public AccountSelectWindow(KbtterContext c)
        {
            InitializeComponent();
            ctx = c;

            tokens = File.Exists("accounts.json") ?
                JsonConvert.DeserializeObject<OAuthAccessToken[]>(File.ReadAllText("accounts.json")).ToList() :
                new List<OAuthAccessToken>();
        }
Exemple #2
0
        void InitializeKbtterCore()
        {
            context = new KbtterContext("5bI3XiTNEMHiamjMV5Acnqkex", "ni2jGjwKTLcdpp1x6nr3yFo9bRrSWRdZfYbzEAZLhKz4uDDErN");
            var acw = new AccountSelectWindow(context);
            var atk=acw.SelectToken();
            if (atk != null)
            {
                context.Kbtter.Authenticate(atk.Token, atk.TokenSecret);

                context.RequestMainTabNew += AddNewTab;

                context.Kbtter.StreamingStatus += (p) => this.Dispatch(() => Kbtter_StreamingStatus(p));
                context.Kbtter.StartStreaming();
            }
            else
            {
                Exit();
            }

        }
Exemple #3
0
        public TweetPage(KbtterContext ct, TwitterStatus st)
        {
            InitializeComponent();
            ctx = ct;
            stat = st;
            dynraw = JObject.Parse(st.RawSource);
            if (stat.RetweetedStatus != null)
            {
                rtuser = stat.User;

                stat = stat.RetweetedStatus;
                dynraw = dynraw.retweeted_status;
                this.Background = new SolidColorBrush(new Color { R = 200, G = 255, B = 200, A = 127 });
            }
            else
            {
                this.Background = new SolidColorBrush(new Color { R = 200, G = 255, B = 255, A = 127 });
            }
            SetStatus();
        }
Exemple #4
0
 public UserPage(KbtterContext ct, string ta)
 {
     InitializeComponent();
     ctx = ct;
     target = ta;
 }