コード例 #1
0
        public ProjectViewModel(BaseViewModel parent)
            : base(parent)
        {
            _First = new Services.ObservableSortedList <ProjectItemViewModel>(
                new ProjectItemViewModel[] { },
                new Comparers.ProjectItemComparer()
                );

            _SearchCommand = new Commands.DelegateCommand(PerformSearch);

            _AddCommand           = new Commands.DelegateCommand(PerformAddFile);
            _AddReferenceCommand  = new Commands.DelegateCommand(PerformAddReference);
            _AddBlueprintsCommand = new Commands.DelegateCommand(PerformAddBlueprints);
            _AddExistingCommand   = new Commands.DelegateCommand(PerformAddExistingFile);
            _AddFolderCommand     = new Commands.DelegateCommand(PerformAddFolder);
            _AddCollectionCommand = new Commands.DelegateCommand(PerformAddCollection);

            _RemoveReferenceCommand = new Commands.DelegateCommand(PerformRemoveReference);

            _OpenProjectCommand  = new Commands.DelegateCommand(PerformOpenProject);
            _NewProjectCommand   = new Commands.DelegateCommand(PerformNewProject);
            _CloseProjectCommand = new Commands.DelegateCommand(PerformCloseProject);

            _ViewCodeCommand = new Commands.DelegateCommand(PerformViewCode);

            _RenameCommand = new Commands.DelegateCommand(PerformRename);
            _DeleteCommand = new Commands.DelegateCommand(PerformDelete);
        }
コード例 #2
0
        public ClassViewModel(BaseViewModel parent) : base(parent)
        {
            _First = new Services.ObservableSortedList <ClassItemViewModel>(
                new ClassItemViewModel[] { },
                new Comparers.ClassItemComparer()
                );

            _SearchCommand = new Commands.DelegateCommand(PerformSearch);

            StartTree();
        }
コード例 #3
0
        public ProjectManagerViewModel(BaseViewModel parent) : base(parent)
        {
            Config = new Config.ConfigViewModel(this);

            Project = new ProjectViewModel(this);
            Project.FileRequested    += Project_FileRequested;
            Project.SelectionChanged += Project_SelectionChanged;
            Project.FileCreated      += Project_FileCreated;
            Project.ReferenceAdded   += Project_ReferenceAdded;
            Project.FileDeleted      += Project_FileDeleted;
            Project.ProjectCreated   += Project_ProjectCreated;
            Project.ProjectOpened    += Project_ProjectOpened;
            Project.ProjectClosed    += Project_ProjectClosed;

            Blueprint = new BlueprintViewModel(this);
            Blueprint.InsertRequested += Blueprint_InsertRequested;

            Editor                          = new EditorViewModel(this);
            Editor.FileChanged             += Editor_FileChanged;
            Editor.Items.CollectionChanged += Editor_CollectionChanged;

            Classes = new ClassViewModel(this);
            BuildClasses();

            Output = new OutputViewModel(this);

            Backup = new BackupViewModel(this);
            Backup.RestoreRequested += Backup_RestoreRequested;

            FindReplace = new FindReplaceViewModel(this);

            _NewProjectCommand   = new Commands.DelegateCommand(PerformNewProject);
            _OpenProjectCommand  = new Commands.DelegateCommand(PerformOpenProject);
            _CloseProjectCommand = new Commands.DelegateCommand(PerformCloseProject);

            _SaveFileCommand = new Commands.DelegateCommand(PerformSaveFile);
            _SaveAllCommand  = new Commands.DelegateCommand(PerformSaveAll);

            _RunScriptCommand    = new Commands.DelegateCommand(PerformRunScript);
            _OpenSelectedCommand = new Commands.DelegateCommand(PerformOpenSelected);

            _CloseFileCommand = new Commands.DelegateCommand(PerformCloseFile);
            _CloseAllCommand  = new Commands.DelegateCommand(PerformCloseAll);

            _UndoCommand      = new Commands.DelegateCommand(PerformUndo);
            _RedoCommand      = new Commands.DelegateCommand(PerformRedo);
            _CutCommand       = new Commands.DelegateCommand(PerformCut);
            _CopyCommand      = new Commands.DelegateCommand(PerformCopy);
            _PasteCommand     = new Commands.DelegateCommand(PerformPaste);
            _DeleteCommand    = new Commands.DelegateCommand(PerformDelete);
            _SelectAllCommand = new Commands.DelegateCommand(PerformSelectAll);

            _CloseViewCommand = new Commands.DelegateCommand(PerformCloseView);
        }
コード例 #4
0
        public BackupViewModel(BaseViewModel parent) : base(parent)
        {
            _Items = new Services.ObservableSortedList <BackupItemViewModel>(
                new Comparers.BackupItemComparer()
                );

            _RestoreAllCommand = new Commands.DelegateCommand(PerformRestoreAll);
            _ClearAllCommand   = new Commands.DelegateCommand(PerformClearAll);
            _RestoreCommand    = new Commands.DelegateCommand(PerformRestore);
            _DeleteCommand     = new Commands.DelegateCommand(PerformDelete);
        }
コード例 #5
0
        public BlueprintViewModel(BaseViewModel parent) : base(parent)
        {
            _First = new Services.ObservableSortedList <GridItemViewModel>(
                new GridItemViewModel[] { },
                new Comparers.GridItemComparer()
                );

            _SearchCommand      = new Commands.DelegateCommand(PerformSearch);
            _InsertNameCommand  = new Commands.DelegateCommand(PerformInsertName);
            _EditProgramCommand = new Commands.DelegateCommand(PerformEditProgram);
            _RenameBlockCommand = new Commands.DelegateCommand(PerformRenameBlock);
        }
コード例 #6
0
        public EditorViewModel(BaseViewModel parent) : base(parent)
        {
            _UpdateAutoCompleteCommand = new Commands.DelegateCommand(PerformUpdateAutoComplete);
            _ShowQuickFindCommand      = new Commands.DelegateCommand(PerformShowQuickFind);

            _Items.CollectionChanged += OnCollectionChanged;

            if (parent != null && parent is ProjectManagerViewModel)
            {
                ProjectManagerViewModel manager = (ProjectManagerViewModel)parent;
                manager.Config.TextEditor.PropertyChanged += Config_PropertyChanged;
            }
        }
コード例 #7
0
        private void Initialize(BaseViewModel parent, ProjectItemViewModel item, Models.PageType type)
        {
            _ProjectItem = item;

            _Model     = new Models.Page();
            Header     = item.Name;
            Identifier = Guid.NewGuid();
            Type       = type;

            item.PropertyChanged += ProjectItem_PropertyChanged;

            BuildEditor();

            _CloseFileCommand  = new Commands.DelegateCommand(PerformCloseFile);
            _SelectPageCommand = new Commands.DelegateCommand(PerformSelectPage);
        }
コード例 #8
0
 public ExceptionViewModel() : base(null)
 {
     _NavigateCommand = new Commands.DelegateCommand(PerformNavigate);
     _CloseCommand    = new Commands.DelegateCommand(PerformClose);
 }
コード例 #9
0
 public ProjectItemViewModel(ProjectItem item) : this(item, null)
 {
     _FileRequestedCommand = new Commands.DelegateCommand(RaiseFileRequested);
 }
コード例 #10
0
 public UpdaterViewModel() : base(null)
 {
     _CancelCommand   = new Commands.DelegateCommand(PerformCancel);
     _DownloadCommand = new Commands.DelegateCommand(PerformDownload);
 }