Ejemplo n.º 1
0
        public SubtitleListView()
        {
            UseSyntaxColoring = true;
            Font = new Font("Tahoma", 8.25F, FontStyle.Regular, GraphicsUnit.Point, 0);
            Columns.AddRange(new[]
            {
                new ColumnHeader {
                    Text = "#", Width = 55
                },
                new ColumnHeader {
                    Width = 80
                },
                new ColumnHeader {
                    Width = 80
                },
                new ColumnHeader {
                    Width = 55
                },
                new ColumnHeader {
                    Width = -2
                }                               // -2 = as rest of space (300)
            });
            SubtitleListViewResize(this, null);

            FullRowSelect       = true;
            View                = View.Details;
            Resize             += SubtitleListViewResize;
            GridLines           = true;
            ColumnWidthChanged += SubtitleListViewColumnWidthChanged;
            OwnerDraw           = true;
            DrawItem           += new DrawListViewItemEventHandler(SubtitleListView_DrawItem);
            DrawSubItem        += new DrawListViewSubItemEventHandler(SubtitleListView_DrawSubItem);
            DrawColumnHeader   += new DrawListViewColumnHeaderEventHandler(SubtitleListView_DrawColumnHeader);
        }
Ejemplo n.º 2
0
        /// <summary>
        /// Extends BeginInvoke so that when a state object is not needed, null does not need to be passed.
        /// <example>
        /// drawlistviewcolumnheadereventhandler.BeginInvoke(sender, e, callback);
        /// </example>
        /// </summary>
        public static IAsyncResult BeginInvoke(this DrawListViewColumnHeaderEventHandler drawlistviewcolumnheadereventhandler, Object sender, DrawListViewColumnHeaderEventArgs e, AsyncCallback callback)
        {
            if (drawlistviewcolumnheadereventhandler == null)
            {
                throw new ArgumentNullException("drawlistviewcolumnheadereventhandler");
            }

            return(drawlistviewcolumnheadereventhandler.BeginInvoke(sender, e, callback, null));
        }
Ejemplo n.º 3
0
        public BrowserListView()
        {
            OwnerDraw = true;

            HandleCreated += new EventHandler(BrowserListView_HandleCreated);
            selectedOrder  = new ArrayList();
            SetStyle(ControlStyles.OptimizedDoubleBuffer, true);
            SetStyle(ControlStyles.AllPaintingInWmPaint, true);

            DrawItem         += new DrawListViewItemEventHandler(BrowserListView_DrawItem);
            DrawSubItem      += new DrawListViewSubItemEventHandler(BrowserListView_DrawSubItem);
            DrawColumnHeader += new DrawListViewColumnHeaderEventHandler(BrowserListView_DrawColumnHeader);

            this.Alignment = ListViewAlignment.Left;
            sorter         = new BrowserListSorter();
        }
Ejemplo n.º 4
0
        public BrowserListView()
        {
            OwnerDraw = true;

            HandleCreated += new EventHandler(BrowserListView_HandleCreated);
            selectedOrder = new ArrayList();
            SetStyle(ControlStyles.OptimizedDoubleBuffer, true);
            SetStyle(ControlStyles.AllPaintingInWmPaint, true);

            DrawItem += new DrawListViewItemEventHandler(BrowserListView_DrawItem);
            DrawSubItem += new DrawListViewSubItemEventHandler(BrowserListView_DrawSubItem);
            DrawColumnHeader += new DrawListViewColumnHeaderEventHandler(BrowserListView_DrawColumnHeader);

            this.Alignment = ListViewAlignment.Left;
            sorter = new BrowserListSorter();
        }
Ejemplo n.º 5
0
    public TreeListView()
        : base()
    {
        View           = View.Details;
        DoubleBuffered = true;
        AllowDrop      = true;

        DrawItem            += new DrawListViewItemEventHandler(OnDrawItem);
        DrawSubItem         += new DrawListViewSubItemEventHandler(OnDrawSubItem);
        DrawColumnHeader    += new DrawListViewColumnHeaderEventHandler(OnDrawColumnHeader);
        MouseMove           += new MouseEventHandler(OnMouseMove);
        ColumnWidthChanging += new ColumnWidthChangingEventHandler(OnColumnWidthChanging);
        //KeyUp += new KeyEventHandler(OnKeyUp);
        //MouseClick += new MouseEventHandler(OnMouseClick);
        //MouseDoubleClick += new MouseEventHandler(OnMouseDoubleClick);
        //MouseUp += new MouseEventHandler(OnMouseUp);
    }
