private void DefaultButtonClick(object sender, RoutedEventArgs e) { using (DefaultValueDialog dialog = new DefaultValueDialog()) { dialog.EnsureButtonClick += (sender1, e1) => { Combox1.SelectedIndex = 1; Combox3.SelectedIndex = 0; Combox4.SelectedIndex = 0; Master.IsChecked = true; rangeTextbox1.GetTextBox().Text = string.Format("2"); rangeTextbox2.GetTextBox().Text = string.Format("20"); dialog.Close(); }; dialog.ShowDialog(); } }
private void DefaultButtonClick(object sender, RoutedEventArgs e) { using (DefaultValueDialog dialog = new DefaultValueDialog()) { dialog.EnsureButtonClick += (sender1, e1) => { MTextbox1.Text = 7504.ToString(); MTextbox2.Text = 496.ToString(); DTextbox1.Text = 5968.ToString(); DTextbox2.Text = 2032.ToString(); STextbox1.Text = 600.ToString(); STextbox2.Text = 400.ToString(); CVTextbox1.Text = 100.ToString(); CVTextbox2.Text = 100.ToString(); CheckBox1.IsChecked = false; dialog.Close(); }; dialog.ShowDialog(); } }