private void GetControlForm_Shown(object sender, EventArgs e) { // Remember whether the map starts out empty. We do this here because // CadastralMapModel.IsEmpty works by checking whether the map's // window is defined. Since we may also set the extent, we could not // subsequently get a correct answer as to whether the map already // contains data. m_NewMap = CadastralMapModel.Current.IsEmpty; // Initialize the file spec of the control file, based on the corresponding registry entry. // (formerly environment variable CED$ControlFile) string cfile = GlobalUserSetting.Read("ControlFile"); if (!String.IsNullOrEmpty(cfile) && File.Exists(cfile)) { controlFileTextBox.Text = cfile; controlTextBox.Focus(); } }
private void FileCheckForm_Shown(object sender, EventArgs e) { // Get default options from the registry. string regstr = GlobalUserSetting.Read("FileCheck"); if (String.IsNullOrEmpty(regstr)) { regstr = CheckItem.GetAllCheckLetters(); } // Convert to option flags m_Options = CheckItem.GetOptions(regstr); // Set check marks beside all the selected options. foreach (char c in regstr) { CheckType check = CheckItem.GetOption(c); CheckBox cb = null; if (check == CheckType.SmallLine) { cb = smallLineCheckBox; } else if (check == CheckType.Dangle) { cb = danglingCheckBox; } else if (check == CheckType.Overlap) { cb = overlapCheckBox; } else if (check == CheckType.Floating) { cb = floatingCheckBox; } else if (check == CheckType.Bridge) { cb = bridgeCheckBox; } else if (check == CheckType.SmallPolygon) { cb = smallPolygonCheckBox; } else if (check == CheckType.NotEnclosed) { cb = notEnclosedCheckBox; } else if (check == CheckType.NoLabel) { cb = noLabelCheckBox; } else if (check == CheckType.NoPolygonForLabel) { cb = noPolygonForLabelCheckBox; } else if (check == CheckType.NoAttributes) { cb = noAttributesCheckBox; } else if (check == CheckType.MultiLabel) { cb = multiLabelCheckBox; } if (cb != null) { cb.Checked = true; } } }