コード例 #1
0
 protected override void OnLoaded()
 {
     Instance         = this;
     this.DataContext = this.viewModel =
         new ViewModelTradingStationLotEditor(
             this.lot,
             callbackSave: () => this.CloseWindow(DialogResult.OK),
             callbackCancel: () => this.CloseWindow(DialogResult.Cancel));
 }
コード例 #2
0
        protected override void OnUnloaded()
        {
            if (ReferenceEquals(this, Instance))
            {
                Instance = null;
            }

            this.DataContext = null;
            this.viewModel.Dispose();
            this.viewModel = null;
        }