コード例 #1
0
 public void Add(string caterogy, MyTask template)
 {
     foreach (EngineCaterogy caterogy2 in this._engineCaterogys)
     {
         if (caterogy2.Name.Equals(caterogy))
         {
             caterogy2.Add(template);
             return;
         }
     }
     EngineCaterogy caterogy3 = new EngineCaterogy(caterogy);
     caterogy3.Add(template);
     this.Add(caterogy3);
 }
コード例 #2
0
ファイル: ManageForm.cs プロジェクト: purplecow/AutoBroswer
 public void addGetTask(MyTask task)
 {
     MyTask task2 = (MyTask) task.Clone();
     foreach (MyTask task3 in this._getTasks)
     {
         if (task3._id == task2._id)
         {
             this._getTasks.Remove(task3);
             break;
         }
     }
     this._getTasks.Add(task2);
 }
コード例 #3
0
ファイル: ManageForm.cs プロジェクト: purplecow/AutoBroswer
 private void dataGridViewTemplate_CellDoubleClick(object sender, DataGridViewCellEventArgs e)
 {
     if (((e.ColumnIndex >= 0) && (e.ColumnIndex < this.dataGridViewTemplate.ColumnCount)) && ((e.RowIndex >= 0) && (e.RowIndex < this.dataGridViewTemplate.Rows.Count)))
     {
         EngineCaterogy caterogy = this._engineManager.GetCaterogy(this._engineManager.SelectedIndex);
         if (caterogy != null)
         {
             MyTask template = caterogy.GetTemplate(e.RowIndex);
             if (template != null)
             {
                 this._task = (MyTask) template.Clone();
                 this.ReloadTask(true);
                 this.tabControl1.SelectedTab = this.tabPageCustonTemplate;
             }
         }
     }
 }
コード例 #4
0
ファイル: ManageForm.cs プロジェクト: purplecow/AutoBroswer
 public void HandleGetTask(WorldPacket recvPacket)
 {
     if (recvPacket != null)
     {
         MyTask task = new MyTask();
         if (recvPacket.ReadInt32() == 0)
         {
             task._id = recvPacket.ReadUInt32();
             uint num2 = recvPacket.ReadUInt32();
             for (uint i = 0; i < num2; i++)
             {
                 string str = recvPacket.ReadString();
                 string str2 = recvPacket.ReadString();
                 string str3 = recvPacket.ReadString();
                 string str4 = recvPacket.ReadString();
                 string str5 = recvPacket.ReadString();
                 TaskInfo info = new TaskInfo(str, str2, str3, str4, str5);
                 task._taskItems.Add(info);
             }
             this.addGetTask(task);
         }
     }
 }
コード例 #5
0
ファイル: MyTask.cs プロジェクト: purplecow/AutoBroswer
 public object Clone()
 {
     MyTask task = new MyTask();
     if (this._taskItems != null)
     {
         task._taskItems = new ArrayList();
         for (int i = 0; i < this._taskItems.Count; i++)
         {
             TaskInfo info2 = (TaskInfo) this._taskItems[i];
             TaskInfo info = new TaskInfo(info2._param1, info2._param2, info2._param3, info2._param4, info2._param5);
             task._taskItems.Add(info);
         }
     }
     task._isRun = this._isRun;
     task._validClickCount = this._validClickCount;
     task._invalidClickCount = this._invalidClickCount;
     task._todayValidClickCount = this._todayValidClickCount;
     task._todayInvalidClickCount = this._todayInvalidClickCount;
     task._yesterdayValidClickCount = this._yesterdayValidClickCount;
     task._yesterdayInvalidClickCount = this._yesterdayInvalidClickCount;
     task._completedCount = this._completedCount;
     task._id = this._id;
     task._name = this._name;
     task._category = this._category;
     if (this._HourClicks != null)
     {
         task._HourClicks = new ArrayList(this._HourClicks);
     }
     if (this._AreaClicks != null)
     {
         task._AreaClicks = new ArrayList(this._AreaClicks);
     }
     task._totalDayClicks = this._totalDayClicks;
     task._note = this._note;
     task._publishTime = this._publishTime;
     return task;
 }
