示例#1
0
        public GameEditor(
            IContextRegistry contextRegistry,
            IDocumentRegistry documentRegistry,
            IControlHostService controlHostService,
            ICommandService commandService,
            IDocumentService documentService,
            IPaletteService paletteService,
            ISettingsService settingsService,
            IResourceService resourceService,
            LevelEditorCore.ResourceLister resourceLister,
            BookmarkLister bookmarkLister
            )
        {
            m_contextRegistry  = contextRegistry;
            m_documentRegistry = documentRegistry;
            m_paletteService   = paletteService;
            m_settingsService  = settingsService;
            m_documentService  = documentService;
            m_resourceService  = resourceService;
            m_resourceLister   = resourceLister;
            m_bookmarkLister   = bookmarkLister;

            //to-do wire it to to command service
            InputScheme.ActiveControlScheme = new MayaControlScheme();
            ResolveOnLoad = true;
        }
示例#2
0
文件: Editor.cs 项目: vincenthamm/ATF
        public Editor(
            ICommandService commandService,
            IControlHostService controlHostService,
            IDocumentService documentService,
            IDocumentRegistry documentRegistry,
            IFileDialogService fileDialogService
            )
        {
            m_commandService = commandService;
            m_controlHostService = controlHostService;
            m_documentService = documentService;
            m_documentRegistry = documentRegistry;
            m_fileDialogService = fileDialogService;

            // create a document client for each file type
            m_txtDocumentClient = new DocumentClient(this, ".txt");
            m_csDocumentClient = new DocumentClient(this, ".cs");
            m_luaDocumentClient = new DocumentClient(this, ".lua");
            m_nutDocumentClient = new DocumentClient(this, ".nut");
            m_pyDocumentClient = new DocumentClient(this, ".py");
            m_xmlDocumentClient = new DocumentClient(this, ".xml");
            m_daeDocumentClient = new DocumentClient(this, ".dae");
            m_cgDocumentClient = new DocumentClient(this, ".cg");

        }
示例#3
0
        public PaletteService(
            ICommandService commandService,
            IControlHostService controlHostService)
            : base(commandService)
        {
            m_controlHostService = controlHostService;

            m_searchInput          = new StringSearchInputUI();
            m_searchInput.Updated += searchInput_Updated;

            m_control      = new UserControl();
            m_control.Dock = DockStyle.Fill;
            m_control.SuspendLayout();
            m_control.Name = "Palette".Localize();
            m_control.Text = "Palette".Localize();
            m_control.Controls.Add(m_searchInput);
            m_control.Controls.Add(TreeControl);
            m_control.Layout += controls_Layout;
            m_control.ResumeLayout();

            m_controlHostService.RegisterControl(
                m_control,
                new ControlInfo(
                    "Palette".Localize(),
                    "Creates new instances".Localize(),
                    StandardControlGroup.Left, null,
                    "http://www.ship.scea.com/portal/search/search.action?q=PaletteService+or+Palette&context=resource_WIKI%7CWWSSDKATF".Localize()),
                this);

            m_paletteTreeAdapter = new PaletteTreeAdapter(this, m_searchInput);
        }
示例#4
0
        public PaletteService(
            ICommandService commandService,
            IControlHostService controlHostService)
            : base(commandService)
        {
            m_controlHostService = controlHostService;

            m_searchInput = new StringSearchInputUI();
            m_searchInput.Updated += searchInput_Updated;

            m_control = new UserControl();
            m_control.Dock = DockStyle.Fill;
            m_control.SuspendLayout();
            m_control.Name = "Palette".Localize();
            m_control.Text = "Palette".Localize();
            m_control.Controls.Add(m_searchInput);
            m_control.Controls.Add(TreeControl);
            m_control.Layout += controls_Layout;
            m_control.ResumeLayout();

            m_controlHostService.RegisterControl(
                m_control,
                new ControlInfo(
                    "Palette", //Is the ID in the layout. We'll localize DisplayName instead.
                    "Creates new instances".Localize(),
                    StandardControlGroup.Left, null,
                    "https://github.com/SonyWWS/ATF/search?utf8=%E2%9C%93&q=PaletteService+or+Palette".Localize())
                {
                    DisplayName = "Palette".Localize()
                },
                this);
        }
 public TabbedControlSelector(
     Form mainForm,
     IControlHostService controlHostService)
 {
     m_mainForm = mainForm;
     m_controlHostService = controlHostService;
 }
示例#6
0
 public PropertyEditor(
     IControlHostService controlHostService,
     IContextRegistry contextRegistry)
 {
     ControlHostService = controlHostService;
     ContextRegistry    = contextRegistry;
 }
