当前位置: 首页>>代码示例>>C#>>正文


C# ClientType.Equals方法代码示例

本文整理汇总了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;
        }
开发者ID:kszysiu,项目名称:hfm-net,代码行数:20,代码来源:ClientSettings.cs

示例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;
        }
开发者ID:kszysiu,项目名称:hfm-net,代码行数:30,代码来源:QueueControl.cs


注:本文中的ClientType.Equals方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。