コード例 #1
0
        private void button5_Click(object sender, EventArgs e)
        {
            bool isdel = checkBox2.Checked;

            string[]      sp   = textBox7.Lines;
            List <string> tt   = new List <string>(sp);
            List <string> newt = new List <string>();

            if (isdel)
            {
                int snum = 0;
                int.TryParse(textBox6.Text, out snum);
                int dnum = 0;
                int.TryParse(textBox5.Text, out dnum);
                for (int i = 0; i < tt.Count; i++)
                {
                    if (tt[i].Length >= snum && tt[i].Length <= dnum)
                    {
                        newt.Add(tt[i]);
                    }
                }
                sp = newt.ToArray();
            }
            else
            {
                sp = AShelp.delspaceStrings(sp);
            }
            textBox7.Lines = sp;
        }
コード例 #2
0
ファイル: frmLogin.cs プロジェクト: fbkc/soft_AutoSend
        private void Form1_Load(object sender, EventArgs e)
        {
            this.Text             = Myinfo.sname;
            this.notifyIcon1.Text = Myinfo.sname;
            List <string> source = AShelp.Load("user");

            if (source != null)
            {
                this.txtName.Text = source[0];
                this.txtPwd.Text  = source[1];
            }
        }
コード例 #3
0
ファイル: frmhzc.cs プロジェクト: fbkc/soft_AutoSend
        private void frmhzc_Load(object sender, EventArgs e)
        {
            string path = Application.StartupPath + "\\cthzc.bin";
            string hzc  = AShelp.LoadTXT(path);

            if (hzc == "")
            {
                MessageBox.Show("文件不存在,请联系客服");
                return;
            }
            string[] strh = Regex.Split(hzc, "\r\n", RegexOptions.IgnoreCase);
            foreach (string s in strh)
            {
                checkedListBox1.Items.Add(s);
            }
        }
コード例 #4
0
ファイル: frmkeyword.cs プロジェクト: fbkc/soft_AutoSend
        private void button6_Click(object sender, EventArgs e)
        {
            int num = 0;

            int.TryParse(txtnum.Text, out num);
            string[]      key1 = txtgjc1.Lines;
            string[]      key2 = txtgjc2.Lines;
            string[]      key3 = txtgjc3.Lines;
            string[]      hz   = txthz.Lines;
            Random        r    = new Random();
            List <string> jg   = new List <string>();
            string        temp = "";

            if (num != 0)
            {
                string formatstr = txtscgs.Text;
                //生成随机后替换【地名】
                for (int i = 0; i < num; i++)
                {
                    temp = formatstr;
                    if (key1.Length > 0)
                    {
                        temp = temp.Replace("【关键词1】", key1[r.Next(key1.Length)]);
                    }
                    if (key2.Length > 0)
                    {
                        temp = temp.Replace("【关键词2】", key2[r.Next(key2.Length)]);
                    }
                    if (key3.Length > 0)
                    {
                        temp = temp.Replace("【关键词3】", key3[r.Next(key3.Length)]);
                    }
                    if (hz.Length > 0)
                    {
                        temp = temp.Replace("【后缀】", hz[r.Next(hz.Length)]);
                    }
                    jg.Add(temp);
                }
                txtjg.Lines = AShelp.delreStrings(jg);
            }
            else
            {
                MessageBox.Show("请输入生成数量!");
            }
        }
コード例 #5
0
        private void button2_Click(object sender, EventArgs e)
        {
            bool   isdel = checkBox1.Checked;
            string t     = textBox1.Text;

            string[] sp = textBox2.Lines;
            foreach (string s in sp)
            {
                t = t.Replace(s.Split('-')[0], "⊙");
            }
            t  = t.Replace("\r\n", "");
            sp = t.Split('⊙');
            List <string> tt   = new List <string>(sp);
            List <string> newt = new List <string>();

            if (isdel)
            {
                int snum = 0;
                int.TryParse(textBox3.Text, out snum);
                int dnum = 0;
                int.TryParse(textBox4.Text, out dnum);
                for (int i = 0; i < tt.Count; i++)
                {
                    if (tt[i].Length >= snum && tt[i].Length <= dnum)
                    {
                        newt.Add(tt[i]);
                    }
                }
                sp = newt.ToArray();
            }
            else
            {
                sp = AShelp.delspaceStrings(sp);
            }

            textBox1.Lines = sp;
        }
