Ejemplo n.º 1
0
        internal void ShowJoinElementsSelectUI()
        {
            if (joinElementSelectWindow == null || joinElementSelectWindow.isShowned == false)
            {
                if (uiApp != null)
                {
                    uiApp.ViewActivated += joinElementSelectWindow_ViewActivated;
                }

                requestjoinElementSelecHandler = new RequestElementsSelectHandler();
                joinElementSelecEvent          = ExternalEvent.Create(requestjoinElementSelecHandler);

                joinElementSelectWindow = new ElementJoinSelectUI(joinElementSelecEvent, requestjoinElementSelecHandler);
                joinElementSelectWindow.Show();
                joinElementSelectWindow.isShowned = true;
            }
        }
Ejemplo n.º 2
0
        public void Execute(UIApplication app)
        {
            try
            {
                if (app != null)
                {
                    uidoc        = app.ActiveUIDocument;
                    joinSelectUI = ONBOXApplication.onboxApp.joinElementSelectWindow;

                    if (uidoc != null)
                    {
                        switch (joinSelectUI.selectElementsSelectOperation)
                        {
                        case SelectElementsToJoin.selectFirstElements:
                            SelectFirstElements();
                            break;

                        case SelectElementsToJoin.selectSecondElements:
                            SelectSecontElements();
                            break;

                        case SelectElementsToJoin.showFirstSelectedElements:
                            ShowFirstSelectedElements();
                            break;

                        case SelectElementsToJoin.showSecondSelectedElements:
                            ShowSecondSelectedElements();
                            break;

                        case SelectElementsToJoin.deselectFirst:
                            DeselectFirst();
                            break;

                        case SelectElementsToJoin.deselectSecond:
                            DeselectSecond();
                            break;

                        case SelectElementsToJoin.join:
                            JoinElements();
                            break;

                        case SelectElementsToJoin.unjoin:
                            UnJoinElements();
                            break;

                        case SelectElementsToJoin.unsubscribe:
                            Unsubscribe();
                            break;

                        case SelectElementsToJoin.undefined:
                            break;

                        default:
                            break;
                        }
                    }
                }
            }
            catch (Exception)
            {
            }
            finally
            {
                joinSelectUI.UnFreezeUI();
            }
        }