コード例 #1
0
        public CompilerViewModel(DocumentModel document, ConsoleModel console, CompilerFlagsModel compilerFlags)
        {
            CompilerFlags = compilerFlags;

            _document = document;
            _console  = console;

            CompileCommand = new RelayCommand(Compile, () => !string.IsNullOrEmpty(_document.FilePath) && !string.IsNullOrEmpty(_document.FileName));
        }
コード例 #2
0
        public MainViewModel()
        {
            _document           = new DocumentModel();
            _debuggerModel      = new DebuggerModel();
            _console            = new ConsoleModel();
            _debugDocumentModel = new DebugDocumentModel();
            _replaceModel       = new ReplaceModel();
            _compilerFlags      = new CompilerFlagsModel();
            _debuggerFlags      = new DebuggerFlagsModel();

            _editorView      = new EditorView();
            _editorDebugView = new EditorDebugView();
            _currentView     = _editorView;

            Editor     = new EditorViewModel(_document);
            File       = new FileViewModel(_document);
            Help       = new HelpViewModel();
            Debugger   = new DebuggerViewModel(_document, _debugDocumentModel, _console, _debuggerModel, _currentView, _editorView, _editorDebugView, _debuggerFlags);
            Compiler   = new CompilerViewModel(_document, _console, _compilerFlags);
            MainWindow = new MainWindowViewModel();
            Replace    = new ReplaceViewModel(_replaceModel, _document);
        }