private void LoginItem_Click(object sender, EventArgs e)
 {
     if (User.one().loggedIn)
     {
         if (configForm != null)
         {
             configForm.Dispose();
             configForm = null;
             Utils.ReleaseMemory(true);
         }
         User.one().Logout();
     }
     else
     {
         ShowLoginForm();
     }
 }
 void configForm_FormClosed(object sender, FormClosedEventArgs e)
 {
     configForm.Dispose();
     configForm = null;
     Utils.ReleaseMemory(true);
     if (_isFirstRun)
     {
         CheckUpdateForFirstRun();
         ShowFirstTimeBalloon();
         _isFirstRun = false;
     }
 }
Exemplo n.º 3
0
 void configForm_FormClosed(object sender, FormClosedEventArgs e)
 {
     configForm.Dispose();
     configForm = null;
     Utils.ReleaseMemory(true);
     if (_isFirstRun)
     {
         ShowBalloonTip(
             I18N.GetString("Shadowsocks is here"),
             I18N.GetString("You can turn on/off Shadowsocks in the context menu"),
             ToolTipIcon.Info,
             0
             );
         _isFirstRun = false;
     }
 }
        void configForm_FormClosed(object sender, FormClosedEventArgs e)
        {
            configForm.Dispose();
            configForm = null;
            var config = controller.GetCurrentConfiguration();

            if (config.firstRun)
            {
                CheckUpdateForFirstRun();
                ShowBalloonTip(
                    I18N.GetString("Shadowsocks is here"),
                    I18N.GetString("You can turn on/off Shadowsocks in the context menu"),
                    ToolTipIcon.Info,
                    0
                    );
                config.firstRun = false;
            }
        }