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; }
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); }
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; }
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; }
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; }
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(); }
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; }
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; }
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); } }
private void tsiAbout_Click(object sender, EventArgs e) { DialogPositioner.From(this); DialogPositioner.preferSouth = true; new frmAbout().Show(); }
private void frmAbout_Load(object sender, EventArgs e) { DialogPositioner.ApplyTo(this); }