public StatusViewSwitch() { InitializeComponent(); if (Singleton.Any <IHardwareVolumeChanger>()) { _changer = Singleton.Resolve <IHardwareVolumeChanger>(); _changer.VolumeDown += _changer_VolumeChanged; _changer.VolumeUp += _changer_VolumeChanged; } }
public FloatViewSwitch() { InitializeComponent(); if (Singleton.Any <IHardwareVolumeChanger>()) { _changer = Singleton.Resolve <IHardwareVolumeChanger>(); _changer.VolumeDown += _changer_VolumeChanged; _changer.VolumeUp += _changer_VolumeChanged; } btInput.Click += BtInput_Click; }
public FastSwitchWindow() { if (Singleton.Any <IHardwareVolumeChanger>()) { _oldChanger = Singleton.Resolve <IHardwareVolumeChanger>(); Singleton.Clear <IHardwareVolumeChanger>(); } Singleton.Add(this); // Add as IHardwareVolumeChanger MouseWheel += Window_MouseWheel; Closed += FastSwitchWindow_Closed; InitializeComponent(); switchesGrid.Initialize(); }
public FloatViewSliderSwitch() { InitializeComponent(); if (Singleton.Any <IHardwareVolumeChanger>()) { _changer = Singleton.Resolve <IHardwareVolumeChanger>(); _changer.VolumeDown += _changer_VolumeChanged; _changer.VolumeUp += _changer_VolumeChanged; } btInput.Clicked += BtInput_Clicked; btOn.Clicked += (o, e) => SetMax(); btMiddle.Clicked += (o, e) => SetMiddle(); btOff.Clicked += (o, e) => SetMin(); }
public StatusViewSwitch() { InitializeComponent(); // Extra f****** crutch, list view calculates wrong height bool crutch = true; listView.SizeChanged += (o, e) => { if (crutch) { crutch = false; listView.HeightRequest = listView.Height + 5; } }; if (Singleton.Any <IHardwareVolumeChanger>()) { _changer = Singleton.Resolve <IHardwareVolumeChanger>(); _changer.VolumeDown += _changer_VolumeChanged; _changer.VolumeUp += _changer_VolumeChanged; } }