public void CallDeleteOptionsWindowShow(DeleteOptionsWindow optionsWindow, object objectToDelete) { if (DeleteOptionsWindowShow != null) { DeleteOptionsWindowShow(optionsWindow, objectToDelete); } }
public void CallDeleteConfirm(DeleteOptionsWindow optionsWindow, object deletedObject) { if (DeleteConfirm != null) { DeleteConfirm(optionsWindow, deletedObject); } }
internal void DeleteConfirm(DeleteOptionsWindow window, object objectToDelete) { CallMethodOnPlugin( delegate(PluginBase plugin) { plugin.CallDeleteConfirm(window, objectToDelete); }, "ConfirmDelete" ); }
internal void ShowDeleteDialog(DeleteOptionsWindow window, object objectToDelete) { CallMethodOnPlugin( delegate(PluginBase plugin) { plugin.CallDeleteOptionsWindowShow(window, objectToDelete); }, "ShowDeleteDialog" ); }
DialogResult ShowDeleteDialog(object objectToDelete, out DeleteOptionsWindow optionsWindow) { string titleText; if (objectToDelete is ComponentSave) { titleText = "Delete Component?"; } else if (objectToDelete is ScreenSave) { titleText = "Delete Screen?"; } else if (objectToDelete is InstanceSave) { titleText = "Delete Instance?"; } else { titleText = "Delete?"; } optionsWindow = new DeleteOptionsWindow(); optionsWindow.Text = titleText; optionsWindow.Message = "Are you sure you want to delete:\n" + objectToDelete.ToString(); optionsWindow.ObjectToDelete = objectToDelete; PluginManager.Self.ShowDeleteDialog(optionsWindow, objectToDelete); DialogResult result = optionsWindow.ShowDialog(); return result; }