コード例 #1
0
        private void btnAdd_Click(object sender, RoutedEventArgs e)
        {
            AddBasicAdjustmentWindow window = new AddBasicAdjustmentWindow(null);

            if (window.ShowDialog(Application.Current.MainWindow))
            {
                List.Add(window.Adjustment);
            }
        }
コード例 #2
0
        private void EditSelectedItem()
        {
            BasicAdjustment adjustment = (lvMain.SelectedItem as BasicAdjustment);

            if (adjustment == null)
            {
                return;
            }

            AddBasicAdjustmentWindow window = new AddBasicAdjustmentWindow(adjustment);

            if (window.ShowDialog(Application.Current.MainWindow))
            {
                adjustment.Modifier = window.Adjustment.Modifier;
                adjustment.Note     = window.Adjustment.Note;
            }
        }