Пример #1
0
 private void m_CreateTab()
 {
     //Crownwood.Magic.Controls.TabPage searchPage;
     TabPage searchPage;
     searchListView searchList = new searchListView();
     searchList.AllowColumnReorder = true;
     searchList.Dock = DockStyle.Fill;
     searchList.AutoArrange = false;
     searchList.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
     searchList.DefaultCustomDraw = true;
     searchList.FullRowSelect = true;
     searchList.FullyCustomHeader = false;
     searchList.HideSelection = false;
     searchList.IncreaseHeaderHeight = 0;
     searchList.View = System.Windows.Forms.View.Details;
     searchList.Initilize(krnGateway);
     searchList.ForeColor = HathiForm.Skin.GetColor("listsForeColor");
     searchList.BackColor = HathiForm.Skin.GetColor("listsBackColor");
     searchList.headerBackColor = HathiForm.Skin.GetColor("listsHeaderBackColor");
     searchList.ScrollBarBKColor = HathiForm.Skin.GetColor("listsScrollBarBackColor").ToArgb();
     searchList.AlreadyDownloadingItemColor = HathiForm.Skin.GetColor("SearchAlreadyDownloadingItemColor");
     searchList.AlreadyDownloadedItemColor = HathiForm.Skin.GetColor("SearchAlreadyDownloadedItemColor");
     //searchPage = new Crownwood.Magic.Controls.TabPage(m_NewTabName, searchList, null);
     searchPage = new TabPage(m_NewTabName, searchList);
     if (SearchesList.ContainsKey(m_SearchCount)) m_SearchCount++; //TODO review this !
     searchPage.Tag = m_SearchCount;
     searchList.Tag = m_SearchCount;
     SearchesList.Add(m_SearchCount, searchList);
     //tabSearchs.TabPages.Add(searchPage);
     tabSearchs.Add(searchPage);
     //tabSearchs.SelectedIndex = tabSearchs.TabPages.Count - 1;
     m_SearchCount++;
 }
Пример #2
0
 private void buttonSearch_Click(object sender, System.EventArgs e)
 {
     buttonSearch.Enabled = false;
     buttonExtend.Text = HathiForm.Globalization["LBL_CANCEL"];
     //Crownwood.Magic.Controls.TabPage searchPage;
     TabPage searchPage;
     searchListView searchList = new searchListView();
     searchList.AllowColumnReorder = true;
     searchList.Dock = DockStyle.Fill;
     searchList.AutoArrange = false;
     searchList.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
     searchList.DefaultCustomDraw = true;
     searchList.FullRowSelect = true;
     searchList.FullyCustomHeader = false;
     searchList.HideSelection = false;
     searchList.IncreaseHeaderHeight = 0;
     searchList.View = System.Windows.Forms.View.Details;
     searchList.Initilize(krnGateway);
     searchList.ForeColor = HathiForm.Skin.GetColor("listsForeColor");
     searchList.BackColor = HathiForm.Skin.GetColor("listsBackColor");
     searchList.headerBackColor = HathiForm.Skin.GetColor("listsHeaderBackColor");
     searchList.ScrollBarBKColor = HathiForm.Skin.GetColor("listsScrollBarBackColor").ToArgb();
     //searchPage = new Crownwood.Magic.Controls.TabPage(textBoxSearch.Text, searchList, null);
     searchPage = new TabPage(textBoxSearch.Text, searchList);
     searchPage.Tag = m_SearchCount;
     searchList.Tag = m_SearchCount;
     SearchesList.Add(m_SearchCount, searchList);
     //tabSearchs.TabPages.Add(searchPage);
     tabSearchs.Add(searchPage);
     //tabSearchs.SelectedIndex = tabSearchs.TabPages.Count - 1;
     uint MinSize;
     try
     {
         MinSize = Convert.ToUInt32(textBoxMinSize.Text) * 1048576;
     }
     catch
     {
         MinSize = 0;
     }
     uint MaxSize;
     try
     {
         MaxSize = Convert.ToUInt32(textBoxMaxSize.Text) * 1048576;
     }
     catch
     {
         MaxSize = 0;
     }
     uint Avaibility;
     try
     {
         Avaibility = Convert.ToUInt32(textBoxAvaibility.Text);
     }
     catch
     {
         Avaibility = 0;
     }
     string searchType = "";
     switch (comboBoxSearchType.SelectedIndex)
     {
         case 0:
             searchType = "";
             break;
         case 1:
             searchType = "Video";
             break;
         case 2:
             searchType = "Pro";
             break;
         case 3:
             searchType = "Audio";
             break;
         case 4:
             searchType = "Image";
             break;
     }
     TotalResult.Add(m_SearchCount, (uint)0);
     TabTitle.Add(m_SearchCount, textBoxSearch.Text);
     krnGateway.Search(m_SearchCount, textBoxSearch.Text, checkBoxSearchAny.Checked, searchType, MaxSize, MinSize, Avaibility, textBoxExclude.Text);
     m_SearchCount++;
 }