コード例 #1
0
 private void saveToolStripMenuItem_Click(object sender, EventArgs e)
 {
     if (DlgSave.ShowDialog() == DialogResult.OK)
     {
         bmp.Save(DlgSave.FileName, ImageFormat.Bmp);
     }
 }
コード例 #2
0
 private void cmdBackup_Click(object sender, EventArgs e)
 {
     DlgSave.FileName = String.Format("Backup_{0:yyyyMMdd_hhmm}", DateTime.Now);
     if (DlgSave.ShowDialog() == DialogResult.OK) // if save dialog success
     {
         BackupProgress.Style = ProgressBarStyle.Marquee;
         Thread BackupThread = new Thread(backup);
         BackupThread.Start(DlgSave.FileName); // start backup in new Thread
         cmdBackup.Enabled = false;
     }
 }
コード例 #3
0
        private void 저장하기ToolStripMenuItem_Click(object sender, EventArgs e)
        {
            DlgSave.InitialDirectory = KAssetDir;
            DlgSave.Filter           = "오브젝트 셋 파일 (*.xml)|*.xml";
            DlgSave.DefaultExt       = ".xml";
            DlgSave.FileName         = "";
            DlgSave.Title            = "오브젝트 셋 저장하기";

            if (DlgSave.ShowDialog() == DialogResult.OK)
            {
                Manager.SaveToFile(DlgSave.FileName);
            }
        }
コード例 #4
0
        private void CmdSave_Click(object sender, System.EventArgs e)
        {
            if (DlgSave.ShowDialog() != DialogResult.OK)
            {
                return;
            }

            using (var fs = new FileStream(DlgSave.FileName, FileMode.Create))
            {
                var xs = new XmlSerializer(typeof(Cron));
                xs.Serialize(fs, CronTab);
            }
        }