Beispiel #1
0
		private void cmdOpen(object sender, EventArgs e)
		{
			OpenFileDialog dlgOpen = new OpenFileDialog();
			dlgOpen.InitialDirectory = lastDir;
			dlgOpen.Filter = "Order Files (*.ord)|*.ord";

			// Show the open dialog.
			if (dlgOpen.ShowDialog() == DialogResult.OK)
			{
				Order doc = new Order();

				try
				{
					doc.Open(dlgOpen.FileName);
				}
				catch (Exception err)
				{
					// All exceptions bubble up to this level.
					MessageBox.Show(err.ToString());
					return;
				}

				// Create the child form for the selected file.
				Child frmChild = new Child(doc, Child.ViewType.ItemGrid);
				frmChild.MdiParent = this;
				frmChild.Show();
			}
		}
		public void Open()
		{
			OpenFileDialog dlgOpen = new OpenFileDialog();
			dlgOpen.InitialDirectory = lastDir;
			dlgOpen.Filter = "Order Files (*.ord)|*.ord";

			// Show the open dialog.
			if (dlgOpen.ShowDialog() == DialogResult.OK)
			{
				Order doc = new Order();

				try
				{
					doc.Open(dlgOpen.FileName);
				}
				catch (Exception err)
				{
					// All exceptions bubble up to this level.
					MessageBox.Show(err.ToString());
					return;
				}

				// Create the child form for the selected file.
				Child frmChild = new Child(doc, Child.ViewType.ItemGrid);
                Program.DocumentManager.AddForm(frmChild);
				frmChild.Show();
			}
		}
 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();
 }
Beispiel #4
0
		private void cmdNew(object sender, EventArgs e)
		{
			// Create a new order.
			Order doc = new Order();
			Child frmChild = new Child(doc, Child.ViewType.ItemGrid);
			frmChild.MdiParent = this;
			frmChild.Show();
		}
		public void New()
		{
			// Create a new order.
			Order doc = new Order();
			Child frmChild = new Child(doc, Child.ViewType.ItemGrid);
			Program.DocumentManager.AddForm(frmChild);
			frmChild.Show();
		}
Beispiel #6
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();
 }
Beispiel #7
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();
 }
Beispiel #8
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();
 }
Beispiel #9
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();
 }
Beispiel #10
0
		private void cmdPreview(object sender, EventArgs e)
		{
			// Launch a print preview child for the active order.
			if (ActiveMdiChild != null)
			{
				Order doc = ((Child)ActiveMdiChild).Document;

				Child frmChild = new Child(doc, Child.ViewType.PrintPreview);
				frmChild.MdiParent = this;
				frmChild.Show();
			}
		}
		public void Preview()
		{
			// Launch a print preview child for the active order.
			if (Program.DocumentManager.ActiveDocumentForm != null)
			{
				Order doc = ((Child)Program.DocumentManager.ActiveDocumentForm).Document;

				Child frmChild = new Child(doc, Child.ViewType.PrintPreview);
				Program.DocumentManager.AddForm(frmChild);
				frmChild.Show();
			}
		}