// parameters: // strStyle 风格。如果为 GUI,表示会自动添加 Idle 事件,并在其中执行 Application.DoEvents public LibraryChannel GetChannel(string strServerUrl = ".", string strUserName = "******", GetChannelStyle style = GetChannelStyle.GUI) { LibraryChannel channel = this.MainForm.GetChannel(strServerUrl, strUserName, style); _channelList.Add(channel); // TODO: 检查数组是否溢出 return(channel); }
public LibraryChannel GetChannel(string strServerUrl, string strUserName, GetChannelStyle style = GetChannelStyle.GUI) { if (EntityRegisterBase.IsDot(strServerUrl) == true) { strServerUrl = Program.MainForm.LibraryServerUrl; } if (EntityRegisterBase.IsDot(strUserName) == true) { strUserName = Program.MainForm.DefaultUserName; } LibraryChannel channel = this._channelPool.GetChannel(strServerUrl, strUserName); if ((style & GetChannelStyle.GUI) != 0) { channel.Idle += channel_Idle; } return(channel); }
public LibraryChannel GetChannel(string strServerUrl, string strUserName, GetChannelStyle style = GetChannelStyle.GUI) { if (EntityRegisterBase.IsDot(strServerUrl) == true) strServerUrl = this.MainForm.LibraryServerUrl; if (EntityRegisterBase.IsDot(strUserName) == true) strUserName = this.MainForm.DefaultUserName; LibraryChannel channel = this._channelPool.GetChannel(strServerUrl, strUserName); if ((style & GetChannelStyle.GUI) != 0) channel.Idle += channel_Idle; return channel; }
// parameters: // strStyle 风格。如果为 GUI,表示会自动添加 Idle 事件,并在其中执行 Application.DoEvents public LibraryChannel GetChannel(string strServerUrl = ".", string strUserName = "******", GetChannelStyle style = GetChannelStyle.GUI) { LibraryChannel channel = this.MainForm.GetChannel(strServerUrl, strUserName, style); _channelList.Add(channel); // TODO: 检查数组是否溢出 return channel; }