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


C# ServerState.ToString方法代码示例

本文整理汇总了C#中ServerState.ToString方法的典型用法代码示例。如果您正苦于以下问题:C# ServerState.ToString方法的具体用法?C# ServerState.ToString怎么用?C# ServerState.ToString使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在ServerState的用法示例。


在下文中一共展示了ServerState.ToString方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: BindSiteState

		private void BindSiteState(ServerState state)
		{
			if (state == ServerState.Continuing)
				state = ServerState.Started;

			litStatus.Text = GetLocalizedString("SiteState." + state.ToString());
			cmdStart.Visible = (state == ServerState.Stopped);
			cmdContinue.Visible = (state == ServerState.Paused);
			cmdPause.Visible = (state == ServerState.Started);
			cmdStop.Visible = (state == ServerState.Started || state == ServerState.Paused);
		}
开发者ID:jordan49,项目名称:websitepanel,代码行数:11,代码来源:WebSitesEditSite.ascx.cs

示例2: SetState

        /// <summary>
        /// Public method for updating the Wlb Server state.  If the state is ConnectionFailure and
        /// a Failure is supplied, it's message is stored in the OtherConfig
        /// </summary>
        /// <param name="session">The User session use to do this operation</param>
        /// <param name="pool">The pool who's Wlb connection state we are updating</param>
        /// <param name="state">The current state of the pool's Wlb Server State</param>
        /// <param name="failure">The Failure (if any) describing the Connection Error</param>
        public static void SetState(Session session, Pool pool, ServerState state, Failure failure)
        {
            //only update the state if new value if different than current value
            //  this is to cut down on unneeded Pool_PropertiesChanged events
            if (GetState(pool) != state)
            {
                // set a lock so we are setting state one at a time
                lock (_lockObject)
                {
                    Helpers.SetOtherConfig(session, pool, WLB_CONNECTION_STATUS, state.ToString());

                    if (null != failure && state == ServerState.ConnectionError)
                    {
                        string error = String.Empty;
                        if (failure.Message == FriendlyErrorNames.WLB_INTERNAL_ERROR)
                        {
                            error = Messages.ResourceManager.GetString("WLB_ERROR_" + failure.ErrorDescription[1]);
                        }
                        else
                        {
                            error = failure.Message;
                        }
                        Helpers.SetOtherConfig(session, pool, WLB_CONNECTION_ERROR, error);
                    }
                    else
                    {
                        Helpers.SetOtherConfig(session, pool, WLB_CONNECTION_ERROR, String.Empty);
                    }
                }
            }
        }
开发者ID:huizh,项目名称:xenadmin,代码行数:39,代码来源:WlbServerState.cs

示例3: ServerStateChanged

        public static void ServerStateChanged(int clientSubscription, ServerState _state)
        {
            try
            {
                if (_state.ToString() != "CONNECTED")
                {
                    logger.Error("KepServer no longer connected: ServerStateChanged error: {0}", _state.ToString());
                }
                else
                {
                    logger.Info("KepServer re-connected.");
                }

            }
            catch (Exception e)
            {
                throw e;
            }
        }
开发者ID:bsrpn6,项目名称:IDCServer,代码行数:19,代码来源:ClientAce.cs

示例4: ShowStatusTray

		private void ShowStatusTray(ServerState state)
		{
			if (!_alwaysShowBalloons && MainForm.Reference.Visible)
				return; // if visible and balloons shouldn't be shown always, don't show.

			_icon.ShowBalloonTip(BalloonDuration, Locale.Tr("Server") + " " + state,
				Locale.Tr("The server is") + " " + state.ToString().ToLower(),
				ToolTipIcon.Info);
		}
开发者ID:CaptainTF,项目名称:bukkitgui2,代码行数:9,代码来源:Notifications.cs


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