Ejemplo n.º 1
0
 public void AddComputer(string nsName, string ip, string userFio, string division)
 {
     if ((userFio == "-") && (division == "-"))
     {
         AddComputer(nsName, ip);
     }
     else if ((userFio != "-") && (division == "-"))
     {
         AddComputer(nsName, ip, userFio);
     }
     else if ((userFio == "-") && (division != "-"))
     {
         CompList.Add(new ComputerVM
         {
             NsName       = nsName,
             Ip           = ip,
             DivisionName = division
         });
     }
     else if ((userFio != "-") && (division != "-"))
     {
         CompList.Add(new ComputerVM
         {
             NsName       = nsName,
             Ip           = ip,
             UserFio      = userFio,
             DivisionName = division
         });
     }
 }
Ejemplo n.º 2
0
 public void AddComputer(string nsName, string ip)
 {
     CompList.Add(new ComputerVM
     {
         NsName = nsName,
         Ip     = ip
     });
 }
Ejemplo n.º 3
0
 public void AddComputer(string nsName, string ip, string userFio)
 {
     CompList.Add(new ComputerVM
     {
         NsName  = nsName,
         Ip      = ip,
         UserFio = userFio
     });
 }
Ejemplo n.º 4
0
 private void ClearFields()
 {
     IntArrayProp = new int[2];
     ComplexProp  = new ComplexClass1();
     CheckBox     = false;
     Lines        = new string[0];
     StringProp   = "";
     CompList.Clear(); CompList.Add(new ComplexClass2(4, 5)); CompList.Add(null); CompList.Add(new ComplexClass2(6, 7));
     BoolList.Clear(); BoolList.Add(true); BoolList.Add(false); BoolList.Add(true);
     SetDebugDisplays();
 }
        public List <CompExtention.Component> GetTableAsComponent()
        {
            List <string> Tables = new List <string>();

            Builder.Data.ComponentBuilder  cb = new Builder.Data.ComponentBuilder(this.Connection);
            List <CompExtention.Component> CompList;

            CompList = ComponentDataHandler.GetComponents(this.Connection);
            Tables   = cb.GetTables();

            foreach (string s in Tables)
            {
                var c = CompList.Where(x => x.TableName == s).FirstOrDefault();
                if (c == null)
                {
                    var comp = new Component(s, ComponentType.none);
                    comp.TableName = s;
                    CompList.Add(comp);
                }
            }
            return(CompList.OrderBy(x => x.TableName).ToList());
        }
Ejemplo n.º 6
0
 public void RemoveComputer(ComputerVM delComp)
 {
     CompList.Remove(delComp);
 }
Ejemplo n.º 7
0
        private void btn_competences_MouseLeftButtonUp(object sender, MouseButtonEventArgs e)
        {
            CompList Comp = new CompList();

            this.NavigationService.Navigate(Comp);
        }