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); } }
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); }
public static void Stop() { ts.Disconnect(); ts = null; }