Пример #1
0
        private void new_btn_Click(object sender, EventArgs e)
        {
            if (doc1.DrawObjectList.Count > 0)
            {
                SaveOfNew save_form = new SaveOfNew();
                save_form.StartPosition = FormStartPosition.CenterParent;
                switch (save_form.ShowDialog())
                {
                case DialogResult.Yes:
                    SaveFileDialog saveFile = new SaveFileDialog();
                    saveFile.Filter           = "configuration (*.xml)|*.xml";
                    saveFile.InitialDirectory = "";
                    saveFile.Title            = "存储文件";
                    saveFile.FileName         = "";
                    SaveFile(saveFile);
                    document.DrawObjectList.Clear();
                    DrawRegion.Invalidate();
                    break;

                case DialogResult.No:
                    document.DrawObjectList.Clear();
                    DrawRegion.Invalidate();
                    break;
                }
            }
        }
Пример #2
0
 private void new_btn_Click(object sender, EventArgs e)
 {
     if (drawDoc.DrawObjectList.Count > 0)
     {
         SaveOfNew save_form = new SaveOfNew();
         save_form.StartPosition = FormStartPosition.CenterParent;
         switch (save_form.ShowDialog())
         {
             case DialogResult.Yes:
                 SaveFileDialog saveFile = new SaveFileDialog();
                 saveFile.Filter = "configuration (*.xml)|*.xml";
                 saveFile.InitialDirectory = "";
                 saveFile.Title = "存储文件";
                 saveFile.FileName = "";
                 SaveFile(saveFile);
                 UpdateFormTitle();
                 drawDoc.DrawObjectList.Clear();
                 drawDoc.SelectedDrawObjectList.Clear();
                 proRegion.treeNodeList.Clear();
                 proRegion.treeView1.Nodes[0].Nodes.Clear();
                 this.workRegion.pictureBox1.Invalidate();
                 this.proRegion.Invalidate();
                 break;
             case DialogResult.No:
                 drawDoc.DrawObjectList.Clear();
                 drawDoc.SelectedDrawObjectList.Clear();
                 proRegion.treeNodeList.Clear();
                 proRegion.treeView1.Nodes[0].Nodes.Clear();
                 this.workRegion.pictureBox1.Invalidate();
                 this.proRegion.Invalidate();
                 break;
         }
     }
 }
Пример #3
0
 private void new_btn_Click(object sender, EventArgs e)
 {
     if (doc1.DrawObjectList.Count > 0)
     {
         SaveOfNew save_form = new SaveOfNew();
         save_form.StartPosition = FormStartPosition.CenterParent;
         switch (save_form.ShowDialog())
         {
             case DialogResult.Yes:
                 SaveFileDialog saveFile = new SaveFileDialog();
         saveFile.Filter = "configuration (*.xml)|*.xml";
         saveFile.InitialDirectory = "";
         saveFile.Title = "存储文件";
         saveFile.FileName = "";
                 SaveFile(saveFile);
                 document.DrawObjectList.Clear();
                 DrawRegion.Invalidate();
                 break;
             case DialogResult.No:
                 document.DrawObjectList.Clear();
                 DrawRegion.Invalidate();
                 break;
         }
     }
 }