示例#7
0
文件: Editor.cs 项目: Joxx0r/ATF
        public Editor(
            IControlHostService controlHostService,
            ICommandService commandService,
            IContextRegistry contextRegistry,
            IDocumentRegistry documentRegistry,
            IDocumentService documentService,
            PrototypeLister prototypeLister,
            SchemaLoader schemaLoader,
            DiagramTheme diagramTheme)
        {
            m_controlHostService = controlHostService;
            m_commandService = commandService;
            m_contextRegistry = contextRegistry;
            m_documentRegistry = documentRegistry;
            m_documentService = documentService;
            m_prototypeLister = prototypeLister;

            m_schemaLoader = schemaLoader;

            m_theme = new D2dDiagramTheme();
            m_fsmRenderer = new D2dDigraphRenderer<State, Transition>(m_theme);

            string initialDirectory = Path.Combine(Directory.GetCurrentDirectory(), "..\\..\\..\\..\\components\\wws_atf\\Samples\\FsmEditor\\data");
            EditorInfo.InitialDirectory = initialDirectory;
        }
示例#8
0
 public PropertyEditor(
     IControlHostService controlHostService,
     IContextRegistry contextRegistry)
 {
     ControlHostService = controlHostService;
     ContextRegistry = contextRegistry;
 }
示例#9
0
文件: Editor.cs 项目: vincenthamm/ATF
        public Editor(
            IControlHostService controlHostService,
            ICommandService commandService,
            IContextRegistry contextRegistry,
            IDocumentRegistry documentRegistry,
            IDocumentService documentService,
            PrototypeLister prototypeLister,
            LayerLister layerLister,
            SchemaLoader schemaLoader)
        {
            m_controlHostService = controlHostService;
            m_commandService = commandService;
            m_contextRegistry = contextRegistry;
            m_documentRegistry = documentRegistry;
            m_documentService = documentService;
            m_prototypeLister = prototypeLister;
            m_layerLister = layerLister;
            
            m_schemaLoader = schemaLoader;

            string initialDirectory = Path.Combine(Directory.GetCurrentDirectory(), "..\\..\\..\\..\\components\\wws_atf\\Samples\\CircuitEditor\\data");
            EditorInfo.InitialDirectory = initialDirectory;
            m_theme = new D2dDiagramTheme();
            m_circuitRenderer = new D2dCircuitRenderer<Module, Connection, ICircuitPin>(m_theme, documentRegistry);
            m_subGraphRenderer = new D2dSubCircuitRenderer<Module, Connection, ICircuitPin>(m_theme);

            // create d2dcontrol for displaying sub-circuit            
            m_d2dHoverControl = new D2dAdaptableControl();
            m_d2dHoverControl.Dock = DockStyle.Fill;
            var xformAdapter = new TransformAdapter();
            xformAdapter.EnforceConstraints = false;//to allow the canvas to be panned to view negative coordinates
            m_d2dHoverControl.Adapt(xformAdapter, new D2dGraphAdapter<Module, Connection, ICircuitPin>(m_circuitRenderer, xformAdapter));
            m_d2dHoverControl.DrawingD2d += new EventHandler(m_d2dHoverControl_DrawingD2d);
        }
示例#10
0
 public SledGotoService(
     MainForm mainForm,
     IControlHostService controlHostService)
 {
     m_mainForm = mainForm;
     m_controlHostService = controlHostService;
 }
示例#11
0
        public TimelineEditor(
            IControlHostService controlHostService,
            ICommandService commandService,
            IContextRegistry contextRegistry,
            IDocumentRegistry documentRegistry,
            IDocumentService documentService,
            IPaletteService paletteService,
            ISettingsService settingsService)
        {
            s_schemaLoader                = new SchemaLoader();
            s_repository.DocumentAdded   += repository_DocumentAdded;
            s_repository.DocumentRemoved += repository_DocumentRemoved;

            paletteService.AddItem(Schema.markerType.Type, "Timelines", this);
            paletteService.AddItem(Schema.groupType.Type, "Timelines", this);
            paletteService.AddItem(Schema.trackType.Type, "Timelines", this);
            paletteService.AddItem(Schema.intervalType.Type, "Timelines", this);
            paletteService.AddItem(Schema.keyType.Type, "Timelines", this);
            paletteService.AddItem(Schema.timelineRefType.Type, "Timelines", this);

            m_contextRegistry    = contextRegistry;
            m_documentRegistry   = documentRegistry;
            m_controlHostService = controlHostService;
            m_documentService    = documentService;
            m_settingsService    = settingsService;
        }
示例#12
0
 public MyPropertyEditor(
     ICommandService commandService,
     IControlHostService controlHostService,
     IContextRegistry contextRegistry)
     : base(commandService, controlHostService, contextRegistry)
 {
 }
