コード例 #1
0
ファイル: WmStateMachine.cs プロジェクト: tmbx/kwm-release
        /// <summary>
        /// Connect a KAS if it is disconnected.
        /// </summary>
        private void ConnectKas(WmKas kas)
        {
            if (kas.ConnStatus != KasConnStatus.Disconnected) return;

            // Clear the current error, but not the failed connection count.
            kas.ClearError(false);

            // Send a connection request.
            kas.ConnStatus = KasConnStatus.Connecting;
            m_wkb.RequestKasConnect(kas.KasID);

            // Update the UI (workspaces are now connecting).
            m_wm.UiBroker.RequestBrowserUiUpdate(false);
            m_wm.UiBroker.RequestSelectedKwsUiUpdate();
        }
コード例 #2
0
ファイル: WmStateMachine.cs プロジェクト: tmbx/kwm-release
 /// <summary>
 /// Clear the errors associated to the KAS specified, reset the number
 /// of failed connection attempts to 0 and request a run of the state 
 /// machine, if required. This can be used to force a KAS to reconnect
 /// sooner than usual.
 /// </summary>
 public void ResetKasFailureState(WmKas kas)
 {
     if (kas.FailedConnectCount != 0 || kas.ErrorEx != null)
     {
         kas.ClearError(true);
         RequestRun("cleared KAS error");
     }
 }