Beispiel #1
0
        private void Form1_Load(object sender, EventArgs e)
        {
            timer1.Interval = 1000 / 60;
            int argb = (int)Microsoft.Win32.Registry.GetValue(@"HKEY_CURRENT_USER\Software\Microsoft\Windows\DWM", "ColorizationColor", null);

            SysColor     = Color.FromArgb(255, Color.FromArgb(argb));
            hk_MediaNext = new GlobalHotkey(Constants.NOMOD, Keys.MediaNextTrack, this);
            hk_MediaPrev = new GlobalHotkey(Constants.NOMOD, Keys.MediaPreviousTrack, this);
            hk_MediaPlay = new GlobalHotkey(Constants.NOMOD, Keys.MediaPlayPause, this);
            hk_StandNext = new GlobalHotkey(Constants.CTRL | Constants.SHIFT, Keys.F12, this);
            hk_StandPrev = new GlobalHotkey(Constants.CTRL | Constants.SHIFT, Keys.F11, this);
            hk_StandPlay = new GlobalHotkey(Constants.CTRL | Constants.SHIFT, Keys.F10, this);
            hk_MediaNext.Register();
            hk_MediaPrev.Register();
            hk_MediaPlay.Register();
            hk_StandNext.Register();
            hk_StandPrev.Register();
            hk_StandPlay.Register();
            Enum.TryParse(Properties.MMP.Default.DrawMode, out colorMode);
            menuControl = new MenuController(this);
            songHandler = new SongHandler(this);
            menuControl.Add(new VolumeMenuHandler(songHandler, menuControl));
            menuControl.Add(new NextSongMenuHandler(songHandler, menuControl));
            menuControl.Add(new PositionMenuHandler(songHandler, menuControl));
            menuControl.Add(new TrackMenuHandler(songHandler, menuControl));
            menuControl.Add(new PreviousSongMenuHandler(songHandler, menuControl));
            menuControl.Add(new CloseMenuHandler(songHandler, menuControl));
            menuControl.DoCreate();
            Paused = true;
        }
Beispiel #2
0
 public MenuHandler(SongHandler songhandler, MenuController menu)
 {
     SongControls = songhandler;
     MenuControls = menu;
 }