示例#13
0
        public TimelineEditor(
            IControlHostService controlHostService,
            ICommandService commandService,
            IContextRegistry contextRegistry,
            IDocumentRegistry documentRegistry,
            IDocumentService documentService,
            IPaletteService paletteService,
            ISettingsService settingsService)
        {
            s_schemaLoader = new SchemaLoader();
            s_repository.DocumentAdded += repository_DocumentAdded;
            s_repository.DocumentRemoved += repository_DocumentRemoved;

            paletteService.AddItem(Schema.markerType.Type, "Timelines", this);
            paletteService.AddItem(Schema.groupType.Type, "Timelines", this);
            paletteService.AddItem(Schema.trackType.Type, "Timelines", this);
            paletteService.AddItem(Schema.intervalType.Type, "Timelines", this);
            paletteService.AddItem(Schema.keyType.Type, "Timelines", this);
            paletteService.AddItem(Schema.timelineRefType.Type, "Timelines", this);

            m_contextRegistry = contextRegistry;
            m_documentRegistry = documentRegistry;
            m_controlHostService = controlHostService;
            m_documentService = documentService;
            m_settingsService = settingsService;
        }
示例#14
0
文件: Editor.cs 项目: zoombapup/ATF
        public Editor(
            IControlHostService controlHostService,
            ICommandService commandService,
            IContextRegistry contextRegistry,
            IDocumentRegistry documentRegistry,
            IDocumentService documentService,
            SchemaLoader schemaLoader,
            PrototypeLister prototypeLister)
        {
            m_controlHostService = controlHostService;
            m_commandService     = commandService;
            m_contextRegistry    = contextRegistry;
            m_documentRegistry   = documentRegistry;
            m_documentService    = documentService;

            m_schemaLoader = schemaLoader;

            m_diagramTheme = new D2dDiagramTheme();

            D2dGradientStop[] gradStops =
            {
                new D2dGradientStop(Color.WhiteSmoke, 0),
                new D2dGradientStop(Color.LightGray, 1)
            };
            m_diagramTheme.FillGradientBrush = D2dFactory.CreateLinearGradientBrush(gradStops);
            m_diagramTheme.FillBrush         = D2dFactory.CreateSolidBrush(Color.WhiteSmoke);
            m_statechartRenderer             = new D2dStatechartRenderer <StateBase, Transition>(m_diagramTheme);

            string initialDirectory = Path.Combine(Directory.GetCurrentDirectory(), "..\\..\\..\\..\\components\\wws_atf\\Samples\\StatechartEditor\\data");

            EditorInfo.InitialDirectory = initialDirectory;
        }
示例#15
0
        public PaletteService(
            ICommandService commandService,
            IControlHostService controlHostService)
            : base(commandService)
        {
            m_controlHostService = controlHostService;

            m_searchInput = new StringSearchInputUI();
            m_searchInput.Updated += searchInput_Updated;

            m_control = new UserControl();
            m_control.Dock = DockStyle.Fill;
            m_control.SuspendLayout();
            m_control.Name = "Palette".Localize();
            m_control.Text = "Palette".Localize();
            m_control.Controls.Add(m_searchInput);
            m_control.Controls.Add(TreeControl);
            m_control.Layout += controls_Layout;
            m_control.ResumeLayout();

            m_controlHostService.RegisterControl(
                m_control,
                new ControlInfo(
                    "Palette".Localize(),
                    "Creates new instances".Localize(),
                    StandardControlGroup.Left, null,
                    "http://www.ship.scea.com/portal/search/search.action?q=PaletteService+or+Palette&context=resource_WIKI%7CWWSSDKATF".Localize()),
                this);

            m_paletteTreeAdapter = new PaletteTreeAdapter(this, m_searchInput);
        }
示例#16
0
 public SledGotoService(
     MainForm mainForm,
     IControlHostService controlHostService)
 {
     m_mainForm           = mainForm;
     m_controlHostService = controlHostService;
 }
示例#17
0
文件: Editor.cs 项目: zparr/ATF
        public Editor(
            IControlHostService controlHostService,
            ICommandService commandService,
            IContextRegistry contextRegistry,
            IDocumentRegistry documentRegistry,
            IDocumentService documentService,
            PrototypeLister prototypeLister,
            SchemaLoader schemaLoader,
            DiagramTheme diagramTheme)
        {
            m_controlHostService = controlHostService;
            m_commandService     = commandService;
            m_contextRegistry    = contextRegistry;
            m_documentRegistry   = documentRegistry;
            m_documentService    = documentService;
            m_prototypeLister    = prototypeLister;

            m_schemaLoader = schemaLoader;

            m_theme       = new D2dDiagramTheme();
            m_fsmRenderer = new D2dDigraphRenderer <State, Transition>(m_theme);

            string initialDirectory = Path.Combine(Directory.GetCurrentDirectory(), "..\\..\\..\\..\\components\\wws_atf\\Samples\\FsmEditor\\data");

            EditorInfo.InitialDirectory = initialDirectory;
        }
