public ConfigData() { this.CultureName = "en-US"; this.RecentSchemaFiles = new ObservableCollection <SchemaFileInfo>(); this.ConnectionStrings = new ObservableCollection <ConnectionStringInfo>(); this.MainWindow = new MainWindowStateInfo(800, 600); this.ManageConnectionStringWindow = new WindowStateInfo(700, 400); this.EditConnectionStringWindow = new WindowStateInfo(500, 160); this.ImportObjectWindow = new WindowStateInfo(900, 700); this.DeleteObjectWindow = new WindowStateInfo(800, 500); this.ImportObjectGenerateFileWindow = new WindowStateInfo(600, 300); this.GenerateSourceCodeWindow = new WindowStateInfo(800, 600); this.ProgressWindow = new WindowStateInfo(900, 700); this.MessageWindow = new WindowStateInfo(700, 400); this.ManageIgnoreObjectWindow = new WindowStateInfo(800, 600); }
// Other members go here. // For every member create public property. // ... #endregion Class Members #region Constructor /// <summary> /// Default constructor. /// Creates instances of all internal classes and sets all default values. /// /// This prevents exception when client cannot load Settings instance from /// XML file - in this case default Settings instance is created. /// Default Settings instance should always contain valid default values. /// </summary> public Settings() { mainWindowStateInfo = new WindowStateInfo(); recentFilesList = new MruInfo(); initialDirectory = Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments); lineWidth = 1; objectColor = Colors.Black; textFontFamilyName = "Tahoma"; textFontStyle = FontConversions.FontStyleToString(FontStyles.Normal); textFontWeight = FontConversions.FontWeightToString(FontWeights.Normal); textFontStretch = FontConversions.FontStretchToString(FontStretches.Normal); textFontSize = 12; // Set default values for other members here // ... }