private void Pressed() { string path = window.GetFilePath(); if (!path.Empty()) { string fileContents = editor.Text; using (StreamWriter swriter = new StreamWriter(path, false)) { swriter.Write(fileContents); } editor.Text = ""; // Reapply text TextPreview textPreview = GetNode <TextPreview>("/root/Window/VB/MainHB/TextPreview"); textPreview.SetTextFromFile(path); textPreview.Show(); VSeparator seperator = GetNode <VSeparator>("/root/Window/VB/MainHB/VSeparator"); seperator.Show(); } else { AcceptDialog ad = GetNode <AcceptDialog>("/root/Window/Notifications/NoFile"); ad.Show(); GD.Print("Path is not set"); } this.Hide(); addButton.Show(); editButton.Show(); }
protected void Back() { NameLabel.Hide(); NameBox.Hide(); NameBox.Text = ""; TypeLabeld.Hide(); Typebox.Hide(); OwnerLabel.Hide(); OwnerBox.Hide(); OwnerBox.Text = ""; AddButton.Show(); ViewButton.Show(); BackButton.Hide(); DoneButton.Hide(); ScreenLabel.Hide(); ScreenSpin.Hide(); ScreenSpin.Text = "0"; CatLabel.Hide(); CatBox.Hide(); ExcLabel.Hide(); ExTablesButton.Hide(); ExTablesButton.Active = false; HoursLabel.Hide(); HoursBox.Hide(); HoursBox.Text = ""; }
private void editModeToolStripMenuItem_Click(object sender, EventArgs e) { editModeToolStripMenuItem.Checked = true; practiceModeToolStripMenuItem.Checked = false; TranslationGridView.Show(); AddButton.Show(); RemoveButton.Show(); PracticeButton.Show(); }
private void button3_Click(object sender, EventArgs e) { AddButton.Show(); HorsesHighlight.BackColor = Color.White; RidersHighlight.BackColor = Color.White; LapsHighlight.BackColor = Color.FromArgb(192, 0, 0); SearchHighlight.BackColor = Color.White; Mode = 2; RefreshMainPanel(); }
private void Modify_Click(object sender, EventArgs e) { this.BackColor = Color.Blue; Nah.ReadOnly = false; Relationship.ReadOnly = false; MJ.ReadOnly = false; button1.Show(); AddButton.Show(); }
///////unlocks all the boxes essentially for now ////// private void Modify_Click(object sender, EventArgs e) { Modname Amod = new Modname(Allergen.Text, Description.Text); Undo_Click(Amod, e); this.BackColor = Color.Blue; Allergen.ReadOnly = false; Description.ReadOnly = false; Save.Show(); AddButton.Show(); }
private void setActiveWordListToolStripMenuItem_Click(object sender, EventArgs e) { using (SelectWordList selectWordList = new SelectWordList()) { selectWordList.SelectHandler += MyListFormSelectedHandler; selectWordList.ShowDialog(); selectWordList.StartPosition = FormStartPosition.CenterParent; TranslationGridView.Show(); editModeToolStripMenuItem.Checked = true; practiceModeToolStripMenuItem.Checked = false; AddButton.Show(); RemoveButton.Show(); PracticeButton.Show(); } }
private void listBox1_SelectedIndexChanged(object sender, EventArgs e) { if (listBox1.SelectedItem == null) { TranslationGrid.Hide(); InformationBox.Show(); InformationBox.Text = "this is not a valid list"; return; } FileName = listBox1.SelectedItem.ToString(); var wordList = WordList.LoadList(FileName); if (wordList == null) { return; } TranslationGrid.Show(); AddButton.Show(); NewListButton.Show(); RemoveButton.Show(); SaveButton.Show(); PracticeButton.Show(); AddButton.Enabled = true; SaveButton.Enabled = true; RemoveButton.Enabled = true; InformationBox.Hide(); var languageArray = wordList.Languages; var sortBy = 0; CountLabel.Text = $"There are {wordList.Count()} words in the list"; TranslationGrid.Rows.Clear(); TranslationGrid.Columns.Clear(); TranslationGrid.Refresh(); foreach (var languages in languageArray) { TranslationGrid.Columns.Add("newColumnName", languages.ToUpper()); } TranslationGrid.Rows.Clear(); wordList.List(sortBy, x => { TranslationGrid.Rows.Add(x); }); }
private void addStockButton_Click(object sender, EventArgs e) { addStockButton.Hide(); delStockButton.Hide(); checkStockbutton.Hide(); updateStockButton.Hide(); AddMedLabel.Show(); deleteMedLabel.Hide(); checkStockLabel.Hide(); updateStocklabel.Hide(); drugnameBox.Show(); drugnameLabel.Show(); categoryBox.Show(); categoryLabel.Show(); descBox.Show(); descLabel.Show(); companyBox.Show(); companyLabel.Show(); supplierBox.Show(); supplierLabel.Show(); quantityBox.Show(); quantityLabel.Show(); costBox.Show(); costLabel.Show(); drugIDLabel.Show(); drugIDBox.Show(); statusLabel.Show(); statusBox.Show(); dateBox.Show(); dateLabel.Show(); AddButton.Show(); deleteButton.Hide(); checkButton.Hide(); updateButton.Hide(); backButton.Show(); clearButton.Show(); }
private void button1_Click(object sender, EventArgs e) { Clear_Button.PerformClick(); FormPanel.Show(); AddButton.Show(); }