コード例 #1
0
        public void AddBlinkStick(IBlinkStickSettings settings = null)
        {
            var newDevice = settings == null?_blinkStickViewModelFactory.Create() : _blinkStickViewModelFactory.Create(settings);

            LedDevices.Add(newDevice);

            var str = settings == null?_loc.GetByKey("MenuItem_NewDevice") : settings.Name;

            newDevice.Create(Menu.CreateChild(newDevice, icon: PackIconKind.UsbFlashDriveOutline, true, str));
        }
コード例 #2
0
ファイル: StaticEventViewModel.cs プロジェクト: cr3nox/cRGB
 public StaticEventViewModel(IEventAggregator aggregator, ILocalizationHelper loc, IStaticEvent ledEvent) : base(aggregator, loc, ledEvent)
 {
     _eventAggregator    = aggregator;
     _localizationHelper = loc;
     DisplayName         = loc.GetByKey("StaticEvent");
 }
コード例 #3
0
 public AudioEventViewModel(IEventAggregator aggregator, ILocalizationHelper loc, IAudioEvent ledEvent) : base(aggregator, loc, ledEvent)
 {
     DisplayName = loc.GetByKey("AudioEvent");
 }
コード例 #4
0
 public TimerEventViewModel(IEventAggregator aggregator, ILocalizationHelper loc, ITimerEvent timerEvent) : base(aggregator, loc, timerEvent)
 {
     _eventAggregator = aggregator;
     DisplayName      = loc.GetByKey("TimerEvent");
     Model            = timerEvent;
 }