private void bEditOwner_Click(object sender, EventArgs e) { //todo save details po.setAddress(textBox9.Text); po.setDob(dateTimePicker1.Value.ToString()); po.setLastName(textBox12.Text); po.setFirstName(textBox13.Text); po.setPhoneOwner(Convert.ToInt32(textBox10.Text)); po.setEmail(textBox11.Text); try { db.updateOwner(po); MessageBox.Show(po.getLastName()); MessageBox.Show("Owner Successfully Edited"); HomePanel.Show(); } catch (Exception er) { MessageBox.Show(er.ToString()); } //db.updateAnimal Cancel_Click(sender, e); }
private void ImageMouseLeftButtonDown(object sender, MouseButtonEventArgs e) { HomePanel homePanel = new HomePanel(); homePanel.Show(); Application.Current.Windows[0].Close(); }
public static HomePanel HomePanel() { if (homePanel == null) { homePanel = new HomePanel(); } return(homePanel); }
private void CreateHomePanel() { var homePanel = new HomePanel(); homePanel.SetBinding(HomePanel.BindingContextProperty, "HomeViewModel"); homePanel.SetBinding(HomePanel.IsVisibleProperty, new Binding("State", BindingMode.OneWay, _indexToBoolConverter, AppConstants.APP_PANEL_HOME, null, this)); _homePanel = homePanel; }
private void loginButton_Click(object sender, EventArgs e) { if (username_field.Text == "admin" && password_field.Text == "password") { LandingPanel.Visible = false; FirewallSplitContainer.Visible = true; HomePanel.BringToFront(); } }
private void Home_Hide() { // changes the displayed items to fit non-home screens PathTxt.Show(); PathField.Show(); ScanBtn.Show(); PathBtn.Show(); HomeContent.Hide(); HomePanel.Hide(); SettingsBox.Hide(); SettingsTitle.Hide(); }
public override void ShowBuildingPanel() { if (!(P2B is HomePanel)) { Debug.LogError("对应的UI错误,请检查!"); return; } HomePanel HP2B = (HomePanel)P2B; HP2B.SetMessage2List(playerBase); base.ShowBuildingPanel(); }
private void Login_Success(object sender, EventArgs e) { /* * Executing after Login success */ _login.Swipe(false); /* Displaying home panel */ _home = new HomePanel(this); _home.ApplicationSelectorHandler += Application_Selector; _home.EditUiObjectHandler += Edit_UIObject; _home.DeleteUiObjectHandler += Delete_UIObject; _home.Swipe(); }
public Main() { InitializeComponent(); if (Session.UserData.kategoria >= 1) { grid.Children.Add(homePanel = new HomePanel(grid)); HR_navigation_Grid.Visibility = Visibility.Visible; } else { grid.Children.Add(szakmai_Kezdolap = new SzakmaiKezdolap(grid)); Szakmai_navigation_Grid.Visibility = Visibility.Visible; HR_navigation_Grid.Visibility = Visibility.Hidden; } }
private void btnDeleteDetails_Click(object sender, EventArgs e) { DialogResult dialogResult = MessageBox.Show("Are you sure want to Delete this animal", "Confirmation", MessageBoxButtons.YesNo); if (dialogResult == DialogResult.Yes) { db.DeleteAnimal(animal); HomePanel.Show(); AnmDetailsPanel.Hide(); MessageBox.Show("Animal successfully deleted"); } else { AnmDetailsPanel.Show(); } }
private void btnUpdateDetails_Click(object sender, EventArgs e) { try { animal.setDateBrought(Convert.ToString(dtpDateBroughtDetails.Value)); animal.setDescription(tbDescriptionDetails.Text); animal.setLocationFound(tbLocationFoundDetails.Text); if (tbOwnersIdDetails.Text != string.Empty) { int po_id = Convert.ToInt32(tbOwnersIdDetails.Text); try { po = db.getOwnerById(po_id); } catch (Exception err) { MessageBox.Show("Can't find previous owner: " + err.ToString()); } } else { po = null; } animal.setOwner(po); if (animal.GetType() == typeof(Dog)) { Dog dog = (Dog)animal; dog.setLastWalked(dtpLastWalkedDetails.Value); } else if (animal.GetType() == typeof(Cat)) { Cat cat = (Cat)animal; cat.setExtra(tbExtraDetails.Text); } db.updateAnimal(animal); MessageBox.Show("Animal successfully updated"); AnmDetailsPanel.Hide(); HomePanel.Show(); } catch (Exception er) { MessageBox.Show(er.ToString()); } }
private void load(OverlayColourProvider colourProvider) { Child = new HomePanel { Child = text = new OsuSpriteText { Anchor = Anchor.Centre, Origin = Anchor.Centre, Margin = new MarginPadding { Vertical = 20 }, Text = CommonStrings.ButtonsSeeMore } }; IdleColour = colourProvider.Light1; HoverColour = Color4.White; Action = () => { overlay?.ShowFrontPage(); }; }
private void HomeButtonClick(object sender, RoutedEventArgs e) { grid.Children.Clear(); grid.Children.Add(homePanel = new HomePanel(grid)); }
public MainForm() { InitializeComponent(); HomePanel.BringToFront(); }
private void dataGridView2_CellClick_1(object sender, DataGridViewCellEventArgs e) { Int32 selectedCellCount = dataGridView2.GetCellCount(DataGridViewElementStates.Selected); if (selectedCellCount > 0) { if (dataGridView2.AreAllCellsSelected(true)) { MessageBox.Show("All cells are selected", "Selected Cells"); } else { System.Text.StringBuilder sb = new System.Text.StringBuilder(); for (int i = 0; i < selectedCellCount; i++) { //an attributes to know which part we selecting string condition = dataGridView2.SelectedCells[i].Value .ToString(); //this is an attribute for getting the value of rfid int idselected = Convert.ToInt32(dataGridView2.Rows[e.RowIndex].Cells[0].Value.ToString()); //We need to create an attribute for identifying what species is our animal if (condition == "Delete") { MessageBox.Show(idselected.ToString()); DialogResult dialogResult = MessageBox.Show("Are you sure want to Delete this owner", "Confirmation", MessageBoxButtons.YesNo); if (dialogResult == DialogResult.Yes) { db.dropOwner(idselected); HomePanel.Show(); } else if (dialogResult == DialogResult.No) { OwnersPanel.Show(); } } else if (condition == "Details") { po = db.getOwnerById(idselected); this.textBox9.Text = po.getAddress(); this.textBox14.Text = Convert.ToString(po.getOwnerId()); this.textBox10.Text = Convert.ToString(po.getPhoneOwner()); this.textBox12.Text = po.getLastName(); this.textBox13.Text = po.getFirstName(); this.dateTimePicker1.Text = Convert.ToString(po.getDob()); this.textBox11.Text = po.getEmail(); //this.tbRfidOwner.Text = animal.getRfidByOwner(po); OwnersPanel.Hide(); OwnDetailsPanel.Show(); } condition = ""; idselected = 0; } } } selectedCellCount = 0; }
/// <summary> /// Method that is used to switch between the application's different pages. /// </summary> private void ChangePage(int pageNum) { switch (pageNum) { case 0: { HomePanel.Invoke((MethodInvoker)(() => { HomePanel.Visible = true; CompareRatingsButton.Enabled = true; HomePanel.BringToFront(); ComparatorCancelButton.Enabled = false; })); ComparatorResultsPanel.Invoke((MethodInvoker)(() => { ComparatorResultsPanel.Visible = false; })); FollowerStatsResultsPanel.Invoke((MethodInvoker)(() => { FollowerStatsResultsPanel.Visible = false; })); FollowerStatsPanel.Invoke((MethodInvoker)(() => { FollowerStatsPanel.Visible = false; })); RatingComparatorPanel.Invoke((MethodInvoker)(() => { RatingComparatorPanel.Visible = false; })); break; } case 1: { HomePanel.Invoke((MethodInvoker)(() => { HomePanel.Visible = false; })); RatingComparatorPanel.Invoke((MethodInvoker)(() => { RatingComparatorPanel.Enabled = true; RatingComparatorPanel.Visible = true; RatingComparatorPanel.BringToFront(); })); ComparatorResultsPanel.Invoke((MethodInvoker)(() => { ComparatorResultsPanel.Visible = false; })); break; } case 2: { RatingComparatorPanel.Invoke((MethodInvoker)(() => { RatingComparatorPanel.Visible = false; ToggleControls("RatingComparator"); })); ComparatorResultsPanel.Invoke((MethodInvoker)(() => { ComparatorResultsPanel.Visible = true; })); break; } case 3: { HomePanel.Invoke((MethodInvoker)(() => { HomePanel.Visible = false; })); FollowerStatsPanel.Invoke((MethodInvoker)(() => { FollowerStatsPanel.Visible = true; FollowerStatsPanel.BringToFront(); FollowerStatsPanel.Enabled = true; FollowerStatCancelButton.Enabled = false; })); FollowerStatsResultsPanel.Invoke((MethodInvoker)(() => { FollowerStatsResultsPanel.Visible = false; })); break; } case 4: { FollowerStatsPanel.Invoke((MethodInvoker)(() => { FollowerStatsPanel.Visible = false; ToggleControls("FollowerStat"); })); FollowerStatsResultsPanel.Invoke((MethodInvoker)(() => { FollowerStatsResultsPanel.Visible = true; })); break; } } }
private void homeButton_Click(object sender, EventArgs e) { // Home button go to welcome page HomePanel.BringToFront(); }
private void addWord_Btn_Click(object sender, EventArgs e) { HomePanel.Hide(); addWordPanel.Show(); }
private void btn_home_Click(object sender, EventArgs e) { HomePanel.BringToFront(); }
private void Home_btn_Click(object sender, EventArgs e) { addWordPanel.Hide(); HomePanel.Show(); }