示例#18
0
 public GameEditor(
     IContextRegistry contextRegistry,
     IDocumentRegistry documentRegistry,            
     IControlHostService controlHostService,
     ICommandService commandService,
     IDocumentService documentService,
     IPaletteService paletteService,
     ISettingsService settingsService,            
     IResourceService resourceService,
     LevelEditorCore.ResourceLister resourceLister,            
     BookmarkLister bookmarkLister
     )
 {
     m_contextRegistry = contextRegistry;
     m_documentRegistry = documentRegistry;
     m_paletteService = paletteService;
     m_settingsService = settingsService;            
     m_documentService = documentService;            
     m_resourceService = resourceService;
     m_resourceLister = resourceLister;            
     m_bookmarkLister = bookmarkLister;
     
     //to-do wire it to to command service
     InputScheme.ActiveControlScheme = new MayaControlScheme();
     ResolveOnLoad = true;
 }
示例#19
0
        public PaletteService(
            ICommandService commandService,
            IControlHostService controlHostService)
            : base(commandService)
        {
            m_controlHostService = controlHostService;

            m_searchInput          = new StringSearchInputUI();
            m_searchInput.Updated += searchInput_Updated;

            m_control      = new UserControl();
            m_control.Dock = DockStyle.Fill;
            m_control.SuspendLayout();
            m_control.Name = "Palette".Localize();
            m_control.Text = "Palette".Localize();
            m_control.Controls.Add(m_searchInput);
            m_control.Controls.Add(TreeControl);
            m_control.Layout += controls_Layout;
            m_control.ResumeLayout();

            m_controlHostService.RegisterControl(
                m_control,
                new ControlInfo(
                    "Palette", //Is the ID in the layout. We'll localize DisplayName instead.
                    "Creates new instances".Localize(),
                    StandardControlGroup.Left, null,
                    "https://github.com/SonyWWS/ATF/search?utf8=%E2%9C%93&q=PaletteService+or+Palette".Localize())
            {
                DisplayName = "Palette".Localize()
            },
                this);
        }
 public TabbedControlSelector(
     Form mainForm,
     IControlHostService controlHostService)
 {
     m_mainForm           = mainForm;
     m_controlHostService = controlHostService;
 }
示例#21
0
 public DefaultTabCommands(
     ICommandService commandService,
     IControlHostService controlHostService,
     IControlRegistry controlRegistry)
 {
     CommandService     = commandService;
     ControlHostService = controlHostService;
     ControlRegistry    = controlRegistry;
 }
示例#22
0
 public DefaultTabCommands(
     ICommandService commandService,
     IControlHostService controlHostService,
     IControlRegistry controlRegistry)
 {
     m_commandService = commandService;
     m_controlHostService = controlHostService;
     m_controlRegistry = controlRegistry;
 }
示例#23
0
 public CircuitControlRegistry(
     IControlHostService controlHostService,
     IContextRegistry contextRegistry,
     IDocumentService documentService)
 {
     m_controlHostService            = controlHostService;
     m_contextRegistry               = contextRegistry;
     documentService.DocumentOpened += documentService_DocumentOpened;
     documentService.DocumentClosed += documentService_DocumentClosed;
 }
示例#24
0
 public PerformanceMonitor(IControlRegistry controlRegistry, IControlHostService controlHostService)
 {
     m_controlRegistry = controlRegistry;
     m_controlHostService = controlHostService;
     m_controlInfo = new ControlInfo(
         "Performance Monitor".Localize(),
         "Displays performance data on the currently active Control".Localize(),
         StandardControlGroup.Floating);
     m_controlInfo.VisibleByDefault = false;
 }
示例#25
0
 public DiagramControlRegistry(
     IControlHostService controlHostService,
     IContextRegistry contextRegistry,
     IDocumentService documentService)
 {
     _hostService = controlHostService;
     _contextRegistry = contextRegistry;
     documentService.DocumentOpened += documentService_DocumentOpened;
     documentService.DocumentClosed += documentService_DocumentClosed;
 }
示例#26
0
 public DiagramControlRegistry(
     IControlHostService controlHostService,
     IContextRegistry contextRegistry,
     IDocumentService documentService)
 {
     _hostService     = controlHostService;
     _contextRegistry = contextRegistry;
     documentService.DocumentOpened += documentService_DocumentOpened;
     documentService.DocumentClosed += documentService_DocumentClosed;
 }
示例#27
0
 public PerformanceMonitor(IControlRegistry controlRegistry, IControlHostService controlHostService)
 {
     m_controlRegistry    = controlRegistry;
     m_controlHostService = controlHostService;
     m_controlInfo        = new ControlInfo(
         "Performance Monitor".Localize(),
         "Displays performance data on the currently active Control".Localize(),
         StandardControlGroup.Floating);
     m_controlInfo.VisibleByDefault = false;
 }
