public static IErrorable <T> SetError <T>(this IErrorable <T> obj, string message) { if (obj == null) { return(null); } obj.HasError = true; obj.Message = message; return(obj); }
private void View_getAllElements <elementType> (IErrorable windowInterface, ICommunicative windowCommunicator) where elementType : Communicator.CommunicatorElement <elementType> { new Task(() => { try { windowCommunicator.ReturnListOfObjects(model.GetAllElements <elementType>().OfType <object>().ToList()); windowCommunicator.PushNotification(goodGettingResult, 0); } catch (Exception ex) { windowCommunicator.PushNotification(badGettingResult, 2); windowInterface.ShowError(ex.Message, ex.HelpLink, errorableTitle); } }).Start(); }
private void View_insertElement <elementType> (IErrorable windowInterface, ICommunicative windowCommunicator, elementType newItem) where elementType : Communicator.CommunicatorElement <elementType> { new Task(() => { try { model.InsertElement <elementType>(newItem); windowCommunicator.PushNotification(goodInsertingResult, 0); } catch (Exception ex) { windowCommunicator.PushNotification(badInsertingResult, 2); windowInterface.ShowError(ex.Message, ex.HelpLink, errorableTitle); } }).Start(); }
private void View_removeListOfElements <elementType> (IErrorable windowInterface, ICommunicative windowCommunicator, List <elementType> itemsToRemove) where elementType : Communicator.CommunicatorElement <elementType> { new Task(() => { try { model.RemoveListOfElements <elementType>(itemsToRemove); windowCommunicator.PushNotification(goodRemovingResult, 0); } catch (Exception ex) { windowCommunicator.PushNotification(badRemovingResult, 2); windowInterface.ShowError(ex.Message, ex.HelpLink, errorableTitle); } }).Start(); }
private void View_find <elementType> (IErrorable windowInterface, ICommunicative windowCommunicator, int elementID) where elementType : Communicator.CommunicatorElement <elementType> { new Task(() => { try { elementType tmp = model.Find <elementType>(elementID); //windowCommunicator.ReturnObject((object)tmp); windowCommunicator.PushNotification(goodGettingResult, 0); } catch (Exception ex) { windowCommunicator.PushNotification(badGettingResult, 2); windowInterface.ShowError(ex.Message, ex.HelpLink, errorableTitle); } }).Start(); }
private void PictureEditorWindow_removePicture(IErrorable arg1, ICommunicative arg3, picture arg2) { removePicture(arg1, arg3, arg2); }
private void PictureEditorWindow_getAllPictures(IErrorable arg, ICommunicative arg1) { getAllPictures(arg, arg1); }
private void PictureEditorWindow_insertPicture(IErrorable arg1, ICommunicative arg3, picture arg2) { insertPicture(arg1, arg3, arg2); }
private void ColorEditorWindow_insertColor(IErrorable arg1, ICommunicative arg3, color arg2) { insertColor(arg1, arg3, arg2); }
private void ColorEditorWindow_removeColor(IErrorable arg1, ICommunicative arg3, color arg2) { removeColor(arg1, arg3, arg2); }
private void StyleEditorWindow_insertStyle(IErrorable arg1, ICommunicative arg3, style arg2) { insertStyle(arg1, arg3, arg2); }
private void TshirtEditorWindow_getAllThsirts(IErrorable arg, ICommunicative arg1) { getAllTshirts(arg, arg1); }
private void TshirtEditorWindow_insertSingleTshirt(IErrorable arg1, ICommunicative arg3, tshirt arg2) { insertTshirt(arg1, arg3, arg2); }
private void TshirtEditorWindow_removeTshirt(IErrorable arg1, ICommunicative arg3, tshirt arg2) { removeTshirt(arg1, arg3, arg2); }
private void StyleEditorWindow_removeStyle(IErrorable arg1, ICommunicative arg3, style arg2) { removeStyle(arg1, arg3, arg2); }
private void _getAllStyles(IErrorable arg, ICommunicative arg1) { getAllStyles(arg, arg1); }
private void CompanyEditorWindow_removeCompany(IErrorable arg1, ICommunicative arg3, company arg2) { removeCompany(arg1, arg3, arg2); }
public Error(IErrorable source, bool isEliminated = false) { Source = source; IsEliminated = isEliminated; }
private void CompanyEditorWindow_insertCompany(IErrorable arg1, ICommunicative arg3, company arg2) { insertCompany(arg1, arg3, arg2); }