コード例 #6
0
ファイル: ManageForm.cs プロジェクト: purplecow/AutoBroswer
 public void GetTaskPacket(MyTask task, WorldPacket ms)
 {
     ms.InputInt(task._taskItems.Count);
     foreach (TaskInfo info in task._taskItems)
     {
         ms.InputString(info._param1, 0x20);
         ms.InputString(info._param2, 0x100);
         ms.InputString(info._param3, 0x100);
         ms.InputString(info._param4, 0x100);
         ms.InputString(info._param5, 0x100);
     }
     if ((task._HourClicks != null) && (task._HourClicks.Count == 0x30))
     {
         for (int i = 0; i < 0x30; i++)
         {
             ms.InputUInt32((uint) task._HourClicks[i]);
         }
     }
     else
     {
         for (int j = 0; j < 0x30; j++)
         {
             ms.InputUInt32(0);
         }
     }
     int[] numArray = new int[2];
     if ((task._AreaClicks != null) && (task._AreaClicks.Count == 0x23))
     {
         for (int k = 0; k < 0x1f; k++)
         {
             numArray[0] |= ((bool) task._AreaClicks[k]) ? (((int) 1) << k) : 0;
         }
         for (int m = 0x1f; m < 0x23; m++)
         {
             numArray[1] |= ((bool) task._AreaClicks[m]) ? (((int) 1) << (m - 0x1f)) : 0;
         }
     }
     ms.InputInt(numArray[0]);
     ms.InputInt(numArray[1]);
     ms.InputString(task.Note, 0x40);
 }
コード例 #7
0
ファイル: ManageForm.cs プロジェクト: purplecow/AutoBroswer
 private void SetHourClicksText(MyTask task)
 {
     if (((task != null) && (task._HourClicks != null)) && (task._HourClicks.Count == HOURSCOUNT))
     {
         int num = 0;
         for (int i = 0; i < task._HourClicks.Count; i++)
         {
             num += Convert.ToInt32(task._HourClicks[i]);
         }
         this.textBoxCustomClickPerDay.Text = num.ToString();
         this.textBoxCustomClock0.Text = Convert.ToInt32(task._HourClicks[0]).ToString();
         this.textBoxCustomClock1.Text = Convert.ToInt32(task._HourClicks[1]).ToString();
         this.textBoxCustomClock2.Text = Convert.ToInt32(task._HourClicks[2]).ToString();
         this.textBoxCustomClock3.Text = Convert.ToInt32(task._HourClicks[3]).ToString();
         this.textBoxCustomClock4.Text = Convert.ToInt32(task._HourClicks[4]).ToString();
         this.textBoxCustomClock5.Text = Convert.ToInt32(task._HourClicks[5]).ToString();
         this.textBoxCustomClock6.Text = Convert.ToInt32(task._HourClicks[6]).ToString();
         this.textBoxCustomClock7.Text = Convert.ToInt32(task._HourClicks[7]).ToString();
         this.textBoxCustomClock8.Text = Convert.ToInt32(task._HourClicks[8]).ToString();
         this.textBoxCustomClock9.Text = Convert.ToInt32(task._HourClicks[9]).ToString();
         this.textBoxCustomClock10.Text = Convert.ToInt32(task._HourClicks[10]).ToString();
         this.textBoxCustomClock11.Text = Convert.ToInt32(task._HourClicks[11]).ToString();
         this.textBoxCustomClock12.Text = Convert.ToInt32(task._HourClicks[12]).ToString();
         this.textBoxCustomClock13.Text = Convert.ToInt32(task._HourClicks[13]).ToString();
         this.textBoxCustomClock14.Text = Convert.ToInt32(task._HourClicks[14]).ToString();
         this.textBoxCustomClock15.Text = Convert.ToInt32(task._HourClicks[15]).ToString();
         this.textBoxCustomClock16.Text = Convert.ToInt32(task._HourClicks[0x10]).ToString();
         this.textBoxCustomClock17.Text = Convert.ToInt32(task._HourClicks[0x11]).ToString();
         this.textBoxCustomClock18.Text = Convert.ToInt32(task._HourClicks[0x12]).ToString();
         this.textBoxCustomClock19.Text = Convert.ToInt32(task._HourClicks[0x13]).ToString();
         this.textBoxCustomClock20.Text = Convert.ToInt32(task._HourClicks[20]).ToString();
         this.textBoxCustomClock21.Text = Convert.ToInt32(task._HourClicks[0x15]).ToString();
         this.textBoxCustomClock22.Text = Convert.ToInt32(task._HourClicks[0x16]).ToString();
         this.textBoxCustomClock23.Text = Convert.ToInt32(task._HourClicks[0x17]).ToString();
         this.textBoxCustomClock24.Text = Convert.ToInt32(task._HourClicks[0x18]).ToString();
         this.textBoxCustomClock25.Text = Convert.ToInt32(task._HourClicks[0x19]).ToString();
         this.textBoxCustomClock26.Text = Convert.ToInt32(task._HourClicks[0x1a]).ToString();
         this.textBoxCustomClock27.Text = Convert.ToInt32(task._HourClicks[0x1b]).ToString();
         this.textBoxCustomClock28.Text = Convert.ToInt32(task._HourClicks[0x1c]).ToString();
         this.textBoxCustomClock29.Text = Convert.ToInt32(task._HourClicks[0x1d]).ToString();
         this.textBoxCustomClock30.Text = Convert.ToInt32(task._HourClicks[30]).ToString();
         this.textBoxCustomClock31.Text = Convert.ToInt32(task._HourClicks[0x1f]).ToString();
         this.textBoxCustomClock32.Text = Convert.ToInt32(task._HourClicks[0x20]).ToString();
         this.textBoxCustomClock33.Text = Convert.ToInt32(task._HourClicks[0x21]).ToString();
         this.textBoxCustomClock34.Text = Convert.ToInt32(task._HourClicks[0x22]).ToString();
         this.textBoxCustomClock35.Text = Convert.ToInt32(task._HourClicks[0x23]).ToString();
         this.textBoxCustomClock36.Text = Convert.ToInt32(task._HourClicks[0x24]).ToString();
         this.textBoxCustomClock37.Text = Convert.ToInt32(task._HourClicks[0x25]).ToString();
         this.textBoxCustomClock38.Text = Convert.ToInt32(task._HourClicks[0x26]).ToString();
         this.textBoxCustomClock39.Text = Convert.ToInt32(task._HourClicks[0x27]).ToString();
         this.textBoxCustomClock40.Text = Convert.ToInt32(task._HourClicks[40]).ToString();
         this.textBoxCustomClock41.Text = Convert.ToInt32(task._HourClicks[0x29]).ToString();
         this.textBoxCustomClock42.Text = Convert.ToInt32(task._HourClicks[0x2a]).ToString();
         this.textBoxCustomClock43.Text = Convert.ToInt32(task._HourClicks[0x2b]).ToString();
         this.textBoxCustomClock44.Text = Convert.ToInt32(task._HourClicks[0x2c]).ToString();
         this.textBoxCustomClock45.Text = Convert.ToInt32(task._HourClicks[0x2d]).ToString();
         this.textBoxCustomClock46.Text = Convert.ToInt32(task._HourClicks[0x2e]).ToString();
         this.textBoxCustomClock47.Text = Convert.ToInt32(task._HourClicks[0x2f]).ToString();
     }
 }
