Example #1
0
        public FormPropertiesBox(DisksDB.DataBase.DataBase db, Box box)
        {
            this.db = db;
            this.box = box;

            InitializeComponent();

            this.textBoxTitle.Text = this.box.Name;
            this.textBoxDescription.Text = this.box.Description;

            foreach (Object o in db.BoxTypes)
            {
                this.comboBoxBoxType.Items.Add(o);
            }

            for (int i = 0; i < this.comboBoxBoxType.Items.Count; i++)
            {
                if (((BoxType)this.comboBoxBoxType.Items[i]).Id == box.Type.Id)
                {
                    this.comboBoxBoxType.SelectedIndex = i;
                }
            }

            this.imagePanelFront.ImgFact = db.FrontImages;
            this.imagePanelBack.ImgFact = db.BackImages;
            this.imagePanelInlay.ImgFact = db.InlayImages;
            this.imagePanelBack.ShowImage(box.BackCover);
            this.imagePanelFront.ShowImage(box.FrontCover);
            this.imagePanelInlay.ShowImage(box.InlayCover);

            var lst = this.db.BoxTypes;
            this.comboBox1.DataSource = lst;
            this.Text = box.Name + " - Properties";
        }
Example #2
0
 /// <summary>
 /// Constructs CD Box tree item
 /// </summary>
 /// <param name="db">database</param>
 /// <param name="box">database object of cdbox</param>
 public TreeNodeBox(DisksDB.DataBase.DataBase db, DataBase.Box box, TreeViewCatalog trv)
     : base(box.Name, box, true, true, "CD/DVD Box", -1, DateTime.Now, true, true, false, false, false)
 {
     this.trv = trv;
     this.db = db;
     this.box = box;
     this.ImageIndex = TreeImages.CDBox;
     this.SelectedImageIndex = TreeImages.CDBoxOpen;
     this.box.ChildItemAdded += new EventHandlerItemAdded(ChildItemAdded);
     this.box.ChildItemRemoved += new EventHandlerItemRemoved(ChildItemRemoved);
     this.box.NameChanged += new EventHandler(NameChanged);
     this.box.ChildsChanged += new EventHandler(ChildsChanged);
 }
Example #3
0
        public FormNewDisk(DisksDB.DataBase.DataBase db, DataBase.Box box)
        {
            this.box = box;

            InitializeComponent();

            FillDrives();
            this.comboBoxDiskType.DataSource = db.DiskTypes;
            this.controlNewCover1.FillImages(db.DiskImages);
            this.textBoxName.Text = box.Name;
            this.diskType = (DiskType)db.DiskTypes[0];

            try
            {
                this.Icon = new System.Drawing.Icon(MyResources.GetStream("dvdbox.ico"));
                this.pictureBox1.Image = new System.Drawing.Bitmap(MyResources.GetStream("wellcomeImage.png"));
            }
            catch (Exception ex)
            {
                Logger.LogException(ex);
            }
        }