Beispiel #1
0
        internal void Close(HexFileViewModel fileToClose)
        {
            if (fileToClose.IsDirty)
            {
                ConfirmationSaveViewModel vm = new ConfirmationSaveViewModel(fileToClose.FileName);
                ConfirmationView          v  = new ConfirmationView(vm);
                v.Owner = Application.Current.MainWindow;
                if ((bool)v.ShowDialog())
                {
                    Save(fileToClose);
                }
            }

            _files.Remove(fileToClose);
            GC.Collect();
            RaiseCanExecuteChanged();
        }
        internal void Close(HexFileViewModel fileToClose)
        {
            if (fileToClose.IsDirty)
            {
                ConfirmationSaveViewModel vm = new ConfirmationSaveViewModel(fileToClose.FileName);
                ConfirmationView v = new ConfirmationView(vm);
                v.Owner = Application.Current.MainWindow;
                if((bool)v.ShowDialog())
                {
                    Save(fileToClose);
                }
            }

            _files.Remove(fileToClose);
            GC.Collect();
            RaiseCanExecuteChanged();
        }