protected override bool HookOnSave() { if (!AssertValidInput()) { return(false); } string newText = CurrText; // Save on Database Table_Kategorie origElem, newElem; origElem = new Table_Kategorie(OrigText); newElem = new Table_Kategorie(newText); origElem.Update(newElem); //Save on UI FrameManager.GetInstance().GetMainToolBar().DataChanged(); CurrText = newText; // DataChanged() kills buffer cache currTreeStore.SetValue(currTreeIter, 0, newText); // Save on this -> base return(true); }
public KategorieChooserTBItem() : base() { cbCategories = new ComboBox(); // Empty box UpdateValues(); var fm = FrameManager.GetInstance(); editCatsButton = new ToggleButton("Edit"); editCatsButton.Clicked += delegate { if (editCatsButton.Active) { fm.ChangeMainFrameMode(DisplayMode.KATEGORIE); } else { fm.ChangeMainFrameMode(DisplayMode.TEXTE); } }; this.PackStart(cbCategories, false, false, 0); this.PackStart(editCatsButton, false, false, 0); }