private void Generate(object sender, EventArgs e) { try { if (String.IsNullOrWhiteSpace(clsPrint.SavingPath)) { MessageBox.Show("Saving Path is not empty."); return; } string namSpace = clsPrint.ClassNameSpace; if (!NameSpaceController.ControlNameSpace(namSpace)) { MessageBox.Show("NameSpace includes forbidden characters."); return; } if (namSpace.ToCharArray()[0].Equals('.') || namSpace.ToCharArray()[namSpace.Length - 1].Equals('.')) { MessageBox.Show("NameSpace could not start and end with '.'"); return; } chklstTables.Enabled = false; Generate(); MessageBox.Show("All Tables created.", "Result Info:"); } catch (Exception exc) { tbpgLog.Select(); LogException(exc, 3); } finally { chklstTables.Enabled = true; } }
private void Generate(object sender, EventArgs e) { try { if (String.IsNullOrWhiteSpace(clsPrint.SavingPath)) { MessageBox.Show("Saving Path is not empty."); return; } if (!NameSpaceController.ControlNameSpace(clsPrint.ClassNameSpace)) { MessageBox.Show("NameSpace includes forbidden characters."); return; } chklstTables.Enabled = false; Generate(); chklstTables.Enabled = true; MessageBox.Show("All Tables created.", "Result Info:"); } catch (Exception exc) { tbpgLog.Select(); LogException(exc, 3); } }