示例#1
0
文件: Form1.cs 项目: Key-F/medGraph
 private void Form1_FormClosing(object sender, FormClosingEventArgs e)
 {
     try
     {
         FormSerialisor.Serialise(this, Application.StartupPath + @"\serialise.xml");
     }
     catch (Exception) { MessageBox.Show("Ошибка сериализации"); }
 }
示例#2
0
        public void SaveGame(Form form)
        {
            SaveFileDialog saveWeekend = new SaveFileDialog();

            saveWeekend.Filter = "XML files (*.XML)|*.XML";

            if (saveWeekend.ShowDialog() == DialogResult.OK)
            {
                FormSerialisor.Serialise(form, saveWeekend.FileName + ".xml");
            }
        }
示例#3
0
        private void button6_Click(object sender, EventArgs e)
        {
            SaveFileDialog dialog = new SaveFileDialog();

            dialog.Filter      = "xml files (*.xml)|*.xml|All files (*.*)|*.*";
            dialog.FilterIndex = 1;
            dialog.FileName    = "sizing";

            if (dialog.ShowDialog() == DialogResult.OK)
            {
                FormSerialisor.Serialise(this, dialog.FileName + "");
            }
        }
示例#4
0
 private void Form1_FormClosing(object sender, FormClosingEventArgs e)
 {
     outp.Text = "";
     button2_Click(sender, null);
     try
     {
         FormSerialisor.Serialise(this, ProgramFilesFolder + @"\vrpd.xml");
     }
     catch (Exception)
     {
     }
     finally
     {
     };
 }
示例#5
0
        void btnSaveProfile_Click(object sender, EventArgs e)
        {
            if (txtProfileName.Text.Length == 0)
            {
                return;
            }

            if (File.Exists(ProfilePath) && lstProfiles.Text != Path.GetFileNameWithoutExtension(ProfilePath))
            {
                if (DialogResult.No == MessageBox.Show("Profile name already exists. Do you want to overwrite?", "Profile Name", MessageBoxButtons.YesNo, MessageBoxIcon.Question))
                {
                    return;
                }
            }

            FormSerialisor.Serialise(this, ProfilePath);
            Trace.TraceInformation("Saved");
            LoadProfiles();
        }
 private void btnSave_Click(object sender, EventArgs e)
 {
     FormSerialisor.Serialise(this, Common.getApplicationFolder() + Const.SETTING_XML);
     this.Close();
 }
示例#7
0
 private void CowinNotifier_FormClosing(object sender, FormClosingEventArgs e)
 {
     FormSerialisor.Serialise(this, Application.StartupPath + @"\serialise.xml");
 }