예제 #1
0
        public MainUI()
        {
            keyboardLayout = LoadKeyboardLayout();

            this.Size     = new Size(1600, 500);
            box           = new PictureBox();
            box.Size      = new Size(1600, 250);
            box.Location  = new Point(0, 10);
            box.BackColor = Color.White;
            canvas        = box.CreateGraphics();

            testLightingBtn          = new Button();
            testLightingBtn.Text     = "Test Lighting";
            testLightingBtn.Size     = new Size(200, 50);
            testLightingBtn.Location = new Point(0, 300);
            testLightingBtn.Click   += TestLightingClicked;
            // chromabtn.Enabled = false;

            /*ledstripbtn = new Button();
             * ledstripbtn.Text = "Use LED Strip";
             * ledstripbtn.Size = new Size(200, 50);
             * ledstripbtn.Location = new Point(0, 350);
             * ledstripbtn.Click += UseLEDStripClicked;*/

            Label lolModeLabel = new Label();

            lolModeLabel.Text        = "League of Legends Ability Cast mode";
            lolModeLabel.Location    = new Point(300, 280);
            lolModeLabel.Size        = new Size(200, 20);
            lolModeSelector          = new ComboBox();
            lolModeSelector.Location = new Point(300, 300);
            lolModeSelector.Items.Add("Normal Cast");
            lolModeSelector.Items.Add("Quick Cast");
            lolModeSelector.Items.Add("Quick Cast with Indicator");
            lolModeSelector.SelectedIndex         = 0;
            lolModeSelector.SelectedIndexChanged += LolModeSelectionChanged;

            /*plt = new FormsPlot();
             * plt.Location = new Point(0, 100);
             * plt.Size = new Size(800, 200);*/

            // Input hook test

            /*KeyboardHook.Instance.OnMouseClicked += (s,e) =>
             * {
             *  //MessageBox.Show("HOLA!");
             *  Debug.WriteLine("clicked" + e.Button);
             * };*/



            this.Controls.AddRange(new Control[] { box, testLightingBtn, ledstripbtn, lolModeLabel, lolModeSelector });

            Gradient.GeneratePalettes();

            ledManager = new LedManager();
            ledManager.DisplayUpdated += UpdateUI;
        }
예제 #2
0
        public MainUI()
        {
            keyboardLayout = LoadKeyboardLayout();

            this.Size     = new Size(1600, 500);
            box           = new PictureBox();
            box.Size      = new Size(1600, 250);
            box.Location  = new Point(0, 10);
            box.BackColor = Color.White;
            canvas        = box.CreateGraphics();

            chromabtn          = new Button();
            chromabtn.Text     = "Use Razer Chroma";
            chromabtn.Size     = new Size(200, 50);
            chromabtn.Location = new Point(0, 300);
            chromabtn.Click   += UseRazerChromaClicked;
            chromabtn.Enabled  = false;

            ledstripbtn          = new Button();
            ledstripbtn.Text     = "Use LED Strip";
            ledstripbtn.Size     = new Size(200, 50);
            ledstripbtn.Location = new Point(0, 350);
            ledstripbtn.Click   += UseLEDStripClicked;

            Label lolModeLabel = new Label();

            lolModeLabel.Text        = "League of Legends Ability Cast mode";
            lolModeLabel.Location    = new Point(300, 280);
            lolModeLabel.Size        = new Size(200, 20);
            lolModeSelector          = new ComboBox();
            lolModeSelector.Location = new Point(300, 300);
            lolModeSelector.Items.Add("Normal Cast");
            lolModeSelector.Items.Add("Quick Cast");
            lolModeSelector.Items.Add("Quick Cast with Indicator");
            lolModeSelector.SelectedIndex         = 0;
            lolModeSelector.SelectedIndexChanged += LolModeSelectionChanged;

            /*plt = new FormsPlot();
             * plt.Location = new Point(0, 100);
             * plt.Size = new Size(800, 200);*/



            this.Controls.AddRange(new Control[] { box, chromabtn, ledstripbtn, lolModeLabel, lolModeSelector });

            Gradient.GeneratePalettes();

            ledManager = new LedManager();
            ledManager.DisplayUpdated += UpdateUI;
        }
예제 #3
0
        public MainUI()
        {
            this.Size     = new Size(1600, 500);
            box           = new PictureBox();
            box.Size      = new Size(1600, 50);
            box.Location  = new Point(0, 10);
            box.BackColor = Color.White;
            canvas        = box.CreateGraphics();

            plt          = new FormsPlot();
            plt.Location = new Point(0, 100);
            plt.Size     = new Size(800, 200);

            this.Controls.AddRange(new Control[] { box, plt });

            Gradient.GeneratePalettes();

            ledManager = new LedManager(170, true);
            ledManager.UpdateDisplay += UpdateUI;
        }