Ejemplo n.º 6
0
        public QueryListView()
        {
            OwnerDraw         = true;
            DrawItem         += new DrawListViewItemEventHandler(OnDrawItem);
            DrawColumnHeader += new DrawListViewColumnHeaderEventHandler(OnDrawColumnHeader);

            // Columns.Add("");
            Location         = new System.Drawing.Point(46, 111);
            Name             = "queryHistoryList";
            ShowItemToolTips = true;
            Size             = new System.Drawing.Size(533, 500);
            TabIndex         = 0;
            UseCompatibleStateImageBehavior = false;
            FullRowSelect       = true;
            View                = System.Windows.Forms.View.Details;
            Resize             += new System.EventHandler(OnResize);
            ColumnWidthChanged += new ColumnWidthChangedEventHandler(OnColumnWidthChanged);
        }
Ejemplo n.º 7
0
        public StocksList()
        {
            DoubleBuffered = true;

            SetStyle(ControlStyles.DoubleBuffer |
                     ControlStyles.OptimizedDoubleBuffer |
                     ControlStyles.AllPaintingInWmPaint, true);
            UpdateStyles();

            lvis = new ListViewItem[listMaxSize];

            DrawColumnHeader    += new DrawListViewColumnHeaderEventHandler(lv_DrawColumnHeader);
            DrawItem            += new DrawListViewItemEventHandler(lv_DrawItem);
            DrawSubItem         += new DrawListViewSubItemEventHandler(lv_DrawSubItem);
            ColumnWidthChanged  += new ColumnWidthChangedEventHandler(lv_ColumnWidthChanged);
            ColumnWidthChanging += new ColumnWidthChangingEventHandler(lv_ColumnWidthChanging);

            MouseDown += new MouseEventHandler(lv_MouseDown);
        }
Ejemplo n.º 8
0
 public ResultsListView(main f)
 {
     mainForm            = f;
     headerFont          = UI.environmentFont;
     OwnerDraw           = true;
     DrawItem           += new DrawListViewItemEventHandler(OnDrawItem);
     DrawColumnHeader   += new DrawListViewColumnHeaderEventHandler(OnDrawColumnHeader);
     Resize             += new EventHandler(OnResize);
     ColumnWidthChanged += new ColumnWidthChangedEventHandler(OnColumnWidthChanged);
     Dock             = System.Windows.Forms.DockStyle.Fill;
     VirtualMode      = true;
     VirtualListSize  = 0;
     BorderStyle      = System.Windows.Forms.BorderStyle.None;
     FullRowSelect    = true;
     HideSelection    = false;
     Location         = new System.Drawing.Point(0, 0);
     Name             = "results";
     ShowItemToolTips = true;
     Size             = new System.Drawing.Size(200, 200);
     UseCompatibleStateImageBehavior = false;
     View                 = System.Windows.Forms.View.Details;
     ColumnClick         += new System.Windows.Forms.ColumnClickEventHandler(this.OnColumnClick);
     RetrieveVirtualItem += new System.Windows.Forms.RetrieveVirtualItemEventHandler(OnRetrieveVirtualItem);
 }
Ejemplo n.º 9
0
 public EXListView()
 {
     _cpadding         = 4;
     _controls         = new ArrayList();
     _sortcol          = -1;
     _sortcolbrush     = SystemBrushes.ControlLight;
     _highlightbrush   = SystemBrushes.Highlight;
     OwnerDraw         = true;
     FullRowSelect     = true;
     View              = View.Details;
     MouseDown        += new MouseEventHandler(This_MouseDown);
     MouseDoubleClick += new MouseEventHandler(This_MouseDoubleClick);
     DrawColumnHeader += new DrawListViewColumnHeaderEventHandler(This_DrawColumnHeader);
     DrawSubItem      += new DrawListViewSubItemEventHandler(This_DrawSubItem);
     MouseMove        += new MouseEventHandler(This_MouseMove);
     ColumnClick      += new ColumnClickEventHandler(This_ColumnClick);
     txtbx             = new TextBox()
     {
         Visible = false
     };
     Controls.Add(txtbx);
     txtbx.Leave    += new EventHandler(C_Leave);
     txtbx.KeyPress += new KeyPressEventHandler(Txtbx_KeyPress);
 }
Ejemplo n.º 10
0
        public SubtitleListView()
        {
            UseSyntaxColoring = true;
            Font = new Font("Tahoma", 8.25F, FontStyle.Regular, GraphicsUnit.Point, 0);
            Columns.AddRange(new[]
            {
                new ColumnHeader { Text="#", Width=55 },
                new ColumnHeader { Width = 80 },
                new ColumnHeader { Width = 80 },
                new ColumnHeader { Width= 55 },
                new ColumnHeader { Width = -2 } // -2 = as rest of space (300)
            });
            SubtitleListViewResize(this, null);

            FullRowSelect = true;
            View = View.Details;
            Resize += SubtitleListViewResize;
            GridLines = true;
            ColumnWidthChanged += SubtitleListViewColumnWidthChanged;
            OwnerDraw = true;
            DrawItem += new DrawListViewItemEventHandler(SubtitleListView_DrawItem);
            DrawSubItem += new DrawListViewSubItemEventHandler(SubtitleListView_DrawSubItem);
            DrawColumnHeader += new DrawListViewColumnHeaderEventHandler(SubtitleListView_DrawColumnHeader);
        }
