public void Skype_ConnectionStatus(TConnectionStatus status) { _blnIsOnline = false; // DEBUG: Write Connection Status to Window //WriteToLog("Connection Status: " + cSkype.Convert.ConnectionStatusToText(status)); //WriteToLog(" - " + status.ToString() + Environment.NewLine); if (status == TConnectionStatus.conOnline) { _blnIsOnline = true; WriteToLog("Connected to Skype user: "******""; foreach (string f in this.FriendNames) { names += f + ","; } WriteToLog("Friends: " + names.Trim(',')); if (this._tokens.Count == 0) { // set default password foreach (string f in this.FriendNames) { this._tokens[f] = f + "'s token"; } this._tokens[this.UserName] = this.UserName + "'s token"; // it is me } WriteToLog("set default tokens"); WriteToLog("Now listening for events..."); WriteToLog(); } }
public void OurConnectionStatus(TConnectionStatus status) { IsOnline = false; // Write Connection Status to Window this.textBox1.AppendText("Connection Status: " + cSkype.Convert.ConnectionStatusToText(status)); this.textBox1.AppendText(" - " + status.ToString() + Environment.NewLine); this.textBox1.ScrollToCaret(); if (status == TConnectionStatus.conOnline) { IsOnline = true; } }
private void ConnectionStatusChanged(CP2Connection conn, TConnectionStatus newStatus) { //если соединение не было открыто, то нафиг if (!conOpened) return; string s = this.con.AppName + " connection state change, new state: "+newStatus.ToString();; //if (newStatus.ToString()=="262146") //{ this.initStream();} this.parent.logService(s); }
// Обработка состояния соединения void ConnectionStatusChanged(CP2Connection conn, TConnectionStatus newStatus) { String state = "MQ connection state "; if( ( newStatus & TConnectionStatus.CS_CONNECTION_BUSY ) != 0 ) { state += "BUSY"; } else if( ( newStatus & TConnectionStatus.CS_CONNECTION_CONNECTED ) != 0 ) { state += "CONNECTED"; } else if( ( newStatus & TConnectionStatus.CS_CONNECTION_DISCONNECTED ) != 0 ) { state += "DISCONNECTED"; } else if( ( newStatus & TConnectionStatus.CS_CONNECTION_INVALID ) != 0 ) { state += "INVALID"; } state += " router state "; if( ( newStatus & TConnectionStatus.CS_ROUTER_CONNECTED ) != 0 ) { // Когда соединились - запрашиваем адрес сервера-обработчика state += "CONNECTED"; } else if( ( newStatus & TConnectionStatus.CS_ROUTER_DISCONNECTED ) != 0 ) { state += "DISCONNECTED"; } else if( ( newStatus & TConnectionStatus.CS_ROUTER_LOGINFAILED ) != 0 ) { state += "LOGINFAILED"; } else if( ( newStatus & TConnectionStatus.CS_ROUTER_NOCONNECT ) != 0 ) { state += "NOCONNECT"; } else if( ( newStatus & TConnectionStatus.CS_ROUTER_RECONNECTING ) != 0 ) { state += "RECONNECTING"; } LogWriteLine(state); }
private void Skype_ConnectionStatus(TConnectionStatus status) { this.Logger.Debug(System.Reflection.MethodBase.GetCurrentMethod().Name); this.Logger.Debug(" status = " + status); }
public void OurConnectionStatus(TConnectionStatus status) { // Always use try/catch with ANY Skype calls. try { // Write Connection Status to Window AddTextToTextBox1(DateTime.Now.ToLocalTime() + ": " + "Connection Status - Converted TConnectionStatus Status: " + skype.Convert.ConnectionStatusToText(status) + " - TConnectionStatus: " + status + "\r\n"); } catch (Exception e) { // Possibly old Skype4COM version, log an error, drop into debug if wanted. AddTextToTextBox1(DateTime.Now.ToLocalTime() + ": " + "Connection Status Event Fired - Bad Text" + " - Exception Source: " + e.Source + " - Exception Message: " + e.Message + "\r\n"); // If the "Use Auto Debug" check box is checked and we are in debug, drop into debug here when retry, otherwise, prompt for action. Debug.Assert(!this.UseAutoDebug.Checked); } }