public void MaterializeSettings()
        {
            FileSizeFilterSettings settings = new FileSizeFilterSettings();
            settings = FilterSettingsBase.LoadSettings<FileSizeFilterSettings>(settings.FileName);

            txtFrom.Text = settings.MinimalSize.ToString();
            txtTo.Text = settings.MaximalSize.ToString();
            cbSizeUnit.SelectedIndex = Convert.ToInt32(settings.Unit);
        }
Ejemplo n.º 2
0
        public void MaterializeSettings()
        {
            FileSizeFilterSettings settings = new FileSizeFilterSettings();

            settings = FilterSettingsBase.LoadSettings <FileSizeFilterSettings>(settings.FileName);

            txtFrom.Text             = settings.MinimalSize.ToString();
            txtTo.Text               = settings.MaximalSize.ToString();
            cbSizeUnit.SelectedIndex = Convert.ToInt32(settings.Unit);
        }
        public void PersistSettings()
        {
            FileSizeFilterSettings settings = new FileSizeFilterSettings();

            int maxSize = 0;
            if (!int.TryParse(txtTo.Text, out maxSize))
                txtTo.Text = "0";

            int minSize = 0;
            if (!int.TryParse(txtFrom.Text, out minSize))
                txtFrom.Text = "0";

            settings.MaximalSize = maxSize;
            settings.MinimalSize = minSize;
            settings.Unit = (FileSizeFilterSettings.SizeUnit)cbSizeUnit.SelectedIndex;

            FilterSettingsBase.SaveSettings<FileSizeFilterSettings>(settings.FileName, settings);
        }
Ejemplo n.º 4
0
        public void PersistSettings()
        {
            FileSizeFilterSettings settings = new FileSizeFilterSettings();

            int maxSize = 0;

            if (!int.TryParse(txtTo.Text, out maxSize))
            {
                txtTo.Text = "0";
            }

            int minSize = 0;

            if (!int.TryParse(txtFrom.Text, out minSize))
            {
                txtFrom.Text = "0";
            }

            settings.MaximalSize = maxSize;
            settings.MinimalSize = minSize;
            settings.Unit        = (FileSizeFilterSettings.SizeUnit)cbSizeUnit.SelectedIndex;

            FilterSettingsBase.SaveSettings <FileSizeFilterSettings>(settings.FileName, settings);
        }
Ejemplo n.º 5
0
 public FileSizeFilter()
 {
     settings__ = FilterSettingsBase.LoadSettings <FileSizeFilterSettings>(settings__.FileName);
 }
Ejemplo n.º 6
0
 public FileSizeFilter()
 {
     settings__ = FilterSettingsBase.LoadSettings<FileSizeFilterSettings>(settings__.FileName);
 }