コード例 #8
0
ファイル: ManageForm.cs プロジェクト: purplecow/AutoBroswer
 private void RunTask(MyTask task)
 {
     this.SendRunTask(task);
 }
コード例 #9
0
ファイル: ManageForm.cs プロジェクト: purplecow/AutoBroswer
 public void SendStopTask(MyTask task)
 {
     WorldPacket packet = new WorldPacket();
     packet.Initialize(0x13);
     packet.InputUInt32(task._id);
     this.AddPacket(packet);
 }
コード例 #10
0
ファイル: ManageForm.cs プロジェクト: purplecow/AutoBroswer
 public void SendRunTask(MyTask mytask)
 {
     try
     {
         client.COPYDATASTRUCT copydatastruct;
         XmlDocument document = new XmlDocument();
         XmlElement newChild = document.CreateElement("root");
         XmlElement element2 = document.CreateElement("tasks");
         XmlElement element4 = document.CreateElement("task");
         XmlElement element5 = document.CreateElement("params");
         foreach (TaskInfo info in mytask._taskItems)
         {
             XmlElement element6 = document.CreateElement("taskinfo");
             XmlElement element7 = document.CreateElement("param1");
             XmlElement element8 = document.CreateElement("param2");
             XmlElement element9 = document.CreateElement("param3");
             XmlElement element10 = document.CreateElement("param4");
             XmlElement element11 = document.CreateElement("param5");
             element7.InnerText = info._param1;
             element6.AppendChild(element7);
             if ((info._param2 != string.Empty) && (info._param2 != ""))
             {
                 element8.InnerText = info._param2;
                 element6.AppendChild(element8);
             }
             if (info._param3 != string.Empty)
             {
                 element9.InnerText = info._param3;
                 element6.AppendChild(element9);
             }
             if (info._param4 != string.Empty)
             {
                 element10.InnerText = info._param4;
                 element6.AppendChild(element10);
             }
             if (info._param5 != string.Empty)
             {
                 element11.InnerText = info._param5;
                 element6.AppendChild(element11);
             }
             element4.AppendChild(element6);
         }
         XmlElement element3 = document.CreateElement("taskid");
         element3.InnerText = mytask._id.ToString();
         element5.AppendChild(element3);
         element3 = null;
         element4.AppendChild(element5);
         element2.AppendChild(element4);
         newChild.AppendChild(element2);
         XmlElement element12 = document.CreateElement("setting");
         if (this.WaitFindTime != 0)
         {
             element3 = document.CreateElement("waitFindTime");
             element3.InnerText = this.WaitFindTime.ToString();
             element12.AppendChild(element3);
             element3 = null;
         }
         if (this.WaitDocCompleteTime != 0)
         {
             element3 = document.CreateElement("waitDocCompleteTime");
             element3.InnerText = this.WaitDocCompleteTime.ToString();
             element12.AppendChild(element3);
             element3 = null;
         }
         if (!string.IsNullOrEmpty(this._curAddress))
         {
             element3 = document.CreateElement("curAddress");
             element3.InnerText = this._curAddress;
             element12.AppendChild(element3);
             element3 = null;
         }
         newChild.AppendChild(element12);
         document.AppendChild(newChild);
         string outerXml = document.OuterXml;
         int length = Encoding.Unicode.GetBytes(outerXml).Length;
         copydatastruct.dwData = IntPtr.Zero;
         copydatastruct.lpData = outerXml;
         copydatastruct.cbDaat = length + 2;
         this.BrowserManager.RunTask(mytask._id, copydatastruct);
     }
     catch (Exception)
     {
     }
 }
