/// <summary>
        /// Constructor.
        /// </summary>
        /// <param name="optionsPath">Options path.</param>
        public MainWelcomeViewModel(string optionsPath)
        {
            this.newModelCommand = new DelegateCommand(NewModelCommandExecuted);
            this.openModelCommand = new DelegateCommand(OpenModelCommandExecuted);

            Options = new ViewModelOptions();
            Options.Deserialize(optionsPath);

            AvailableModelModelContextViewModels = new List<BaseModelContextViewModel>();
        }
예제 #2
0
        /// <summary>
        /// Constructor.
        /// </summary>
        /// <param name="optionsPath">Options path.</param>
        public MainWelcomeViewModel(string optionsPath)
        {
            this.newModelCommand  = new DelegateCommand(NewModelCommandExecuted);
            this.openModelCommand = new DelegateCommand(OpenModelCommandExecuted);

            Options = new ViewModelOptions();
            Options.Deserialize(optionsPath);

            AvailableModelModelContextViewModels = new List <BaseModelContextViewModel>();
        }
        /// <summary>
        /// Constuctor.
        /// </summary>
        /// <param name="modelContextName">Name of the model context.</param>
        /// <param name="options">View model options.</param>
        /// <param name="mainViewModel">The main view model, this MRU view model belongs to.</param>
        public MRUFilesViewModel(string modelContextName, ViewModelOptions options, MainWelcomeViewModel mainViewModel)
        {
            this.Options = options;
            this.mruFileEntries = new ObservableCollection<MRUFileEntryViewModel>();

            this.addCommand = new DelegateCommand<MRUFileEntry>(AddCommandExecuted);
            this.removeCommand = new DelegateCommand<MRUFileEntry>(RemoveCommandExecuted);
            this.moveToTopCommand = new DelegateCommand<MRUFileEntry>(MoveToTopCommandExecuted);
            this.openCommand = new DelegateCommand<MRUFileEntry>(OpenCommandExecuted);

            this.mainViewModel = mainViewModel;

            InitializeMRUEntries(modelContextName);
        }
예제 #4
0
        /// <summary>
        /// Constuctor.
        /// </summary>
        /// <param name="modelContextName">Name of the model context.</param>
        /// <param name="options">View model options.</param>
        /// <param name="mainViewModel">The main view model, this MRU view model belongs to.</param>
        public MRUFilesViewModel(string modelContextName, ViewModelOptions options, MainWelcomeViewModel mainViewModel)
        {
            this.Options        = options;
            this.mruFileEntries = new ObservableCollection <MRUFileEntryViewModel>();

            this.addCommand       = new DelegateCommand <MRUFileEntry>(AddCommandExecuted);
            this.removeCommand    = new DelegateCommand <MRUFileEntry>(RemoveCommandExecuted);
            this.moveToTopCommand = new DelegateCommand <MRUFileEntry>(MoveToTopCommandExecuted);
            this.openCommand      = new DelegateCommand <MRUFileEntry>(OpenCommandExecuted);

            this.mainViewModel = mainViewModel;

            InitializeMRUEntries(modelContextName);
        }