Пример #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();
			}
		}
Пример #2
0
		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();
			}
		}
Пример #3
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();
 }
Пример #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();
		}
Пример #5
0
		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();
		}
Пример #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();
 }
Пример #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();
 }
Пример #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();
 }
Пример #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();
 }
Пример #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();
			}
		}
Пример #11
0
		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();
			}
		}