Example #1
0
        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);
        }
Example #2
0
 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();
 }
Example #3
0
 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();
 }
Example #4
0
 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();
 }
Example #5
0
 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();
 }
Example #6
0
 private void PictureEditorWindow_removePicture(IErrorable arg1, ICommunicative arg3, picture arg2)
 {
     removePicture(arg1, arg3, arg2);
 }
Example #7
0
 private void PictureEditorWindow_getAllPictures(IErrorable arg, ICommunicative arg1)
 {
     getAllPictures(arg, arg1);
 }
Example #8
0
 private void PictureEditorWindow_insertPicture(IErrorable arg1, ICommunicative arg3, picture arg2)
 {
     insertPicture(arg1, arg3, arg2);
 }
Example #9
0
 private void ColorEditorWindow_insertColor(IErrorable arg1, ICommunicative arg3, color arg2)
 {
     insertColor(arg1, arg3, arg2);
 }
Example #10
0
 private void ColorEditorWindow_removeColor(IErrorable arg1, ICommunicative arg3, color arg2)
 {
     removeColor(arg1, arg3, arg2);
 }
Example #11
0
 private void StyleEditorWindow_insertStyle(IErrorable arg1, ICommunicative arg3, style arg2)
 {
     insertStyle(arg1, arg3, arg2);
 }
Example #12
0
 private void TshirtEditorWindow_getAllThsirts(IErrorable arg, ICommunicative arg1)
 {
     getAllTshirts(arg, arg1);
 }
Example #13
0
 private void TshirtEditorWindow_insertSingleTshirt(IErrorable arg1, ICommunicative arg3, tshirt arg2)
 {
     insertTshirt(arg1, arg3, arg2);
 }
Example #14
0
 private void TshirtEditorWindow_removeTshirt(IErrorable arg1, ICommunicative arg3, tshirt arg2)
 {
     removeTshirt(arg1, arg3, arg2);
 }
Example #15
0
 private void StyleEditorWindow_removeStyle(IErrorable arg1, ICommunicative arg3, style arg2)
 {
     removeStyle(arg1, arg3, arg2);
 }
Example #16
0
 private void _getAllStyles(IErrorable arg, ICommunicative arg1)
 {
     getAllStyles(arg, arg1);
 }
Example #17
0
 private void CompanyEditorWindow_removeCompany(IErrorable arg1, ICommunicative arg3, company arg2)
 {
     removeCompany(arg1, arg3, arg2);
 }
Example #18
0
 public Error(IErrorable source, bool isEliminated = false)
 {
     Source       = source;
     IsEliminated = isEliminated;
 }
Example #19
0
 private void CompanyEditorWindow_insertCompany(IErrorable arg1, ICommunicative arg3, company arg2)
 {
     insertCompany(arg1, arg3, arg2);
 }