Example #1
0
        /** Method initiaties the process of updating the attendance process */
        private void saveButton_Click(object sender, System.EventArgs e)
        {
            FeedbackWindow message = new FeedbackWindow();

            if (attendanceOptions.SelectedIndex != 0)
            {
                BookingController        controller     = new BookingController();
                string                   selectedOption = (attendanceOptions.SelectedItem as ListItem).text;
                Dictionary <string, int> options        = controller.getAttendanceOptions()[selectedOption];
                booking.setAttendance(options["attendance"]);
                booking.setConfirmation(options["confirmation"]);
                booking.setLackOfCancellation(options["lackOfCancellation"]);
                if (controller.updateAttendanceStatus(booking))
                {
                    message.setMessageForSuccessfullOperation();
                }
                else
                {
                    message.setMessageForSavingError();
                }
                parent.getAppointmentBoxes();
                this.Hide();
            }
            else
            {
                message.setCustomizedMessage(ATTENDANCE_OPTION_NOT_SELECTED);
            }
            message.Show();
        }
 public ManagerFeedbackViewModel(String username, FeedbackWindow parent)
 {
     this.Username = username;
     this.parent   = parent;
     GenerateTypes();
     ConfirmCommand = new MyICommand(Confirm);
 }
        /** Method initiates process of saving a booking */
        private void saveBookingButton_Click(object sender, EventArgs e)
        {
            BookingController controller = new BookingController();
            string            startTime  = timeOfBooking.Text.Substring(0, 5);
            string            endTime    = timeOfBooking.Text.Substring(7);
            int userId = ApplicationState.userId;

            if (ApplicationState.userType == "admin")
            {
                if ((int)patientListBox.SelectedValue == 0)
                {
                    FeedbackWindow message = new FeedbackWindow();
                    message.setCustomizedMessage("You are required to choose a patient");
                    message.Show();
                    return;
                }
                else
                {
                    userId = (int)patientListBox.SelectedValue;
                }
            }
            bool result = false;

            result = controller.bookAppointment(commentTextField.Text, startTime, endTime, userId, staffScheduleId);
            this.reloadScheduleOrShowFeedbackWindowBasedOnResult(result);
            if (result && (printCheckBox.Checked || emailCheckBox.Checked))
            {
                PrintingPrompt printingPrompt = new PrintingPrompt(this.date, startTime, endTime, this.doctorsName, staffScheduleId);
                printingPrompt.Show();
            }
        }
Example #4
0
    // Update is called once per frame
    void Update()
    {
        if (m_CommandWindow == null)
        {
            m_CommandWindow = FindObjectOfType <CommandWindow>();
            if (m_CommandWindow != null)
            {
                m_CommandWindow.onMessageSentCallback += OnMessageSentCallback;
                m_ClientWorld.GetExistingSystem <S_HandleTextReceived>().CommandWindow = m_CommandWindow;
            }
        }

        if (m_FeedbackWindow == null)
        {
            m_FeedbackWindow = FindObjectOfType <FeedbackWindow>();
            if (m_FeedbackWindow != null)
            {
                m_ClientWorld.GetExistingSystem <S_HandleVisorMessageReceived>().FeedbackWindow = m_FeedbackWindow;
            }
        }

        if (m_AssetDatabase == null)
        {
            m_AssetDatabase = FindObjectOfType <GameAssetDatabase>();
            if (m_AssetDatabase != null)
            {
                m_ClientWorld.GetExistingSystem <S_HandleTextReceived>().GameAssetDatabase = m_AssetDatabase;
            }
        }

        ug_Network.Update();

        m_ClientWorld.EntityManager.CompleteAllJobs();
        b_EndOfFrame.Update();
    }
Example #5
0
        public void CheckRulesForPFD(object sender, EventArgs e)
        {
            //Stop listening for changed events since our ruleManager causes changes
            EquationEditor.EquationTokensChanged -= new EventHandler(CheckRulesForPFD);

            if (!isLoadingFile)
            {
                var iPropertiesWindows = from c in DrawingCanvas.ChildIPfdElements
                                         where c is IPropertiesWindow
                                         select c as IPropertiesWindow;

                var pfdElements = DrawingCanvas.ChildIPfdElements;

                foreach (IPfdElement pfdElement in pfdElements)
                {
                    pfdElement.RemoveFeedback();
                }

                //AC TODO: Update rules validation for equations
                //ruleManager.Validate(pfdElements, EquationEditor.EquationsData, userDefinedVaraibles);
                FeedbackWindow.updateFeedbackWindow(ruleManager.ErrorMessages);
                ValidationChecked(this, EventArgs.Empty);
            }

            //ok done changing stuff listen for changed events again
            EquationEditor.EquationTokensChanged += new EventHandler(CheckRulesForPFD);
        }
