public void ClearSongControls() { UniqueIdBox.Text = "(No song selected)"; TitleBox.Clear(); SubtitleBox.Clear(); BackgroundBox.Clear(); ComposerBox.Clear(); ArrangerBox.Clear(); CopyrightBox.Clear(); LicenseBox.Clear(); MadeFamousByBox.Clear(); DifficultyBox.Value = 0; RatingBox.Value = 0; FingerHintBox.Clear(); HandsBox.Clear(); TagBox.Clear(); TagList.Items.Clear(); BookmarkMeasureBox.Value = 1; BookmarkDescriptionBox.Clear(); BookmarkList.Items.Clear(); PropertiesGroup.Enabled = false; }
private void newFileBtn_Click(object sender, RoutedEventArgs e) { filesListGrid.Visibility = Visibility.Hidden; newFileGrid.Visibility = Visibility.Visible; welcomeGrid.Visibility = Visibility.Hidden; TitleBox.Clear(); contentBox.Clear(); toggleSwitch.IsChecked = true; toggleSwitch.IsEnabled = false; TitleBox.IsReadOnly = false; contentBox.IsReadOnly = false; saveBtn.IsEnabled = true; }
private void NewFileItem_Click(object sender, EventArgs e) { using (Form2 dlg1 = new Form2()) { if (dlg1.ShowDialog() == DialogResult.OK) { shirina = dlg1.newWidth; wysota = dlg1.newHeight; SpShir = dlg1.newSpWidth; cvetik = Color.Thistle; cvetTxt = Color.Black; TitleBox.Clear(); AuthorBox.Clear(); tab.Clear(); pictureBox1.Invalidate(); } } }
private void ReadSlide(object sender, EventArgs e) { if (NoPowerPoint()) { if (!LoadPresentation()) { return; //If there is no presentation open load one, but return if the user cancels. } } TitleBox.Clear(); BodyTextBox.Clear(); BodyTextBox.ZoomFactor = 1f; //This line is to alleviate a bug in the RichTextBox class that //^prevents display of the proper ZoomFactor after clearing it. foreach (var item in presentation.Slides[1].Shapes) { var shape = (Ppt.Shape)item; if (shape.HasTextFrame != msoTrue) { continue; } if (shape.Name.Contains("Title")) { TitleBox.Text += shape.TextFrame.TextRange.Text + ' '; } else if (shape.TextFrame.HasText == msoTrue) { IDataObject clipped = Clipboard.GetDataObject(); shape.TextFrame.TextRange.Copy(); BodyTextBox.Paste(); //if (BodyTextBox.Font.SizeInPoints > 17f) BodyTextBox.ZoomFactor = 0.5f; if (shape.TextFrame.TextRange.Font.Size > 17f) { BodyTextBox.ZoomFactor = 0.5f; } Clipboard.SetDataObject(clipped, true); } } }
private void NewButton_Click(object sender, EventArgs e) { TitleBox.Clear(); MessegeBox.Clear(); }