コード例 #11
0
ファイル: ManageForm.cs プロジェクト: purplecow/AutoBroswer
 public void SendModifyTask(MyTask task)
 {
     WorldPacket ms = new WorldPacket();
     ms.Initialize(0x11);
     ms.InputUInt32(task._id);
     this.GetTaskPacket(task, ms);
     this.AddPacket(ms);
 }
コード例 #12
0
ファイル: ManageForm.cs プロジェクト: purplecow/AutoBroswer
 public void SendAddTask(MyTask task)
 {
     WorldPacket ms = new WorldPacket();
     ms.Initialize(13);
     this.GetTaskPacket(task, ms);
     this.AddPacket(ms);
 }
コード例 #13
0
ファイル: ManageForm.cs プロジェクト: purplecow/AutoBroswer
 public void ResetLoginUser()
 {
     this._tasks.Clear();
     this._task = new MyTask();
     this._modifyTaskIndex = -1;
     this.IsInitialisedMyTask = false;
     this.ReloadTask(false);
     this.ReloadTasks();
 }
コード例 #14
0
ファイル: ManageForm.cs プロジェクト: purplecow/AutoBroswer
 public void RemoveTask(uint taskID)
 {
     int index = 0;
     index = 0;
     while (index < this._tasks.Count)
     {
         if (((MyTask) this._tasks[index])._id == taskID)
         {
             break;
         }
         index++;
     }
     if (index < this._tasks.Count)
     {
         this._tasks.RemoveAt(index);
         if (index == this._modifyTaskIndex)
         {
             this._modifyTaskIndex = -1;
             this._task = null;
             this._task = new MyTask();
             this.ReloadTask(false);
         }
         else if (index < this._modifyTaskIndex)
         {
             this._modifyTaskIndex--;
         }
         this.UpdateAccount();
     }
     this.ReloadTasks();
 }
