Ejemplo n.º 1
0
        private void Form1_Load(object sender, EventArgs e)
        {
            try
            {
                mClient.mServerIP   = IniHelper.ProfileReadValue("CloudBlackboardSetting", "ServerIP", mConfigPath);
                mClient.mServerPort = Convert.ToInt32(IniHelper.ProfileReadValue("CloudBlackboardSetting", "ServerPort", mConfigPath));
            }
            catch
            {
                MessageBox.Show("错误:配置文件不可用!");
                System.Environment.Exit(0);
            }

            if (mClient.mServerIP == "" ||
                mClient.mServerPort == 0
                )
            {
                MessageBox.Show("错误:配置文件不可用!");
                System.Environment.Exit(0);
            }

            Form_Logon form_logon = new Form_Logon();

            if (form_logon.ShowDialog() == DialogResult.Cancel)
            {
                System.Environment.Exit(0);
            }

            Thread thread = new Thread(new ThreadStart(ThreadGetNewNotes))
            {
                IsBackground = true
            };

            thread.Start();
        }
Ejemplo n.º 2
0
 private void Form_Logon_Load(object sender, EventArgs e)
 {
     try
     {
         textBox_User.Text = IniHelper.ProfileReadValue("CloudBlackboardSetting", "User", mConfigPath);
         textBox_PIN.Text  = IniHelper.ProfileReadValue("CloudBlackboardSetting", "PIN", mConfigPath);
         if (textBox_PIN.Text != "")
         {
             mPinLoaded        = true;
             checkBox1.Checked = true;
         }
     }
     catch
     {
         mPinLoaded        = false;
         checkBox1.Checked = false;
     }
 }