//Change intervention deadlines private void ChangeDeadlines(object sender, RoutedEventArgs e) { bool success = true; int interventionDeadline = 0; int movingDeadline = 0; try { interventionDeadline = Int32.Parse(InterventionDeadline.Text); movingDeadline = Int32.Parse(MovingDeadline.Text); if (interventionDeadline < 0 || movingDeadline < 0) { success = false; } } catch (Exception ex) { success = false; } if (success == false) { MessageBox.Show(ETD.Properties.Resources.MessageBox_Notification_DeadlineNumbers); } else { InterventionSectionPage.setInterventionDeadline(interventionDeadline); InterventionSectionPage.setMovingDeadline(movingDeadline); MessageBox.Show(ETD.Properties.Resources.MessageBox_Notification_DeadlineChanged); } }
public MainWindow() { InitializeComponent(); //only attach SelectionChanged event here to avoid the culture being updated twice ComboBox_Languages.SelectedItem = Properties.Settings.Default.DefaultCulture.NativeName; this.ComboBox_Languages.SelectionChanged += new System.Windows.Controls.SelectionChangedEventHandler(this.ComboBox_Languages_SelectionChanged); FormPopup.RegisterMainWindow(this);//Register main window as the master window, used for displaying popups followupSection = new FollowUpSectionForm(); shiftSection = new ShiftsSection(); mapModificationSection = new AdditionalInfoPage(this); teamsSection = new TeamsSectionPage(this); mapSection = new MapSectionPage(this, mapModificationSection); interventionsSection = new InterventionSectionPage(this); previousWidth = MapSection.ActualWidth; previousHeight = MapSection.ActualHeight; //Populating the Map modification section Frame AIFrame = new Frame(); AIFrame.Content = mapModificationSection; AIPSection.Child = AIFrame; //Populating the Teams section Frame teamsFrame = new Frame(); teamsFrame.Content = teamsSection; TeamsSection.Child = teamsFrame; //Populating the Map section Frame mapFrame = new Frame(); mapFrame.Content = mapSection; MapSection.Child = mapFrame; //Populating the Interventions section Frame interventionsFrame = new Frame(); interventionsFrame.Content = interventionsSection; InterventionsSection.Child = interventionsFrame; //Starting GPS Services tasks GPSServices.StartServices(this); }
public InterventionFormPage(InterventionSectionPage interventionSection, Intervention intervention) { InitializeComponent(); this.interventionSection = interventionSection; this.intervention = intervention; setInterventionNumber(intervention.getInterventionNumber()); //Set the intervention type RED if it is of code 1 //dispatcherTimer.Tick += new EventHandler(PersistencyUpdate); //dispatcherTimer.Interval += new TimeSpan(0, 0, 30); //dispatcherTimer.Start(); BuildComponents(); details.Focus(); intervention.RegisterInstanceObserver(this); }