コード例 #1
0
        JsonObject MakePresence()
        {
            JsonObject activity = new JsonObject()
            {
                { "name", GetStatus() },
                { "type", 0 }
            };
            JsonObject obj = new JsonObject()
            {
                { "since", null },
                { "activities", new JsonArray()
                  {
                      activity
                  } },
                { "status", Status.ToString() },
                { "afk", false }
            };

            return(obj);
        }
コード例 #2
0
        private void comboBoxStatus_SelectionChanged(object sender, SelectionChangedEventArgs e)
        {
            PresenceStatus status = (this.comboBoxStatus.SelectedValue as Status).Value;

            this.configurationService.Set(Configuration.ConfFolder.RCS, Configuration.ConfEntry.STATUS, status.ToString());

            if (this.sipService.IsPublicationEnabled)
            {
                this.sipService.PresencePublish(status);
            }
        }