Example #6
0
 /** Method prepares staff drop down and initializes ListItem and FeedbackWindow classes */
 public addStaffMember()
 {
     InitializeComponent();
     this.itemsForComboBoxes = new ListItem();
     this.feedback           = new FeedbackWindow();
     fillInDropDownStaffTypeMenu();
     staffTypes.DropDownStyle = ComboBoxStyle.DropDownList;
 }
 /** Method constructs the class and fills the doctors menu */
 public addStaffExceptionDay()
 {
     InitializeComponent();
     this.feedbackWindow = new FeedbackWindow();
     this.fillInTheDropDownMenuWithAllTheDoctors();
     allTheDoctors.DropDownStyle = ComboBoxStyle.DropDownList;
     this.prepareDateTimePickers();
 }
Example #8
0
        private static void OpenLogs()
        {
            var logFile = FeedbackWindow.GetCharonLogFilesSortedByCreationTime().FirstOrDefault();

            if (string.IsNullOrEmpty(logFile) == false)
            {
                EditorUtility.OpenWithDefaultApp(logFile);
            }
        }
Example #9
0
    // Use this for initialization
    void Start()
    {
        // Locate the class in scene
        _feedbackWindow = GameObject.Find("FeedbackPanel").GetComponent <FeedbackWindow>();

        // setup the window
        _feedbackWindow.Setup(SendFeedbackPressed);
        ElasticEmailClient.Details = new ElasticEmailDetails(string.Empty, string.Empty, string.Empty, string.Empty, string.Empty);
    }
Example #10
0
        private void ContactUs_Click(object sender, RoutedEventArgs e)
        {
            FeedbackWindow fb = new FeedbackWindow(color);

            fb.Top          = Window.GetWindow(this).Top;
            fb.Left         = Window.GetWindow(this).Left;
            fb.Main.Content = new FeedbackPage(username);
            fb.Show();
        }
 /**
  * Method reloads schedule or shows feedback windown based on result passed as parameter
  *
  * @param result of saving the appointment
  */
 private void reloadScheduleOrShowFeedbackWindowBasedOnResult(bool result)
 {
     if (result)
     {
         parent.reloadSchedule();
         this.Close();
     }
     else
     {
         FeedbackWindow window = new FeedbackWindow();
         window.setMessageForBookingProblem();
         window.Show();
     }
 }
 /** Method changes date to previous month */
 private void previousMonthButton_Click(object sender, EventArgs e)
 {
     if (this.date.AddMonths(-1).Month >= DateTime.Today.Month)
     {
         this.date = this.date.AddMonths(-1);
         reloadDayBoxes();
     }
     else
     {
         FeedbackWindow message = new FeedbackWindow();
         message.setMessageForBookingNotAvailableForDateDueToDateInThePast();
         message.Show();
     }
 }
Example #13
0
        /**
         * Method calls on saving controller method based on validation
         *
         * @param errors list of errors
         * @param user user model
         */
        private void save(List <string> errors, UserModel user)
        {
            UserController controller = new UserController();
            FeedbackWindow feedback   = new FeedbackWindow();

            if (errors.Count != 0)
            {
                feedback.setMessageForInvalidFieldsValues(errors);
            }
            else if (!controller.save(user))
            {
                feedback.setMessageForSavingError();
            }
            else
            {
                feedback.setMessageForSuccessfullOperation();
            }
            feedback.Show();
        }
Example #14
0
        private void dayOfaWeekBox_Click(object sender, EventArgs e)
        {
            if (this.morningAppointments + this.afternoonAppointments == 0)
            {
                FeedbackWindow message = new FeedbackWindow();
                message.setMessageForNoAppointmentsPerDay();
                message.Show();
                return;
            }
            if (this.date.Date < DateTime.Today.Date)
            {
                FeedbackWindow message = new FeedbackWindow();
                message.setMessageForBookingNotAvailableForDateDueToDateInThePast();
                message.Show();
                return;
            }

            this.singleDay.ShowDialog();
        }
