コード例 #1
0
        public MainViewModelDesign()
        {
            var colors = new ColorsStorage("");

            MainChart = new SciChartViewModel(colors);

            InitializeCommands();

            SelectionMasksStorage = new SelectionMasksStorage();

            IsTrendLoading     = false;
            IsTrendNotLoading  = true;
            IsRepositoryLoaded = true;
            IsExportDataMode   = true;
            IsTreeViewExpanded = true;
            IsPopupOpen        = false;
            IsDebugMode        = true;

            Repository = new RepositoryDesignTime();

            var loco = new LocomotiveDesignTime();

            Repository.Locomotives.Add(loco);

            var section = new SectionDesignTime(loco);

            loco.Sections.Add(section);

            GenerateFault(section);
            GenerateFault(section);
            GeneratePsnLogDesignTime(section);
            _collapseTreeCmd = new RelayCommand(CollapseTree, () => true);
        }
コード例 #2
0
ファイル: MainViewModel.cs プロジェクト: AlienJust/RPD
        private void SaveSelectionMask(string containerName, SelectionMask mask)
        {
            if (!SelectionMasksStorage.SelectionMasks.ContainsKey(containerName))
            {
                SelectionMasksStorage.SelectionMasks[containerName] = new SelectionMasksCollection();
            }

            if (!SelectionMasksStorage.SelectionMasks[containerName].Contains(mask))
            {
                SelectionMasksStorage.SelectionMasks[containerName].Items.Add(mask);
                SelectionMasksStorage.Save(_applicationSettings.SelectionMasksFullFilePath);
            }
        }