예제 #1
0
        //public void StartSuperSockets()
        //{
        //    //Setup the appServer
        //    if (!SuperSocketAppServerInstance.RunningServer.Setup(PluginAppSettings.GetInt("SuperSocketPort"))) //Setup with listening port
        //    {
        //        // Failed to setup!
        //        MessageBox.Show("Failed setup for Socket Server.", Resources.ApplicationName, MessageBoxButtons.OK);
        //        return;
        //    }

        //    //Try to start the appServer
        //    if (!SuperSocketAppServerInstance.RunningServer.Start())
        //    {
        //        // Failed to start!
        //        MessageBox.Show("Failed to start Socket Server on port " + PluginAppSettings.GetInt("SuperSocketPort") + ".", Resources.ApplicationName, MessageBoxButtons.OK);
        //        return;
        //    }
        //}

        private void btnSave_Click(object sender, EventArgs e)
        {
            if (ValidateSettings())
            {
                StoreSettingsInAppStrings();

                PluginAppSettings.Save();

                btnSave.Enabled            = false;
                btnCheckForUpdates.Enabled = true;
            }
        }
예제 #2
0
        public void FirstTimeRunCheck()
        {
            if ((IsRunning.Item1 || port == -1) &&
                (IsRunning.Item2 || secure_port == -1) &&
                !PluginAppSettings.GetBoolean("NotFirstTimeRun"))
            {
                PluginAppSettings.SetString("NotFirstTimeRun", "True");
                PluginAppSettings.Save();

                if (IsRunning.Item1 || IsRunning.Item2)
                {
                    if (MessageBox.Show(Resources.FirstTimeRun, Resources.ApplicationName + " First Time Run",
                                        MessageBoxButtons.OKCancel) == DialogResult.OK)
                    {
                        LaunchIndexPage();
                    }
                }
            }
        }