示例#28
0
 public GameProjectLister(
     ICommandService commandService,
     IControlHostService controlHostService,
     IContextRegistry contextRegistry)
     : base(commandService)
 {
     m_controlHostService = controlHostService;
     m_contextRegistry = contextRegistry;
     m_contextRegistry.ActiveContextChanged += ContextRegistry_ActiveContextChanged;
 }
示例#29
0
 public GameProjectLister(
     ICommandService commandService,
     IControlHostService controlHostService,
     IContextRegistry contextRegistry)
     : base(commandService)
 {
     m_controlHostService = controlHostService;
     m_contextRegistry    = contextRegistry;
     m_contextRegistry.ActiveContextChanged += ContextRegistry_ActiveContextChanged;
 }
 public CircuitControlRegistry(
     IControlHostService controlHostService,
     IContextRegistry contextRegistry,
     IDocumentService documentService)
 {
     m_controlHostService = controlHostService;
     m_contextRegistry = contextRegistry;
     documentService.DocumentOpened += documentService_DocumentOpened;
     documentService.DocumentClosed += documentService_DocumentClosed;
 }
示例#31
0
        public ResourceListEditor(
            IControlHostService controlHostService,
            ICommandService commandService,
            IContextRegistry contextRegistry)
        {
            m_controlHostService = controlHostService;
            m_commandService     = commandService;
            m_contextRegistry    = contextRegistry;

            m_contextRegistry.ActiveContextChanged += contextRegistry_ActiveContextChanged;
        }
示例#32
0
        public CharacterEditor(
            IControlHostService controlHostService,
            ICommandService commandService,
            IContextRegistry contextRegistry)
        {
            m_controlHostService = controlHostService;
            m_commandService = commandService;
            m_contextRegistry = contextRegistry;

            m_contextRegistry.ActiveContextChanged += contextRegistry_ActiveContextChanged;
        }
示例#33
0
        public ResourceListEditor(
            IControlHostService controlHostService,
            ICommandService commandService,
            IContextRegistry contextRegistry)
        {
            m_controlHostService = controlHostService;
            m_commandService = commandService;
            m_contextRegistry = contextRegistry;

            m_contextRegistry.ActiveContextChanged += new EventHandler(contextRegistry_ActiveContextChanged);
        }
示例#34
0
 public Editor(
     IControlHostService controlHostService,
     IDocumentService documentService,
     IContextRegistry contextRegistry,
     IDocumentRegistry documentRegistry,
     DomTypes domTypes)
 {
     m_controlHostService = controlHostService;
     m_documentService    = documentService;
     m_contextRegistry    = contextRegistry;
     m_documentRegistry   = documentRegistry;
 }
示例#35
0
文件: Editor.cs 项目: sbambach/ATF
 public Editor(
     IControlHostService controlHostService,
     IDocumentService documentService,
     IContextRegistry contextRegistry,
     IDocumentRegistry documentRegistry,
     DomTypes domTypes)
 {
     m_controlHostService = controlHostService;
     m_documentService = documentService;
     m_contextRegistry = contextRegistry;
     m_documentRegistry = documentRegistry;
 }
示例#36
0
 /// <summary>
 /// Registers a control with the control host service</summary>
 /// <param name="controlHostService">Control host service</param>
 /// <param name="control">Control</param>
 /// <param name="name">Control name</param>
 /// <param name="description">Control description</param>
 /// <param name="group">Initial location of control on main form</param>
 /// <param name="id">Unique ID for control</param>
 /// <param name="client">Client that owns control, or null</param>
 /// <returns>IControlInfo for registered control</returns>
 public static IControlInfo RegisterControl(
     this IControlHostService controlHostService,
     object control,
     string name,
     string description,
     Sce.Atf.Applications.StandardControlGroup group,
     string id,
     IControlHostClient client)
 {
     var def = new ControlDef() { Name = name, Description = description, Group = group, Id = id };
     return controlHostService.RegisterControl(def, control, client);
 }
示例#37
0
        public EventListEditor(
            IControlHostService controlHostService,
            ICommandService commandService,
            IContextRegistry contextRegistry)
        {
            m_commandService = commandService;
            m_contextRegistry = contextRegistry;

            m_contextRegistry.ActiveContextChanged += contextRegistry_ActiveContextChanged;
            m_contextRegistry.ContextAdded += contextRegistry_ContextAdded;
            m_contextRegistry.ContextRemoved += contextRegistry_ContextRemoved;
        }
        public EventListEditor(
            IControlHostService controlHostService,
            ICommandService commandService,
            IContextRegistry contextRegistry)
        {
            m_commandService  = commandService;
            m_contextRegistry = contextRegistry;

            m_contextRegistry.ActiveContextChanged += contextRegistry_ActiveContextChanged;
            m_contextRegistry.ContextAdded         += contextRegistry_ContextAdded;
            m_contextRegistry.ContextRemoved       += contextRegistry_ContextRemoved;
        }