Example #15
0
        /** Method is responsible for starting process of logging the user in or showing feedback message */
        private void logInButton_Click(object sender, EventArgs e)
        {
            Logger         logger  = new Logger();
            FeedbackWindow message = new FeedbackWindow();

            try {
                if (Validator.validateLogger(loginField.Text, passwordField.Text))
                {
                    try {
                        if (logger.logUserIn(loginField.Text, passwordField.Text) == true)
                        {
                            LogInPanel.Visible = false;
                            HomePanel.Visible  = true;
                            this.CenterToScreen();
                            loadLeftPanel();
                            loadInitialInformationPanel();
                            if (ApplicationState.userType != "admin")
                            {
                                loadHomePanel();
                            }
                            else
                            {
                                loadSurgeryManagementPanel();
                            }
                        }
                    }
                    catch (LoggerException ex) {
                        message.setCustomizedMessage(ex.Message);
                        message.Show();
                    }
                }
                else
                {
                    message.setCustomizedMessage(Validator.getEmptyLoginMessage());
                    message.Show();
                }
            }
            catch (Exception) {
                message.setMessageForExceptionReporting();
                message.Show();
            }
        }
Example #16
0
        private void FinishedExerciseClick(object param)
        {
            FeedbackWindow    window = new FeedbackWindow();
            FeedbackViewModel vm     = new FeedbackViewModel(window);

            window.DataContext = vm;

            Feedback feedback = Feedback.Medium;
            bool?    result   = window.ShowDialog();

            if (result == true)
            {
                feedback = vm.UserFeedback;
            }
            try
            {
                CurrentUser.ExerciseCompleted(feedback);
            }
            catch (SqlException)
            {
                MessageBox.Show($"Kunne ikke oprette forbindelse til databasen!");
            }
            UpdateExerciseDesc();
        }
        /** Method is responsible for initiation of the process of saving the settings */
        private void saveUserSettings_Click(object sender, EventArgs e)
        {
            List <string> notification = new List <string>();
            List <string> verification = new List <string>();
            List <string> confirmation = new List <string>();

            if (onThePhoneVerification.Enabled && onThePhoneVerification.Checked)
            {
                verification.Add(settingsPanel.verificationOptions.call.ToString());
            }
            if (emailVerification.Enabled && emailVerification.Checked)
            {
                verification.Add(settingsPanel.verificationOptions.email.ToString());
            }
            if (printableConfirmation.Enabled && printableConfirmation.Checked)
            {
                confirmation.Add(settingsPanel.confirmationOptions.print.ToString());
            }
            if (emailConfirmation.Enabled && emailConfirmation.Checked)
            {
                confirmation.Add(settingsPanel.confirmationOptions.email.ToString());
            }

            FeedbackWindow feedback = new FeedbackWindow();

            if (!controller.saveSettings(notification, verification, confirmation))
            {
                feedback.setMessageForSavingError();
            }
            else
            {
                feedback.setMessageForSuccessfullOperation();
            }
            feedback.Show();
            fillInSettingsBasedOnUserData();
        }
Example #18
0
 public Engine(FeedbackWindow window, DTE2 application)
 {
     _window = window;
     _application = application;
 }
 public FeedbackListener(FeedbackWindow control)
 {
     _control = control;
 }
Example #20
0
 public FeedbackViewModel(FeedbackWindow window)
 {
     _window = window;
 }
 public FeedbackListener(FeedbackWindow window)
 {
     _window = window;
 }
Example #22
0
 public Engine(FeedbackWindow window, DTE2 application)
 {
     _window      = window;
     _application = application;
 }
Example #23
0
 public Engine(FeedbackWindow control, DTE2 application)
 {
     _control = control;
     _application = application;
 }
        private void Feedback()
        {
            FeedbackWindow fw = new FeedbackWindow(parent);

            fw.Show();
        }
Example #25
0
 private void DrawingCanvas_PfdChanging(object sender, EventArgs e)
 {
     FeedbackWindow.FeedbackStatusChanged(FeedbackStatus.ChangedButNotChecked);
 }