示例#1
0
        private bool SaveUser(string userid, string pwd, string id, string path)
        {
            string type = id + path;

            try
            {
                string newuserid = du.EnDEUser(userid, type, true);//加密
                string newpwd    = du.EnDEUser(pwd, type, true);
                du.SetValue("userid", newuserid);
                du.SetValue("pwd", newpwd);
                du.SetValue("id", id);
                du.SetValue("path", path);
                return(true);
            }
            catch (Exception)
            {
                return(false);
            }
        }
示例#2
0
文件: Note.cs 项目: zipsoon/EmuchSign
 //选项颜色改变
 private void cbColor_SelectedIndexChanged(object sender, EventArgs e)
 {
     try
     {
         int forecolor = -1;
         if (cbColor.SelectedIndex == 0)
         {
             rtxtNote.ForeColor = Color.Red; forecolor = 0;
         }
         if (cbColor.SelectedIndex == 1)
         {
             rtxtNote.ForeColor = Color.Blue; forecolor = 1;
         }
         if (cbColor.SelectedIndex == 2)
         {
             rtxtNote.ForeColor = Color.Green; forecolor = 2;
         }
         if (cbColor.SelectedIndex == 3)
         {
             rtxtNote.ForeColor = Color.Yellow; forecolor = 3;
         }
         if (cbColor.SelectedIndex == 4)
         {
             rtxtNote.ForeColor = Color.Orange; forecolor = 4;
         }
         if (cbColor.SelectedIndex == 5)
         {
             rtxtNote.ForeColor = Color.Pink; forecolor = 5;
         }
         if (cbColor.SelectedIndex == 6)
         {
             rtxtNote.ForeColor = Color.LightGreen; forecolor = 6;
         }
         if (cbColor.SelectedIndex == 7)
         {
             rtxtNote.ForeColor = Color.SkyBlue; forecolor = 7;
         }
         if (cbColor.SelectedIndex == 8)
         {
             rtxtNote.ForeColor = Color.Black; forecolor = 8;
         }
         if (cbColor.SelectedIndex == 9)
         {
             rtxtNote.ForeColor = Color.Silver; forecolor = 9;
         }
         if (cbColor.SelectedIndex == 10)
         {
             rtxtNote.ForeColor = Color.Purple; forecolor = 10;
         }
         if (cbColor.SelectedIndex == 11)
         {
             rtxtNote.ForeColor = Color.Gold; forecolor = 11;
         }
         du.SetValue("forecolor", forecolor.ToString());
     }
     catch (Exception)
     {
         colorG = 0;
         colorB = 0;
         //保存时候颜色选项隐藏
         cbColor.Visible = false;
         cbox.Visible    = false;
         lbMsg.Visible   = true;
         lbMsg.ForeColor = Color.FromArgb(255, colorG, colorB);
         lbMsg.Text      = "* 颜色配置失败!";
         timer2.Interval = 63;
         timer2.Enabled  = true;
         timer2.Start();
         return;
     }
 }