public void Initilize(CkernelGateway in_krnGateway) { Name = "listViewQueue"; AlreadyDownloadingItemColor = Color.Red; AlreadyDownloadedItemColor = Color.Green; try { Font = new Font("Microsoft Sans Serif", 8.25F, GraphicsUnit.Point); } catch { Font = (Font)this.Parent.Font.Clone(); } krnGateway = in_krnGateway; Columns.Add("File Name", 400, true); Columns.Add("Size", 80, true); Columns.Add("Sources", 60, true); Columns.Add("Codec", 60, false); Columns.Add("Length", 60, false); Columns.Add("Bitrate", 60, false); Columns.Add("File type", 90, false); ContextMenuSearch = new ContextMenu(); ContextMenuSearch.MenuItems.Add("Download", new EventHandler(OnDownloadFile)); ContextMenuSearch.MenuItems.Add("Download (Stopped)", new EventHandler(OnDownloadFileStopped)); ContextMenuSearch.MenuItems.Add("-"); ContextMenuSearch.MenuItems.Add("Copy eLink to clipboard", new EventHandler(OnCopyLink)); ContextMenuSearch.MenuItems.Add("Copy eLink to clipboard (HTML)", new EventHandler(OnCopyLinkHTML)); ContextMenuSearch.MenuItems.Add("-"); MenuItem MenuItemInfo = new MenuItem("Search more info"); ContextMenuSearch.MenuItems.Add(MenuItemInfo); MenuInfo = new CMenuInfo(MenuItemInfo); ContextMenu = ContextMenuSearch; ContextMenuSearch.Popup += new System.EventHandler(myContextMenuPopup); TheColumnSorter = new SearchColumnSorter(); TheColumnSorter.CurrentColumn = 1; TheColumnSorter.sortOrder = -1; this.ClickHeader += new HeaderEventHandler(myColumnClick); this.DoubleClick += new EventHandler(OnDownloadFile); this.KeyDown += new KeyEventHandler(OnKeyDown); m_DefaultWidths = new int[] { 400, 80, 60, 60, 60, 60, 90 }; m_Globalize(); m_LoadWidths(); this.SelectedIndexChanged += new EventHandler(searchListView_SelectedIndexChanged); }
public void Initilize(CkernelGateway in_krnGateway) { Name="listViewQueue"; AlreadyDownloadingItemColor=Color.Red; AlreadyDownloadedItemColor=Color.Green; try { Font=new Font("Microsoft Sans Serif",8.25F,GraphicsUnit.Point); } catch { Font=(Font)this.Parent.Font.Clone(); } krnGateway=in_krnGateway; Columns.Add("File Name",400,true); Columns.Add("Size",80,true); Columns.Add("Sources",60,true); Columns.Add("Codec",60,false); Columns.Add("Length",60,false); Columns.Add("Bitrate",60,false); Columns.Add("File type",90,false); ContextMenuSearch = new ContextMenu(); ContextMenuSearch.MenuItems.Add("Download",new EventHandler(OnDownloadFile)); ContextMenuSearch.MenuItems.Add("Download (Stopped)",new EventHandler(OnDownloadFileStopped)); ContextMenuSearch.MenuItems.Add("-"); ContextMenuSearch.MenuItems.Add("Copy eLink to clipboard", new EventHandler(OnCopyLink)); ContextMenuSearch.MenuItems.Add("Copy eLink to clipboard (HTML)", new EventHandler(OnCopyLinkHTML)); ContextMenuSearch.MenuItems.Add("-"); MenuItem MenuItemInfo=new MenuItem("Search more info"); ContextMenuSearch.MenuItems.Add(MenuItemInfo); MenuInfo=new CMenuInfo(MenuItemInfo); ContextMenu=ContextMenuSearch; ContextMenuSearch.Popup+=new System.EventHandler(myContextMenuPopup); TheColumnSorter=new SearchColumnSorter(); TheColumnSorter.CurrentColumn=1; TheColumnSorter.sortOrder=-1; this.ClickHeader+=new HeaderEventHandler(myColumnClick); this.DoubleClick+=new EventHandler(OnDownloadFile); this.KeyDown+=new KeyEventHandler(OnKeyDown); m_DefaultWidths=new int[] {400,80,60,60,60,60,90}; m_Globalize(); m_LoadWidths(); this.SelectedIndexChanged+=new EventHandler(searchListView_SelectedIndexChanged); }