Exemplo n.º 1
0
        public static void InsertInDataGrid(DataGridView grid, SingleFileInfo torrent, MultiFileInfoList torrents = null)
        {
            var column = ((DataGridViewComboBoxColumn)grid.Columns[2]);

            grid.Rows.Add(new object[] { torrent.FileName, Formatter.BytesToEnglish(torrent.FileSize), "Normal" });

            var cell = (DataGridViewComboBoxCell)grid.Rows[0].Cells[2];
            // var test = grid;

            //column.DisplayStyle = DataGridViewComboBoxDisplayStyle.ComboBox;
            //column.Items.AddRange(new string[] { "Normal", "High", "Maximum" });
            //column.MaxDropDownItems = 3;

            /*
             * grid.DefaultCellStyle.SelectionBackColor = Color.White;
             * grid.DefaultCellStyle.SelectionForeColor = Color.Black;
             */
        }
Exemplo n.º 2
0
 public FileDescription(SingleFileInfo file, string torrentName) : this(torrentName)
 {
     FileName = file.FileName;
     Length   = file.FileSize;
     BaseValidation();
 }