Пример #1
0
        private void ReadSettings()
        {
            Settings settings = SettingsIO.ReadSettings(SETTINGS_FILE);

            if (settings != null)
            {
                txtXsdPath.Text              = settings.XsdPath;
                chkRecurseXsd.IsChecked      = settings.RecurseXsd;
                txtXmlPath.Text              = settings.XmlPath;
                chkRecurseXml.IsChecked      = settings.RecurseXml;
                chkIncludeWarnings.IsChecked = settings.IncludeWarnings;
                if (settings.Height.HasValue)
                {
                    this.Height = settings.Height.Value;
                }
                if (settings.Width.HasValue)
                {
                    this.Width = settings.Width.Value;
                }
                if (settings.Left.HasValue)
                {
                    this.Left = settings.Left.Value;
                }
                if (settings.Top.HasValue)
                {
                    this.Top = settings.Top.Value;
                }
            }
        }
Пример #2
0
        private void WriteSettings()
        {
            Settings settings = new Settings
            {
                XsdPath         = txtXsdPath.Text,
                RecurseXsd      = chkRecurseXsd.IsChecked,
                XmlPath         = txtXmlPath.Text,
                RecurseXml      = chkRecurseXml.IsChecked,
                IncludeWarnings = chkIncludeWarnings.IsChecked,
                Height          = this.Height,
                Width           = this.Width,
                Left            = this.Left,
                Top             = this.Top
            };

            SettingsIO.WriteSettings(SETTINGS_FILE, settings);
        }