Dear visitor, welcome to AnnoZone Forum. If this is your first visit here, please read the Help. It explains in detail how this page works. To use all features of this page, you should consider registering. Please use the registration form, to register here or read more information about the registration process. If you are already registered, please login here.
This post has been edited 1 times, last edit by "kleiner-siedler" (Nov 19th 2009, 11:15am)
Quoted
gibt eine moeglichkeit, mods aus dem manager heraus von der festplatte zu loeschen?
Quoted
und, wenn sich ein mod komplett aktivieren laesst, sollte er das vielleicht auch gleich tun, nachdem man auf aktivieren gedrueckt hat, und sich nach einem test nicht noch bestaetigen lassen. nur mods die dann nur teilweise aktiviert werden wuerden, sollten das melden und sich somit abbrechen lassen.
Source code |
|
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 |
private void Editor_Test_PV_Click(object sender, RoutedEventArgs e) { try { List<AnnoModificationManager.PropriaVilis> i = new List<AnnoModificationManager.PropriaVilis>(); if (this.pvDeveloper != null) { foreach (AnnoModificationManager.PropriaVilis vilis in pvDeveloper.cItems.Items) { i.Add(vilis); } } else { if (this.OpenPV.ShowDialog() == wf.DialogResult.OK) { using (StreamReader reader = new StreamReader(this.OpenPV.FileName)) { BinaryFormatter formatter = new BinaryFormatter(); i = (List<AnnoModificationManager.PropriaVilis>)formatter.Deserialize(reader.BaseStream); } } else return; } if (i.Count > 0) { AnnoModificationManager.PropriaVilisGetter getter = new AnnoModificationManager.PropriaVilisGetter(); getter.insertPV(i); if (getter.ShowDialog() == false) { return; } i = getter.getList(); } try { Directory.Delete("testModules", true); } catch (Exception) { } Thread.Sleep(500); Directory.CreateDirectory("testModules"); Thread.Sleep(500); foreach (KeyValuePair<string, List<AnnoModificationManager.TextModule>> pair in AnnoModificationManager.Utils.DifferTextModules(this.Module_List.Items)) { using (StreamWriter writer = new StreamWriter("testModules//" + pair.Key.Replace(@"", "_").Replace(":", " "), false, pair.Value[0].getEncoding)) { string originalFileData = AnnoModificationManager.Utils.RemoveEmptys(pair.Value[0].originalFileData); foreach (AnnoModificationManager.TextModule module in pair.Value) { originalFileData = module.Modify(originalFileData, i); } writer.Write(originalFileData); continue; } } Process.Start(Path.GetFullPath("testModules")); this.CheckTest(i); } catch (Exception exception) { AnnoModificationManager.MessageWindow.Show("Fehler: " + exception.Message); } } private void Editor_Test_Click(object sender, RoutedEventArgs e) { try { try { Directory.Delete("testModules", true); } catch (Exception) { } Thread.Sleep(500); Directory.CreateDirectory("testModules"); Thread.Sleep(500); foreach (KeyValuePair<string, List<AnnoModificationManager.TextModule>> pair in AnnoModificationManager.Utils.DifferTextModules(this.Module_List.Items)) { using (StreamWriter writer = new StreamWriter("testModules//" + pair.Key.Replace(@"", "_").Replace(":", " "), false, pair.Value[0].getEncoding)) { string originalFileData = AnnoModificationManager.Utils.RemoveEmptys(pair.Value[0].originalFileData); foreach (AnnoModificationManager.TextModule module in pair.Value) { originalFileData = module.Modify(originalFileData); } writer.Write(originalFileData); continue; } } this.CheckTest(); Process.Start(Path.GetFullPath("testModules")); } catch (Exception exception) { AnnoModificationManager.MessageWindow.Show("Fehler: " + exception.Message); } } private void CheckTest() { //try { using (StreamWriter writer = new StreamWriter(@"testModules\Log.txt")) { foreach (KeyValuePair<string, List<AnnoModificationManager.TextModule>> pair in AnnoModificationManager.Utils.DifferTextModules(this.Module_List.Items)) { writer.WriteLine("---> File " + pair.Key + " --------------------------------"); using (StreamReader reader = new StreamReader("testModules//" + pair.Key.Replace(@"", "_").Replace(":", " "))) { string str = AnnoModificationManager.Utils.RemoveEmptys(reader.ReadToEnd()); //str = str.Replace("\r\n", ""); foreach (AnnoModificationManager.TextModule module in pair.Value) { writer.WriteLine("***********"); writer.WriteLine(string.Concat(new object[] { "# Textmodule ", pair.Value.IndexOf(module) + 1, " of ", pair.Value.Count, " #" })); writer.WriteLine("# ModuleID: " + module.ModuleID); writer.WriteLine("# Identifiers: " + module.getIdentifiers); writer.WriteLine("# Destination File: " + module.getFilename); string modified = module.getModified(); bool active = AnnoModificationManager.Utils.StringContains(str, modified); /*if (active == false) { object nx = 1; nx.ToString(); }*/ writer.WriteLine("# -----> Status: " + active.ToString().ToUpper()); writer.WriteLine(""); writer.WriteLine(module.getModified()); writer.WriteLine(""); } continue; } } } Process.Start(@"testModules\Log.txt"); } /*catch (Exception exception) { AnnoModificationManager.MessageWindow.Show("Fehler: " + exception.Message); }*/ } private void CheckTest(List<AnnoModificationManager.PropriaVilis> pvs) { try { using (StreamWriter writer = new StreamWriter(@"testModules\Log.txt")) { foreach (KeyValuePair<string, List<AnnoModificationManager.TextModule>> pair in AnnoModificationManager.Utils.DifferTextModules(this.Module_List.Items)) { writer.WriteLine("---> File " + pair.Key + " --------------------------------"); using (StreamReader reader = new StreamReader("testModules//" + pair.Key.Replace(@"", "_").Replace(":", " "))) { string str = AnnoModificationManager.Utils.RemoveEmptys(reader.ReadToEnd()); foreach (AnnoModificationManager.TextModule module in pair.Value) { writer.WriteLine("***********"); writer.WriteLine(string.Concat(new object[] { "# Textmodule ", pair.Value.IndexOf(module) + 1, " of ", pair.Value.Count, " #" })); writer.WriteLine("# ModuleID: " + module.ModuleID); writer.WriteLine("# Identifiers: " + module.getIdentifiers); writer.WriteLine("# Destination File: " + module.getFilename); string modified = module.getModified(); bool active = str.Contains(modified); writer.WriteLine("# -----> Status: " + active.ToString().ToUpper()); writer.WriteLine(""); writer.WriteLine(module.getModified(pvs)); writer.WriteLine(""); } continue; } } } Process.Start(@"testModules\Log.txt"); } catch (Exception exception) { AnnoModificationManager.MessageWindow.Show("Fehler: " + exception.Message); } } |
This post has been edited 1 times, last edit by "mrboese" (Nov 19th 2009, 5:29pm)
This post has been edited 1 times, last edit by "mrboese" (Nov 20th 2009, 8:40pm)
3 guests