Ejemplo n.º 11
0
        public amuleDownloadStatusList()
        {
            OwnerDraw = true;

            DrawColumnHeader +=
                new DrawListViewColumnHeaderEventHandler(amuleDownloadStatusList_DrawColumnHeader);

            DrawSubItem += new DrawListViewSubItemEventHandler(amuleDownloadStatusList_DrawSubItem);
            DownloadQueueItem.InitDraw3DModifiers(FontHeight + 1);

            MouseClick  += new MouseEventHandler(amuleDownloadStatusList_MouseClickHandler);
            ColumnClick += new ColumnClickEventHandler(amuleDownloadStatusList_ColumtClickHandler);

            m_ctx_menu.Opening += new System.ComponentModel.CancelEventHandler(cms_Opening);
            m_ctx_menu.Items.Add(new ToolStripLabel("Downloads"));
            m_ctx_menu.Items.Add(new ToolStripSeparator());

            ToolStripButton it_pause = new ToolStripButton("Pause");

            it_pause.Click += new EventHandler(it_pause_Click);
            m_ctx_menu.Items.Add(it_pause);
            ContextMenuStrip = m_ctx_menu;

            ToolStripButton it_resume = new ToolStripButton("Resume");

            it_resume.Click += new EventHandler(it_resume_Click);
            m_ctx_menu.Items.Add(it_resume);

            ToolStripButton it_cancel = new ToolStripButton("Cancel");

            it_cancel.Click += new EventHandler(it_cancel_Click);
            m_ctx_menu.Items.Add(it_cancel);

            m_ctx_menu.Items.Add(new ToolStripSeparator());
            //
            // Init columns
            //
            m_column_index = new int[(int)DOWNLOAD_CTRL_COL_ID.COL_LAST_ID];
            UpdateColumnIndexes();
            // File name
            if (m_settings.FilenameVisible)
            {
                CreateColumtAt("File name", m_settings.FilenameWidth,
                               (int)DOWNLOAD_CTRL_COL_ID.COL_FILENAME_ID);
            }
            AppendItemToCtxMenu(m_ctx_menu, "File name", DOWNLOAD_CTRL_COL_ID.COL_FILENAME_ID,
                                m_settings.FilenameVisible, new EventHandler(column_Click));
            // Status
            if (m_settings.StatusVisible)
            {
                CreateColumtAt("Status", m_settings.StatusWidth,
                               (int)DOWNLOAD_CTRL_COL_ID.COL_STATUS_ID);
            }
            AppendItemToCtxMenu(m_ctx_menu, "Status", DOWNLOAD_CTRL_COL_ID.COL_STATUS_ID,
                                m_settings.StatusVisible, new EventHandler(column_Click));
            // Size
            if (m_settings.SizeVisible)
            {
                CreateColumtAt("Size", m_settings.SizeWidth,
                               (int)DOWNLOAD_CTRL_COL_ID.COL_SIZE_ID);
            }
            AppendItemToCtxMenu(m_ctx_menu, "Size", DOWNLOAD_CTRL_COL_ID.COL_SIZE_ID,
                                m_settings.SizeVisible, new EventHandler(column_Click));
            // Completed size
            if (m_settings.CompletedVisible)
            {
                CreateColumtAt("Completed", m_settings.CompletedWidth,
                               (int)DOWNLOAD_CTRL_COL_ID.COL_COMPLETED_ID);
            }
            AppendItemToCtxMenu(m_ctx_menu, "Completed", DOWNLOAD_CTRL_COL_ID.COL_COMPLETED_ID,
                                m_settings.CompletedVisible, new EventHandler(column_Click));
            // Speed
            if (m_settings.SpeedVisible)
            {
                CreateColumtAt("Speed", m_settings.SpeedWidth,
                               (int)DOWNLOAD_CTRL_COL_ID.COL_SPEED_ID);
            }
            AppendItemToCtxMenu(m_ctx_menu, "Speed", DOWNLOAD_CTRL_COL_ID.COL_SPEED_ID,
                                m_settings.SpeedVisible, new EventHandler(column_Click));
            // Sources
            if (m_settings.SourcesVisible)
            {
                CreateColumtAt("Sources", m_settings.SourcesWidth,
                               m_column_index[(int)DOWNLOAD_CTRL_COL_ID.COL_SOURCES_ID]);
            }
            AppendItemToCtxMenu(m_ctx_menu, "Sources", DOWNLOAD_CTRL_COL_ID.COL_SOURCES_ID,
                                m_settings.SizeVisible, new EventHandler(column_Click));

            ContextMenuStrip = m_ctx_menu;
        }