コード例 #1
0
        private void tmiEditKpsColors_Click(object sender, EventArgs e)
        {
            DialogPositioner.From(this);
            DialogPositioner.preferSouth = true;
            frmKps k = new frmKps();

            if (k.ShowDialog() != DialogResult.OK)
            {
                return;
            }

            KPSCOLOR[] newcolors = k.GetNewColors();
            if (SerializeKpsColors(kpscolors, kpscolorscount) == SerializeKpsColors(newcolors, newcolors.Length))
            {
                return;
            }

            for (int i = 0; i < newcolors.Length; i++)
            {
                kpscolors[i] = newcolors[i];
            }
            kpscolorscount = newcolors.Length;

            settingsModified = true;
        }
コード例 #2
0
 private void frmColorPicker_Load(object sender, EventArgs e)
 {
     cancelled     = true;
     rscroll.Value = color.R;
     gscroll.Value = color.G;
     bscroll.Value = color.B;
     Updatevalues(true);
     DialogPositioner.ApplyTo(this);
 }
コード例 #3
0
ファイル: KpsColorControl.cs プロジェクト: yugecin/osukps
        private void btnColor_Click(object sender, EventArgs e)
        {
            DialogPositioner.From(FindForm());
            Color?newcol = frmColorPicker.ShowAndEdit(btnColor.BackColor);

            if (newcol == null)
            {
                return;
            }
            btnColor.BackColor = (Color)newcol;
        }
コード例 #4
0
 private void frmGetKey_Load(object sender, EventArgs e)
 {
     DialogPositioner.ApplyTo(this);
     oldactivecolor           = colors.active;
     oldinactivecolor         = colors.inactive;
     btnColInactive.BackColor = colors.inactive;
     btnColActive.BackColor   = colors.active;
     lblKey.Text = "[ Press a key ]";
     Cancelled   = true;
     keychanged  = false;
 }
コード例 #5
0
        private void btnColActive_Click(object sender, EventArgs e)
        {
            DialogPositioner.From(this);
            Color?newcol = frmColorPicker.ShowAndEdit(colors.active);

            if (newcol == null)
            {
                return;
            }
            colors.active          = (Color)newcol;
            btnColActive.BackColor = colors.active;
        }
コード例 #6
0
        private void newConfigurationToolStripMenuItem_Click(object sender, EventArgs e)
        {
            DialogPositioner.From(this);
            string name = frmPrompt.Prompt("Save new configuration", "Enter a name for your new configuration.", "", "Save");

            if (name == null)
            {
                return;
            }
            changeCurrentSettingsFile(name + ".ini");
            saveSettings();
        }
コード例 #7
0
        private void tmiEditForeColor_Click(object sender, EventArgs e)
        {
            DialogPositioner.From(this);
            Color?newcol = frmColorPicker.ShowAndEdit(lblTotal.ForeColor);

            if (newcol == null)
            {
                return;
            }
            frmMain.FgColor = (Color)newcol;
            OnColorsUpdated();
            settingsModified = true;
        }
コード例 #8
0
        private void tmiEditGlobalActiveColor_Click(object sender, EventArgs e)
        {
            DialogPositioner.From(this);
            Color?newcol = frmColorPicker.ShowAndEdit(btns[0].color.active);

            if (newcol == null)
            {
                return;
            }
            Color nc = (Color)newcol;

            for (var i = 0; i < buttonCount; i++)
            {
                btns[i].color.active = nc;
            }
            settingsModified = true;
        }
コード例 #9
0
ファイル: KpsButton.cs プロジェクト: yugecin/osukps
        private void KpsButton_Click(object sender, EventArgs e)
        {
            DialogPositioner.From(FindForm(), PointToScreen(new Point(Width / 2, Height / 2)));
            IKeyHandler newHandler = frmGetKey.ShowDialogAndGetKeyHandler(color, key, label.Text);

            if (newHandler == null)
            {
                return;
            }
            keyhandler = newHandler;
            key        = frmGetKey.yourkey();      //get my key id
            frmGetKey.UpdateLabel(label);
            if (settingChangedEvent != null)
            {
                settingChangedEvent(null, null);
            }
        }
コード例 #10
0
 private void tsiAbout_Click(object sender, EventArgs e)
 {
     DialogPositioner.From(this);
     DialogPositioner.preferSouth = true;
     new frmAbout().Show();
 }
コード例 #11
0
ファイル: frmAbout.cs プロジェクト: yugecin/osukps
 private void frmAbout_Load(object sender, EventArgs e)
 {
     DialogPositioner.ApplyTo(this);
 }