void ItemCheckedChanging(object sender, CheckBoxChangeEventArgs e) { if (e.EventSource != eEventSource.Code) { Exception valueException = null; object value = GetValueFromString(((CheckBoxItem)sender).Text, out valueException); e.Cancel = !ApplyValue(value, valueException); } }
private void chkSettingComments_CheckedChanged( object sender, CheckBoxChangeEventArgs e ) { if( mSelectedFile != string.Empty ) FillGrid( mSelectedFile ); Properties.Settings.Default.ShowComments = chkSettingComments.Checked; }
private void allLayersBox_CheckedChanged(object sender, CheckBoxChangeEventArgs e) { if (multiBoard.SelectedBoard == null) return; layersComboBox.Enabled = !allLayersBox.Checked; SetLayer(); InputHandler.ClearSelectedItems(multiBoard.SelectedBoard); multiBoard.RenderFrame(); }
private void viewCheckboxes_CheckedChanged(object sender, CheckBoxChangeEventArgs e) { ItemTypes newVisibleTypes = 0; ItemTypes newEditedTypes = 0; foreach (CheckBoxItem checkbox in checkboxes) switch (checkbox.CheckState) { case CheckState.Checked: newVisibleTypes ^= (ItemTypes)checkbox.Tag; newEditedTypes ^= (ItemTypes)checkbox.Tag; break; case CheckState.Indeterminate: newVisibleTypes ^= (ItemTypes)checkbox.Tag; break; } ApplicationSettings.visibleTypes = newVisibleTypes; ApplicationSettings.editedTypes = newEditedTypes; if (multiBoard.SelectedBoard != null) InputHandler.ClearSelectedItems(multiBoard.SelectedBoard); multiBoard.RenderFrame(); }
private void viewCheckboxes_CheckedChanging(object sender, CheckBoxChangeEventArgs e) { CheckBoxItem checkBox = (CheckBoxItem)sender; if (!usingMouse && checkBox.Checked && (ApplicationSettings.editedTypes & (ItemTypes)checkBox.Tag) == (ItemTypes)checkBox.Tag) e.Cancel = true; }
/// <summary> /// Raises the CheckedChanged event. /// </summary> protected virtual void InvokeCheckedChanged(CheckBoxChangeEventArgs e) { if (CheckedChanged != null) CheckedChanged(this, e); }
private void OnLoadAtStartupCheckedChanged(object sender, CheckBoxChangeEventArgs e) { if (checkBoxItemLoadAtStartup.Checked) LoadAtStartupHelper.SetLoadAtStartup(); else LoadAtStartupHelper.UnsetLoadAtStartup(); AppManager.Instance.Settings.UserSettings.LoadAtStartup = checkBoxItemLoadAtStartup.Checked; AppManager.Instance.Settings.UserSettings.Save(); }
private void checkShowPoly_CheckedChanged(object sender, CheckBoxChangeEventArgs e) // 绘制多边形 { BaseForm baseForm = this.ActiveMdiChild as BaseForm; if (baseForm != null) { m_bRenderPoly = checkShowPoly.Checked; baseForm.SceneSceneEditor.EnableRenderPoly((sender as DevComponents.DotNetBar.CheckBoxItem).Checked ? 1 : 0); } }
public void checkBoxItemSizeOptions_CheckedChanged(object sender, CheckBoxChangeEventArgs e) { var publicationControl = xtraTabControlPublications.SelectedTabPage as PrintProductControl; if (publicationControl == null || !_allowToSave) return; SetSizeOptions(publicationControl); SettingsNotSaved = true; }
public void checkBoxItemAdSizeStandartSquare_CheckedChanged(object sender, CheckBoxChangeEventArgs e) { var publicationControl = xtraTabControlPublications.SelectedTabPage as PrintProductControl; if (publicationControl == null || !_allowToSave) return; if (!Controller.Instance.PrintProductAdSizeStandartSquare.Checked) { var prevColorPricing = publicationControl.PrintProduct.ColorPricing; if (prevColorPricing == ColorPricingType.CostPerInch) { switch (ListManager.Instance.DefaultColorPricing) { case ColorPricingType.CostPerAd: buttonItemColorOptions_Click(Controller.Instance.PrintProductColorOptionsCostPerAd, null); break; case ColorPricingType.PercentOfAdRate: buttonItemColorOptions_Click(Controller.Instance.PrintProductColorOptionsPercentOfAd, null); break; case ColorPricingType.ColorIncluded: buttonItemColorOptions_Click(Controller.Instance.PrintProductColorOptionsIncluded, null); break; default: buttonItemColorOptions_Click(Controller.Instance.PrintProductColorOptionsCostPerAd, null); break; } } } SetSizeOptions(publicationControl); SettingsNotSaved = true; }
private void ItemCheckedChanged(object sender, CheckBoxChangeEventArgs e) { if (_SettingEditValue) return; OnEditValueChanged(EventArgs.Empty); }
private void chkisall_CheckedChanged(object sender, DevComponents.DotNetBar.CheckBoxChangeEventArgs e) { LoadOrder(); }
public void checkBoxItemAccountNumber_CheckedChanged(object sender, CheckBoxChangeEventArgs e) { Controller.Instance.HomeAccountNumberText.Enabled = Controller.Instance.HomeAccountNumberCheck.Checked; SchedulePropertyEditValueChanged(null, null); }
void cbxAutoUpdate_CheckedChanged(object sender, DevComponents.DotNetBar.CheckBoxChangeEventArgs e) { _settings["AutoUpdate"] = (sender as CheckBoxItem).Checked ? "1" : "0"; saveSettings(); }
//是否循环飞行 private void checkBoxItem_Loop_CheckedChanged(object sender, CheckBoxChangeEventArgs e) { try { flyAnimationClass.IsFlyLoop = this.checkBoxItem_Loop.Checked; FlyAnimationPlayStop();//停止飞行 if (IsFlyByPolyline) { flyAnimationClass.CreateAnimationFromPath(flyAnimationClass.globe, flyAnimationClass.FlyPathPolyline, this.ratingItem_FlySpeed.Rating, this.checkBoxItem_Loop.Checked, this.checkBoxItem_LookDown.Checked); } if (TimerProgressBar != null) { //进度条控制 this.TimerProgressBar.Stop(); this.progressBarItem_FlyAnimation.Value = this.progressBarItem_FlyAnimation.Maximum; this.progressBarItem_FlyAnimation.Text = ""; ProgressBarValue = 0; this.progressBarItem_FlyAnimation.Refresh(); } } catch { } }
private void chkSettingSaveOnExit_CheckedChanged( object sender, CheckBoxChangeEventArgs e ) { Properties.Settings.Default.SaveOnExit = chkSettingSaveOnExit.Checked; }
private void checkBoxItem1_CheckedChanged(object sender, CheckBoxChangeEventArgs e) // 绘制region边界 { BaseForm baseForm = this.ActiveMdiChild as BaseForm; if (baseForm != null) { baseForm.SetRenderRegionEdge((sender as DevComponents.DotNetBar.CheckBoxItem).Checked); } }
/// <summary> /// Sets the Checked property of the item, raises appropriate events and provides the information about the source of the change. /// </summary> /// <param name="newValue">New value for Checked property</param> /// <param name="source">Source of the change.</param> public virtual void SetChecked(bool newValue, eEventSource source) { // Allow user to cancel the checking if (m_CheckBoxStyle == eCheckBoxStyle.RadioButton && newValue && this.Parent != null) { CheckBoxItem b = null; foreach (BaseItem item in this.Parent.SubItems) { if (item == this) continue; b = item as CheckBoxItem; if (b != null && b.Checked && b.CheckBoxStyle == eCheckBoxStyle.RadioButton) { break; } } CheckBoxChangeEventArgs e = new CheckBoxChangeEventArgs(b, this, source); InvokeCheckedChanging(e); if (e.Cancel) return; } else { CheckBoxChangeEventArgs e = new CheckBoxChangeEventArgs(null, this, source); InvokeCheckedChanging(e); if (e.Cancel) return; } m_Checked = newValue; if (m_Checked && m_CheckState == CheckState.Unchecked || !m_Checked && m_CheckState != CheckState.Unchecked) { m_CheckState = m_Checked ? CheckState.Checked : CheckState.Unchecked; } if (this.Command != null) this.Command.Checked = m_Checked; this.OnCheckedChanged(source); OnCheckedBindableChanged(EventArgs.Empty); if (ShouldSyncProperties) BarFunctions.SyncProperty(this, "Checked"); if (this.Displayed) this.Refresh(); }
private void checkToggleShowProfile_CheckedChanged(object sender, CheckBoxChangeEventArgs e) { EngineLayer.ATLBase.SetShowProfile(e.NewChecked.Checked ? 1 : 0); }
/// <summary> /// Sets the Checked property of the item, raises appropriate events and provides the information about the source of the change. /// </summary> /// <param name="newValue">New value for Checked property</param> /// <param name="source">Source of the change.</param> public virtual void SetChecked(CheckState newValue, eEventSource source) { CheckBoxChangeEventArgs e = new CheckBoxChangeEventArgs(null, this, source); InvokeCheckedChanging(e); if (e.Cancel) return; m_CheckState = newValue; m_Checked = (newValue != CheckState.Unchecked); if (this.Command != null) this.Command.Checked = m_Checked; this.OnCheckedChanged(source); OnCheckStateChanged(EventArgs.Empty); if (ShouldSyncProperties) BarFunctions.SyncProperty(this, "CheckState"); if (this.Displayed) this.Refresh(); }