private void AddButton_Click(object sender, RoutedEventArgs e) { string name = NewUniformName; GLType type = (GLType)typeComboBox.SelectedItem; NewUniform = UniformMaker.Make(type, name); Close(); }
// ================================================================================================== // OTHER // ================================================================================================== public AddUniformWindow() { InitializeComponent(); this.DataContext = this; NewUniform = null; NameValidationRule = new OpenGLIdentifierValidationRule(); ICollection <GLType> supportedTypes = UniformMaker.GetSupportedTypes(); typeComboBox.ItemsSource = supportedTypes; typeComboBox.SelectedIndex = 0; }