Ejemplo n.º 1
0
        public static void Attached(Type typeElement)
        {
            PanelSettings temp = PanelSettings.Load();

            temp.Panels.FirstOrDefault(x => x.Items.Count(y => y.Element == typeElement) != 0).Items.Remove(temp.Panels.FirstOrDefault(x => x.Items.Count(y => y.Element == typeElement) != 0).Items.FirstOrDefault(w => w.Element == typeElement));

            temp.Save();
        }
Ejemplo n.º 2
0
        public static void Build(WindowPosition position, int screen, IEnumerable <PanelItemParametry> items)
        {
            PanelSettings temp = PanelSettings.Load();

            temp.Panels.First(x => x.Position == position && x.IndexScreen == screen).Items = new List <PanelItemParametry>(items);

            temp.Save();
        }
Ejemplo n.º 3
0
        public static void SingleBuild(Type typeElement, PanelItemParametry value)
        {
            PanelSettings temp = PanelSettings.Load();

            var item  = temp.Panels.FirstOrDefault(x => x.Items.Count(y => y.Element == typeElement) != 0).Items.FirstOrDefault(w => w.Element == typeElement);
            int index = temp.Panels.FirstOrDefault(x => x.Items.Count(y => y.Element == typeElement) != 0).Items.IndexOf(item);

            temp.Panels.First(x => x.Items.Count(y => y.Element == typeElement) != 0).Items[index] = value;

            temp.Save();
        }
Ejemplo n.º 4
0
        public static void SingleBuild(WindowPosition position, Type typeElement)
        {
            PanelSettings temp = PanelSettings.Load();

            var item  = temp.Panels.First(x => x.Items.Count(y => y.Element == typeElement) != 0).Items.FirstOrDefault(w => w.Element == typeElement);
            int index = temp.Panels.First(x => x.Items.Count(y => y.Element == typeElement) != 0).Items.IndexOf(item);

            item.Position = position;

            temp.Panels.First(x => x.Items.Count(y => y.Element == typeElement) != 0).Items[index] = item;

            temp.Save();
        }
Ejemplo n.º 5
0
 public static PanelItemParametry GetParametry(Type typeElement)
 {
     return(PanelSettings.Load().Panels.FirstOrDefault(x => x.Items.Count(y => y.Element == typeElement) != 0).Items.FirstOrDefault(w => w.Element == typeElement));
 }