Пример #1
0
 /// <summary>
 /// 添加分组按钮
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void btn_addg_ok_Click(object sender, EventArgs e)
 {
     //输入有效
     if (!textBox_GroupID.Text.IsNullorEmpty() && !textBox_Groupname.Text.IsNullorEmpty())
     {
         FormMain.GetInstance().AddGroup(textBox_Groupname.Text, textBox_GroupID.Text);
         this.Dispose();
     }
     else
     {
         MessageBox.Show("请录入正确的信息", "提示", MessageBoxButtons.OK, MessageBoxIcon.Warning);
     }
 }
Пример #2
0
 /// <summary>
 /// 确定
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void buttonOK_Click(object sender, EventArgs e)
 {
     if (CheckIfIlleagal())
     {
         //处理图片转换为base64
         string targetpath = FormMain.PicCachePath + "/" + textBoxUid.Text + ".jpg";
         LocalImageHelp.CompressImage(UserFaceSource, targetpath);
         string base64image = LocalImageHelp.Image2Base64str(targetpath);
         FormMain.GetInstance().AddUser(textBoxBelongGroup.Text, textBoxName.Text, textBoxUid.Text, base64image, textBoxuserinfo.Text);
         Dispose();
     }
     else
     {
         MessageBox.Show("请录入完整的数据", "警告", MessageBoxButtons.OK, MessageBoxIcon.Warning);
     }
 }
Пример #3
0
        /// <summary>
        /// 主界面状态栏文字切换
        /// </summary>
        /// <param name="text"></param>
        public static void statusLabelchange(string text)
        {
            Action changetext = () => { statusLabel.Text = text; };

            FormMain.GetInstance().Invoke(changetext);
        }
Пример #4
0
 static void Main()
 {
     Application.EnableVisualStyles();
     Application.SetCompatibleTextRenderingDefault(false);
     Application.Run(FormMain.GetInstance());
 }