private void Types_SelectionChanged(object sender, SelectionChangedEventArgs e) { var selectedType = (FixtureType)Enum.Parse(typeof(FixtureType), types.SelectedValue.ToString()); if (selectedType != FixtureType.notSet) { img.Children.Clear(); currentFixture.type = selectedType; current++; if (current < Fixtures.Fixtures.Count) { currentFixture = Fixtures.Fixtures[current]; if (currentFixture.Name == "120mm.png") { currentFixture.IsTable = true; current++; currentFixture = Fixtures.Fixtures[current]; } currentFixture = Fixtures.Fixtures[current]; img.Children.Add(currentFixture.img); types.SelectedIndex = 0; } else { Fixtures.SaveToFile(); this.Close(); } } }
private void Save_Click(object sender, RoutedEventArgs e) { Fixtures.SaveToFile(); }