Esempio n. 1
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);
            }
        }