Ejemplo n.º 1
0
 private void 配置SToolStripMenuItem_Click(object sender, EventArgs e)
 {
     Setting st = new Setting();
     if (st.ShowDialog() == DialogResult.OK)
     {
         this.fontsize = st.fontsize;
         this.color = st.color;
         this.roomid = st.roomid;
         this.cookie = st.cookie;
     }
 }
Ejemplo n.º 2
0
 public Send()
 {
     InitializeComponent();
     Setting st = new Setting();
     try
     {
         string[] rows = File.ReadAllLines(Directory.GetCurrentDirectory() + "\\sendsetting.dat");
         this.fontsize = rows[0];
         this.color = rows[1];
         this.roomid = rows[2];
         this.cookie = rows[3];
     }
     catch
     {
         if (st.ShowDialog() == DialogResult.OK)
         {
             this.fontsize = st.fontsize;
             this.color = st.color;
             this.roomid = st.roomid;
             this.cookie = st.cookie;
         }
     }
     while (this.cookie == "")
     {
         MessageBox.Show("用户COOKIE不存在!您可以在Chrome内核浏览器中开启开发者模式,在console中输入‘document.cookie’+回车确认,然后复制双引号内内容即为本软件所需cookie", "提示", MessageBoxButtons.OK, MessageBoxIcon.Information);
         if (st.ShowDialog() == DialogResult.OK)
         {
             this.fontsize = st.fontsize;
             this.color = st.color;
             this.roomid = st.roomid;
             this.cookie = st.cookie;
         }
     }
     GC.Collect();
     GC.WaitForPendingFinalizers();
 }