public StatusEntry(CustomStatus status) : this()
 {
     EmojText.Text      = status.EmojiFull;
     Text.Text          = status.Text;
     TimeSeconds.Output = status.Time;
     customStatus       = status;
 }
        public async void SetStatus(CustomStatus status)
        {
            var state = new UserSettings(status);

            var content = new JsonContent(state);

            await client.PatchAsync(DiscordAPI.settingsEndpoint, content);
        }
Beispiel #3
0
 public TransitCustomStatus(CustomStatus status)
 {
     Text      = status.Text;
     EmojiId   = status.EmojiId;
     EmojiName = status.EmojiName;
     Animated  = status.Animated;
     Time      = status.Time;
 }
Beispiel #4
0
        private void ChangeStatus()
        {
            Debug.WriteLine(Entries.Count);
            statusTimer.Stop();

            currStatus = Entries[random.Next(Entries.Count)].customStatus;

            statusTimer.Interval = currStatus.Time * 1000;
            App.client.SetStatus(currStatus);
            statusTimer.Start();
            Debug.WriteLine("Changed! " + currStatus.Text);
        }
Beispiel #5
0
        private void AddEntry(CustomStatus status = null)
        {
            StatusEntry statusEntry;

            if (status == null)
            {
                statusEntry = new StatusEntry();
                Interrupt();
            }
            else
            {
                statusEntry = new StatusEntry(status);
            }
            statusEntry.Margin                           = new Thickness(0, 0, 0, 10);
            statusEntry.CloseButton.Click               += (s, x) => CloseButtnClcl(statusEntry);
            statusEntry.Text.TextChanged                += (s, x) => Interrupt();
            statusEntry.EmojText.TextChanged            += (s, x) => Interrupt();
            statusEntry.TimeSeconds.TextBox.TextChanged += (s, x) => Interrupt();
            VerticalStack.Children.Insert(1, statusEntry);
            Entries.Insert(0, statusEntry);
            Count.Text = Entries.Count.ToString();
        }
Beispiel #6
0
 public UserSettings(CustomStatus status)
 {
     CustomStatus = status;
 }