| 12345678910111213141516171819202122232425262728293031323334353637383940414243 |
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- using System.Windows;
- using System.Windows.Controls;
- using System.Windows.Data;
- using System.Windows.Documents;
- using System.Windows.Input;
- using System.Windows.Media;
- using System.Windows.Media.Imaging;
- using System.Windows.Shapes;
- namespace WpfApplication19
- {
- /// <summary>
- /// Interaction logic for EditINWindow.xaml
- /// </summary>
- public partial class EditINWindow : Window
- {
- public EditINWindow()
- {
- InitializeComponent();
- var w = (MainWindow)Application.Current.MainWindow;
- grainSizeInput.Text = w.inStarGS;
- }
- private void saveBtn_Click(object sender, RoutedEventArgs e)
- {
- var w = (MainWindow)Application.Current.MainWindow;
- w.inStarGS = grainSizeInput.Text;
- this.Close();
- }
- private void grainSizeInput_PreviewKeyDown(object sender, KeyEventArgs e)
- {
- if ((e.Key >= Key.D0 && e.Key <= Key.D9) || e.Key == Key.Next || e.Key == Key.Back || e.Key == Key.Delete || e.Key == Key.Left || e.Key == Key.Right)
- e.Handled = false;
- else e.Handled = true;
- }
- }
- }
|