Пример #1
0
        private static void GenerateFault(SectionDesignTime section)
        {
            var fault = new FaultDesignTime();

            section.Faults.Add(fault);

            var rpdMeter = new RpdMeterDesignTime("УРАН 1");

            fault.RpdMeters.Add(rpdMeter);
            rpdMeter.Channels.Add(new RpdChannelDesignTime("Канал 1"));
            rpdMeter.Channels.Add(new RpdChannelDesignTime("Канал 2"));
            rpdMeter.Channels.Add(new RpdChannelDesignTime("Канал 3"));
            rpdMeter.Channels.Add(new RpdChannelDesignTime("Канал 4"));
            rpdMeter.Channels.Add(new RpdChannelDesignTime("Канал 5"));
            rpdMeter.Channels.Add(new RpdChannelDesignTime("Канал 6"));

            var psnMeter = new PsnMeterDesignTime();

            fault.PsnLog.PsnMeters.Add(psnMeter);
            psnMeter.PsnChannels.Add(new PsnChannelDesignTime("Канал 1"));
            psnMeter.PsnChannels.Add(new PsnChannelDesignTime("Канал 2"));
            psnMeter.PsnChannels.Add(new PsnChannelDesignTime("Канал 3"));
            psnMeter.PsnChannels.Add(new PsnChannelDesignTime("Канал 4"));
            psnMeter.PsnChannels.Add(new PsnChannelDesignTime("Канал 5"));


            fault.Signals.Add(new SignalDesignTime("Сигнал 1"));
            fault.Signals.Add(new SignalDesignTime("Сигнал 2"));
            fault.Signals.Add(new SignalDesignTime("Сигнал 3"));
            fault.Signals.Add(new SignalDesignTime("Сигнал 4"));
        }
Пример #2
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);
        }
Пример #3
0
        private static void GeneratePsnLogDesignTime(SectionDesignTime section)
        {
            var log = new PsnLogDesignTime()
            {
                HasIntegrityErrors = true
            };

            var meter = new PsnMeterDesignTime();

            meter.PsnChannels.Add(new PsnChannelDesignTime());
            meter.PsnChannels.Add(new PsnChannelDesignTime());
            meter.PsnChannels.Add(new PsnChannelDesignTime());
            meter.PsnChannels.Add(new PsnChannelDesignTime());
            meter.PsnChannels.Add(new PsnChannelDesignTime());
            meter.PsnChannels.Add(new PsnChannelDesignTime());
            log.PsnMeters.Add(meter);

            section.PsnLogs.Add(log);
            section.PsnLogs.Add(new PsnLogDesignTime());
            section.PsnLogs.Add(new PsnLogDesignTime());
            section.PsnLogs.Add(new PsnLogDesignTime());
            section.PsnLogs.Add(new PsnLogDesignTime());
            section.PsnLogs.Add(new PsnLogDesignTime());
            section.PsnLogs.Add(new PsnLogDesignTime());
            section.PsnLogs.Add(new PsnLogDesignTime());
            section.PsnLogs.Add(new PsnLogDesignTime());
            section.PsnLogs.Add(new PsnLogDesignTime());
            section.PsnLogs.Add(new PsnLogDesignTime());
            section.PsnLogs.Add(new PsnLogDesignTime());
            section.PsnLogs.Add(new PsnLogDesignTime());
            section.PsnLogs.Add(new PsnLogDesignTime()
            {
                IsNew = true
            });
            section.PsnLogs.Add(new PsnLogDesignTime()
            {
                IsNew = true
            });
            section.PsnLogs.Add(new PsnLogDesignTime()
            {
                IsNew = true
            });
            section.PsnLogs.Add(new PsnLogDesignTime()
            {
                IsNew = true
            });
            section.PsnLogs.Add(new PsnLogDesignTime()
            {
                IsNew = true
            });
        }