public void Save_Settings(PiHoleServerInfo serverInfo)
 {
     helper.Save(serverNumber, serverInfo);
     //var index = serverlist.IndexOf(serverInfo);
     this.serverlist.Add(new PiHoleServerInfo()
     {
         PiHoleServerName = serverInfo.PiHoleServerName, PiHoleServerAddress = serverInfo.PiHoleServerAddress, PiHoleServerAuthKey = serverInfo.PiHoleServerAuthKey
     });
 }
 public void ListViewModel()
 {
     for (var i = 1; i <= Convert.ToInt32(new ServerCount().NumberOfServers); i++)
     {
         var piholesettingsstore = new PiHoleSettingsStore(i.ToString());
         var piholeserverinfo    = new PiHoleServerInfo();
         piholeserverinfo = piholesettingsstore.Retrive_Settings();
         this.serverlist.Add(new PiHoleServerInfo()
         {
             PiHoleServerName = piholeserverinfo.PiHoleServerName, PiHoleServerAddress = piholeserverinfo.PiHoleServerAddress, PiHoleServerAuthKey = piholeserverinfo.PiHoleServerAuthKey
         });
     }
 }
Exemple #3
0
        /*public string HostNameSummary
         * {
         *  get
         *  {
         *      return this.PiHoleServerName;
         *  }
         * }*/


        public void Save_Settings(PiHoleServerInfo serverInfo, string serverNumber)
        {
            helper.Save(serverNumber, serverInfo);
        }