public Disk(IDBLayer idb, long id, string name, Image image, DiskType type, Box box) : base(idb, id) { this.name = name; this.image = image; this.type = type; this.box = box; }
public FormPropertiesImage(ImageFactory fact, Image selectedImage) { this.fact = fact; this.SelectedImage = selectedImage; InitializeComponent(); if (null != selectedImage) { this.textBoxTitle.Text = selectedImage.Name; this.textBoxDescription.Text = ""; this.pictureBox1.Image = selectedImage.Picture; this.Text = selectedImage.Name + " Properties"; ResizeImage(); } else { this.textBoxTitle.Text = ""; this.textBoxDescription.Text = ""; this.Text = "New Image"; } }
public virtual void DeleteImage(Image img) { if (null != DeleteImageEvent) { DeleteImageEvent(img); } OnChildRemoved(img); }
protected override void SaveChanges() { if (null != this.SelectedImage) { this.SelectedImage.Name = this.textBoxTitle.Text; if (null != this.fileName) { this.SelectedImage.FileName = this.fileName; } this.updated = true; } else { try { this.SelectedImage = this.fact.AddImage(this.textBoxTitle.Text, this.fileName, null); this.updated = true; } catch (Exception) { MessageBox.Show(this, "Please specify image", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error); } } }
public virtual void UpdateImage(Image img, string name, string fileName, byte[] data) { if (null != UpdateImageEvent) { UpdateImageEvent(img, name, fileName, data); } }