Exemple #1
0
 public StatusViewSwitch()
 {
     InitializeComponent();
     if (Singleton.Any <IHardwareVolumeChanger>())
     {
         _changer             = Singleton.Resolve <IHardwareVolumeChanger>();
         _changer.VolumeDown += _changer_VolumeChanged;
         _changer.VolumeUp   += _changer_VolumeChanged;
     }
 }
Exemple #2
0
        public FloatViewSwitch()
        {
            InitializeComponent();
            if (Singleton.Any <IHardwareVolumeChanger>())
            {
                _changer             = Singleton.Resolve <IHardwareVolumeChanger>();
                _changer.VolumeDown += _changer_VolumeChanged;
                _changer.VolumeUp   += _changer_VolumeChanged;
            }

            btInput.Click += BtInput_Click;
        }
Exemple #3
0
        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;
            }
        }