示例#39
0
        public DomNodePropertySearchService(
            IContextRegistry contextRegistry,
            IControlHostService controlHostService)
        {
            m_contextRegistry    = contextRegistry;
            m_controlHostService = controlHostService;

            // define root control
            m_rootControl      = new UserControl();
            m_rootControl.Name = "Search and Replace";
            m_rootControl.SuspendLayout();
            m_rootControl.Anchor = AnchorStyles.Top | AnchorStyles.Bottom | AnchorStyles.Left | AnchorStyles.Right;

            // Create and add the search input control
            var domNodeSearchToolStrip = new DomNodeSearchToolStrip();

            SearchUI = domNodeSearchToolStrip;
            SearchUI.Control.Dock = DockStyle.None;
            m_rootControl.Controls.Add(SearchUI.Control);
            SearchUI.UIChanged += UIElement_Changed;

            _clearButton = new Button()
            {
                Text = "Clear"
            };
            _clearButton.Click    += (object sender, EventArgs args) => { m_contextRegistry.GetActiveContext <IQueryableContext>().Query(null); };
            _clearButton.Dock      = DockStyle.None;
            _clearButton.AutoSize  = true;
            _clearButton.FlatStyle = FlatStyle.Flat;
            _clearButton.FlatAppearance.BorderSize = 0;
            m_rootControl.Controls.Add(_clearButton);

            // Create and add the replace input control
            var domNodeReplaceToolStrip = new DomNodeReplaceToolStrip();

            // hack --  we can't set this property, because it's marked as "internal" in the
            //          ATF library
            // domNodeReplaceToolStrip.DomNodeSearchToolStrip = domNodeSearchToolStrip;
            ReplaceUI = domNodeReplaceToolStrip;
            ReplaceUI.Control.Dock = DockStyle.None;
            m_rootControl.Controls.Add(ReplaceUI.Control);
            ReplaceUI.UIChanged += UIElement_Changed;


            // Create and add the results output control
            ResultsUI = new DomNodeSearchResultsListView(m_contextRegistry);
            ResultsUI.Control.Dock = DockStyle.None;
            m_rootControl.Controls.Add(ResultsUI.Control);
            ResultsUI.UIChanged += UIElement_Changed;

            m_rootControl.Layout += controls_Layout;
            m_rootControl.ResumeLayout();
        }
示例#40
0
        public GridPropertyEditor(
            ICommandService commandService,
            IControlHostService controlHostService,
            IContextRegistry contextRegistry)
        {
            m_commandService = commandService;
            m_controlHostService = controlHostService;
            m_contextRegistry = contextRegistry;

            Configure(out m_gridControl, out m_controlInfo);

            m_gridControl.MouseUp += gridControl_MouseUp;
        }
示例#41
0
        public ResourceLister(
            ICommandService commandService,
            IControlHostService controlHostService,
            ISettingsService settingsService,
            ThumbnailService thumbnailService)
        {
            m_commandService     = commandService;
            m_controlHostService = controlHostService;
            m_settingsService    = settingsService;

            m_thumbnailService = thumbnailService;
            m_thumbnailService.ThumbnailReady += ThumbnailManager_ThumbnailReady;
        }
示例#42
0
 public PerformanceMonitor(IControlRegistry controlRegistry, IControlHostService controlHostService)
 {
     m_controlRegistry = controlRegistry;
     m_controlHostService = controlHostService;
     m_controlInfo = new ControlInfo(
         "Performance Monitor", //Is the ID in the layout. We'll localize DisplayName instead.
         "Displays performance data on the currently active Control".Localize(),
         StandardControlGroup.Floating)
     {
         DisplayName = "Performance Monitor".Localize()
     };
     m_controlInfo.VisibleByDefault = false;
 }
示例#43
0
 public Editor(
     IControlHostService controlHostService,
     IDocumentService documentService,
     IContextRegistry contextRegistry,
     IDocumentRegistry documentRegistry,
     SchemaLoader schemaLoader)
 {
     m_controlHostService = controlHostService;
     m_documentService    = documentService;
     m_contextRegistry    = contextRegistry;
     m_documentRegistry   = documentRegistry;
     m_schemaLoader       = schemaLoader;
 }
示例#44
0
 public PerformanceMonitor(IControlRegistry controlRegistry, IControlHostService controlHostService)
 {
     m_controlRegistry    = controlRegistry;
     m_controlHostService = controlHostService;
     m_controlInfo        = new ControlInfo(
         "Performance Monitor", //Is the ID in the layout. We'll localize DisplayName instead.
         "Displays performance data on the currently active Control".Localize(),
         StandardControlGroup.Floating)
     {
         DisplayName = "Performance Monitor".Localize()
     };
     m_controlInfo.VisibleByDefault = false;
 }
