Init() public static method

全局初始化
public static Init ( IntPtr shandle, Size ssize ) : void
shandle System.IntPtr 显示区域的handle
ssize System.Drawing.Size 显示区域的大小
return void
Ejemplo n.º 1
0
        private void Main_Shown(object sender, EventArgs e)
        {
            CenterToScreen();
            Core.Init(Main_Main_Display.Handle, Main_Main_Display.Size);
            SetForm();
            RefreshList();
            VisibleChanged += Main_VisibleChanged;
            SizeChanged    += Main_SizeChanged;
            NotifySystem.RegisterClick(TaskbarIconClickHandler);
            Core.MainIsVisible      = true;
            _hotkeyHelper           = new HotkeyHelper(Handle);
            _playKey                = _hotkeyHelper.RegisterHotkey(Keys.F5, KeyModifiers.Alt);
            _playKey1               = _hotkeyHelper.RegisterHotkey(Keys.Play, KeyModifiers.None);
            _playKey2               = _hotkeyHelper.RegisterHotkey(Keys.Pause, KeyModifiers.None);
            _prevKey                = _hotkeyHelper.RegisterHotkey(Keys.Left, KeyModifiers.Alt);
            _prevKey1               = _hotkeyHelper.RegisterHotkey(Keys.MediaPreviousTrack, KeyModifiers.None);
            _nextKey                = _hotkeyHelper.RegisterHotkey(Keys.Right, KeyModifiers.Alt);
            _nextKey1               = _hotkeyHelper.RegisterHotkey(Keys.MediaNextTrack, KeyModifiers.None);
            _hotkeyHelper.OnHotkey += OnHotkey;

            Main_Main_Display.ResumeLayout();
        }