private void AddPanel_Click(object sender, RoutedEventArgs e) { var PanelWindow = new PanelWindow() { ActionData = Actions.New, PanelsData = this.PanelsData, SelectedIndex = this.PanelsData.Count, QuotationData = this.QuotationData, }; PanelWindow.ShowDialog(); }
private void InsertDown_Click(object sender, RoutedEventArgs e) { if (PanelsList.SelectedItem is Panel panel) { var PanelWindow = new PanelWindow() { ActionData = Actions.InsertDown, PanelsData = this.PanelsData, SelectedIndex = this.PanelsData.IndexOf(panel) + 1, QuotationData = this.QuotationData, }; PanelWindow.ShowDialog(); } }
private void EditPanel_Click(object sender, RoutedEventArgs e) { if (PanelsList.SelectedItem is Panel panel) { var PanelWindow = new PanelWindow() { ActionData = Actions.Edit, PanelData = panel, PanelsData = this.PanelsData, QuotationData = this.QuotationData, }; PanelWindow.ShowDialog(); this.Window_Loaded(null, null); } }