protected override void CheckChanged(bool isChecked) { Size clientSize = _form.GetClientSize(); using (CustomSizeDialog customSizeDialog = new CustomSizeDialog(clientSize)) { if (customSizeDialog.ShowDialog() == DialogResult.OK) { Size clientSize2 = SizeHelper.FromString(customSizeDialog.WidthText, customSizeDialog.HeightText); _form.SetClientSize(clientSize2); } } }
private void CustomSizeClick(object sender, EventArgs e) { Button button = sender as Button; Size size = SizeHelper.Parse(button.Text); using (CustomSizeDialog customSizeDialog = new CustomSizeDialog(size)) { if (customSizeDialog.ShowDialog() == DialogResult.OK) { button.Text = customSizeDialog.WidthText + SizeHelper.Separator + customSizeDialog.HeightText; _thumbnailPixelsRadio.Checked = true; } } }
protected override void UpdateSettings() { base.UpdateSettings(); if (!base.Settings.DesktopSizeSameAsClientAreaSize.Value && !base.Settings.DesktopSizeFullScreen.Value) { string text = _rdsCustomButton.Text; if (!_rdsCustomRadio.Checked) { text = (from r in _rdsSizeGroup.Controls.OfType <RadioButton>() where r.Checked select r).First().Text; } base.Settings.DesktopSize.Value = SizeHelper.Parse(text); } }
private void CustomSizeClick(object sender, EventArgs e) { Button button = sender as Button; RadioButton radioButton = button.Parent.GetNextControl(button, forward: false) as RadioButton; radioButton.Checked = true; Size size = SizeHelper.Parse(button.Text); using (CustomSizeDialog customSizeDialog = new CustomSizeDialog(size)) { if (customSizeDialog.ShowDialog() == DialogResult.OK) { button.Text = customSizeDialog.WidthText + SizeHelper.Separator + customSizeDialog.HeightText; } } }
public void UpdatePreferences() { UpdateSettings(); MainForm theForm = Program.TheForm; foreach (CheckBox control in _virtualGroupsGroup.Controls) { (control.Tag as IBuiltInVirtualGroup).IsInTree = control.Checked; } Program.TheForm.ServerTreeLocation = _treeLocationCombo.SelectedValue; Program.TheForm.ServerTreeVisibility = _treeVisibilityCombo.SelectedValue; RdpClient.ConnectionBarState connectionBarState = _connectionBarEnabledCheckBox.Checked ? ((!_connectionBarAutoHiddenCheckBox.Checked) ? RdpClient.ConnectionBarState.Pinned : RdpClient.ConnectionBarState.AutoHide) : RdpClient.ConnectionBarState.Off; Program.Preferences.ConnectionBarState = connectionBarState; Program.Preferences.PerformanceFlags = ComputeFlagsFromCheckBoxes(); string text = _casCustomButton.Text; if (!_casCustomRadio.Checked) { text = (from r in _casSizeGroup.Controls.OfType <RadioButton>() where r.Checked select r).First().Text; } Size size = SizeHelper.Parse(text); Size clientSize = theForm.GetClientSize(); if (clientSize != size) { theForm.SetClientSize(size); } size = SizeHelper.Parse(_thumbnailPixelsButton.Text); Program.Preferences.ThumbnailSize = size; Program.Preferences.ThumbnailSizeIsInPixels = _thumbnailPixelsRadio.Checked; int thumbnailPercentage = int.Parse(_thumbnailPercentageTextBox.Text); Program.Preferences.ThumbnailPercentage = thumbnailPercentage; }
public override void ReadXml(XmlNode xmlNode, RdcTreeNode node) { base.Value = SizeHelper.Parse(xmlNode.FirstChild.InnerText); }