private void ExportSelectedEchoes_Click(object sender, EventArgs e)
        {
            int index = GetSelectedEchoList();

            if (index == -1)
            {
                MessageBox.Show("Select a single echo list or select the echoes to export first.");
                return;
            }

            Util.WTSaveFileDialog tempSave = new Util.WTSaveFileDialog("echologs", CurrentWSG.CharacterName + ".PT" + (index + 1) + ".echologs");

            try
            {
                if (tempSave.ShowDialog() == DialogResult.OK)
                {
                    SaveSelectedToXmlEchoes(tempSave.FileName(), index);
                }
            }
            catch (Exception ex)
            {
                MessageBox.Show("Error occurred while trying to save locations: " + ex.ToString());
                return;
            }

            MessageBox.Show("Echoes saved to " + tempSave.FileName());
        }
Пример #2
0
 private void ExportToFileLocker_Click(object sender, EventArgs e)
 {
     Util.WTSaveFileDialog ToFile = new Util.WTSaveFileDialog("txt", LockerPartsGroup.Text);
     if (ToFile.ShowDialog() == DialogResult.OK)
     {
         System.IO.File.WriteAllText(ToFile.FileName(), ExportToTextLocker());
     }
 }
Пример #3
0
 private void ExportAllToFileLocations_Click(object sender, EventArgs e)
 {
     Util.WTSaveFileDialog tempSave = new Util.WTSaveFileDialog("locations", "Default.locations");
     try
     {
         if (tempSave.ShowDialog() == DialogResult.OK)
         {
             SaveToXmlLocations(tempSave.FileName());
             MessageBox.Show("Locations saved to " + tempSave.FileName());
         }
     }
     catch (Exception ex)
     {
         MessageBox.Show("Error occurred while trying to save locations: " + ex.ToString());
         return;
     }
 }
Пример #4
0
        private void ExportToXmlLocker_Click(object sender, EventArgs e)
        {
            Util.WTSaveFileDialog fileDlg = new Util.WTSaveFileDialog("xml", db.OpenedLockerFilename());

            if (fileDlg.ShowDialog() == DialogResult.OK)
            {
                LockerTL.SaveToXml(fileDlg.FileName());
            }
        }
Пример #5
0
        private void ExportToXmlGears_Click(object sender, EventArgs e)
        {
            Util.WTSaveFileDialog fileDlg = new Util.WTSaveFileDialog("xml", gearFileName);

            if (fileDlg.ShowDialog() == DialogResult.OK)
            {
                GearTL.SaveToXml(fileDlg.FileName());
            }
        }
        private void ExportToFileSkills_Click(object sender, EventArgs e)
        {
            Util.WTSaveFileDialog tempExport = new Util.WTSaveFileDialog("skills", CurrentWSG.CharacterName + ".skills");

            if (tempExport.ShowDialog() == DialogResult.OK)
            {
                // Create empty xml file
                XmlTextWriter writer = new XmlTextWriter(tempExport.FileName(), new System.Text.ASCIIEncoding());
                writer.Formatting  = Formatting.Indented;
                writer.Indentation = 2;
                writer.WriteStartDocument();
                writer.WriteStartElement("INI");
                writer.WriteEndElement();
                writer.WriteEndDocument();
                writer.Flush();
                writer.Close();

                XmlFile       Skills           = new XmlFile(tempExport.FileName());
                List <string> subsectionnames  = new List <string>();
                List <string> subsectionvalues = new List <string>();

                for (int Progress = 0; Progress < CurrentWSG.NumberOfSkills; Progress++)
                {
                    subsectionnames.Clear();
                    subsectionvalues.Clear();

                    subsectionnames.Add("Level");
                    subsectionnames.Add("Experience");
                    subsectionnames.Add("InUse");
                    subsectionvalues.Add(CurrentWSG.LevelOfSkills[Progress].ToString());
                    subsectionvalues.Add(CurrentWSG.ExpOfSkills[Progress].ToString());
                    subsectionvalues.Add(CurrentWSG.InUse[Progress].ToString());

                    Skills.AddSection(CurrentWSG.SkillNames[Progress], subsectionnames, subsectionvalues);
                }
            }
        }
        private void ExportEchoes_Click(object sender, EventArgs e)
        {
            int index = GetSelectedEchoList();

            if (index == -1)
            {
                MessageBox.Show("Select a playthrough to export first.");
                return;
            }

            try
            {
                Util.WTSaveFileDialog tempExport = new Util.WTSaveFileDialog("echologs", CurrentWSG.CharacterName + ".PT" + (index + 1) + ".echologs");

                if (tempExport.ShowDialog() == DialogResult.OK)
                {
                    SaveToXmlEchoes(tempExport.FileName(), index);
                }
            }
            catch (Exception ex)
            {
                MessageBox.Show("Export failed:\r\n" + ex.ToString());
            }
        }