public override void Delete() { IDesigner designer = Dataphoria.GetDesigner(GetBuffer()); if ((designer == null) || ((designer != null) && designer.CloseSafely())) { base.Delete(); } }
private void OpenClicked(object sender, EventArgs args) { IDesigner designer = Dataphoria.GetDesigner(GetBuffer()); if (designer != null) { designer.Select(); } else { OpenDesigner(Dataphoria.GetDefaultDesigner(_documentType)); } }
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); } }