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); }
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); } }