public SharkIt() { InitializeComponent(); WindowState = FormWindowState.Minimized; m_path = Properties.Settings.Default.Path; ShowInTaskbar = false; // Ignore about localization for now systemTray.Text = "Connecting..."; //systemTray.Icon = Resources.download_red; systemTray.BalloonTipClicked += new EventHandler(systemTray_BalloonTipClicked); m_session = new Session(); m_api = new API(m_session); m_session.GotSID += new Session.GotSIDHandler(m_gs_GotSID); m_session.GotToken += new Session.GotTokenHandler(m_gs_GotToken); Timer t = new Timer(); t.Interval = 50; t.Tick += new EventHandler(ClipboardWatcher); t.Start(); }
public API(Session session) { m_session = session; m_session.GotToken += new Session.GotTokenHandler(m_session_GotToken); }
public void getCommunicationTokenHandler(Session gs, JObject response, object state) { string token = (string)response["result"]; m_token = token; GotToken(this, token); }