Exemple #1
0
 private void mnuGenerateCode_Click(object sender, EventArgs e)
 {
     using (CodeGenerator.Dialog dialog = new CodeGenerator.Dialog())
     {
         try {
             dialog.ShowDialog(project);
         }
         catch (Exception ex) {
             MessageBox.Show(ex.Message, Strings.GetString("unknown_error"),
                             MessageBoxButtons.OK, MessageBoxIcon.Error);
         }
     }
 }
Exemple #2
0
 private void mnuGenerateCode_Click(object sender, EventArgs e)
 {
     if (_diagram?.Project != null)
     {
         using (CodeGenerator.Dialog dialog = new CodeGenerator.Dialog())
         {
             try
             {
                 dialog.ShowDialog(_diagram.Project);
             }
             catch (Exception ex)
             {
                 MessageBox.Show(ex.Message, Strings.UnknownError,
                                 MessageBoxButtons.OK, MessageBoxIcon.Error);
             }
         }
     }
 }
		private void mnuGenerateCode_Click(object sender, EventArgs e)
		{
			if (diagram != null && diagram.Project != null)
			{
				using (CodeGenerator.Dialog dialog = new CodeGenerator.Dialog())
				{
					try
					{
						dialog.ShowDialog(diagram.Project);
					}
					catch (Exception ex)
					{
						MessageBox.Show(ex.Message, Strings.UnknownError,
							MessageBoxButtons.OK, MessageBoxIcon.Error);
					}
				}
			}
		}