Ejemplo n.º 1
0
 internal void SetSortingAlgorithmForTab(string name, string option, Tab SelectedTab)
 {
     SortingAlgorithmInfo s = SortingAlgorithmInfos.FirstOrDefault(x => x.League == SelectedTab.League.Name && x.TabIndex == SelectedTab.Index);
     if (s == null)
     {
         s = new SortingAlgorithmInfo()
         {
             League = SelectedTab.League.Name,
             TabIndex = SelectedTab.Index
         };
         SortingAlgorithmInfos.Add(s);
     }
     s.Name = name;
     s.Option = option;
     SaveChanges();
 }
Ejemplo n.º 2
0
        internal void SetSortingAlgorithmForTab(string name, string option, Tab SelectedTab)
        {
            SortingAlgorithmInfo s = SortingAlgorithmInfos.FirstOrDefault(x => x.League == SelectedTab.League.Name && x.TabIndex == SelectedTab.Index);

            if (s == null)
            {
                s = new SortingAlgorithmInfo()
                {
                    League   = SelectedTab.League.Name,
                    TabIndex = SelectedTab.Index
                };
                SortingAlgorithmInfos.Add(s);
            }
            s.Name   = name;
            s.Option = option;
            SaveChanges();
        }