示例#45
0
        public DomNodeNameSearchService(
            IContextRegistry contextRegistry,
            IControlHostService controlHostService)
        {
            m_contextRegistry = contextRegistry;
            m_controlHostService = controlHostService;

            m_rootControl = new DomNodeNameSearchControl();
            m_rootControl.Name = "DomNode Name Search and Replace";
            m_rootControl.SuspendLayout();
            m_rootControl.Anchor = AnchorStyles.Top | AnchorStyles.Bottom | AnchorStyles.Left | AnchorStyles.Right;
            m_rootControl.ResumeLayout();
        }
        public DomNodeNameSearchService(
            IContextRegistry contextRegistry,
            IControlHostService controlHostService)
        {
            m_contextRegistry    = contextRegistry;
            m_controlHostService = controlHostService;

            m_rootControl      = new DomNodeNameSearchControl();
            m_rootControl.Name = "DomNode Name Search and Replace";
            m_rootControl.SuspendLayout();
            m_rootControl.Anchor = AnchorStyles.Top | AnchorStyles.Bottom | AnchorStyles.Left | AnchorStyles.Right;
            m_rootControl.ResumeLayout();
        }
示例#47
0
文件: Editor.cs 项目: vincenthamm/ATF
 public Editor(
     IControlHostService controlHostService,
     IDocumentService documentService,
     IContextRegistry contextRegistry,
     IDocumentRegistry documentRegistry,
     SchemaLoader schemaLoader)
 {
     m_controlHostService = controlHostService;
     m_documentService = documentService;
     m_contextRegistry = contextRegistry;
     m_documentRegistry = documentRegistry;
     m_schemaLoader = schemaLoader;
 }
示例#48
0
        public EventListEditor(
            IControlHostService controlHostService,
            ICommandService commandService,
            IContextRegistry contextRegistry)
        {
            m_controlHostService = controlHostService;
            m_commandService     = commandService;
            m_contextRegistry    = contextRegistry;

            m_contextRegistry.ActiveContextChanged += new EventHandler(contextRegistry_ActiveContextChanged);
            m_contextRegistry.ContextAdded         += new EventHandler <ItemInsertedEventArgs <object> >(contextRegistry_ContextAdded);
            m_contextRegistry.ContextRemoved       += new EventHandler <ItemRemovedEventArgs <object> >(contextRegistry_ContextRemoved);
        }
示例#49
0
        public EventListEditor(
            IControlHostService controlHostService,
            ICommandService commandService,
            IContextRegistry contextRegistry)
        {
            m_controlHostService = controlHostService;
            m_commandService = commandService;
            m_contextRegistry = contextRegistry;

            m_contextRegistry.ActiveContextChanged += new EventHandler(contextRegistry_ActiveContextChanged);
            m_contextRegistry.ContextAdded += new EventHandler<ItemInsertedEventArgs<object>>(contextRegistry_ContextAdded);
            m_contextRegistry.ContextRemoved += new EventHandler<ItemRemovedEventArgs<object>>(contextRegistry_ContextRemoved);
        }
示例#50
0
        public GridPropertyEditor(
            ICommandService commandService,
            IControlHostService controlHostService,
            IContextRegistry contextRegistry)
        {
            m_commandService     = commandService;
            m_controlHostService = controlHostService;
            m_contextRegistry    = contextRegistry;

            Configure(out m_gridControl, out m_controlInfo);

            m_gridControl.MouseUp += gridControl_MouseUp;
        }
示例#51
0
        /// <summary>
        /// Registers a control with the control host service</summary>
        /// <param name="controlHostService">Control host service</param>
        /// <param name="control">Control</param>
        /// <param name="name">Control name</param>
        /// <param name="description">Control description</param>
        /// <param name="group">Initial location of control on main form</param>
        /// <param name="client">Client that owns control, or null</param>
        /// <returns>ControlInfo for registered control</returns>
        public static ControlInfo RegisterControl(
            this IControlHostService controlHostService,
            Control control,
            string name,
            string description,
            StandardControlGroup group,
            IControlHostClient client)
        {
            var info = new ControlInfo(name, description, group);

            controlHostService.RegisterControl(control, info, client);
            return(info);
        }
示例#52
0
        public PropertyEditor(
            ICommandService commandService,
            IControlHostService controlHostService,
            IContextRegistry contextRegistry)
        {
            CommandService     = commandService;
            ControlHostService = controlHostService;
            ContextRegistry    = contextRegistry;

            Configure(out m_propertyGrid, out m_controlInfo);

            m_propertyGrid.PropertyGridView.ContextRegistry = ContextRegistry;
            m_propertyGrid.MouseUp += propertyGrid_MouseUp;
        }
