15 public override void OnInit()
17 this.transUpload.SetActive(
false);
18 this.buttonSubmit.interactable =
false;
19 if (!
ELayer.config.nameReport.IsEmpty())
21 this.inputName.text =
ELayer.config.nameReport;
23 else if (
ELayer.core.IsGameStarted)
25 this.inputName.text =
"nameBraced".lang(
ELayer.pc.NameSimple,
ELayer.pc.Aka,
null,
null,
null);
27 if (!
ELayer.config.emailReport.IsEmpty())
29 this.inputEmail.text =
ELayer.config.emailReport;
31 this.inputVersion.text =
ELayer.core.version.GetText() +
"/" +
ELayer.config.lang;
32 this.inputLang.text =
ELayer.config.lang;
35 this.collector.onSubmit = delegate()
39 this.category.Init((
string s) => (
"form_" + s).lang());
40 List<GameIndex> gameList =
GameIO.GetGameList();
41 if (gameList.Count > 0)
44 this.saveIndex = gameList[0];
45 for (
int i = 0; i < gameList.Count; i++)
47 if (
ELayer.core.IsGameStarted && gameList[i].id ==
Game.id)
50 this.saveIndex = gameList[i];
53 this.ddSave.SetList<
GameIndex>(index, gameList, (
GameIndex a,
int b) => ((ELayer.core.IsGameStarted && a.id ==
Game.id) ?
"currentSave".lang() :
"") + a.FormTitle, delegate(
int a,
GameIndex b)
60 this.toggleSave.SetActive(
false);
62 this.toggleSave.onValueChanged.AddListener(delegate(
bool a)
64 this.ddSave.SetActive(a);
66 this.toggleSave.isOn =
false;
67 this.ddSave.SetActive(this.toggleSave.isOn);
69 this.inputDetail.onValueChanged.AddListener(delegate(
string a)
73 this.inputSummary.onValueChanged.AddListener(delegate(
string a)
81 public void Validate()
83 bool interactable =
true;
84 if (this.inputSummary.text.Length < 4)
88 if (this.inputDetail.text.Length < 4)
92 this.buttonSubmit.interactable = interactable;
96 public void CollectFiles()
98 string str = Application.persistentDataPath +
"/";
99 string text = str +
"_temp";
100 string text2 = text +
"/log.zip";
101 IO.CreateDirectory(text);
102 IO.Copy(str +
"Player.log", text);
103 IO.Copy(str +
"Player-prev.log", text);
104 IO.SaveText(text +
"/System.txt", this.GetSystemText());
105 using (ZipFile zipFile =
new ZipFile())
107 zipFile.ExtractExistingFile = ExtractExistingFileAction.OverwriteSilently;
108 zipFile.AddDirectory(text);
111 this.form.CurrentReport.AttachFile(
"log.zip", File.ReadAllBytes(text2));
112 if (this.toggleSave.isOn)
114 string text3 = text +
"/save.zip";
115 using (ZipFile zipFile2 =
new ZipFile())
117 zipFile2.ExtractExistingFile = ExtractExistingFileAction.OverwriteSilently;
118 zipFile2.AddDirectory(
GameIO.pathSaveRoot +
this.saveIndex.id);
119 zipFile2.Save(text3);
121 this.form.CurrentReport.AttachFile(this.saveIndex.id +
".zip", File.ReadAllBytes(text3));
123 IO.DeleteDirectory(text);
127 public void OnCancel()
129 LayerFeedback.lastDetail = this.inputDetail.text;
130 LayerFeedback.lastSummary = this.inputSummary.text;
136 public void OnSubmit()
138 if (!this.inputEmail.text.IsEmpty())
140 ELayer.config.emailReport = this.inputEmail.text;
142 if (!this.inputName.text.IsEmpty())
144 ELayer.config.nameReport = this.inputName.text;
146 this.transUpload.SetActive(
true);
147 this.form.IncludeScreenshot = this.toggleScreenshot.isOn;
148 this.cgForm.alpha = 0.5f;
149 this.form.transform.SetParent(
ELayer.ui.transform,
false);
151 LayerFeedback.lastDetail = (LayerFeedback.lastSummary =
"");
155 public string GetSystemText()
158 CS$<>8__locals1.txt =
"";
159 LayerFeedback.<GetSystemText>g__Append|24_0(
"OS: " + SystemInfo.operatingSystem, ref CS$<>8__locals1);
160 LayerFeedback.<GetSystemText>g__Append|24_0(
"Processor: " + SystemInfo.processorType, ref CS$<>8__locals1);
161 LayerFeedback.<GetSystemText>g__Append|24_0(
"Memory: " + SystemInfo.systemMemorySize.ToString(), ref CS$<>8__locals1);
162 LayerFeedback.<GetSystemText>g__Append|24_0(
"Graphics API: " + SystemInfo.graphicsDeviceType.ToString(), ref CS$<>8__locals1);
163 LayerFeedback.<GetSystemText>g__Append|24_0(
"Graphics Processor: " + SystemInfo.graphicsDeviceName, ref CS$<>8__locals1);
164 LayerFeedback.<GetSystemText>g__Append|24_0(
"Graphics Memory: " + SystemInfo.graphicsMemorySize.ToString(), ref CS$<>8__locals1);
165 LayerFeedback.<GetSystemText>g__Append|24_0(
"Graphics Vendor: " + SystemInfo.graphicsDeviceVendor, ref CS$<>8__locals1);
166 LayerFeedback.<GetSystemText>g__Append|24_0(
"Quality Level: " + QualitySettings.names[QualitySettings.GetQualityLevel()], ref CS$<>8__locals1);
167 LayerFeedback.<GetSystemText>g__Append|24_0(
"Resolution: " + Screen.width.ToString() +
"x" + Screen.height.ToString(), ref CS$<>8__locals1);
168 LayerFeedback.<GetSystemText>g__Append|24_0(
"Full Screen: " + Screen.fullScreen.ToString(), ref CS$<>8__locals1);
169 return CS$<>8__locals1.txt;
174 internal static void <GetSystemText>g__Append|24_0(
string s, ref
LayerFeedback.<>c__DisplayClass24_0 A_1)
176 A_1.txt = A_1.txt + s + Environment.NewLine;
180 public static string lastSummary =
"";
183 public static string lastDetail =
"";
186 public UIText textProgress;
189 public InputField inputVersion;
192 public InputField inputName;
195 public InputField inputEmail;
198 public InputField inputLang;
201 public InputField inputSummary;
204 public InputField inputDetail;
207 public FeedbackForm form;
210 public DebugLogCollector collector;
213 public Transform transUpload;
216 public UIDropdown ddSave;
219 public Toggle toggleSave;
222 public Toggle toggleScreenshot;
228 public CanvasGroup cgForm;
231 public CategoryDropdown category;
234 public Button buttonSubmit;