Exemplo n.º 1
0
        public void ShowMover(UIApplication uiapp)
        {
            if (mainWindow == null)
            {
                handler = new MoverHandler(uiapp);
                var exEvent = ExternalEvent.Create(handler);

                mainWindow         = new MainWindow(exEvent, handler);
                mainWindow.Closed += WindowClosed;
                mainWindow.Show();
            }
        }
Exemplo n.º 2
0
        public FamilyWindow(ExternalEvent extEvent, MoverHandler handler)
        {
            m_event   = extEvent;
            m_handler = handler;
            m_handler.FamilyWindowInstance = this;

            selectedLink = m_handler.SelectedLink;
            familyInfo   = m_handler.SelectedFamilyInfo;

            linkedDoc = selectedLink.LinkedDocument;
            hostDoc   = m_handler.CurrentDocument;
            CollectElementTypes();

            InitializeComponent();

            var categories = selectedLink.Categories.Values.OrderBy(o => o.CategoryName).ToList();

            comboBoxCategory.ItemsSource   = null;
            comboBoxCategory.ItemsSource   = categories;
            comboBoxCategory.SelectedIndex = 0;
        }
Exemplo n.º 3
0
        public MainWindow(ExternalEvent extEvent, MoverHandler handler)
        {
            m_event   = extEvent;
            m_handler = handler;
            m_handler.MainWindowInstance = this;

            linkInstances = m_handler.LinkInstances;

            InitializeComponent();

            Title = "Element Mover v." + System.Reflection.Assembly.GetExecutingAssembly().GetName().Version;

            var instanceList = linkInstances.Values.OrderBy(o => o.DisplayName).ToList();

            comboBoxLinkModel.ItemsSource       = instanceList;
            comboBoxLinkModel.DisplayMemberPath = "DisplayName";
            comboBoxLinkModel.SelectedIndex     = 0;

            ElementMoverUtil.progressBar = progressBar;
            ElementMoverUtil.statusLabel = statusLable;
        }
        public MappingWindow(ExternalEvent extEvent, MoverHandler handler)
        {
            m_event   = extEvent;
            m_handler = handler;
            m_handler.MappingWindowInstance = this;

            linkInstances = m_handler.LinkInstances;
            selectedLink  = m_handler.SelectedLink;

            InitializeComponent();

            var instances = linkInstances.Values.OrderBy(o => o.DisplayName).ToList();

            comboBoxLink.ItemsSource       = instances;
            comboBoxLink.DisplayMemberPath = "DisplayName";
            var selectedIndex = instances.FindIndex(o => o.InstanceId == selectedLink.InstanceId);

            if (selectedIndex > -1)
            {
                comboBoxLink.SelectedIndex = selectedIndex;
            }
        }