コード例 #6
0
 private void button12_Click(object sender, EventArgs e)
 {
     string[] s = textBox1.Lines;
     textBox1.Lines = AShelp.RandomStrings(s);
 }
コード例 #7
0
ファイル: frmrepeat.cs プロジェクト: fbkc/soft_AutoSend
 private void button1_Click(object sender, EventArgs e)
 {
     string[] s = textBox1.Lines;
     s = AShelp.delreStrings(s);
     textBox2.Lines = s;
 }
コード例 #8
0
 private void button6_Click(object sender, EventArgs e)
 {
     textBox1.Lines = AShelp.delreStrings(textBox1.Lines);
 }
コード例 #9
0
ファイル: frmLogin.cs プロジェクト: fbkc/soft_AutoSend
        private void LoginServer(string name, string pass)
        {
            string   realmList = "";      //目前所有站
            string   realmNameInfo = "";  //权限站
            string   expirationTime = ""; //到期时间
            DateTime s, n;

            s = DateTime.Now;
            n = DateTime.Now;

            string key = NetHelper.GetMD5(name + "100dh888");
            string dosubmit = "1";
            //var obj = new
            //{
            //    username = name,
            //    password = pass,
            //    dosubmit,
            //    key
            //};
            //string postDataStr = JsonConvert.SerializeObject(obj);
            StringBuilder strpost = new StringBuilder();

            strpost.AppendFormat("username={0}&", name);
            strpost.AppendFormat("password={0}&", pass);
            strpost.AppendFormat("dosubmit={0}&", dosubmit);
            strpost.AppendFormat("key={0}&", key);
            try
            {
                string login_json = NetHelper.HttpPost("http://tool.100dh.cn/LoginHandler.ashx?action=Login", strpost.ToString());
                if (login_json != "")
                {
                    // list = (List<CategoryJson>)HttpHelper.JsonToObject<List<CategoryJson>>(main1);
                    JObject jo   = (JObject)JsonConvert.DeserializeObject(login_json);
                    string  code = jo["code"].ToString();
                    string  msg  = jo["msg"].ToString();
                    if (code == "0")//失败
                    {
                        MessageBox.Show("登录失败," + msg); return;
                    }
                    else if (code == "1")//成功
                    {
                        string data = jo["detail"].ToString();
                        expirationTime = jo["detail"]["cmUser"]["expirationTime"].ToString(); //到期时间
                        DateTime.TryParse(expirationTime, out s);
                        realmNameInfo = jo["detail"]["cmUser"]["realmNameInfo"].ToString();   //此账号下绑定的域名
                        realmList     = jo["detail"]["realmList"].ToString();
                        //rjlist = (List<ReleaseJson>)HttpHelper.JsonToObject<List<ReleaseJson>>(release);
                        List <realmNameInfo> rjlist = (List <realmNameInfo>)HttpHelper.JsonToObject <List <realmNameInfo> >(realmList);
                        if (rjlist.Count > 0)
                        {
                            List <realmNameInfo> rList = new List <realmNameInfo>();
                            foreach (realmNameInfo rj in rjlist)
                            {
                                //rj.path = joo[item.Key]["path"].ToString();路径,暂时未加
                                if (realmNameInfo.Contains(rj.Id) && rj.isUseing == true)
                                {
                                    rList.Add(rj);
                                }
                            }
                            Myinfo.rjlist = rList;
                        }
                        if (s <= n)
                        {
                            MessageBox.Show("授权已到期!");
                        }
                        else
                        {
                            Myinfo.softtime      = s - n;
                            Myinfo.realmNameInfo = realmNameInfo;
                            Myinfo.username      = name;
                            Myinfo.password      = pass;
                            if (ckbremenber.Checked)
                            {
                                AShelp.Save(this.txtName.Text, this.txtPwd.Text, "", "", "user");
                                Myinfo.username = this.txtName.Text;
                            }
                            frmMain f = new frmMain(name, pass);
                            f.Show();
                            Myinfo.myfmain = f;
                            Myinfo.mylogin = this;
                            this.Hide();
                        }
                    }
                }
            }
            catch (Exception ex)
            {
                MessageBox.Show("出现错误,请联系作者!" + ex);
            }
        }