예제 #1
0
        public SettingsForm(MainForm mForm)
        {
            InitializeComponent();
            mainForm             = mForm;
            this.FormBorderStyle = FormBorderStyle.FixedSingle;
            this.MaximizeBox     = false;
            this.MinimizeBox     = false;
            KeyboardListener.HookKeyboard();

            cmdToggleOverlay.GotFocus     += onFocus;
            cmdToggleVPFeature.GotFocus   += onFocus;
            vpFeatureDiscordCB.GotFocus   += onFocus;
            vpFeatureTeamspeakCB.GotFocus += onFocus;
            vpFeatureSkypeCB.GotFocus     += onFocus;
            overlayClickableCB.GotFocus   += onFocus;
            txtAboutCntxt.GotFocus        += onFocus;
            cmdClearDb.GotFocus           += onFocus;

            gameplayTooltip             = new ToolTip();
            gameplayTooltip.ToolTipIcon = ToolTipIcon.Info;
            gameplayTooltip.IsBalloon   = true;
            gameplayTooltip.ShowAlways  = true;
            gameplayTooltip.SetToolTip(gameplayTooltipLabel, "Automatic picking works by analyzing mouse and keyboard during gameplay\nUse this to let the system know whether the game you play is based on mouse, keyboard or both in order to get good results");
            gameplayTooltip.AutoPopDelay = 20000;

            txtVersion.Text          = "v" + Program.VERSION;
            txtAboutCntxt.DetectUrls = true;
            txtAboutCntxt.ReadOnly   = true;
            txtAboutCntxt.Text       = "This application was developed as a Software Engineering B.Sc. graduation project at Azrieli College of Engineering\r\n\r\nFor more details visit: https://github.com/alkerr/GamingMusicPlayer";
            this.hide();
        }
        private void UserControlConfig_OnLoaded(object sender, RoutedEventArgs e)
        {
            Global.UltimoUserControl        = new UserControlConfig();
            Global.CasinhaButton.Visibility = Visibility.Visible;

            _listener = new KeyboardListener();
            _listener.OnKeyPressed += _listener_OnKeyPressed;

            _listener.HookKeyboard();

            CheckBoxLeague.IsChecked = Settings.Default.RLeague;
        }
        //  Evento ao carregar o UserControlRodando_OnLoaded
        private void UserControlRodando_OnLoaded(object sender, RoutedEventArgs e)
        {
            _listener = new KeyboardListener();
            _listener.OnKeyPressed += _listener_OnKeyPressed;

            _listener.HookKeyboard();
            Global.UltimoUserControl = new UserControlRodando();

            Global.EngrenagemButton.Visibility = Visibility.Visible;

            //  Verifica se o league tá aberto
            //  Passamos a função direta pra não ter o intervalo do timer, ao inicializar o UserControl
            LeagueStatusUx();

            //  É só um timer, pra ficar repetindo a função de cima...
            TimerLeagueStatusUx();
        }