public override void OnClick(AddinDesignerEventArgs e)
        {
            try
            {
                SnippetsParms           snippetsParms      = new SnippetsParms();
                TableRelationToXppParms relationToXppParms = new TableRelationToXppParms();

                Relation relation = null;
                if (e.SelectedElement != null)
                {
                    relation = e.SelectedElement as Relation;
                }

                if (relation == null)
                {
                    throw new System.Exception("Relation should be selected");
                }
                relationToXppParms.InitFromRelation(relation);
                relationToXppParms.InitDialogParms(snippetsParms);

                SnippetsDialog dialog = new SnippetsDialog();
                dialog.SetParameters(snippetsParms);
                dialog.Show();
                dialog.ShowResultButton_Click(null, null);
            }
            catch (System.Exception ex)
            {
                CoreUtility.HandleExceptionWithErrorMessage(ex);
            }
        }
示例#2
0
        private static void TestRunBaseBuilder()
        {
            SnippetsParms  snippetsParms  = new SnippetsParms();
            RunBaseBuilder runBaseBuilder = new RunBaseBuilder();

            runBaseBuilder.InitDialogParms(snippetsParms);

            SnippetsDialog dialog = new SnippetsDialog();

            dialog.SetParameters(snippetsParms);
            Application.Run(dialog);
        }
示例#3
0
        public override void OnClick(AddinEventArgs e)
        {
            try
            {
                SnippetsParms  snippetsParms  = new SnippetsParms();
                RunBaseBuilder runBaseBuilder = new RunBaseBuilder();

                runBaseBuilder.InitDialogParms(snippetsParms);

                SnippetsDialog dialog = new SnippetsDialog();
                dialog.SetParameters(snippetsParms);
                dialog.Show();
            }
            catch (Exception ex)
            {
                CoreUtility.HandleExceptionWithErrorMessage(ex);
            }
        }