Esempio n. 1
0
        public SceneTreeGui(IEventRoutingService eventRoutingService, IWorldTreeService worldTreeService, IViewService viewService,
                            IPresentationGuiCommands commands, ICommonGuiObjects commonGuiObjects)
        {
            itemIndex             = new Dictionary <ISceneNode, TreeItem>();
            this.worldTreeService = worldTreeService;
            this.viewService      = viewService;
            this.commands         = commands;

            eyeIcon    = Icon.FromResource("Clarity.Ext.Gui.EtoForms.Resources.eye_icon.ico");
            sceneIcon  = Icon.FromResource("Clarity.Ext.Gui.EtoForms.Resources.scene_icon.ico");
            viewIcon   = Icon.FromResource("Clarity.Ext.Gui.EtoForms.Resources.view_icon.ico");
            layoutIcon = Icon.FromResource("Clarity.Ext.Gui.EtoForms.Resources.layout_icon.ico");
            entityIcon = Icon.FromResource("Clarity.Ext.Gui.EtoForms.Resources.entity_icon.ico");
            whiteIcon  = Icon.FromResource("Clarity.Ext.Gui.EtoForms.Resources.white_icon.ico");

            rootItem = new TreeItem {
                Text = "GuiRoot", Expanded = true
            };
            treeView = new TreeView
            {
                Width       = 250,
                DataStore   = rootItem,
                ContextMenu = commonGuiObjects.SelectionContextMenu
            };
            //RebuildFromRoot();
            eventRoutingService.RegisterServiceDependency(typeof(ISceneTreeGui), typeof(IWorldTreeService));
            eventRoutingService.Subscribe <IWorldTreeUpdatedEvent>(typeof(ISceneTreeGui), nameof(OnWorldUpdated), OnWorldUpdated);
            eventRoutingService.Subscribe <IAppModeChangedEvent>(typeof(ISceneTreeGui), nameof(OnAppModeChanged), OnAppModeChanged);
            treeView.SelectionChanged += OnSelectionChanged;
            treeView.NodeMouseClick   += OnNodeMouseClick;
            treeView.MouseDoubleClick += OnNodeMouseDoubleClick;

            viewService.Update += OnViewServiceUpdate;
        }
Esempio n. 2
0
 protected PresentationComponent(Lazy <IAppModeService> appModeServiceLazy, IPresentationGuiCommands commands, IWorldCopyPasteService worldCopyPaste, IViewService viewService)
 {
     this.appModeServiceLazy = appModeServiceLazy;
     this.commands           = commands;
     this.worldCopyPaste     = worldCopyPaste;
     this.viewService        = viewService;
 }
Esempio n. 3
0
 protected ManipulateInPresentationComponent(IAppModeService appModeService, IViewService viewService, IPresentationGuiCommands commands)
 {
     this.appModeService = appModeService;
     this.viewService    = viewService;
     this.commands       = commands;
 }