public void Initilize(CkernelGateway in_krnGateway) { Name = "sharedListView"; krnGateway = in_krnGateway; krnGateway.OnRefreshShared += new RefreshEvent(m_InvokeOnRefreshShared); krnGateway.OnNewSharedFile += new FileEvent(m_InvokeOnNewSharedFile); krnGateway.OnRemovedSharedFile += new FileEvent(m_InvokeOnRemovedSharedFile); Columns.Add("File Name", 190, false); Columns.Add("Size", 75, false); Columns.Add("Priority", 60, false); Columns.Add("Progress", 60, true); ContextMenuShared = new ContextMenu(); ContextMenuShared.MenuItems.Add("Open file", new EventHandler(OnOpenFile)); ContextMenuShared.MenuItems.Add("Delete file", new EventHandler(OnDeleteFile)); ContextMenuShared.MenuItems.Add("-"); ContextMenuShared.MenuItems.Add("Copy eLink to clipboard", new EventHandler(OnCopyLink)); ContextMenuShared.MenuItems.Add("Copy eLink to clipboard (HTML)", new EventHandler(OnCopyLinkHTML)); ContextMenuShared.MenuItems.Add("Copy eLink to clipboard (Sources)", new EventHandler(OnCopyLinkSources)); ContextMenuShared.MenuItems.Add("-"); PriorityMenu = new MenuItem("&Priority"); ContextMenuShared.MenuItems.Add(PriorityMenu); PriorityMenu.MenuItems.Add("Very high Priority", new EventHandler(OnReleasePriority)); PriorityMenu.MenuItems.Add("High Priority", new EventHandler(OnHighPriority)); PriorityMenu.MenuItems.Add("Normal Priority", new EventHandler(OnNormalPriority)); PriorityMenu.MenuItems.Add("Low Priority", new EventHandler(OnLowPriority)); PriorityMenu.MenuItems.Add("Very low Priority", new EventHandler(OnVeryLowPriority)); ContextMenuShared.MenuItems.Add("-"); MenuItem MenuItemInfo = new MenuItem("Search more info"); ContextMenuShared.MenuItems.Add(MenuItemInfo); MenuInfo = new CMenuInfo(MenuItemInfo); ContextMenu = ContextMenuShared; ContextMenuShared.Popup += new System.EventHandler(myContextMenuPopup); TheColumnSorter = new ColumnSorter(); TheColumnSorter.CurrentColumn = 1; TheColumnSorter.sortOrder = -1; this.ClickHeader += new HeaderEventHandler(myColumnClick); this.DoubleClick += new EventHandler(OnOpenFile); this.KeyDown += new KeyEventHandler(OnKeyDown); m_DefaultWidths = new int[] { 190, 75, 60, 60 }; m_Globalize(); m_LoadWidths(); SmallImageList = eAntForm.SystemIconsList.list; SelectedIndexChanged += new EventHandler(sharedListView_SelectedIndexChanged); ReloadList(false); }
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); }
private void m_InitControls() { Name = "downloadList"; Columns.Add("File Name", 190, false); Columns.Add("Size", 60, false); Columns.Add("Speed", 60, false); Columns.Add("Completed", 60, false); Columns.Add("Remaining", 60, false); Columns.Add("Sources", 60, false); Columns.Add("Usefull sources", 60, false); Columns.Add("Transfers", 60, false); Columns.Add("Status", 60, false); Columns.Add("Progress", 190, true); Columns.Add("Priority", 60, false); Columns.Add("Estimated", 70, false); Columns.Add("Category", 70, false); ContextMenuDownloads = new ContextMenu(); ContextMenuDownloads.MenuItems.Add("Start", new EventHandler(OnStartFile)); ContextMenuDownloads.MenuItems.Add("Stop", new EventHandler(OnStopFile)); ContextMenuDownloads.MenuItems.Add("Cancel", new EventHandler(OnCancelFile)); ContextMenuDownloads.MenuItems.Add("-"); ContextMenuDownloads.MenuItems.Add("Preview", new EventHandler(OnPreviewFile)); ContextMenuDownloads.MenuItems.Add("Open File", new EventHandler(OnOpenFile)); ContextMenuDownloads.MenuItems.Add("-"); ContextMenuDownloads.MenuItems.Add("Copy eLink to clipboard", new EventHandler(OnCopyLink)); ContextMenuDownloads.MenuItems.Add("Copy eLink to clipboard (HTML)", new EventHandler(OnCopyLinkHTML)); ContextMenuDownloads.MenuItems.Add("-"); PriorityMenu = new MenuItem("&Priority"); ContextMenuDownloads.MenuItems.Add(PriorityMenu); PriorityMenu.MenuItems.Add("High", new EventHandler(OnHighPriority)); PriorityMenu.MenuItems.Add("Normal", new EventHandler(OnNormalPriority)); PriorityMenu.MenuItems.Add("Low", new EventHandler(OnLowPriority)); CategoryMenu = new MenuItem("Category"); ContextMenuDownloads.MenuItems.Add(CategoryMenu); ContextMenuDownloads.MenuItems.Add("-"); ContextMenuDownloads.MenuItems.Add("Show details"); ContextMenuDownloads.MenuItems.Add("-"); MenuItemInfo = new MenuItem("Search more info"); ContextMenuDownloads.MenuItems.Add(MenuItemInfo); MenuInfo = new CMenuInfo(MenuItemInfo); //MenuInfo.DisplayAllMenuItem.Click+=new EventHandler(m_DisplayAllMenuItem_Click); // ContextMenuDownloads.MenuItems.Add("-"); ContextMenuDownloads.MenuItems.Add("Clear completed", new EventHandler(OnClearCompleted)); TheColumnSorter = new ColumnSorter(); TheColumnSorter.CurrentColumn = 3; sortColumn = 3; sortOrder = -1; TheColumnSorter.sortOrder = -1; this.ClickHeader += new HeaderEventHandler(myColumnClick); this.KeyDown += new KeyEventHandler(OnKeyDown); ContextMenu = ContextMenuDownloads; ContextMenuDownloads.Popup += new System.EventHandler(myContextMenuPopup); m_DefaultWidths = new int[] { 190, 60, 60, 60, 60, 60, 60, 60, 60, 190, 60, 70, 70 }; m_LoadWidths(); SmallImageList = eAntForm.SystemIconsList.list; m_Globalize(); }