Example #1
0
        /// <summary>
        /// Configures the editor</summary>
        /// <param name="treeControl">Control to display data</param>
        /// <param name="treeControlAdapter">Adapter to drive control. Its ITreeView should
        /// implement IInstancingContext and/or IHierarchicalInsertionContext.</param>
        /// <remarks>Default is to create a TreeControl and TreeControlAdapter,
        /// using the global image lists.</remarks>
        protected override void Configure(
            out TreeControl treeControl,
            out TreeControlAdapter treeControlAdapter)
        {
            treeControl = new TreeControl();
            treeControl.ImageList = ResourceUtil.GetImageList16();
            treeControl.StateImageList = ResourceUtil.GetImageList16();

            treeControlAdapter = new TreeControlAdapter(treeControl);

            treeControl.PreviewKeyDown += treeControl_PreviewKeyDown;
            treeControl.NodeExpandedChanging += treeControl_NodeExpandedChanging;
            treeControl.NodeExpandedChanged += treeControl_NodeExpandedChanged;

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

            m_control = new UserControl();
            m_control.Dock = DockStyle.Fill;
            m_control.SuspendLayout();
            m_control.Name = "Tree View".Localize();
            m_control.Text = "Tree View".Localize();
            m_control.Controls.Add(m_searchInput);
            m_control.Controls.Add(TreeControl);
            m_control.Layout += controls_Layout;
            m_control.ResumeLayout();
        }
Example #2
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);
        }
Example #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", //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);
        }
Example #4
0
        /// <summary>
        /// Configures the editor</summary>
        /// <param name="treeControl">Control to display data</param>
        /// <param name="treeControlAdapter">Adapter to drive control. Its ITreeView should
        /// implement IInstancingContext and/or IHierarchicalInsertionContext.</param>
        /// <remarks>Default is to create a TreeControl and TreeControlAdapter,
        /// using the global image lists.</remarks>
        protected override void Configure(
            out TreeControl treeControl,
            out TreeControlAdapter treeControlAdapter)
        {
            treeControl                = new TreeControl();
            treeControl.ImageList      = ResourceUtil.GetImageList16();
            treeControl.StateImageList = ResourceUtil.GetImageList16();

            treeControlAdapter = new TreeControlAdapter(treeControl);

            treeControl.PreviewKeyDown       += treeControl_PreviewKeyDown;
            treeControl.NodeExpandedChanging += treeControl_NodeExpandedChanging;
            treeControl.NodeExpandedChanged  += treeControl_NodeExpandedChanged;


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

            m_control      = new UserControl();
            m_control.Dock = DockStyle.Fill;
            m_control.SuspendLayout();
            m_control.Name = "Tree View".Localize();
            m_control.Text = "Tree View".Localize();
            m_control.Controls.Add(m_searchInput);
            m_control.Controls.Add(TreeControl);
            m_control.Layout += controls_Layout;
            m_control.ResumeLayout();
        }
Example #5
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);
        }
Example #6
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);
        }
Example #7
0
            public PaletteTreeAdapter(PaletteService paletteService, StringSearchInputUI searchInput)
            {
                m_paletteService = paletteService;
                m_searchInput    = searchInput;

                if (ItemChanged == null)
                {
                    return;                      // inhibit compiler warning
                }
                if (Reloaded == null)
                {
                    return;
                }
            }
Example #8
0
            public PaletteTreeAdapter(PaletteService paletteService, StringSearchInputUI searchInput,
                                      IComparer <string> categoryComparer)
            {
                m_paletteService = paletteService;
                m_searchInput    = searchInput;
                m_categories     = new SortedDictionary <string, List <object> >(categoryComparer);

                if (ItemChanged == null)
                {
                    return;                      // inhibit compiler warning
                }
                if (Reloaded == null)
                {
                    return;
                }
            }
        /// <summary>
        /// Create and configure TreeControl</summary>
        /// <param name="treeControl">New TreeControl</param>
        /// <param name="treeControlAdapter">Adapter for TreeControl</param>
        protected override void Configure(out TreeControl treeControl, out TreeControlAdapter treeControlAdapter)
        {
            base.Configure(out treeControl, out treeControlAdapter);

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

            TreeControl.PreviewKeyDown       += TreeControl_PreviewKeyDown;
            TreeControl.NodeExpandedChanging += TreeControl_NodeExpandedChanging;
            TreeControl.NodeExpandedChanged  += TreeControl_NodeExpandedChanged;
            TreeControl.ItemRendererChanged  += (sender, e) => UpdateTreeItemRenderer();
        }
Example #10
0
        /// <summary>
        /// Create and configure TreeControl</summary>
        /// <param name="treeControl">New TreeControl</param>
        /// <param name="treeControlAdapter">Adapter for TreeControl</param>
        protected override void Configure(out TreeControl treeControl, out TreeControlAdapter treeControlAdapter)
        {
            base.Configure(out treeControl, out treeControlAdapter);

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

            TreeControl.PreviewKeyDown += TreeControl_PreviewKeyDown;
            TreeControl.NodeExpandedChanging += TreeControl_NodeExpandedChanging;
            TreeControl.NodeExpandedChanged += TreeControl_NodeExpandedChanged;
            TreeControl.ItemRendererChanged += (sender, e) => UpdateTreeItemRenderer();
        }
Example #11
0
            public PaletteTreeAdapter(PaletteService paletteService, StringSearchInputUI searchInput,
                IComparer<string> categoryComparer)
            {
                m_paletteService = paletteService;
                m_searchInput = searchInput;
                m_categories = new SortedDictionary<string, List<object>>(categoryComparer);

                if (ItemChanged == null) return; // inhibit compiler warning
                if (Reloaded == null) return;
            }
Example #12
0
            public PaletteTreeAdapter(PaletteService paletteService, StringSearchInputUI searchInput)
            {
                m_paletteService = paletteService;
                m_searchInput = searchInput;

                if (ItemChanged == null) return; // inhibit compiler warning
                if (Reloaded == null) return;
            }