コード例 #1
0
        private void zTeamToolStripMenuItem_Click(object sender, EventArgs e)
        {
            string         FilePath;
            SaveFileDialog Dialog = new SaveFileDialog();

            Dialog.InitialDirectory = m_SaveFolderPath;
            Dialog.Filter           = "ZT Config File (*.xml)|*.xml";

            if (Dialog.ShowDialog() == DialogResult.OK)
            {
                m_SaveFolderPath = Path.GetDirectoryName(Dialog.FileName);
                Properties.Settings.Default.SaveFolder = m_SaveFolderPath;
                FilePath = Dialog.FileName;
            }
            else
            {
                return;
            }
            swapItemInfo();
            m_File.SaveAsXml(FilePath, m_Items);
            m_IsSaved = true;
            MessageBox.Show(FilePath + " has been saved", "zFileManager");
            Properties.Settings.Default.SaveFolder = Path.GetDirectoryName(FilePath);
            Properties.Settings.Default.Save();
        }
コード例 #2
0
 private void xmlToolStripMenuItem_Click(object sender, EventArgs e)
 {
     if (m_File.AllowedConversationModes.Contains(BmdFile.BmdConversationType.BmdToXml))
     {
         string fpath = SaveAsXmlDialog();
         if (!string.IsNullOrEmpty(fpath))
         {
             m_File.SaveAsXml(fpath, dataGridView1);
         }
     }
     else
     {
         MessageBox.Show("This BMD file cannot be saved as xml.");
     }
 }