private void Skype_UserStatus(TUserStatus Status)
        {
            if (skypeManager.Logger.IsDebugEnabled)
            {
                skypeManager.Logger.Debug("Skype_UserStatus " + Status);
            }

            var userStatus = Status.ToUserStatus();

            skypeManager.PublishUserStatus(userStatus);
        }
예제 #2
0
        public void Skype_UserStatus(TUserStatus status)
        {
            // Write User Status to Window
            this.textBox1.AppendText("User Status: " + skype.Convert.UserStatusToText(status));
            this.textBox1.AppendText(" - " + status.ToString() + Environment.NewLine);
            this.textBox1.ScrollToCaret();

            if ((status == TUserStatus.cusLoggedOut) && (Properties.Settings.Default.StopAtLogoffOrExit))
            {
                this.Close();
            }
        }
예제 #3
0
 private static bool ChageStatus(TUserStatus status)
 {
     try
     {
         var skype = new Skype();
         skype.Attach(7, true);
         skype.ChangeUserStatus(status);
         return(true);
     }
     catch (Exception)
     {
         throw;
     }
 }
예제 #4
0
        public SkypeStatusConfig(TUserStatus status)
        {
            // The value of CanSave can be setted to true because no check is needed since this window contains only a combo box
            // which is setted automatically on the first element if other values are not selected.
            CanSave = true;
            Status  = status;

            InitializeComponent();

            statuses = new Dictionary <string, TUserStatus>();

            foreach (TUserStatus sts in Enum.GetValues(typeof(TUserStatus)))
            {
                // Even though these 3 statuses are on the enum they are not displayed on Skype so the user can't use them.
                if (!sts.Equals(TUserStatus.cusUnknown) && !sts.Equals(TUserStatus.cusNotAvailable) && !sts.Equals(TUserStatus.cusLoggedOut))
                {
                    statuses.Add(sts.ToString().Replace("cus", ""), sts);
                }
            }

            StatusComboBox.ItemsSource = statuses.Keys;
        }
        private void SetOnCall(bool call)
        {
            if (onCall != call)
            {
                onCall = call;

                if (skypeManager.Logger.IsDebugEnabled)
                {
                    skypeManager.Logger.Debug("OnCallBehaviour " + onCall);
                }

                if (onCall)
                {
                    priorUserStatus = skypeManager.Skype.CurrentUserStatus;

                    //change to busy only if we're online
                    if (priorUserStatus == TUserStatus.cusOnline)
                    {
                        skypeManager.Skype.ChangeUserStatus(TUserStatus.cusDoNotDisturb);
                    }

                    //monitor explicit status changes
                    skypeManager.Skype.UserStatus += Skype_UserStatus;
                }
                else
                {
                    skypeManager.Skype.UserStatus -= Skype_UserStatus;

                    //update status post call if prior status is different
                    if (priorUserStatus != skypeManager.Skype.CurrentUserStatus)
                    {
                        skypeManager.Skype.ChangeUserStatus(priorUserStatus);
                    }
                }
            }
        }
예제 #6
0
        public static Status GetStatusValue(this TUserStatus status)
        {
            switch (status)
            {
            case TUserStatus.cusOnline:
                return(Status.Online);

            case TUserStatus.cusAway:
                return(Status.Away);

            case TUserStatus.cusOffline:
                return(Status.Offline);

            case TUserStatus.cusDoNotDisturb:
                return(Status.DoNotDisturb);

            case TUserStatus.cusNotAvailable:
                return(Status.NotAvailable);

            case TUserStatus.cusSkypeMe:
                return(Status.SkypeMe);
            }
            return(Status.Unknown);
        }
 private void Skype_UserStatus(TUserStatus Status)
 {
     priorUserStatus = Status;
 }
예제 #8
0
 private void SkypeUserStatus(TUserStatus status)
 {
     OnSkypeUserStatusChanged((UserStatus)status);
 }
예제 #9
0
 private void SkypeUserStatus(TUserStatus status)
 {
     FireUserStatus(status.GetStatusValue());
 }
예제 #10
0
 public void ChangeUserStatus(TUserStatus newVal)
 {
     throw new System.NotImplementedException();
 }
        private void Skype_UserStatus(TUserStatus status)
        {
            if (Logger.IsDebugEnabled)
            {
                Logger.Debug("TextToSpeechBehaviour Skype_UserStatus " + status);
            }

            var userStatus = status.ToUserStatus();

            SpeakUserStatus(userStatus);
        }
예제 #12
0
 private void SwitchStatus(TUserStatus status)
 {
     activeStatus = status;
 }
예제 #13
0
        public void OurUserStatus(TUserStatus status)
        {
            // Always use try/catch with ANY Skype calls.
            try
            {
                // Write User Status to Window.
                AddTextToTextBox1(DateTime.Now.ToLocalTime() + ": " +
                 "User Status - TUserStatus Converted Status: " + skype.Convert.UserStatusToText(status) +
                 " - TUserStatus: " + status +
                 "\r\n");

                // If our user status is logged out.
                if (status == TUserStatus.cusLoggedOut)
                {
                    // If Exit on Skype User Logoff Check Box is Checked quit.
                    if (this.UserLogoff.Checked)
                    {
                        TheNotifyIconExample_TimeToExit = true;
                        this.Close();
                    }
                }
            }
            catch (Exception e)
            {
                // Possibly old Skype4COM version, log an error, drop into debug if wanted.
                AddTextToTextBox1(DateTime.Now.ToLocalTime() + ": " +
                 "User 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);
            }
        }
예제 #14
0
 private void SkypeUserStatus(TUserStatus status)
 {
     OnSkypeUserStatusChanged((UserStatus)status);
 }
예제 #15
0
 public void ChangeStatus(TUserStatus status)
 {
     _skype.CurrentUserStatus = status;
 }
예제 #16
0
 private void Skype_UserStatus(TUserStatus status)
 {
     this.Logger.Debug(System.Reflection.MethodBase.GetCurrentMethod().Name);
     this.Logger.Debug("    status = " + status);
 }
 private void Skype_UserStatus(TUserStatus Status)
 {
     switch (Status)
     {
         case TUserStatus.cusOnline:
         case TUserStatus.cusDoNotDisturb:
             OnLunch(false);
             break;
     }
 }
예제 #18
0
        public void Skype_UserStatus(TUserStatus status)
        {
            // Write User Status to Window
            this.textBox1.AppendText("User Status: " + skype.Convert.UserStatusToText(status));
            this.textBox1.AppendText(" - " + status.ToString() + Environment.NewLine);
            this.textBox1.ScrollToCaret();

            if ((status == TUserStatus.cusLoggedOut) && (Properties.Settings.Default.StopAtLogoffOrExit))
            {
                this.Close();
            }
        }
예제 #19
0
        public void OnSaved(WpfConfiguration configurationControl)
        {
            var config = configurationControl as SkypeStatusConfig;

            status = config.Status;
        }