private void rdSaveToMultipleFiles_CheckedChanged(object sender, EventArgs e) { ConditionalControls.UnlockHeight(this); ConditionalControls.SetVisible(panelSaveSeparator, rdSaveToMultipleFiles.Checked); ConditionalControls.SetVisible(rdFilePerScan, !rdSingleScan.Checked && rdSaveToMultipleFiles.Checked); ConditionalControls.LockHeight(this); }
protected override void OnLoad(object sender, EventArgs eventArgs) { new LayoutManager(this) .Bind(btnCancel, btnOK) .RightToForm() .Bind(comboLanguages, comboOcrMode) .WidthToForm() .Activate(); LoadLanguages(); comboLanguages.DisplayMember = "Name"; comboLanguages.ValueMember = "Code"; ConditionalControls.UnlockHeight(this); ConditionalControls.SetVisible(comboOcrMode, availableModes != null, 8); labelOcrMode.Visible = availableModes != null; ConditionalControls.LockHeight(this); if (appConfigManager.Config.OcrState == OcrState.Enabled) { checkBoxEnableOcr.Checked = true; SetSelectedValue(comboLanguages, appConfigManager.Config.OcrDefaultLanguage ?? ""); SetSelectedItem(comboOcrMode, appConfigManager.Config.OcrDefaultMode); checkBoxRunInBG.Checked = appConfigManager.Config.OcrDefaultAfterScanning; } else if (appConfigManager.Config.OcrState == OcrState.Disabled) { checkBoxEnableOcr.Checked = false; comboLanguages.SelectedValue = ""; comboOcrMode.SelectedValue = ""; checkBoxRunInBG.Checked = false; } else { checkBoxEnableOcr.Checked = UserConfigManager.Config.EnableOcr; SetSelectedValue(comboLanguages, UserConfigManager.Config.OcrLanguageCode ?? appConfigManager.Config.OcrDefaultLanguage ?? ""); SetSelectedItem(comboOcrMode, UserConfigManager.Config.OcrMode == OcrMode.Default ? appConfigManager.Config.OcrDefaultMode : UserConfigManager.Config.OcrMode); checkBoxRunInBG.Checked = UserConfigManager.Config.OcrAfterScanning ?? appConfigManager.Config.OcrDefaultAfterScanning; } UpdateView(); }
private void rdLoadIntoNaps2_CheckedChanged(object sender, EventArgs e) { ConditionalControls.UnlockHeight(this); ConditionalControls.SetVisible(panelSaveTo, !rdLoadIntoNaps2.Checked); ConditionalControls.LockHeight(this); }
private void rdMultipleScansDelay_CheckedChanged(object sender, EventArgs e) { ConditionalControls.UnlockHeight(this); ConditionalControls.SetVisible(panelScanDetails, rdMultipleScansDelay.Checked); ConditionalControls.LockHeight(this); }