void RouteEdit() { int i = TableRoutes.SelectedRow; if (i != -1) { TableRoutingControllerItem item = TableRoutingController.Items [i]; WindowPreferencesRouteController.Item = item; WindowPreferencesRouteController dlg = new WindowPreferencesRouteController(); dlg.Window.ReleasedWhenClosed = true; NSApplication.SharedApplication.RunModalForWindow(dlg.Window); dlg.Window.Close(); TableRoutingController.RefreshUI(); this.EnableIde(); } }
void RouteAdd() { TableRoutingControllerItem item = new TableRoutingControllerItem(); item.Ip = ""; item.Icon = "out"; item.Action = "out"; item.Notes = ""; WindowPreferencesRouteController.Item = item; WindowPreferencesRouteController dlg = new WindowPreferencesRouteController(); dlg.Window.ReleasedWhenClosed = true; NSApplication.SharedApplication.RunModalForWindow(dlg.Window); dlg.Window.Close(); if (dlg.Accepted) { TableRoutingController.Items.Add(item); TableRoutingController.RefreshUI(); } this.EnableIde(); }