本文整理汇总了C#中ClientType.Equals方法的典型用法代码示例。如果您正苦于以下问题:C# ClientType.Equals方法的具体用法?C# ClientType.Equals怎么用?C# ClientType.Equals使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ClientType
的用法示例。
在下文中一共展示了ClientType.Equals方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: ClientSettings
public ClientSettings(ClientType clientType)
{
ClientType = clientType;
LegacyClientSubType = clientType.Equals(ClientType.Legacy) ? LegacyClientSubType.Path : LegacyClientSubType.None;
Name = String.Empty;
Server = String.Empty;
Port = 0;
Username = String.Empty;
Password = String.Empty;
//ClientProcessorMegahertz = 1;
FahLogFileName = Constants.FahLogFileName;
UnitInfoFileName = Constants.UnitInfoFileName;
QueueFileName = Constants.QueueFileName;
Path = String.Empty;
FtpMode = FtpType.Passive;
UtcOffsetIsZero = false;
ClientTimeOffset = 0;
}
示例2: SetControlsForClientType
private void SetControlsForClientType(ClientType type)
{
bool legacyVisible = type.Equals(ClientType.Legacy);
int legacyHeight = type.Equals(ClientType.Legacy) ? DefaultRowHeight : 0;
txtEndDate.Visible = legacyVisible;
tableLayoutPanel1.RowStyles[(int)QueueControlRows.EndDate].Height = legacyHeight;
txtSpeedFactor.Visible = legacyVisible;
tableLayoutPanel1.RowStyles[(int)QueueControlRows.SpeedFactor].Height = legacyHeight;
txtPerformanceFraction.Visible = legacyVisible;
tableLayoutPanel1.RowStyles[(int)QueueControlRows.PerfFraction].Height = legacyHeight;
txtMegaFlops.Visible = legacyVisible;
tableLayoutPanel1.RowStyles[(int)QueueControlRows.MegaFlops].Height = legacyHeight;
txtAverageDownloadRate.Visible = legacyVisible;
tableLayoutPanel1.RowStyles[(int)QueueControlRows.AvgDownload].Height = legacyHeight;
txtAverageUploadRate.Visible = legacyVisible;
tableLayoutPanel1.RowStyles[(int)QueueControlRows.AvgUpload].Height = legacyHeight;
txtUserID.Visible = legacyVisible;
tableLayoutPanel1.RowStyles[(int)QueueControlRows.UserId].Height = legacyHeight;
bool visible = type.Equals(ClientType.FahClient);
int height = type.Equals(ClientType.FahClient) ? DefaultRowHeight : 0;
WaitingOnTextBox.Visible = visible;
tableLayoutPanel1.RowStyles[(int)QueueControlRows.WaitingOn].Height = height;
AttemptsTextBox.Visible = visible;
tableLayoutPanel1.RowStyles[(int)QueueControlRows.Attempts].Height = height;
NextAttemptTextBox.Visible = visible;
tableLayoutPanel1.RowStyles[(int)QueueControlRows.NextAttempt].Height = height;
}