private void Form1_Load(object sender, EventArgs e) { emailList = new Dictionary <EmailHelper.EmailConfig, string>(); initflush = new Task(InitOrFlushFileEngine); initflush.Start(); pet[0] = new Bitmap(Application.StartupPath + "\\shell\\surface0000.png"); pet[1] = new Bitmap(Application.StartupPath + "\\shell\\surface0001.png"); pet[2] = new Bitmap(Application.StartupPath + "\\shell\\surface0002.png"); pet[3] = new Bitmap(Application.StartupPath + "\\shell\\surface0003.png"); pet[4] = new Bitmap(Application.StartupPath + "\\shell\\surface0004.png"); pet[5] = new Bitmap(Application.StartupPath + "\\shell\\surface0005.png"); pet[6] = new Bitmap(Application.StartupPath + "\\shell\\surface0006.png"); pet[7] = new Bitmap(Application.StartupPath + "\\shell\\surface0007.png"); pet[8] = new Bitmap(Application.StartupPath + "\\shell\\surface0008.png"); pet[9] = new Bitmap(Application.StartupPath + "\\shell\\surface0009.png"); petDrag[0] = new Bitmap(Application.StartupPath + "\\shell\\surface0091.png"); petDrag[1] = new Bitmap(Application.StartupPath + "\\shell\\surface0092.png"); petDrag[2] = new Bitmap(Application.StartupPath + "\\shell\\surface0093.png"); petBlink[0] = new Bitmap(Application.StartupPath + "\\shell\\surface1003.png"); petBlink[1] = new Bitmap(Application.StartupPath + "\\shell\\surface1004.png"); petHit[0] = new Bitmap(Application.StartupPath + "\\shell\\surface0002.png"); petHit[1] = new Bitmap(Application.StartupPath + "\\shell\\surface0001.png"); petHit[2] = new Bitmap(Application.StartupPath + "\\shell\\surface0004.png"); petEat[0] = new Bitmap(Application.StartupPath + "\\shell\\surface0033.png"); petEat[1] = new Bitmap(Application.StartupPath + "\\shell\\surface0034.png"); petEat[2] = new Bitmap(Application.StartupPath + "\\shell\\surface0035.png"); petHat[0, 0] = new Bitmap(Application.StartupPath + "\\shell\\surface3000.png"); petHat[0, 1] = new Bitmap(Application.StartupPath + "\\shell\\surface3001.png"); petHat[1, 0] = new Bitmap(Application.StartupPath + "\\shell\\surface3002.png"); petHat[1, 1] = new Bitmap(Application.StartupPath + "\\shell\\surface3003.png"); petHat[2, 0] = new Bitmap(Application.StartupPath + "\\shell\\surface3004.png"); petHat[2, 1] = new Bitmap(Application.StartupPath + "\\shell\\surface3005.png"); petHat[3, 0] = new Bitmap(Application.StartupPath + "\\shell\\surface3006.png"); petHat[3, 1] = new Bitmap(Application.StartupPath + "\\shell\\surface3007.png"); petClothes[0, 0] = new Bitmap(Application.StartupPath + "\\shell\\surface3100.png"); petClothes[0, 1] = new Bitmap(Application.StartupPath + "\\shell\\surface3101.png"); petClothes[0, 2] = new Bitmap(Application.StartupPath + "\\shell\\surface3102.png"); petClothes[0, 3] = new Bitmap(Application.StartupPath + "\\shell\\surface3103.png"); petClothes[1, 0] = new Bitmap(Application.StartupPath + "\\shell\\surface3200.png"); petClothes[1, 1] = new Bitmap(Application.StartupPath + "\\shell\\surface3201.png"); petClothes[1, 2] = new Bitmap(Application.StartupPath + "\\shell\\surface3202.png"); petClothes[1, 3] = new Bitmap(Application.StartupPath + "\\shell\\surface3203.png"); petSing[0] = new Bitmap(Application.StartupPath + "\\shell\\surface0025.png"); petSing[1] = new Bitmap(Application.StartupPath + "\\shell\\surface0026.png"); DressAll(); SetBits(petWithClothes[0]); Config = new ConfigHelper.ConfigHelper(); //吃文件线程 et = new EatThread(Config, EatThing, notifyIcon1); et.Start(); //邮件监控线程 EmailTask = new EmailHelper.EmailTask(notifyIcon1); EmailTask.Start(); initEmailItems(); vplay = new VoicePlay(); }
public EatThread(ConfigHelper.ConfigHelper configHelper, Action SetMap, System.Windows.Forms.NotifyIcon notifyIcon1) { this.configHelper = configHelper; EatFileAllowType = configHelper.GetConfig("EatFileAllowType").ToString().Split(','); EatFileNotAllowType = configHelper.GetConfig("EatFileNotAllowType").ToString().Split(','); EatPath = new DirectoryInfo(configHelper.GetConfig("EatPath").ToString()); EatBetween = int.Parse(configHelper.GetConfig("EatBetween").ToString()); this.SetMap = SetMap; ni = notifyIcon1; }
private void ChangeConfig_Load(object sender, EventArgs e) { this.Config = Form1.Config; if (Config.GetConfig("EatFileEnable").ToString().Equals("true")) { comboBox1.SelectedIndex = 0; } else { comboBox1.SelectedIndex = 1; } textBox1.Text = Config.GetConfig("EatFileAllowType").ToString(); textBox2.Text = Config.GetConfig("EatFileNotAllowType").ToString(); textBox3.Text = Config.GetConfig("EatBetween").ToString(); EatfileAllow = Config.GetConfig("EatPath").ToString(); }
private void ChangeConfig_Load(object sender, EventArgs e) { this.Config = Form1.Config; if (Config.GetConfig("EatFileEnable").ToString().Equals("true")) { comboBox1.SelectedIndex = 0; } else { comboBox1.SelectedIndex = 1; } textBox1.Text = Config.GetConfig("EatFileAllowType").ToString(); textBox2.Text = Config.GetConfig("EatFileNotAllowType").ToString(); textBox3.Text = Config.GetConfig("EatBetween").ToString(); textBox4.Text = Config.GetConfig("ListenPort").ToString(); textBox5.Text = Config.GetConfig("DefDownloadSavePath") == null?Environment.GetFolderPath(Environment.SpecialFolder.Programs) : Config.GetConfig("DefDownloadSavePath").ToString(); EatfileAllow = Config.GetConfig("EatPath").ToString(); }