public TeamInfoPage(TeamsSectionPage teamsSection, Team team) { InitializeComponent(); this.teamsSection = teamsSection; this.team = team; PopulateInfo(); teamName.ContextMenu = (ContextMenu)TeamContextName; team.RegisterInstanceObserver(this); }
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 TeamFormPage(TeamsSectionPage caller) { InitializeComponent(); this.caller = caller; ComboBoxItem createUserItem = new ComboBoxItem(); createUserItem.Content = "NEW USER"; createUserItem.FontStyle = FontStyles.Italic; createUserItem.FontWeight = FontWeights.Bold; ComboBoxItem createUserItem2 = new ComboBoxItem(); createUserItem2.Content = "NEW USER"; createUserItem2.FontStyle = FontStyles.Italic; createUserItem2.FontWeight = FontWeights.Bold; ComboBoxItem createUserItem3 = new ComboBoxItem(); createUserItem3.Content = "NEW USER"; createUserItem3.FontStyle = FontStyles.Italic; createUserItem3.FontWeight = FontWeights.Bold; ComboBox_TeamMemberName1.Items.Add(createUserItem); ComboBox_TeamMemberName2.Items.Add(createUserItem2); ComboBox_TeamMemberName3.Items.Add(createUserItem3); using (SQLiteDataReader reader = StaticDBConnection.QueryDatabase("SELECT Name FROM Volunteers")) { while (reader.Read()) { ComboBoxItem cbItem = new ComboBoxItem(); cbItem.Content = reader["Name"].ToString(); ComboBoxItem cbItem2 = new ComboBoxItem(); cbItem2.Content = reader["Name"].ToString(); ComboBoxItem cbItem3 = new ComboBoxItem(); cbItem3.Content = reader["Name"].ToString(); ComboBox_TeamMemberName1.Items.Add(cbItem); ComboBox_TeamMemberName2.Items.Add(cbItem2); ComboBox_TeamMemberName3.Items.Add(cbItem3); } } StaticDBConnection.CloseConnection(); }