Пример #1
0
 private void skinButton1_Click(object sender, EventArgs e)
 {
     if (skinComboBox1.Text.Length > 0 && skinTextBox1.Text.Length == 1)
     {
         showInfo(Wcf.SendCommand(string.Format("{0}", skinComboBox1.Text)));
     }
     else if (skinComboBox1.Text.Length > 0 && skinTextBox1.Text.Length > 1)
     {
         showInfo(Wcf.SendCommand(string.Format("{0} {1}", skinComboBox1.Text, skinTextBox1.Text)));
     }
 }
Пример #2
0
 private void pTimer_Elapsed(object sender, System.Timers.ElapsedEventArgs e)
 {
     if (pNum == 10)
     {
         string str = Wcf.SendCommand("status");
         if (str.Length != 0)
         {
             showInfo(str);
         }
         pNum = 0;
     }
     else
     {
         showStatus(string.Format("{0}秒后更新状态", 10 - pNum));
         pNum++;
         if (pNum == 10)
         {
             pNum = 0;
         }
     }
 }
Пример #3
0
        private void ExtractKeysAndReg(string plainText, int showMode)
        {
            List <string> listStrKeys = ExtractKeysFromString(plainText);

            if (listStrKeys.Count > 0)
            {
                string strKeys;


                strKeys = string.Join(",", listStrKeys.ToArray());
                try
                {
                    // Clipboard.SetText(strKeys);
                    // showInfo(strKeys);
                    if (showMode == 0)
                    {
                        showInfo(string.Format("{0} Key被获取,正在激活.", listStrKeys.Count));
                    }
                    //  skinTextBox1.Text += (string.Format("{0} keys have been copied to clipboard", listStrKeys.Count));
                    string stra = (string.Format("redeem {0}", strKeys));
                    //showInfo(stra);
                    string a = Wcf.SendCommand(stra);

                    showInfo(a);
                }
                catch
                {
                    MessageBox.Show(strKeys, "Ctrl+C to copy");
                }
            }
            else
            {
                if (showMode == 0)
                {
                    showInfo(string.Format("没有获取到KEY!"));
                }
            }
        }
Пример #4
0
        private void skinButton1_Click(object sender, EventArgs e)
        {
            string str = string.Format("play {0}", skinTextBox1.Text);

            showInfo(Wcf.SendCommand(str));
        }