Ejemplo n.º 1
0
 private void rentButton_Click(object sender, EventArgs e)
 {
     // Create a new LView.
     LView doc = new LView();
     doc.LastFileName = "Rent";
     Child frmChild = new Child(doc, Child.ViewType.Rent, Parent);
     frmChild.Show();
 }
Ejemplo n.º 2
0
 private void openButton_Click(object sender, EventArgs e)
 {
     // Create a new LView.
     LView doc = new LView();
     doc.LastFileName = "Add Member";
     Child frmChild = new Child(doc, Child.ViewType.AddMem, Parent);
     frmChild.Show();
 }
Ejemplo n.º 3
0
 private void button1_Click(object sender, EventArgs e)
 {
     // Create a new LView.
     LView doc = new LView();
     doc.LastFileName = "Update Game";
     Child frmChild = new Child(doc, Child.ViewType.UpdateGam, Parent);
     frmChild.Show();
 }
Ejemplo n.º 4
0
 private void rentToolStripMenuItem_Click(object sender, EventArgs e)
 {
     // Create a new LView.
     LView doc = new LView();
     doc.LastFileName = "Rent";
     Form parent;
     parent = this;
     Child frmChild = new Child(doc, Child.ViewType.Rent, parent);
     frmChild.Show();
 }
Ejemplo n.º 5
0
 private void membershipToolStripMenuItem_Click(object sender, EventArgs e)
 {
     // Create a new LView.
     LView doc = new LView();
     doc.LastFileName = "Members";
     Form parent;
     parent = this;
     Child frmChild = new Child(doc, Child.ViewType.Members, parent);
     //frmChild.MdiParent = this;
     frmChild.Show();
 }
Ejemplo n.º 6
0
 public TransactionList(LView document,Form parent)
     : this()
 {
     Document = document;
 }
Ejemplo n.º 7
0
 public UpdateMovieDocument(LView document)
     : this()
 {
     Document = document;
 }
Ejemplo n.º 8
0
 public AddMemberDocument(LView document)
     : this()
 {
     Document = document;
 }
Ejemplo n.º 9
0
 public AddMovieDocument(LView document)
     : this()
 {
     Document = document;
 }
Ejemplo n.º 10
0
 public UpdateMemberDocument(LView document)
     : this()
 {
     Document = document;
 }
Ejemplo n.º 11
0
 public ReturnDocument(LView document)
     : this()
 {
     Document = document;
 }
Ejemplo n.º 12
0
 public InventoryList(LView document,Form parent)
     : this()
 {
     Document = document;
     Parent = parent;
 }
Ejemplo n.º 13
0
        public Child(LView doc, ViewType viewType,Form parent)
            : this()
        {
            // Configure the title.
            this.Text = doc.LastFileName;
            this.Document = doc;
            this.MdiParent = parent;

            // Create a reference for the view.
            // This reference can accomodate any type of control.
            Control view = null;

            // Instantiate the appropriate view.
            switch (viewType)
            {
                case ViewType.Inventory:
                    view = new InventoryList(doc,parent);

                    this.Size = new System.Drawing.Size(900, 580);
                    break;
                case ViewType.Members:
                    view = new MemberList(doc,parent);
                    this.Size = new System.Drawing.Size(875, 300);
                    break;
                case ViewType.Transactions:
                    view = new TransactionList(doc,parent);
                    this.Size = new System.Drawing.Size(810, 300);
                    break;
                case ViewType.AddMov:
                    view = new AddMovieDocument(doc);
                    this.Size = new System.Drawing.Size(425, 355);
                    break;
                case ViewType.AddGam:
                    view = new AddGameDocument(doc);
                    this.Size = new System.Drawing.Size(425, 355);
                    break;
                case ViewType.UpdateMov:
                    view = new UpdateMovieDocument(doc);
                    this.Size = new System.Drawing.Size(425, 355);
                    break;
                case ViewType.UpdateGam:
                    view = new UpdateGameDocument(doc);
                    this.Size = new System.Drawing.Size(425, 355);
                    break;
                case ViewType.Rent:
                    view = new RentDocument(doc);
                    this.Size = new System.Drawing.Size(550, 475);
                    break;
                case ViewType.Return:
                    view = new ReturnDocument(doc);
                    this.Size = new System.Drawing.Size(550, 400);
                    break;
                case ViewType.AddMem:
                    view = new AddMemberDocument(doc);
                    this.Size = new System.Drawing.Size(430, 430);
                    break;
                case ViewType.UpdateMem:
                    view = new UpdateMemberDocument(doc);
                    this.Size = new System.Drawing.Size(430, 430);
                    break;

            }

            // Add the view to the form.
            view.Dock = DockStyle.Fill;
            this.Controls.Add(view);
        }
Ejemplo n.º 14
0
 public UpdateGameDocument(LView document)
     : this()
 {
     Document = document;
 }
Ejemplo n.º 15
0
 public MemberList(LView document,Form parent)
     : this()
 {
     Document = document;
     Parent = parent;
 }
Ejemplo n.º 16
0
 public AddGameDocument(LView document)
     : this()
 {
     Document = document;
 }