public void RegisterMainGraph(ViewInfo viewInfo, ITreeViewControl treeView, PropertyGridView wpfPropertyGrid,
                               CommandLineView commandLineView, LayerView layerView, IHelpView helpView,
                               BooView booView)
 {
     ActionsGraph = CreateMainGraph(viewInfo, treeView, wpfPropertyGrid, commandLineView, layerView, helpView,
                                    booView);
 }
 public Items(ITreeViewControl treeView, IPropertyGridView wpfPropertyView, ILayerView layerView,
              IHelpView helpView, BooView booView)
 {
     _layerView      = layerView;
     TreeView        = treeView;
     WpfPropertyView = wpfPropertyView;
     HelpView        = helpView;
     BooView         = booView;
 }
 public UiElementsItem(ITreeViewControl treeView, IPropertyGridView wpfPropertyView, ILayerView layerView,
                       IHelpView helpView, BooView booView)
     : base(InputNames.UiElementsItem)
 {
     _treeView        = treeView;
     _helpView        = helpView;
     _booView         = booView;
     _wpfPropertyView = wpfPropertyView;
     _layerView       = layerView;
 }
        private ActionsGraph CreateMainGraph(ViewInfo viewInfo, ITreeViewControl treeView,
                                             PropertyGridView wpfPropertyGrid, CommandLineView commandLineView,
                                             LayerView layerView, IHelpView helpView, BooView booView)
        {
            var result = new ActionsGraph();

            ActionsGraph = result;
            result.Register(this);

            var defaultAppInputs = new DefaultAppInputs(ActionsGraph);

            defaultAppInputs.InitializeInputs(viewInfo, treeView, wpfPropertyGrid, commandLineView, layerView, helpView,
                                              booView);

            return(result);
        }
Example #5
0
 public void InitializeInputs(ViewInfo viewInfo, ITreeViewControl treeView, PropertyGridView wpfPropertyView,
                              CommandLineView commandLineView, LayerView layerView, IHelpView helpView,
                              BooView booView)
 {
     ActionGraph.Register(new NodeSelectInput());
     ActionGraph.Register(new UiElementsItem(treeView, wpfPropertyView, layerView, helpView, booView));
     ActionGraph.Register(new ViewInfoInput(viewInfo));
     ActionGraph.Register(new CommandLineInput(commandLineView));
     ActionGraph.Register(new RestrictedPlaneInput());
     ActionGraph.Register(new ClipboardManager());
     ActionGraph.Register(new CommandLinePrePusherInput());
     ActionGraph.Register(new DescriptorsFactoryInput());
     ActionGraph.Register(new FunctionFactoryInput());
     ActionGraph.Register(new OptionsSetupInput());
     ActionGraph.Register(new UiBuilderInput());
     ActionGraph.Register(new CurrentDocumentInput());
     ActionGraph.Register(new GlobalCapabilitiesInput());
 }
Example #6
0
        public void Run(IOccContainerMultiView sceneWorkspace, ActionsGraph actionsGraph, PartModelingView newView,
                        ViewInfo viewInfo)
        {
            _attachedView = sceneWorkspace;
            _actionGraph  = actionsGraph;
            var uiItems =
                _actionGraph[InputNames.UiElementsItem].GetData(NotificationNames.GetValue).Get
                <UiElementsItem.Items>();

            _treeView        = uiItems.TreeView;
            _wpfPropertyView = (PropertyGridView)uiItems.WpfPropertyView;
            _wpfLayerView    = (LayerView)uiItems.LayerView;
            _helpView        = uiItems.HelpView;
            _commandLineView =
                _actionGraph[InputNames.CommandLineView].GetData(NotificationNames.GetValue).Get
                <CommandLineView>();
            _metaModifierContainer = new CommandList(_actionGraph);

            _actionGraph.OnSwitchAction += UpdateSwitchAction;

            Application.DoEvents();
            _actionGraph.Register(new FunctionFactoryInput());
            DefaultFunctions.Setup(_actionGraph);
            var defaultConstraintFunctions = new DefaultConstraintFunctions();

            defaultConstraintFunctions.Setup(_actionGraph);

            OccInitialize.Setup(ref _device, ref _viewer, ref _context, out _view, _attachedView);

            InitDocument();

            _solver = new Solver(_document);
            UpdateSolverOptions();
            ViewInfoSetup(viewInfo);
            RegisterModifiers();
            InitializeInputs();
            DefineShapeConcepts();
            SetupChangedShapeEvent();
            ViewInfoPostSetup();
            UserInterfaceSetup();

            SwitchUserAction(ModifierNames.StartUp);
            var optionsSetup = actionsGraph[InputNames.OptionsSetupInput].Get <OptionsSetup>();

            optionsSetup.Register(new AutoSaveOptionsItem());

            var occSection = optionsSetup.UpdateSectionNode(OptionSectionNames.Background);
            var color      = occSection.GetColorValue(0);

            _viewer.SetDefaultBackgroundColor((ShapeUtils.GetOccColor(color)));
            //SetGradientBackground();


            ForceStartupViewUpdate();

            OptionsEventMapping(optionsSetup);

            var presenter = newView.GetPresenter();

            presenter.OnMouseMoveHandler  += MouseMoveHandler;
            presenter.OnMouseDownHandler  += MouseDownHandler;
            presenter.OnMouseUpHandler    += MouseUpHandler;
            presenter.OnMouseWheelHandler += MouseWheelHandler;

            presenter.OnResizeEvent += ResizeView;

            ApplicationNotificationUtils.Instance.ExitingApplication += () => SwitchUserAction(ModifierNames.NaroExit);

            _view.SurfaceDetail = V3dTypeOfSurfaceDetail.V3d_TEX_ALL;
            new SketchSolveUpdater(_document);


            SetOriginalGradientBackground();

            ResumeRunning();
        }
Example #7
0
 public ViewInfo(ITreeViewControl treeView, ActionsGraph actionGraph)
 {
     TreeView      = treeView;
     _actionsGraph = actionGraph;
 }