Ejemplo n.º 1
0
        private void StartPlugin()
        {
            this.Controls.Clear();

            tip = new ToolTip();

            Settings.LoadSettings();

            noticePanel = new NoticePanel();
            this.Controls.Add(noticePanel);

            ts = new TwittwerService("822113440844148738-s7MLex2gcSFKxzKZfBDwcwJqvJYk0LA", "8UYP6Ahmn5GjJXkr0bN3Jy2XmKBX8jT3Slxk8EhzLCEmO"); //   (Settings.ast, Settings.atn);

            ts.onAuthorized += (s1, s2) => {
                Settings.ast = s1;
                Settings.atn = s2;
            };

            if (!ts.Connected)
            {
                connectionPanel           = new ConnectionPanel();
                connectionPanel.OnConnect = OnConnect;
                Controls.Add(connectionPanel);
            }
            else
            {
                this.Controls.Add(CreateTweetPanel());
                AutoTweet.Run(PlatformEngine);
            }
        }
Ejemplo n.º 2
0
        public static bool Run(NETSDK engine)
        {
            if (isRunning)
            {
                return(true);
            }

            cts = new CancellationTokenSource();
            ct  = cts.Token;

            PlatformEngine = engine;
            ts             = new TwittwerService(Settings.ast, Settings.atn);

            LinkEvents();

            return(ts.Connected);
        }
Ejemplo n.º 3
0
 public static void Stop()
 {
     ts.Disconnect();
     ts = null;
 }