private void browseButton_Click(object sender, EventArgs e) { OpenFileDialog dial = new OpenFileDialog(); dial.Filter = "Control files (*.utm)|*.utm|Text files (*.txt)|*.txt|All Files (*.*)|*.*"; dial.DefaultExt = "utm"; dial.Title = "Pick Control File"; // If the user picked a file, display it, and set focus // to the list of control points. if (dial.ShowDialog() == DialogResult.OK) { controlFileTextBox.Text = dial.FileName; controlTextBox.Focus(); GlobalUserSetting.Write("ControlFile", dial.FileName); } }
private void okButton_Click(object sender, EventArgs e) { // Pick up the checked items. CheckType checks = CheckType.Null; if (smallLineCheckBox.Checked) { checks |= CheckType.SmallLine; } if (danglingCheckBox.Checked) { checks |= CheckType.Dangle; } if (overlapCheckBox.Checked) { checks |= CheckType.Overlap; } if (floatingCheckBox.Checked) { checks |= CheckType.Floating; } if (bridgeCheckBox.Checked) { checks |= CheckType.Bridge; } if (smallPolygonCheckBox.Checked) { checks |= CheckType.SmallPolygon; } if (notEnclosedCheckBox.Checked) { checks |= CheckType.NotEnclosed; } if (noLabelCheckBox.Checked) { checks |= CheckType.NoLabel; } if (noPolygonForLabelCheckBox.Checked) { checks |= CheckType.NoPolygonForLabel; } if (noAttributesCheckBox.Checked) { checks |= CheckType.NoAttributes; } if (multiLabelCheckBox.Checked) { checks |= CheckType.MultiLabel; } // Hold options in the registry. string regstr = CheckItem.GetCheckLetters(checks); GlobalUserSetting.Write("FileCheck", regstr); // Remember the selected options m_Options = checks; this.DialogResult = DialogResult.OK; Close(); }