public SearchResultRow(string fileName, int fileSize, int fileType, DateTime fileDate, Disk disk, Box box, Category category, string diskName, string boxName, string categoryName) : base(fileName) { this.fileName = fileName; this.fileSize = fileSize; this.fileType = fileType; this.fileDate = fileDate; this.disk = disk; this.box = box; this.category = category; this.diskName = diskName; this.boxName = boxName; this.categoryName = categoryName; }
public FormPropertiesDisk(DisksDB.DataBase.Disk disk, DisksDB.DataBase.DataBase db) { InitializeComponent(); this.disk = disk; this.textBoxTitle.Text = disk.Name; this.textBoxDescription.Text = ""; this.textBoxDescription.Enabled = false; this.imagePanel1.ImgFact = db.DiskImages; foreach (DiskType o in db.DiskTypes) { this.comboBox1.Items.Add(o); if (o.Id == disk.Type.Id) { this.comboBox1.SelectedItem = o; } } this.imagePanel1.ShowImage(disk.Image); this.Text = disk.Name + " - Properties"; }
private void AddingFilesThread() { try { this.addedDisk = this.box.AddDisk(this.textBoxName.Text, this.diskType, this.controlNewCover1.Image, this.DriveLetter, this, true); } catch (Exception ex) { this.donePage.FinishText = "Error occured while adding Disk \r\n" + ex.Message + ex.StackTrace; } //this.Invoke(new AddedCDEvent(this.OnAdded)); }
private void AddDisk() { if (this.checkBoxAddFiles.Checked == true) { Thread t = new Thread(new ThreadStart(this.AddingFilesThread)); t.Start(); } else { this.addedDisk = this.box.AddDisk(this.textBoxName.Text, (DiskType)this.comboBoxDiskType.SelectedItem, this.controlNewCover1.Image, this.DriveLetter, this, false); this.OnAdded(); } }
public void Failed(string message) { this.textBoxProgressLog.Invoke(new AddTextHandler(this.AddText), "Adding files failed\r\n"); //this.textBoxProgressLog.Text += "Adding files failed\r\n"; this.donePage.FinishText = "Error occured while adding Disk \r\n"; // + ex.Message; this.Invoke(new AddedCDEvent(this.OnAdded)); this.addedDisk = null; }
public void UpdateDisk(Disk disk, String name, DiskType type, Image image, Box box) { DBUtils.UpdateSQL(this.DBConString, "UPDATE [Disks] SET [DiskImage] = ?, [Name] = ?, [Type] = ?, [CDBox] = ?, [LastUpdate] = NOW() WHERE [id] = ?", new object[] {image.Id, name, type.Id, box.Id, disk.Id}); }
public List<File> GetFiles(Disk disk) { using (OleDbDataReader myReader = DBUtils.ExecSQL(this.DBConString, "SELECT [id], [Name], [Size], [Date], [Attributes], [Parent], [Disk] FROM [Files] WHERE ([Disk] = ?) AND ([Parent] IS NULL) ORDER BY [Attributes] DESC, [Name] ASC", new object[] { disk.Id })) { List<File> lst = new List<File>(); while (true == myReader.Read()) { string attr = myReader[4].ToString(); File f = new File(this, (int)(myReader[0]), (string)(myReader[1]), long.Parse(myReader[2].ToString()), DateTime.Parse(myReader[3].ToString()), int.Parse(attr)); lst.Add(f); } return lst; } }
public void DeleteDisk(Disk d) { DBUtils.ExecSQL(this.DBConString, "DELETE FROM [Disks] WHERE [id]= ?", new object[] {d.Id}); }