void ControllerMainStoreWindow_SaveButtonClicked(object sender, ObjectEventArgs e) { string message; string path = (string)e.Data; if (!ControllerXMLManager.TrySerializeToXML(path, controllerBookStore, out message)) { ControlerMessager.ShowMessage(message); } }
void ControllerMainStoreWindow_OpenButtonClicked(object sender, ObjectEventArgs e) { string message; string path = (string)e.Data; if (!ControllerXMLManager.TryDeserializeFromXML(path, ref controllerBookStore, out message)) { ControlerMessager.ShowError(message); } else { ControllerMainStoreWindow.DGVStoreSource = controllerBookStore.StoreBooksBindingList; } }
void ControllerMainStoreWindow_AddButtonClicked(object sender, ObjectEventArgs e) { controllerBookStore.AddBook((T)e.Data); }
void ControllerMainStoreWindow_DeleteButtonClicked(object sender, ObjectEventArgs e) { controllerBookStore.RemoveBookAt((int)e.Data); }
void ControllerMainStoreWindow_EditButtonClicked(object sender, ObjectEventArgs e) { ControllerMainStoreWindow.EditingBook = controllerBookStore.ReturnBookAt((int)e.Data); }
void ControllerMainStoreWindow_ErrorOccurred(object sender, ObjectEventArgs e) { ControlerMessager.ShowError((string)e.Data); }