コード例 #1
0
        protected override void OnClosing(System.ComponentModel.CancelEventArgs e)
        {
            ChopperViewModel cvm = (ChopperViewModel)DataContext;

            if (!cvm.WillInsert)
            {
                cvm.ChopperReset();
            }
        }
コード例 #2
0
        private void ChopperOpen(object sender, RoutedEventArgs e)
        {
            ChopperViewModel  ntvm = new ChopperViewModel((PianoRollViewModel)DataContext);
            NoteChopperWindow ncv  = new NoteChopperWindow {
                DataContext = ntvm
            };

            ncv.Show();
        }