Example #1
0
        private void DevDesignerShellForm_FormClosing(object sender, FormClosingEventArgs e)
        {
            BasicDesignerViewer basicDesignerViewer = CurrentDesignerViewer;

            if (basicDesignerViewer != null && basicDesignerViewer.WantSave)
            {
                switch (XtraMessageBox.Show("设计已修改并且未保存,需要保存吗", "提示", MessageBoxButtons.YesNoCancel, MessageBoxIcon.Question))
                {
                case DialogResult.Yes:
                    basicDesignerViewer.Save(false);
                    break;

                case DialogResult.Cancel:
                    e.Cancel = true;
                    break;
                }
            }
        }
Example #2
0
        public void SaveDesignerViewer()
        {
            BasicDesignerViewer basicDesignerViewer = CurrentDesignerViewer;

            basicDesignerViewer.Save(false);
        }