Example #1
0
        public BlAuxiliary(MainUnitViewModel main, CardModel card)
        {
            _card      = card;
            Location.X = XLocation;

            _main = main;
        }
Example #2
0
 public VuMeter(MainUnitViewModel main)
 {
     _main                       = main;
     _vuTimer.Elapsed           += VuTimerEvent;
     main.PanelSelectionChanged += (sender, args) => StopVuMeter();
     _vuValues.Add(-80);
 }
Example #3
0
 public McuSelector(MainUnitViewModel main, PanelViewModel panel)
     : base(main.Id)
 {
     _main             = main;
     _panel            = panel;
     panel.McuChanged += PanelOnMcuChanged;
 }
Example #4
0
        private void InitiateSelectors()
        {
            ButtonRangeSelectors = new ObservableCollection <ButtonRangeSelector>(Enumerable.
                                                                                  Range(0, 18).Select(i => new ButtonRangeSelector(i, this)));

            ButtonRangeSelectors[0].IsSelected = true;
            SelectedMcu = _main.TabCollection.OfType <MainUnitViewModel>().First(i => i.Id == 0);

            McuSelectors = new ObservableCollection <McuSelector>(
                _main.TabCollection.OfType <MainUnitViewModel>().Select(q => new McuSelector(q, this)));
            _main.SystemChanged += MainOnSystemChanged;


            McuSelectors[0].IsSelected = true;

            ColumnHeaderViews = new ObservableCollection <ColumnHeaderViewModel>(Enumerable.Range(0, 12).Select(
                                                                                     x => new ColumnHeaderViewModel(x, SelectedMcu, this)));

            ButtonChanged += (sender, args) => ButtonStartId = args.NewId;

            McuChanged += OnMcuChanged;

            RowHeaders = new ObservableCollection <RowHeaderViewModel>(GenRows(SelectedMcu));
            SelectedMcu.CardsUpdated += NewMcuOnCardsUpdated;
        }
Example #5
0
        public BlLink(MainUnitViewModel main)
        {
            LinkOptions = new ObservableCollection <LinkOption>();
            _main       = main;
            Location.X  = XLocation;
            Cards(main.DataModel.ExpansionCards);

            for (var x = 0; x < 15; x++)
            {
                Snapshots.Add(new SnapShot(this)
                {
                    Offset   = { X = 0, Y = SnapshotHeight + RowHeight * x + _innerSpace(x) },
                    SnapType = SnapType.Gray,
                    RowId    = x
                });

                Snapshots.Add(new SnapShot(this)
                {
                    Offset   = { X = Size.X, Y = SnapshotHeight + RowHeight * x + _innerSpace(x) },
                    SnapType = SnapType.Red,
                    RowId    = x
                });
            }

            Snapshots.Add(new SnapShot(this)
            {
                Offset = { X = SnapshotWidth, Y = Size.Y }, RowId = 30
            });
        }
Example #6
0
 public BlOutput(FlowModel flow, MainUnitViewModel main)
 {
     _flow      = flow;
     Location.X = XLocation;
     main.PresetNamesUpdated += Receiver_PresetNamesUpdated;
     main.DspMirrorUpdated   += ReceiverOnDspMirrorUpdated;
 }
Example #7
0
 public LinkCardOption(CardModel card, MainUnitViewModel main, BlLink link)
 {
     _card = card;
     _main = main;
     _link = link;
     _main.CardsUpdated += (sender, args) => RaisePropertyChanged(() => IsVisible);
 }
Example #8
0
        public BlSpMatrix()
        {
            _main = new MainUnitViewModel();
            _card = new CardModel();

            ChkVms = new ObservableCollection <ChkVm>(GenMatrix());
        }
Example #9
0
 public MessageSelectViewModel(MainUnitViewModel main, int id)
 {
     _main = main;
     _id   = id;
     main.SdCardMessagesReceived  += Receiver_SdCardMessagesReceived;
     main.SdCardPositionsReceived += ReceiverOnSdCardPositionsReceived;
 }
Example #10
0
 public SendData(MainUnitViewModel main) : base(main)
 {
     PopulateItems();
     foreach (var itemtoDownload in ItemstoDownload)
     {
         AttachHandler(itemtoDownload);
     }
 }
Example #11
0
        public BlAuxSpeakerPeq(MainUnitViewModel main, CardModel card)
            : base(main)
        {
            Location.X = XLocation;

            _card = card;
            main.PresetNamesUpdated += Receiver_PresetNamesUpdated;
        }
Example #12
0
        public BlSpeakerPeq(FlowModel flow, MainUnitViewModel main)
            : base(main)
        {
            Location.X = XLocation;

            _flow = flow;
            main.PresetNamesUpdated += Receiver_PresetNamesUpdated;
        }
Example #13
0
 public BlDelay(MainUnitViewModel main, FlowModel flow)
 {
     _main               = main;
     _flow               = flow;
     Location.X          = XLocation;
     Location.Y          = RowHeight;
     _main.DelayChanged += () => RaisePropertyChanged(() => DisplaySetting);
 }
Example #14
0
        public BlInputPeq(FlowModel flow, MainUnitViewModel main)
            : base(main)
        {
            Location.X = XLocation;

            _flow = flow;
            SetYLocation();
        }
Example #15
0
 public BlMonitor(FlowModel flow, MainUnitViewModel main, CardModel card)
 {
     _card               = card;
     _main               = main;
     Location.X          = XLocation;
     _flow               = flow;
     _main.KreisUpdated += ReceiverOnEepromReceived;
 }
