private void DoInit()
        {
            _repeatLastCommandTimer = new Timer(new TimerCallback(SetLastRamColorTimerTick), null, Timeout.Infinite, Timeout.Infinite); //70ms apperas to be the lower vald value. 100 is even better but dont look good.
            _ledFun = new Comm_LED_Fun(false);
            _ledFun.Apply_ScanPeriphera_Scuuess += CallBackLedFunApplyScanPeripheralSuccess;
            _ledFun.ApplyEZ_Success             += CallBackLedFunApplyEzSuccess;
            _ledFun.ApplyAdv_Success            += CallBackLedFunApplyAdvSuccess;
            _ledFun.Ini_LED_Fun();
            _ledFun = CommUI.Get_Easy_Pattern_color_Key(_ledFun);

            _ledFun.LEd_Layout.Set_Support_Flag();
            do
            {
                Thread.Sleep(10);
            }while (!_scanDone);

            _ledFun.Current_Mode = 1;

            _ledFun.Led_Ezsetup_Obj.PoweronStatus = 1;
            _ledFun.Set_Sync(false);

            _ledObject      = (LedObject)typeof(Comm_LED_Fun).GetField("LedObj", BindingFlags.NonPublic | BindingFlags.Instance).GetValue(this._ledFun);
            _gb_led_periphs = (GBLedPeripherals)typeof(LedObject).GetField("gb_led_periphs", BindingFlags.NonPublic | BindingFlags.Instance).GetValue(_ledObject);
            _ram_led_obj    = (PeripheralDeviceManagement)typeof(LedObject).GetField("ram_led_obj", BindingFlags.NonPublic | BindingFlags.Instance).GetValue(_ledObject);
            //Initialize mode and bright.
            _ram_led_obj?.Software_Control(1, -1, 0, 9, true);
            _ledObject.bSyncRAM = false;
            _ledObject.bSyncVGA = false;
            _initialized        = true;
        }
        private void DoInit()
        {
            _repeatLastCommandTimmer.Elapsed  += OnTimedEvent;
            _repeatLastCommandTimmer.AutoReset = false;
            _ledFun = new Comm_LED_Fun(false);
            _ledFun.Apply_ScanPeriphera_Scuuess += CallBackLedFunApplyScanPeripheralSuccess;
            _ledFun.ApplyEZ_Success             += CallBackLedFunApplyEzSuccess;
            _ledFun.ApplyAdv_Success            += CallBackLedFunApplyAdvSuccess;

            _ledFun.Ini_LED_Fun();

            _ledFun = CommUI.Get_Easy_Pattern_color_Key(_ledFun);

            _ledFun.LEd_Layout.Set_Support_Flag();
            do
            {
                Thread.Sleep(10);
            }while (!_scanDone);

            _ledFun.Current_Mode = 0; // 1= Advanced 0 = Simple or Ez

            _ledFun.Led_Ezsetup_Obj.PoweronStatus = 1;
            _ledFun.Set_Sync(true);
            FillAllAreaInfo();
            Fill_ExtArea_info();
            _initialized = true;
        }
Exemple #3
0
        public void Init()
        {
            if (IsInitialized())
            {
                return;
            }

            bool scanDone = false;

            ledFun_ = new Comm_LED_Fun(false);
            ledFun_.Apply_ScanPeriphera_Scuuess += () => scanDone = true;

            ledFun_.Ini_LED_Fun();

            ledFun_ = CommUI.Get_Easy_Pattern_color_Key(ledFun_);
            ledFun_.LEd_Layout.Set_Support_Flag();

            do
            {
                Thread.Sleep(millisecondsTimeout: 10);
            }while (!scanDone);

            ledFun_.Current_Mode = 0;
            ledFun_.Led_Ezsetup_Obj.PoweronStatus = 1;
            ledFun_.Set_Sync(false);

            initialized_ = true;
        }
Exemple #4
0
        private void DoInit()
        {
            if (_ledFun != null)
            {
                return;
            }

            _ledFun = new Comm_LED_Fun(false);
            _ledFun.Apply_ScanPeriphera_Scuuess += CallBackLedFunApplyScanPeripheralSuccess;
            _ledFun.ApplyEZ_Success             += CallBackLedFunApplyEzSuccess;
            _ledFun.ApplyAdv_Success            += CallBackLedFunApplyAdvSuccess;

            _ledFun.Ini_LED_Fun();

            _ledFun = CommUI.Get_Easy_Pattern_color_Key(_ledFun);

            _ledFun.LEd_Layout.Set_Support_Flag();
            do
            {
                Thread.Sleep(10);
            }while (!_scanDone);

            _ledFun.Current_Mode = 0; // 1= Advanced 0 = Simple or Ez

            _ledFun.Led_Ezsetup_Obj.PoweronStatus = 1;
            StopMusicMode();
            _initialized = true;
            _ledFun.Set_Sync(false);
            StopMusicMode();
            FillAllAreaInfo();
            Fill_ExtArea_info();
        }