コード例 #15
0
ファイル: ManageForm.cs プロジェクト: purplecow/AutoBroswer
 public void HandleMyTask(WorldPacket recvPacket)
 {
     if (recvPacket != null)
     {
         MyTask task = new MyTask {
             _id = recvPacket.ReadUInt32(),
             _publishTime = recvPacket.ReadUInt32(),
             _isRun = recvPacket.ReadUInt32() == 1
         };
         uint num = recvPacket.ReadUInt32();
         for (uint i = 0; i < num; i++)
         {
             string str = recvPacket.ReadString();
             string str2 = recvPacket.ReadString();
             string str3 = recvPacket.ReadString();
             string str4 = recvPacket.ReadString();
             string str5 = recvPacket.ReadString();
             TaskInfo info = new TaskInfo(str, str2, str3, str4, str5);
             task._taskItems.Add(info);
         }
         int num3 = recvPacket.ReadInt32();
         int num4 = recvPacket.ReadInt32();
         int num5 = 0;
         ArrayList areaClicks = new ArrayList();
         num5 = 0;
         while (num5 < 0x1f)
         {
             areaClicks.Add((num3 & (((int) 1) << num5)) != 0);
             num5++;
         }
         while (num5 < 0x23)
         {
             areaClicks.Add((num4 & (((int) 1) << (num5 - 0x1f))) != 0);
             num5++;
         }
         task.SetAreaClick(areaClicks);
         ArrayList hourClicks = new ArrayList();
         for (num5 = 0; num5 < 0x30; num5++)
         {
             uint num6 = recvPacket.ReadUInt32();
             hourClicks.Add(num6);
         }
         task.SetHourClick(hourClicks);
         task._validClickCount = recvPacket.ReadUInt32();
         task._invalidClickCount = recvPacket.ReadUInt32();
         task._todayValidClickCount = recvPacket.ReadUInt32();
         task._todayInvalidClickCount = recvPacket.ReadUInt32();
         task._yesterdayValidClickCount = recvPacket.ReadUInt32();
         task._yesterdayInvalidClickCount = recvPacket.ReadUInt32();
         task.Note = recvPacket.ReadString();
         this.AddTask(task);
         this.UpdateAccount();
     }
 }
コード例 #16
0
ファイル: ManageForm.cs プロジェクト: purplecow/AutoBroswer
 public void AddTask(MyTask task)
 {
     MyTask task2 = (MyTask) task.Clone();
     foreach (MyTask task3 in this._tasks)
     {
         if (task3._id == task2._id)
         {
             this._tasks.Remove(task3);
             break;
         }
     }
     this._tasks.Add(task2);
     this.UpdateAccount();
     this.ReloadTasks();
 }
コード例 #17
0
ファイル: ManageForm.cs プロジェクト: purplecow/AutoBroswer
 private void LoadTemplates()
 {
     int num = 0;
     try
     {
         XmlDocument document = new XmlDocument();
         document.Load("template.xml");
         foreach (XmlNode node2 in document.SelectSingleNode("root").ChildNodes)
         {
             if (node2.Name.Equals("tasks"))
             {
                 foreach (XmlNode node3 in node2.ChildNodes)
                 {
                     if (node3.Name.Equals("task"))
                     {
                         MyTask template = new MyTask();
                         foreach (XmlNode node4 in node3.ChildNodes)
                         {
                             if (node4.Name.Equals("name"))
                             {
                                 template.Name = node4.InnerText;
                             }
                             else
                             {
                                 if (node4.Name.Equals("category"))
                                 {
                                     template.Category = node4.InnerText;
                                     continue;
                                 }
                                 if (node4.Name.Equals("note"))
                                 {
                                     template.Note = node4.InnerText;
                                     continue;
                                 }
                                 if (node4.Name.Equals("taskinfo"))
                                 {
                                     string s = string.Empty;
                                     string innerText = string.Empty;
                                     string str3 = string.Empty;
                                     string str4 = string.Empty;
                                     string str5 = string.Empty;
                                     foreach (XmlNode node5 in node4)
                                     {
                                         if (node5.Name.Equals("param1"))
                                         {
                                             s = node5.InnerText;
                                         }
                                         else
                                         {
                                             if (node5.Name.Equals("param2"))
                                             {
                                                 innerText = node5.InnerText;
                                                 continue;
                                             }
                                             if (node5.Name.Equals("param3"))
                                             {
                                                 str3 = node5.InnerText;
                                                 continue;
                                             }
                                             if (node5.Name.Equals("param4"))
                                             {
                                                 str4 = node5.InnerText;
                                                 continue;
                                             }
                                             if (node5.Name.Equals("param5"))
                                             {
                                                 str5 = node5.InnerText;
                                             }
                                         }
                                     }
                                     if ((WindowUtil.StringToInt(s) > -1) && (WindowUtil.StringToInt(s) < 0x1d))
                                     {
                                         TaskInfo task = new TaskInfo(s, innerText, str3, str4, str5);
                                         template.Insert(task, -1);
                                     }
                                 }
                             }
                         }
                         if (template._taskItems.Count > 0)
                         {
                             this._engineManager.Add(template.Category, template);
                         }
                     }
                 }
                 continue;
             }
         }
     }
     catch (Exception)
     {
         num = -1;
     }
     if (num == 0)
     {
         foreach (EngineCaterogy caterogy in this._engineManager.Caterogy)
         {
             if (string.IsNullOrEmpty(caterogy.Name))
             {
                 this.listBoxTemplateCategory.Items.Add("未分类");
             }
             else
             {
                 this.listBoxTemplateCategory.Items.Add(caterogy.Name);
             }
         }
         this.ReloadTemplate(0);
     }
 }
