상속: Rallion.AppSettings
예제 #1
0
 public static Settings Instance()
 {
     if( instance == null ) {
         instance = new Settings();
     }
     return instance;
 }
예제 #2
0
 private void SelectCategory(Settings settings)
 {
     if (settings.Category != string.Empty)
     {
         lstCategories.SelectedIndices.Clear();
         for (int i = 0; i < lstCategories.Items.Count; i++)
         {
             if (lstCategories.Items[i].Name == settings.Category)
             {
                 lstCategories.SelectedIndices.Add(i);
                 break;
             }
         }
     }
 }
예제 #3
0
 private void SelectFilter(Settings settings)
 {
     if (settings.Filter != string.Empty)
     {
         for (int i = 0; i < cboFilter.Items.Count; i++)
         {
             string name = cboFilter.GetItemText(cboFilter.Items[i]);
             if (name == settings.Filter)
             {
                 mchkAdvancedCategories.Checked = true;
                 cboFilter.SelectedIndex = i;
                 cboFilter.Text = name;
                 ApplyFilter((Filter)cboFilter.SelectedItem);
             }
         }
     }
 }
예제 #4
0
 private void SelectAutoCats(Settings settings)
 {
     if (settings.AutoCats != null)
     {
         List<string> autocats = settings.AutoCats.Split(',').ToList();
         foreach (string ac in autocats)
         {
             for (int i = 0; i < lvAutoCatType.Items.Count; i++)
             {
                 if (lvAutoCatType.Items[i].Name == ac) lvAutoCatType.Items[i].Checked = true;
             }
         }
     }
 }