Esempio n. 1
0
 private void newToolStripMenuItem1_Click(object sender, EventArgs e)
 {
     SaveFileDialog dialog = new SaveFileDialog() { Title = "Select where to save the XML", Filter = "eXtended Markup Language (*.xml)|*.xml" };
     if (dialog.ShowDialog() != DialogResult.OK) return;
     List<IWzObject> objs = new List<IWzObject>();
     foreach (WzNode node in MainPanel.DataTree.SelectedNodes)
         if (node.Tag is IWzObject)
             objs.Add((IWzObject)node.Tag);
     WzNewXmlSerializer serializer = new WzNewXmlSerializer(UserSettings.Indentation, UserSettings.LineBreakType);
     threadDone = false;
     runningThread = new Thread(new ParameterizedThreadStart(RunWzObjExtraction));
     runningThread.Start((object)new object[] { objs, dialog.FileName, serializer });
     new Thread(new ParameterizedThreadStart(ProgressBarThread)).Start(serializer);
 }
Esempio n. 2
0
 private void newToolStripMenuItem1_Click(object sender, EventArgs e)
 {
     SaveFileDialog dialog = new SaveFileDialog() { Title = HaRepacker.Properties.Resources.SelectOutXml, Filter = string.Format("{0}|*.xml", HaRepacker.Properties.Resources.XmlFilter) };
     if (dialog.ShowDialog() != DialogResult.OK) return;
     List<WzObject> objs = new List<WzObject>();
     foreach (WzNode node in MainPanel.DataTree.SelectedNodes)
         if (node.Tag is WzObject)
             objs.Add((WzObject)node.Tag);
     WzNewXmlSerializer serializer = new WzNewXmlSerializer(UserSettings.Indentation, UserSettings.LineBreakType);
     threadDone = false;
     runningThread = new Thread(new ParameterizedThreadStart(RunWzObjExtraction));
     runningThread.Start((object)new object[] { objs, dialog.FileName, serializer });
     new Thread(new ParameterizedThreadStart(ProgressBarThread)).Start(serializer);
 }