Example #1
0
 private void ShowCustomDialogDemo()
 {
     using (var dialog = new MyCustomDialog())
     {
         // The ShowDialog() extension method is exposed by:
         // using SolidEdgeFramework.Extensions (SolidEdge.Community.dll)
         if (SolidEdgeAddIn.Application.ShowDialog(dialog) == DialogResult.OK)
         {
         }
     }
 }
Example #2
0
        public override void OnControlClick(RibbonControl control)
        {
            var application = DemoAddIn.Instance.Application;

            // Demonstrate how to handle commands without binding to a local variable.
            switch (control.CommandId)
            {
            case 0:
                using (var dialog = new SaveFileDialog())
                {
                    // The ShowDialog() extension method is exposed by:
                    // using SolidEdgeFramework.Extensions (SolidEdge.Community.dll)
                    if (application.ShowDialog(dialog) == DialogResult.OK)
                    {
                    }
                }
                break;

            case 1:
                using (var dialog = new FolderBrowserDialog())
                {
                    // The ShowDialog() extension method is exposed by:
                    // using SolidEdgeFramework.Extensions (SolidEdge.Community.dll)
                    if (application.ShowDialog(dialog) == DialogResult.OK)
                    {
                    }
                }
                break;

            case 2:
                using (var dialog = new MyCustomDialog())
                {
                    // The ShowDialog() extension method is exposed by:
                    // using SolidEdgeFramework.Extensions (SolidEdge.Community.dll)
                    if (application.ShowDialog(dialog) == DialogResult.OK)
                    {
                    }
                }
                break;

            case 8:
                application.StartCommand(SolidEdgeConstants.PartCommandConstants.PartToolsOptions);
                break;

            case 11:
                application.StartCommand(SolidEdgeConstants.PartCommandConstants.PartHelpSolidEdgeontheWeb);
                break;
            }
        }
Example #3
0
        public override void OnControlClick(RibbonControl control)
        {
            var application = DemoAddIn.Instance.Application;

            // Demonstrate how to handle commands without binding to a local variable.
            switch (control.CommandId)
            {
                case 0:
                    using (var dialog = new SaveFileDialog())
                    {
                        // The ShowDialog() extension method is exposed by:
                        // using SolidEdgeFramework.Extensions (SolidEdge.Community.dll)
                        if (application.ShowDialog(dialog) == DialogResult.OK)
                        {

                        }
                    }
                    break;
                case 1:
                    using (var dialog = new FolderBrowserDialog())
                    {
                        // The ShowDialog() extension method is exposed by:
                        // using SolidEdgeFramework.Extensions (SolidEdge.Community.dll)
                        if (application.ShowDialog(dialog) == DialogResult.OK)
                        {
                        }
                    }
                    break;
                case 2:
                    using (var dialog = new MyCustomDialog())
                    {
                        // The ShowDialog() extension method is exposed by:
                        // using SolidEdgeFramework.Extensions (SolidEdge.Community.dll)
                        if (application.ShowDialog(dialog) == DialogResult.OK)
                        {
                        }
                    }
                    break;
                case 8:
                    application.StartCommand(SolidEdgeConstants.PartCommandConstants.PartToolsOptions);
                    break;
                case 11:
                    application.StartCommand(SolidEdgeConstants.PartCommandConstants.PartHelpSolidEdgeontheWeb);
                    break;
            }
        }