/// <summary> /// The checkbox has been checked or unchecked. /// </summary> /// <param name="control"></param> /// <param name="selectedIndex"></param> public void OnCheckChanged(LabelCheckBoxControl sender, bool isChecked) { // set the value for enabled bool enabled = isChecked; // locals Color labelColor = Color.Black; // use gray if not enabled if (!enabled) { // use dark gray labelColor = Color.DarkGray; } // set the label color this.NameControl.LabelColor = labelColor; this.ChipsControl.LabelColor = labelColor; this.IsComputerPlayerCheckBox.LabelColor = labelColor; // enable each of the controls this.CountingSystemControl.Enabled = enabled; this.CountingSystemControl.Editable = enabled; this.NameControl.Enabled = enabled; this.NameControl.Editable = enabled; this.ChipsControl.Enabled = enabled; this.ChipsControl.Editable = enabled; this.IsComputerPlayerCheckBox.Enabled = enabled; this.IsComputerPlayerCheckBox.Editable = enabled; }
/// <summary> /// The checkbox has been checked or unchecked. /// </summary> /// <param name="control"></param> /// <param name="selectedIndex"></param> public void OnCheckChanged(LabelCheckBoxControl sender, bool isChecked) { // If the sender object exists if (NullHelper.Exists(sender, options)) { // if htis is the MoveSourceCheckBox if (sender.Name == MoveSourceCheckBox.Name) { // Set the value for isChecked Options.MoveSourceImage = isChecked; } } }
/// <summary> /// The checkbox has been checked or unchecked. /// </summary> /// <param name="control"></param> /// <param name="selectedIndex"></param> public void OnCheckChanged(LabelCheckBoxControl sender, bool isChecked) { // if this is the UseEncryptionCheckBox if (sender.Name == "UseEncryptionCheckBox") { // if Checked if (UseEncryptionCheckBox.Checked) { // Enable both the EncryptionKey and the EncryptAndCopy button this.UseCustomKeyCheckBox.Editable = true; this.UseCustomKeyCheckBox.Enabled = true; this.EncryptAndCopyButton.Enabled = true; this.EncryptAndCopyButton.ForeColor = Color.Black; this.EncryptAndCopyButton.BackgroundImage = Properties.Resources.WoodButtonWidth640; } else { // Disable both the EncryptionKey and the EncryptAndCopy button this.UseCustomKeyCheckBox.Editable = false; this.UseCustomKeyCheckBox.Enabled = false; this.EncryptAndCopyButton.Enabled = false; this.EncryptAndCopyButton.ForeColor = Color.DarkGray; this.EncryptAndCopyButton.BackgroundImage = Properties.Resources.WoodButtonWidth640Disabled; } } // if this is the UseCustomKeyCheckBox if (sender.Name == "UseCustomKeyCheckBox") { // if Checked if (UseCustomKeyCheckBox.Checked) { // Enable both the EncryptionKeyControl EncryptionKeyControl.Editable = true; EncryptionKeyControl.Enabled = true; EncryptionKeyControl.LabelColor = Color.Black; } else { // Disable both Editable and Enabled EncryptionKeyControl.Editable = false; EncryptionKeyControl.Enabled = false; EncryptionKeyControl.LabelColor = Color.DarkGray; } } // Enable or disable buttons UIControl(); }
/// <summary> /// event is fired when On Check Changed /// </summary> public void OnCheckChanged(LabelCheckBoxControl sender, bool isChecked) { // if the value for HasMethodInfo is true if (HasMethodInfo) { // set the value which toggles the panel MethodInfo.UseCustomWhere = isChecked; // Enable the Save button if there are changes UIEnable(); // set this value because the WherePanel shjows or hides based upon it this.CustomWhere = isChecked; } }
/// <summary> /// The checkbox has been checked or unchecked. /// </summary> /// <param name="control"></param> /// <param name="selectedIndex"></param> public void OnCheckChanged(LabelCheckBoxControl sender, bool isChecked) { // if this is the UseEncryptionCheckBox if (sender.Name == "UseEncryptionCheckBox") { // if Checked if (UseEncryptionCheckBox.Checked) { // Enable both the EncryptionKey and the EncryptAndCopy button this.UseCustomKeyCheckBox.Editable = true; this.UseCustomKeyCheckBox.Enabled = true; } else { // Disable both the EncryptionKey and the EncryptAndCopy button this.UseCustomKeyCheckBox.Editable = false; this.UseCustomKeyCheckBox.Enabled = false; } } // if this is the UseCustomKeyCheckBox if (sender.Name == "UseCustomKeyCheckBox") { // if Checked if (UseCustomKeyCheckBox.Checked) { // Enable both the EncryptionKeyControl EncryptionKeyControl.Editable = true; EncryptionKeyControl.Enabled = true; EncryptionKeyControl.LabelColor = Color.Black; } else { // Disable both Editable and Enabled EncryptionKeyControl.Editable = false; EncryptionKeyControl.Enabled = false; EncryptionKeyControl.LabelColor = Color.DarkGray; } } // Enable or disable buttons UIControl(); }
/// <summary> /// This event is fired when a checkbox is checked or unchecked. /// </summary> /// <param name="labelCheckBox"></param> /// <param name="isChecked"></param> public void OnCheckChanged(LabelCheckBoxControl labelCheckBox, bool isChecked) { // If the CompareInfo object exists if (this.HasCompareInfo) { // only handle this event for the RemoteCompareCheckBox if (labelCheckBox.Name == "RemoteCompareCheckBox") { // if checked if (labelCheckBox.Checked) { // Set the CompareType CompareInfo.CompareType = CompareTypeEnum.CompareXmlFileAndSQLDatabase; // turn off Create Xml File until checked CreateXmlFileCheckBox.Checked = false; } else { // Set the CompareType this.CompareInfo.CompareType = CompareTypeEnum.CompareTwoSQLDatabases; } } else if (labelCheckBox.Name == "CreateXmlFileCheckBox") { // if checked if (labelCheckBox.Checked) { // Set the CompareType this.CompareInfo.CompareType = CompareTypeEnum.CreateXmlFile; } else { // Set the CompareType this.CompareInfo.CompareType = CompareTypeEnum.CompareXmlFileAndSQLDatabase; } } } // Control how the UI is setup UIControl(); }
/// <summary> /// event is fired when On Check Changed /// </summary> public void OnCheckChanged(LabelCheckBoxControl sender, bool isChecked) { // Show or hide the InfoLabel and InfoLabel1 basedup isChecked value. InfoLabel.Visible = !isChecked; ClickHere.Visible = ((isChecked) && (!DatabaseSchemaClicked)); // there is only one label check box control so this has to be the DatabaseCreatedCheckBox // if isChecked is true if (isChecked) { // Enable the button InstallDatabaseSchemaButton.Enabled = true; InstallDatabaseSchemaButton.ForeColor = Color.GhostWhite; } else { // Disable the button InstallDatabaseSchemaButton.Enabled = false; InstallDatabaseSchemaButton.ForeColor = Color.DarkGray; } }
/// <summary> /// event is fired when On Check Changed /// </summary> public void OnCheckChanged(LabelCheckBoxControl sender, bool isChecked) { // if isChecked if ((isChecked) && (HasInfo)) { // determine which control is checked, so we know which control to uncheck if (sender.Name == this.UseDataTierNetCheckBox.Name) { // Uncheck UseEntityFrameworkCheckBox UseEntityFrameworkCheckBox.Checked = false; // Use DataTier.Net to load the data Info.DataTechnology = DataTechnologyEnum.DataTierNet; } else if (sender.Name == this.UseEntityFrameworkCheckBox.Name) { // Uncheck UseDataTierNetCheckBox UseDataTierNetCheckBox.Checked = false; // Use EntityFramework.Net to load the data Info.DataTechnology = DataTechnologyEnum.EntityFramework; } } }
/// <summary> /// The checkbox has been checked or unchecked. /// </summary> /// <param name="control"></param> /// <param name="selectedIndex"></param> public void OnCheckChanged(LabelCheckBoxControl sender, bool isChecked) { // if the value for HasSettings is true if (HasSettings) { if (sender.Name == PromptForDeleteControl.Name) { // Set the value Settings.PromptForDelete = isChecked; } else if (sender.Name == DisableHoveringControl.Name) { // set the value Settings.DisableHoverControl = isChecked; } // if the value for HasSettingsFile is true if (HasSettingsFile) { // Save the Settings SaveSettings(); } } }
/// <summary> /// The checkbox has been checked or unchecked. /// </summary> /// <param name="control"></param> /// <param name="selectedIndex"></param> public void OnCheckChanged(LabelCheckBoxControl sender, bool isChecked) { // Enable or disable controls UIEnable(); }