private async Task <ServerLog> addServer(ServerConf serverConf) { ServerLog newServer = new ServerLog(); newServer.Name = serverConf.Name; newServer.URI = serverConf.URI; newServer.Connection.Configuration = m_configuration; //newServer.control.StatusStrip = StatusBar; newServer.Connection.ServerUrl = newServer.URI; m_servers.Add(newServer); itemsTV.Nodes[0].Nodes.Add(newServer.Name).Tag = newServer; itemsTV.Nodes[0].Expand(); try { await newServer.Connection.Connect(); } catch (Exception exception) { ClientUtils.HandleException(this.Text, exception); } foreach (GroupConf groupConf in serverConf.GroupConfs) { addGroup(groupConf, newServer); } return(newServer); }
public ServerConf NewServerDialog(ApplicationConfiguration configuration, string serverName = "Server") { m_configuration = configuration; serverNameTB.Text = serverName; if (ShowDialog() != DialogResult.OK) { return(null); } var conf = new ServerConf { Name = serverNameTB.Text, URI = serverURITB.Text }; return(conf); }
/// <summary> /// Main Cttor.</summary> public DBConfClass(ServerConf Master, ServerConf Backup) { MasterSrv = Master; BackupSrv = Backup; SrvEn = SrvSelection.None; if (Backup.Enable) { SrvEn = SrvSelection.BackupOnly; } if (Master.Enable) { SrvEn = SrvSelection.MasterOnly; } if (Master.Enable && Backup.Enable) { SrvEn = SrvSelection.BothSrv; } }
private async Task <ServerLog> addServer(ServerConf serverConf) { ServerLog newServer = new ServerLog(); newServer.Name = serverConf.Name; newServer.URI = serverConf.URI; newServer.Connection.Configuration = m_configuration; newServer.Connection.ServerUrl = newServer.URI; m_servers.Add(newServer); try { await newServer.Connection.Connect(); } catch (Exception exception) { //ClientUtils.HandleException(this.Text, exception); } foreach (GroupConf groupConf in serverConf.GroupConfs) { addGroup(groupConf, newServer); } return(newServer); }