Exemplo n.º 1
0
 private void Form1_Shown(object sender, EventArgs e)
 {
     if (FileHelper.FileExits(cookieFileName))
     {
         Cookie = FileHelper.GetObject <CookieMsg>(cookieFileName);
         ShowBar();
     }
 }
Exemplo n.º 2
0
 private void button1_Click(object sender, EventArgs e)
 {
     if (string.IsNullOrWhiteSpace(txtEmail.Text) || string.IsNullOrWhiteSpace(txtExpire.Text) || string.IsNullOrWhiteSpace(txtKey.Text))
     {
         MessageBox.Show("cookie信息不完整");
         return;
     }
     else
     {
         Cookie = new CookieMsg()
         {
             email = txtEmail.Text.Trim(), key = txtKey.Text.Trim(), uid = txtUid.Text.Trim(), expire_in = txtExpire.Text.Trim()
         };
         FileHelper.SaveObject(Cookie, cookieFileName);
         ShowBar();
     }
 }