Beispiel #1
0
        private void loadLayoutButton_Click(object sender, EventArgs e)
        {
            string message = LoadLayout().Result;

            if (message != "")
            {
                MessageBoxes.InformationMessageBox(message, "Done");
            }
        }
 private void saveAppButton_Click(object sender, EventArgs e)
 {
     try
     {
         if (validations.ValidateApp(nameValue.Text, filePath))
         {
             requestor.AddApplication(new AppModel {
                 FilePath = filePath, Name = nameValue.Text
             });
             Close();
         }
     }
     catch (ValidationException ex)
     {
         MessageBoxes.InformationMessageBox(ex.Message, "Not valid input");
     }
 }
 private void editLayoutButton_Click(object sender, EventArgs e)
 {
     try
     {
         if (manager.EditLayoutModel(nameValue.Text, logic.GetCheckedListBoxItems(aviableAppsCheckListBox), layoutToEdit.Id, layoutToEdit))
         {
             this.Close();
         }
     }
     catch (ValidationException ex)
     {
         MessageBoxes.InformationMessageBox(ex.Message, "Not valid input");
     }
     catch (Exception ex)
     {
         MessageBoxes.WarningMessageBox(ex.Message, "Data files opened");
     }
 }
Beispiel #4
0
        private void createLayoutButton_Click(object sender, EventArgs e)
        {
            List <AppModel> selectedApps = logic.GetCheckedApps(aviableAppsCheckListBox);

            try
            {
                if (manager.CreateNewLayoutModels(nameValue.Text, selectedApps))
                {
                    Close();
                }
            }
            catch (ValidationException ex)
            {
                MessageBoxes.InformationMessageBox(ex.Message, "Not valid input");
            }
            catch (IOException IOe)
            {
                MessageBoxes.WarningMessageBox(IOe.Message, "Data files opened!");
            }
        }