Example #1
0
 private void SetAutoCompleteCtrl(int idxPanel)
 {
     bool flag = false;
     List<Control> auList = new List<Control>();
     this.JPList[idxPanel].JP.GetAutoCompList(this.JPList[idxPanel].JP, auList);
     foreach (Control control in auList)
     {
         flag = false;
         Naccs.Common.CustomControls.IAutoComplete complete = (Naccs.Common.CustomControls.IAutoComplete) control;
         foreach (AuCtrlInfo info in this.AuCtrlInfoList)
         {
             if (info.ID == complete.id)
             {
                 complete.AutoCompleteCustomSource = info.AuList;
                 flag = true;
             }
         }
         if (!flag)
         {
             AuCtrlInfo item = new AuCtrlInfo {
                 AuList = new AutoCompleteStringCollection(),
                 ID = complete.id
             };
             complete.AutoCompleteCustomSource = item.AuList;
             this.AuCtrlInfoList.Add(item);
         }
     }
 }
Example #2
0
 private void SetHistory(XmlDocument doc)
 {
     this.AuCtrlInfoList.Clear();
     try
     {
         foreach (XmlElement element2 in doc.DocumentElement.ChildNodes)
         {
             AuCtrlInfo item = new AuCtrlInfo {
                 AuList = new AutoCompleteStringCollection(),
                 ID = element2.GetAttribute("id")
             };
             foreach (XmlElement element3 in element2.ChildNodes)
             {
                 item.AuList.Add(element3.InnerText);
             }
             this.AuCtrlInfoList.Add(item);
         }
         for (int i = 0; i < this.JPList.Count; i++)
         {
             if (this.JPList[i].JPStatus == JobPanelStatus.Open)
             {
                 this.SetAutoCompleteCtrl(i);
             }
         }
     }
     catch
     {
         Console.WriteLine("Failure in re-reading in the input history (auto complete) file.");
     }
 }
Example #3
0
 private void ReadHistoryFile(string HistoryFile)
 {
     this.AuCtrlInfoList.Clear();
     if (File.Exists(HistoryFile))
     {
         XmlDocument document = new XmlDocument();
         try
         {
             document.Load(HistoryFile);
             foreach (XmlElement element2 in document.DocumentElement.ChildNodes)
             {
                 AuCtrlInfo item = new AuCtrlInfo {
                     AuList = new AutoCompleteStringCollection(),
                     ID = element2.GetAttribute("id")
                 };
                 foreach (XmlElement element3 in element2.ChildNodes)
                 {
                     item.AuList.Add(element3.InnerText);
                 }
                 this.AuCtrlInfoList.Add(item);
             }
         }
         catch
         {
             Console.WriteLine("Failure in reading in the input history (auto complete) file.(DivJobForm.ReadHistoryFile)");
             Console.WriteLine("(" + HistoryFile + ")");
         }
     }
 }