示例#1
0
        public override void Delete()
        {
            IDesigner designer = Dataphoria.GetDesigner(GetBuffer());

            if ((designer == null) || ((designer != null) && designer.CloseSafely()))
            {
                base.Delete();
            }
        }
示例#2
0
        private void OpenClicked(object sender, EventArgs args)
        {
            IDesigner designer = Dataphoria.GetDesigner(GetBuffer());

            if (designer != null)
            {
                designer.Select();
            }
            else
            {
                OpenDesigner(Dataphoria.GetDefaultDesigner(_documentType));
            }
        }
示例#3
0
        private void OpenWithClicked(object sender, EventArgs args)
        {
            DesignerInfo info     = Dataphoria.ChooseDesigner(_documentType);
            IDesigner    designer = Dataphoria.GetDesigner(GetBuffer());

            if (designer != null)
            {
                if (designer.DesignerID != info.ID)
                {
                    if
                    (
                        (
                            MessageBox.Show
                            (
                                Strings.OtherDesignerOpen,
                                Strings.OtherDesignerOpenTitle,
                                MessageBoxButtons.YesNo,
                                MessageBoxIcon.Question,
                                MessageBoxDefaultButton.Button1
                            ) == DialogResult.Yes
                        ) &&
                        designer.CloseSafely()
                    )
                    {
                        OpenDesigner(info);
                    }
                }
                else
                {
                    designer.Select();
                }
            }
            else
            {
                OpenDesigner(info);
            }
        }