Ejemplo n.º 1
0
        public UndoTransaction(UndoManager undoManager, bool newTransaction)
        {
            if (newTransaction)
            {
                undoManager.Transactions.Clear();
            }
            undoManager.Transactions.Add(this);

            this.undoManager = undoManager;
            Debug.Assert(undoManager != null);
            this.undoManager.IsEnabled = false;
        }
Ejemplo n.º 2
0
        public MainWindowVM(EDOConfig config) {

//手動で英語環境のテストをしたい場合以下を有効にする

            Options.Init();
            this.config = config;
            recentFileList = new RecentFileList();
            List<string> files = recentFileList.RecentFiles;
            foreach (string file in files)
            {
                Debug.WriteLine(file);
            }

            edoUnits = new ObservableCollection<EDOUnitVM>();
            undoManager = new UndoManager();
            undoManager.UndoBufferCount = config.UndoBufferCount;
            undoManager.ModelChangeHandler += OnModelChanged;
            if (config.ReopenLastFile && File.Exists(config.LastFile))
            {
                DoOpen(false, config.LastFile);
            }
            if (edoModel == null)
            {
                edoModel = EDOModel.createDefault();
                createViewModels(edoModel);
                undoManager.Init(edoModel, this);
                UpdateRecentFiles();
            }

            this.HelpCommand = new HelpCommandImpl(this);
            this.AddCommand = new AddCommandImpl(this);
            this.StatusMessage = "Ready";
            this.IsErrorMessage = true;
            this.Title = DEFAULT_TITLE;
            this.IsTextBoxChanged = false;
//            var xdoc = XDocument.Parse(Resources.Options);
//            Debug.WriteLine(xdoc.ToString());
            this.isRestarting = false;
        }
Ejemplo n.º 3
0
 public UndoTransaction(UndoManager undoManager) : this(undoManager, false)
 {
 }
Ejemplo n.º 4
0
 public UndoTransaction(UndoManager undoManager)
     : this(undoManager, false)
 {
 }