private void MyForm_notifiedMe_aboutNext(eFlowformFormEvents SomeEvent_) { switch (SomeEvent_) { case eFlowformFormEvents.Next: // ToDos: here! #region ((cMODEL_s020)MyFlowforms[0]).Show(); if (MyFlowforms[0] == null) { //MyFlowforms[0] = new cMODEL_s020( // Base_ref, // new cFlowform.dNotifyBase(MyFlowforms_notifiedMe), // MyProcess //); } MyForm.Hide(); MyFlowforms[0].Show(); #endregion // IF LAST FORM: //NotifyBase(eFlowformEvents.Closed, this); break; } }
private void MyForm_notifiedMe_aboutNext(eFlowformFormEvents SomeEvent_) { switch (SomeEvent_) { case eFlowformFormEvents.Next: // ToDos: here! MyProcess.Undefined_orAll = MyForm.Undefined_orAll; #region ((cFlowform)MyFlowforms[0]).Show(); if (MyFlowforms[0] == null) { MyFlowforms[0] = new cManage_Views_PK_s010( Base_ref, new cFlowform.dNotifyBase(MyFlowforms_notifiedMe), MyProcess ); } MyForm.Hide(); MyFlowforms[0].Show(); #endregion break; } }
private void MyForm_notifiedMe_aboutNext(eFlowformFormEvents SomeEvent_) { switch (SomeEvent_) { case eFlowformFormEvents.Next: // ToDos: here! MyProcess.Choice = MyForm.Choice; #region ((cManage_ConfigTables_CreateOrChange_s010)MyFlowforms[0]).Show(); if (MyFlowforms[0] == null) { MyFlowforms[0] = new cManage_ConfigTables_CreateOrChange_s010( Base_ref, new cFlowform.dNotifyBase(MyFlowforms_notifiedMe), MyProcess ); } MyForm.Hide(); MyFlowforms[0].Show(); #endregion break; } }
public void NotifyBase(eFlowformFormEvents someEvent_in) { if (someEvent_in == eFlowformFormEvents.Next) { if (notifybase_aboutnext_ != null) notifybase_aboutnext_(someEvent_in); } else { if (notifybase_ != null) notifybase_(someEvent_in); } }
private void MyForm_notifiedMe_aboutNext(eFlowformFormEvents SomeEvent_) { switch (SomeEvent_) { case eFlowformFormEvents.Next: MyForm.Hide(); //--- frmProcessOutput output = new frmProcessOutput("Output"); output.MdiParent = Base_ref; output.Show(); //--- MyForm.Refresh(); MyForm.Hide(); output.Refresh(); Base_ref.Refresh(); //--- //output.DisplayMessage("generating...", true); frm_Main.NTierProject.Metadata.SQLScriptOption = MyForm.SQLscriptOptions; frm_Main.NTierProject.Metadata.PseudoReflectionable = MyForm.pReflection; frm_Main.NTierProject.Build( new OGen.lib.generator.cGenerator.dBuild( output.DisplayMessage ) ); //output.DisplayMessage("... finished!", true); output.DisplayMessage(); //--- NotifyBase(eFlowformEvents.Closed, this); break; } }
private void MyForm_notifiedMe_aboutNext(eFlowformFormEvents SomeEvent_) { switch (SomeEvent_) { case eFlowformFormEvents.Next: // ToDos: here! if (MyForm.ViewName == "") { System.Windows.Forms.MessageBox.Show( "must choose a view", "Warning", System.Windows.Forms.MessageBoxButtons.OK, System.Windows.Forms.MessageBoxIcon.Warning ); } else { MyProcess.ViewName = MyForm.ViewName; #region ((cManage_Views_PK_s020)MyFlowforms[0]).Show(); if (MyFlowforms[0] == null) { MyFlowforms[0] = new cManage_Views_PK_s020( Base_ref, new cFlowform.dNotifyBase(MyFlowforms_notifiedMe), MyProcess ); } MyForm.Hide(); MyFlowforms[0].Show(); #endregion } break; } }
protected void MyForm_notifiedMe(eFlowformFormEvents someEvent_in) { switch (someEvent_in) { case eFlowformFormEvents.Closed: NotifyBase(eFlowformEvents.Closed, this); break; case eFlowformFormEvents.Back: NotifyBase(eFlowformEvents.Back, this); break; } }
private void MyForm_notifiedMe_aboutNext(eFlowformFormEvents SomeEvent_) { switch (SomeEvent_) { case eFlowformFormEvents.Next: if (MyForm.TableName == "") { System.Windows.Forms.MessageBox.Show( "must choose one table", "Warning", System.Windows.Forms.MessageBoxButtons.OK, System.Windows.Forms.MessageBoxIcon.Warning ); } else { MyProcess.TableName = MyForm.TableName; switch (MyProcess.Choice) { case eInsUpdDel.Delete: MyProcess.ConfigTables(); NotifyBase(eFlowformEvents.Closed, this); break; case eInsUpdDel.Insert: case eInsUpdDel.Update: #region ((cManage_ConfigTables_CreateOrChange_s020)MyFlowforms[0]).Show(); if (MyFlowforms[0] == null) { MyFlowforms[0] = new cManage_ConfigTables_CreateOrChange_s020( Base_ref, new cFlowform.dNotifyBase(MyFlowforms_notifiedMe), MyProcess ); } MyForm.Hide(); MyFlowforms[0].Show(); #endregion break; } } break; } }
private void MyForm_notifiedMe_aboutNext(eFlowformFormEvents SomeEvent_) { switch (SomeEvent_) { case eFlowformFormEvents.Next: if ( (MyForm.ConfigField == "") || (MyForm.NameField == "") || (MyForm.DatatypeField == "") ) { System.Windows.Forms.MessageBox.Show( "must choose fields", "Warning", System.Windows.Forms.MessageBoxButtons.OK, System.Windows.Forms.MessageBoxIcon.Warning ); } else { if (MyForm.ConfigField == MyForm.NameField) { System.Windows.Forms.MessageBox.Show( "Name Field must be diferente from Config Field", "Warning", System.Windows.Forms.MessageBoxButtons.OK, System.Windows.Forms.MessageBoxIcon.Warning ); } else { MyProcess.ConfigField = MyForm.ConfigField; MyProcess.NameField = MyForm.NameField; MyProcess.DatatypeField = MyForm.DatatypeField; MyProcess.ConfigTables(); NotifyBase(eFlowformEvents.Closed, this); } } break; } }
private void MyForm_notifiedMe_aboutNext(eFlowformFormEvents SomeEvent_) { switch (SomeEvent_) { case eFlowformFormEvents.Next: // ToDos: here! MyProcess.ViewPKs = MyForm.ViewPKs; MyProcess.Manage_Views_PK(); NotifyBase(eFlowformEvents.Closed, this); break; } }
public void NotifyBase(eFlowformFormEvents someEvent_in) { if (someEvent_in == eFlowformFormEvents.Next) { if (notifybase_aboutnext_ != null) { notifybase_aboutnext_(someEvent_in); } } else { if (notifybase_ != null) { notifybase_(someEvent_in); } } }
private void MyForm_notifiedMe_aboutNext(eFlowformFormEvents SomeEvent_) { switch (SomeEvent_) { case eFlowformFormEvents.Next: #region Checking... if ( (mode_ == eMode.New) && (MyForm.ApplicationPath.Trim() == string.Empty) ) { System.Windows.Forms.MessageBox.Show( "must provide a valid Application Path", "Warning", System.Windows.Forms.MessageBoxButtons.OK, System.Windows.Forms.MessageBoxIcon.Warning ); return; } if ( (mode_ == eMode.New) && ( (System.IO.Directory.GetDirectories(MyForm.ApplicationPath).Length != 0) || (System.IO.Directory.GetFiles(MyForm.ApplicationPath).Length != 0) ) ) { switch(System.Windows.Forms.MessageBox.Show( "provided Application Path is not empty,\nfile overwrite may occur,\ncontinue?", "Warning", System.Windows.Forms.MessageBoxButtons.OKCancel, System.Windows.Forms.MessageBoxIcon.Warning )) { case System.Windows.Forms.DialogResult.OK: { break; } case System.Windows.Forms.DialogResult.Cancel: { return; } } } if (MyForm.ApplicationName.Trim() == string.Empty) { System.Windows.Forms.MessageBox.Show( "must provide a valid Application Name", "Warning", System.Windows.Forms.MessageBoxButtons.OK, System.Windows.Forms.MessageBoxIcon.Warning ); return; } if (MyForm.Namespace.Trim() == string.Empty) { System.Windows.Forms.MessageBox.Show( "must provide a valid Application Namespace", "Warning", System.Windows.Forms.MessageBoxButtons.OK, System.Windows.Forms.MessageBoxIcon.Warning ); return; } #endregion OGen.NTier.lib.metadata.cDBMetadata_DB[] _dbs = MyForm.UnBind_DBConnections(); #region More Checking... if (_dbs.Length == 0) { System.Windows.Forms.MessageBox.Show( "must provide at least one valid DB Connection", "Warning", System.Windows.Forms.MessageBoxButtons.OK, System.Windows.Forms.MessageBoxIcon.Warning ); return; } #endregion if (mode_ == eMode.Update) { #region Updating... frm_Main.ntierproject.Metadata.DBs.Clear(); for (int d = 0; d < _dbs.Length; d++) { int _justadded = frm_Main.ntierproject.Metadata.DBs.Add( _dbs[d].DBServerType, false ); frm_Main.ntierproject.Metadata.DBs[_justadded].CopyFrom( _dbs[d] ); //if (d == 0) { // // ToDos: here! document this behaviour and describe it throught unit testing // // first item in the array, represents default db connection // frm_Main.ntierproject.Metadata.Default_DBServerType = frm_Main.ntierproject.Metadata.DBs[_justadded].DBServerType; // frm_Main.ntierproject.Metadata.Default_ConfigMode = frm_Main.ntierproject.Metadata.DBs[_justadded].Connections[0].ConfigMode; //} } frm_Main.ntierproject.Metadata.ApplicationName = MyForm.ApplicationName; frm_Main.ntierproject.Metadata.Namespace = MyForm.Namespace; #endregion frm_Main.NTierProject.hasChanges = true; } else { #region Creating... MyForm.Hide(); frmProcessOutput output = new frmProcessOutput("Output"); output.MdiParent = Base_ref; output.Show(); frm_Main.ntierproject.New( MyForm.ApplicationPath, MyForm.ApplicationName, MyForm.Namespace, _dbs, new OGen.NTier.lib.metadata.cDBMetadata.dLoadState_fromDB( output.DisplayMessage ) ); output.DisplayMessage(); #endregion } Base_ref.Form_Refresh(); MyForm.Hide(); NotifyBase(eFlowformEvents.Closed, this); break; } }
private void MyForm_notifiedMe_aboutNext(eFlowformFormEvents SomeEvent_) { switch (SomeEvent_) { case eFlowformFormEvents.Next: #region Checking... if ( (mode_ == eMode.New) && (MyForm.ApplicationPath.Trim() == string.Empty) ) { System.Windows.Forms.MessageBox.Show( "must provide a valid Application Path", "Warning", System.Windows.Forms.MessageBoxButtons.OK, System.Windows.Forms.MessageBoxIcon.Warning ); return; } if ( (mode_ == eMode.New) && ( (System.IO.Directory.GetDirectories(MyForm.ApplicationPath).Length != 0) || (System.IO.Directory.GetFiles(MyForm.ApplicationPath).Length != 0) ) ) { switch (System.Windows.Forms.MessageBox.Show( "provided Application Path is not empty,\nfile overwrite may occur,\ncontinue?", "Warning", System.Windows.Forms.MessageBoxButtons.OKCancel, System.Windows.Forms.MessageBoxIcon.Warning )) { case System.Windows.Forms.DialogResult.OK: { break; } case System.Windows.Forms.DialogResult.Cancel: { return; } } } if (MyForm.ApplicationName.Trim() == string.Empty) { System.Windows.Forms.MessageBox.Show( "must provide a valid Application Name", "Warning", System.Windows.Forms.MessageBoxButtons.OK, System.Windows.Forms.MessageBoxIcon.Warning ); return; } if (MyForm.Namespace.Trim() == string.Empty) { System.Windows.Forms.MessageBox.Show( "must provide a valid Application Namespace", "Warning", System.Windows.Forms.MessageBoxButtons.OK, System.Windows.Forms.MessageBoxIcon.Warning ); return; } #endregion OGen.NTier.lib.metadata.cDBMetadata_DB[] _dbs = MyForm.UnBind_DBConnections(); #region More Checking... if (_dbs.Length == 0) { System.Windows.Forms.MessageBox.Show( "must provide at least one valid DB Connection", "Warning", System.Windows.Forms.MessageBoxButtons.OK, System.Windows.Forms.MessageBoxIcon.Warning ); return; } #endregion if (mode_ == eMode.Update) { #region Updating... frm_Main.ntierproject.Metadata.DBs.Clear(); for (int d = 0; d < _dbs.Length; d++) { int _justadded = frm_Main.ntierproject.Metadata.DBs.Add( _dbs[d].DBServerType, false ); frm_Main.ntierproject.Metadata.DBs[_justadded].CopyFrom( _dbs[d] ); //if (d == 0) { // // ToDos: here! document this behaviour and describe it throught unit testing // // first item in the array, represents default db connection // frm_Main.ntierproject.Metadata.Default_DBServerType = frm_Main.ntierproject.Metadata.DBs[_justadded].DBServerType; // frm_Main.ntierproject.Metadata.Default_ConfigMode = frm_Main.ntierproject.Metadata.DBs[_justadded].Connections[0].ConfigMode; //} } frm_Main.ntierproject.Metadata.ApplicationName = MyForm.ApplicationName; frm_Main.ntierproject.Metadata.Namespace = MyForm.Namespace; #endregion frm_Main.NTierProject.hasChanges = true; } else { #region Creating... MyForm.Hide(); frmProcessOutput output = new frmProcessOutput("Output"); output.MdiParent = Base_ref; output.Show(); frm_Main.ntierproject.New( MyForm.ApplicationPath, MyForm.ApplicationName, MyForm.Namespace, _dbs, new OGen.NTier.lib.metadata.cDBMetadata.dLoadState_fromDB( output.DisplayMessage ) ); output.DisplayMessage(); #endregion } Base_ref.Form_Refresh(); MyForm.Hide(); NotifyBase(eFlowformEvents.Closed, this); break; } }