public void ReconnectServer(RomoteType type) { IRemote remote = Get(type); if (null != remote) { remote.Reconnect(); } }
public static IRemote Create(RomoteType type) { switch (type) { case RomoteType.LOGIN: IRemoteBuilder builer = new LoginRemoteBuilder(); return(builer.Create()); } return(null); }
public void ConnectServer(ServerInfo info, RomoteType type) { IRemote remote = Get(type); if (null == remote) { remote = RemoteFactory.Create(type); remote.CoreModules = base.CoreModules; Add(remote); } remote.Connect(info); }
private IRemote Get(RomoteType type) { var enumerator = listRemote.GetEnumerator(); while (enumerator.MoveNext()) { var item = enumerator.Current; if (item.type == type) { return(item); } } return(null); }
public Remote(RomoteType t) { type = t; }