コード例 #18
0
ファイル: ManageForm.cs プロジェクト: purplecow/AutoBroswer
 public void StartTask(MyTask task = new MyTask())
 {
     this.StartTaskThread(task);
 }
コード例 #19
0
ファイル: ManageForm.cs プロジェクト: purplecow/AutoBroswer
 private void SetAreaClicksText(MyTask task)
 {
     if (((task != null) && (task._AreaClicks != null)) && (task._AreaClicks.Count == 0x23))
     {
         int num = 0;
         this.checkBoxCustomHeBei.Checked = (bool) task._AreaClicks[num++];
         this.checkBoxCustomSanXi.Checked = (bool) task._AreaClicks[num++];
         this.checkBoxCustomLiaoNing.Checked = (bool) task._AreaClicks[num++];
         this.checkBoxCustomJiLin.Checked = (bool) task._AreaClicks[num++];
         this.checkBoxCustomHeiLongjiang.Checked = (bool) task._AreaClicks[num++];
         this.checkBoxCustomJiangSu.Checked = (bool) task._AreaClicks[num++];
         this.checkBoxCustomZheJiang.Checked = (bool) task._AreaClicks[num++];
         this.checkBoxCustomAnHui.Checked = (bool) task._AreaClicks[num++];
         this.checkBoxCustomFuJian.Checked = (bool) task._AreaClicks[num++];
         this.checkBoxCustomJiangXi.Checked = (bool) task._AreaClicks[num++];
         this.checkBoxCustomSanDong.Checked = (bool) task._AreaClicks[num++];
         this.checkBoxCustomHeNan.Checked = (bool) task._AreaClicks[num++];
         this.checkBoxCustomHuBei.Checked = (bool) task._AreaClicks[num++];
         this.checkBoxCustomHuNan.Checked = (bool) task._AreaClicks[num++];
         this.checkBoxCustomGuangDong.Checked = (bool) task._AreaClicks[num++];
         this.checkBoxCustomHaiNan.Checked = (bool) task._AreaClicks[num++];
         this.checkBoxCustomSiChuang.Checked = (bool) task._AreaClicks[num++];
         this.checkBoxCustomGuiZhou.Checked = (bool) task._AreaClicks[num++];
         this.checkBoxCustomYunNan.Checked = (bool) task._AreaClicks[num++];
         this.checkBoxCustomShanXi.Checked = (bool) task._AreaClicks[num++];
         this.checkBoxCustomGanSu.Checked = (bool) task._AreaClicks[num++];
         this.checkBoxCustomQingHai.Checked = (bool) task._AreaClicks[num++];
         this.checkBoxCustomTaiWan.Checked = (bool) task._AreaClicks[num++];
         this.checkBoxCustomBeiJing.Checked = (bool) task._AreaClicks[num++];
         this.checkBoxCustomTianJin.Checked = (bool) task._AreaClicks[num++];
         this.checkBoxCustomShangHai.Checked = (bool) task._AreaClicks[num++];
         this.checkBoxCustomChongQing.Checked = (bool) task._AreaClicks[num++];
         this.checkBoxCustomNeiMengGu.Checked = (bool) task._AreaClicks[num++];
         this.checkBoxCustomXiZang.Checked = (bool) task._AreaClicks[num++];
         this.checkBoxCustomXinJiang.Checked = (bool) task._AreaClicks[num++];
         this.checkBoxCustomNingXia.Checked = (bool) task._AreaClicks[num++];
         this.checkBoxCustomGuangXi.Checked = (bool) task._AreaClicks[num++];
         this.checkBoxCustomXiangGan.Checked = (bool) task._AreaClicks[num++];
         this.checkBoxCustomAoMen.Checked = (bool) task._AreaClicks[num++];
         this.checkBoxCustomOtherProvince.Checked = (bool) task._AreaClicks[num++];
     }
 }
