void OnCloseWindow(object sender, EventArgs args) { // Disconnect external signal handlers to prevent bloweup TaskManager.TaskAdded -= OnTaskAdded; TaskManager.TaskDeleted -= OnTaskDeleted; TaskManager.TaskStatusChanged -= OnTaskStatusChanged; // The following code has to be done for the MenuBar to // appear properly the next time this window is opened. if (menu_bar != null) { content_vbox.Remove(menu_bar); ActionManager am = Tomboy.ActionManager; am ["NewTaskAction"].Activated -= OnNewTask; am ["OpenTaskAction"].Activated -= OnOpenTask; am ["CloseTaskListWindowAction"].Activated -= OnCloseWindow; am ["DeleteTaskAction"].Activated -= OnDeleteTask; am ["ShowTaskHelpAction"].Activated -= OnShowHelp; } Tomboy.ActionManager.UI.RemoveActionGroup(action_group); Tomboy.ActionManager.UI.RemoveUi(menubar_ui); Hide(); Destroy(); instance = null; }
public static TaskListWindow GetInstance (TaskManager manager) { if (instance == null) instance = new TaskListWindow (manager); System.Diagnostics.Debug.Assert ( instance.manager == manager, "Multiple TaskManagers not supported"); return instance; }
private void OnOpenToDoListAction() { TaskListWindow task_list_window = TaskListWindow.GetInstance(manager); if (task_list_window != null) { task_list_window.Present(); } }
public static TaskListWindow GetInstance(TaskManager manager) { if (instance == null) { instance = new TaskListWindow(manager); } System.Diagnostics.Debug.Assert( instance.manager == manager, "Multiple TaskManagers not supported"); return(instance); }
void OnCloseWindow (object sender, EventArgs args) { // Disconnect external signal handlers to prevent bloweup TaskManager.TaskAdded -= OnTaskAdded; TaskManager.TaskDeleted -= OnTaskDeleted; TaskManager.TaskStatusChanged -= OnTaskStatusChanged; // The following code has to be done for the MenuBar to // appear properly the next time this window is opened. if (menu_bar != null) { content_vbox.Remove (menu_bar); ActionManager am = Tomboy.ActionManager; am ["NewTaskAction"].Activated -= OnNewTask; am ["OpenTaskAction"].Activated -= OnOpenTask; am ["CloseTaskListWindowAction"].Activated -= OnCloseWindow; am ["DeleteTaskAction"].Activated -= OnDeleteTask; am ["ShowTaskHelpAction"].Activated -= OnShowHelp; } Tomboy.ActionManager.UI.RemoveActionGroup (action_group); Tomboy.ActionManager.UI.RemoveUi (menubar_ui); Hide (); Destroy (); instance = null; }