Exemplo n.º 1
0
		private void MyForm_notifiedMe_aboutNext(FlowformFormEvents SomeEvent_) {
			switch (SomeEvent_) {
				case FlowformFormEvents.Next:
					this.MyForm.Hide();
					//---
					frmProcessOutput output = new frmProcessOutput("Output");
					output.MdiParent = this.Base_ref;
					output.Show();
					//---
					this.MyForm.Refresh(); this.MyForm.Hide();
					output.Refresh();
					this.Base_ref.Refresh();
					//---
					//output.DisplayMessage("generating...", true);
					frm_Main.NTierProject.Metadata.MetadataExtendedCollection[0].SQLScriptOption = this.MyForm.SQLscriptOptions;
//					frm_Main.NTierProject.Metadata.PseudoReflectionable = this.MyForm.pReflection;
					frm_Main.NTierProject.Build(output.DisplayMessage);
					//output.DisplayMessage("... finished!", true);
					output.DisplayMessage();
					//---
					this.NotifyBase(FlowformEvents.Closed, this);
					break;
			}
		}
Exemplo n.º 2
0
		public bool ProjectOpen(bool Refresh_) {
			bool ProjectOpened = false;

			switch (this.ProjectSave(false, true, true)) {
				case DialogResult.Yes:
				case DialogResult.No:
					#region OpenFileDialog.ShowDialog(); ProjectOpened = ...; this.Form_Refresh();
					OpenFileDialog openfile = new OpenFileDialog();
					openfile.Filter = "Project's Metadata File (*.xml)|*.xml";
					openfile.Multiselect = false;
					switch (openfile.ShowDialog()) {
						case DialogResult.OK:
							this.ProjectClose(false);

							frmProcessOutput output = new frmProcessOutput("Output");
							output.MdiParent = this;
							output.Show();
							output.Refresh();
							this.Refresh();
							//output.DisplayMessage("opening...", true);

							frm_Main.NTierProject.Open(
								openfile.FileName, 
								false,
								output.DisplayMessage
							);

							//output.DisplayMessage("... finished!", true);
							output.DisplayMessage();
							#region //frmDataLayer.Show();
							//frmDataLayer datalayer = new frmDataLayer();
							//datalayer.MdiParent = this;
							////datalayer.WindowState = FormWindowState.Maximized;
							//datalayer.Show();
							#endregion

							ProjectOpened = true;
							break;
						case DialogResult.Cancel:
							ProjectOpened = false;
							break;
					}

					// even if project was not opened
					// refresh is needed for save state could
					// have been changed, hence:
					if (Refresh_) this.Form_Refresh();
					#endregion
					break;
				case DialogResult.Cancel:
					ProjectOpened = false;
					break;
			}

			return ProjectOpened;
		}