Пример #1
0
        public MainWindow()
        {
            InitializeComponent();
            var ts = TranslationSource.Instance;

            if (!string.IsNullOrEmpty(Settings.Default.SubstDriveLetter))
            {
                Settings.Default.SubstDriveLetter = Settings.Default.SubstDriveLetter.ToUpper();
            }
            if (!DosDeviceHelpers.IsDriveLetter(Settings.Default.SubstDriveLetter))
            {
                DisplayError(ts["WarningInvalidDriveLetter"]);
                Settings.Default.SubstDriveLetter = "Z:";
            }
            if (Settings.Default.MRU == null)
            {
                Settings.Default.MRU = new System.Collections.Specialized.StringCollection();
            }
            else
            {
                foreach (var item in Settings.Default.MRU)
                {
                    PathComboBox.Items.Add(item);
                }
            }
            LimitTextBox.Text          = Settings.Default.Limit.ToString();
            _scanResult                = new ObservableCollection <ScanItem>();
            ResultDataGrid.ItemsSource = _scanResult;
        }