コード例 #20
0
ファイル: ManageForm.cs プロジェクト: purplecow/AutoBroswer
 public void StartTaskThread(MyTask task)
 {
     if (task == null)
     {
         this.StopTaskThread();
         this._startNetTask = true;
     }
     else
     {
         this._testTask = (MyTask) task.Clone();
     }
     this._taskThreadRun = true;
 }
コード例 #21
0
ファイル: ManageForm.cs プロジェクト: purplecow/AutoBroswer
 private void TaskEditClick(object sender, EventArgs e)
 {
     int rowIndex = this.dataGridViewTasks.CurrentCell.RowIndex;
     if ((rowIndex >= 0) && (rowIndex < this._tasks.Count))
     {
         this._task = (MyTask) ((MyTask) this.Tasks[rowIndex]).Clone();
         this._modifyTaskIndex = rowIndex;
         this.ReloadTask(true);
         this.tabControl1.SelectedTab = this.tabPageCustonTemplate;
     }
 }
コード例 #22
0
ファイル: ManageForm.cs プロジェクト: purplecow/AutoBroswer
 protected override void Dispose(bool disposing)
 {
     if (this._findTimer != null)
     {
         this._findTimer.Dispose();
         this._findTimer = null;
     }
     this._task = null;
     if (this._panels != null)
     {
         this._panels.Clear();
     }
     this._panels = null;
     if (disposing && (this.components != null))
     {
         this.components.Dispose();
     }
     base.Dispose(disposing);
 }
コード例 #23
0
ファイル: ManageForm.cs プロジェクト: purplecow/AutoBroswer
 public MyTask GetTestTask()
 {
     MyTask task = null;
     if (this._testTask != null)
     {
         if (this._browserManager.GetEmptyBrowserWindow())
         {
             if (this._testTask != null)
             {
                 task = this._testTask;
                 this._testTask = null;
                 this.RunTask(task);
             }
             return task;
         }
         if (!this._browserManager.GetEmptyBrowserProcess())
         {
             this.StartBrowserProcess(true);
         }
     }
     return task;
 }
コード例 #24
0
ファイル: ManageForm.cs プロジェクト: purplecow/AutoBroswer
 private void buttonCustonTemplateSaveClick(object sender, EventArgs e)
 {
     if ((this._task != null) && (this._task._taskItems.Count > 0))
     {
         string str = this.textBoxTaskNote.Text.Trim();
         if (str.Length >= 0x20)
         {
             str = str.Remove(0x1c) + "...";
         }
         this._task.Note = str;
         this._task.SetAreaClick(this.GetAreasClick());
         this._task.SetHourClick(this.GetHoursClick());
         if (this._modifyTaskIndex != -1)
         {
             this.SendModifyTask(this._task);
             this._modifyTaskIndex = -1;
         }
         else
         {
             this.SendAddTask(this._task);
         }
         this._task = new MyTask();
         this.ResetTemplateComponent();
         this.tabControl1.SelectedTab = this.tabPageTaskManage;
     }
 }
コード例 #25
0
ファイル: ManageForm.cs プロジェクト: purplecow/AutoBroswer
 private void dataGridViewTasks_CellMouseDoubleClick(object sender, DataGridViewCellMouseEventArgs e)
 {
     if (((e.ColumnIndex >= 0) && (e.ColumnIndex < this.dataGridViewTasks.ColumnCount)) && ((e.RowIndex >= 0) && (e.RowIndex < this.dataGridViewTasks.Rows.Count)))
     {
         int rowIndex = e.RowIndex;
         if ((rowIndex >= 0) && (rowIndex < this._tasks.Count))
         {
             this._task = (MyTask) ((MyTask) this.Tasks[rowIndex]).Clone();
             this._modifyTaskIndex = rowIndex;
             this.ReloadTask(true);
             this.tabControl1.SelectedTab = this.tabPageCustonTemplate;
         }
     }
 }
コード例 #26
0
 public void Add(MyTask template)
 {
     this._templates.Add(template);
 }