示例#53
0
        /// <summary>
        /// Constructor that a derived class can use to provide additional customizations</summary>
        public CurveEditor(ICommandService commandService,
            IControlHostService controlHostService,
            IContextRegistry contextRegistry,
            CurveEditingControl curveEditingControl,
            ControlInfo controlInfo)
        {
            // The commandService parameter is currently unused 
            // but kept for backwards compatibility & potential future use

            m_controlHostService = controlHostService;
            m_contextRegistry = contextRegistry;
            m_curveEditorControl = curveEditingControl;
            m_controlInfo = controlInfo;
        }
示例#54
0
        public PropertyEditor(
            ICommandService commandService,
            IControlHostService controlHostService,
            IContextRegistry contextRegistry)
        {
            CommandService = commandService;
            ControlHostService = controlHostService;
            ContextRegistry = contextRegistry;

            Configure(out m_propertyGrid, out m_controlInfo);

            m_propertyGrid.PropertyGridView.ContextRegistry = ContextRegistry;
            m_propertyGrid.MouseUp += propertyGrid_MouseUp;
        }
示例#55
0
        /// <summary>
        /// Constructor that a derived class can use to provide additional customizations</summary>
        /// <param name="commandService">ICommandService</param>
        /// <param name="controlHostService">IControlHostService</param>
        /// <param name="contextRegistry">IContextRegistry</param>
        /// <param name="curveEditingControl">CurveEditingControl to use</param>
        /// <param name="controlInfo">ControlInfo for CurveEditingControl</param>
        public CurveEditor(ICommandService commandService,
                           IControlHostService controlHostService,
                           IContextRegistry contextRegistry,
                           CurveEditingControl curveEditingControl,
                           ControlInfo controlInfo)
        {
            // The commandService parameter is currently unused
            // but kept for backwards compatibility & potential future use

            m_controlHostService = controlHostService;
            m_contextRegistry    = contextRegistry;
            m_curveEditorControl = curveEditingControl;
            m_controlInfo        = controlInfo;
        }
示例#56
0
        public ProjectLister(
            ICommandService commandService,
            IControlHostService controlHostService,
            IContextRegistry contextRegistry,
            IDocumentRegistry documentRegistry)
            : base(commandService)
        {
            m_controlHostService = controlHostService;
            m_contextRegistry = contextRegistry;
            m_documentRegistry = documentRegistry;

            // The tree control always displays the contents of the active document
            m_documentRegistry.ActiveDocumentChanged += documentRegistry_ActiveDocumentChanged;
        }
示例#57
0
        public KeyValueEditor(ICommandService commandService,
                              IControlHostService controlHostService,
                              IContextRegistry contextRegistry,
                              IDocumentRegistry documentRegstiry,
                              IDocumentService documentService)
        {
            this.commandService     = commandService;
            this.contextRegistry    = contextRegistry;
            this.controlHostService = controlHostService;
            this.documentRegstiry   = documentRegstiry;
            this.documentService    = documentService;

            documentInfo = new DocumentClientInfo("KVDocument", (string)null, null, null, true);
        }
示例#58
0
        public OutputService(IControlHostService controlHostService)
        {
            m_controlHostService = controlHostService;

            m_textBox = new RichTextBox();
            m_textBox.Multiline = true;
            m_textBox.ScrollBars = RichTextBoxScrollBars.Both;
            m_textBox.WordWrap = false;
            m_textBox.ReadOnly = true;
            m_textBox.MouseUp += textBox_MouseUp;
            m_textBox.FontChanged += textBox_FontChanged;
            m_textBox.ParentChanged += textBox_ParentChanged;

            // Force creation of the handle to be sure that the RichTextBox's handle is created on the GUI thread.
            var hwnd = m_textBox.Handle;
        }
示例#59
0
        public CurveEditor(ICommandService commandService,
            IControlHostService controlHostService,
            IContextRegistry contextRegistry)
        {
            // The commandService parameter is currently unused 
            // but kept for backwards compatibility & potential future use

            m_controlHostService = controlHostService;
            m_contextRegistry = contextRegistry;
            
            m_curveEditorControl = new CurveEditingControl();
            m_controlInfo = new ControlInfo(
                "Curve Editor".Localize(),
                "Edits selected object curves".Localize(),
                StandardControlGroup.Bottom);
        }
示例#60
0
        public ProjectTreeLister(
            ICommandService commandService,
            IControlHostService controlHostService,
            IContextRegistry contextRegistry,
            ISettingsService settings,
            TextEditing.TextEditor textEditor
          )
            : base(commandService)
        {
            this.commandService = commandService;
            m_controlHostService = controlHostService;
            m_contextRegistry = contextRegistry;
            this.settings = settings;
            this.textEditor = textEditor;

            this.TreeControl.ImageList = ResourceUtil.GetImageList16();
        }