Example #16
0
        protected PeqBaseViewModel(MainUnitViewModel main)
        {
            Main = main;

            PresentationTraceSources.DataBindingSource.Switch.Level = SourceLevels.Critical;

            main.RedundancyUpdated  += EepromHandlerOnSpeakerRedundancyDataUpdated;
            main.PresetNamesUpdated += EepromHandlerOnPresetNamesUpdated;
        }
Example #17
0
        private void OnMcuChanged(object sender, McuChangedEventArgs rangeChangedEventArgs)
        {
            SelectedMcu.CardsUpdated -= NewMcuOnCardsUpdated;

            SelectedMcu = rangeChangedEventArgs.NewMcu;
            UpdateRowHeaders();

            rangeChangedEventArgs.NewMcu.CardsUpdated += NewMcuOnCardsUpdated;
        }
Example #18
0
        public BlSpeaker(FlowModel flow, MainUnitViewModel main, int line)
        {
            _flow = flow;
            _main = main;
            _line = line;

            Location.X = XLocation + (line > 0 ? 15 : 5);
            UpdateLoads();
        }
Example #19
0
 protected VuMeterControl(MainUnitViewModel main)
 {
     _main           = main;
     _vuMeterAvarage = -80;
     _vuMeterCurrent = -80;
     _vuMeterMax     = -80;
     main.VuMeter.VuMeterActivated += VuMeter_VuMeterActivated;
     main.VuMeter.VuDataReceived   += VuMeter_VuDataReceived;
 }
Example #20
0
        public BlInputName(FlowModel flow, MainUnitViewModel main)
            : base(main)
        {
            _flow = flow;
            _main = main;


            //main.SensitivityDownloaded += ReceiverOnSensitivityDownloaded;
            main.PresetNamesUpdated   += Receiver_PresetNamesUpdated;
            main.DspMirrorUpdated     += Receiver_DspMirrorUpdated;
            main.MonitorSliderUpdated += (a, b) => RaisePropertyChanged(() => MonitorSlider);
        }
Example #21
0
        public BlSpMatrix(MainUnitViewModel main, CardModel card)
        {
            _main = main;
            _card = card;

            Location.X = XLocation;

            if (main.DataModel.LoudSpeakerMatrix == null)
            {
                main.DataModel.LoudSpeakerMatrix = new Dictionary <int, int>();
            }

            ChkVms = new ObservableCollection <ChkVm>(GenMatrix());
        }
Example #22
0
        public AuxLinkOption(FlowModel flow, CardModel card, MainUnitViewModel main, BlLink link)
        {
            _card = card;
            _main = main;
            _link = link;
            _flow = flow;

            Messenger.Default.Register <int>(this, "InpName", i =>
            {
                if (i != _flow.Id)
                {
                    return;
                }
                RaisePropertyChanged(() => Content);
            });
            link.LinkChanged += LinkOnLinkChanged;
        }
Example #23
0
        public BlExtInput(FlowModel flow, MainUnitViewModel unit, MainViewModel main)
            : base(unit)
        {
            _flow      = flow;
            Unit       = unit;
            _main      = main;
            _channelId = _vuBlock[0];
            if (_flow.Id < GenericMethods.StartCountFrom)
            {
                throw new ArgumentException("External input on flow " + _flow.Id);
            }
            Unit.ExtinputUpdate   += () => RaisePropertyChanged(() => DisplaySetting);
            Unit.DspMirrorUpdated += Receiver_DspMirrorUpdated;


            InitSliders();
            Unit.VuMeter.VuMeterActivated += (sender, args) => RaisePropertyChanged(() => VuActivated);
        }
Example #24
0
        public ColumnHeaderViewModel(int relativeButtonId, MainUnitViewModel mainUnit, PanelViewModel panelViewModel)
        {
            _relativeButtonId = relativeButtonId;
            MainUnit          = mainUnit;
            ButtonId          = relativeButtonId;


            Cells = new ObservableCollection <MatrixCellViewModel>(GenCells());

            UpdateAllHeaders();

            panelViewModel.ButtonChanged += PanelViewModelOnButtonChanged;

            panelViewModel.McuChanged += PanelViewModelOnMcuChanged;
            MainUnit.CardsUpdated     += NewMcu_CardsUpdated;

            AlarmSelectionChanged        += OnAlarmSelectionChanged;
            mainUnit.RoutingTableUpdated += Receiver_EepromValuesReceived;
        }
Example #25
0
        public BlEmergency(MainUnitViewModel main)
        {
            _main = main;

            for (var x = 0; x < 5; x++)
            {
                Snapshots.Add(new SnapShot(this)
                {
                    Offset = { X = 0, Y = SnapshotHeight + RowHeight * x }, SnapType = SnapType.Gray, RowId = x
                });
            }
            Snapshots.Add(new SnapShot(this)
            {
                Offset = { X = SnapshotWidth, Y = 0 }, RowId = 30
            });

            Location.X = XLocation;
            SetYLocation();

            UpdatePanelCount();
        }
Example #26
0
 public AttachedPanelUpdater(MainUnitViewModel main) : base(main)
 {
 }
Example #27
0
 public BlEmergency()
 {
     _main = new MainUnitViewModel();
 }
Example #28
0
 public Auxlinks(MainUnitViewModel main)
     : base(main)
 {
 }
Example #29
0
 public Delaysettings(MainUnitViewModel main)
     : base(main)
 {
 }
Example #30
0
 public SdMessages(MainUnitViewModel main)
     : base(main)
 {
 }