Exemple #1
0
        private void AddRequest(AssetItem item, AssetProxy proxy)
        {
            var request = new ThumbnailRequest(item, proxy);

            _requests.Add(request);
            item.AddReference(this);
        }
            /// <summary>
            /// Initializes a new instance of the <see cref="AssetItemView"/> class.
            /// </summary>
            /// <param name="asset">The asset.</param>
            public AssetItemView(AssetItem asset)
            {
                _asset = asset;
                _asset.AddReference(this);

                Name        = asset.ShortName;
                TooltipText = asset.Path;

                Height = IconSize + 4;
            }
        /// <summary>
        /// Initializes a new instance of the <see cref="AssetEditorWindow"/> class.
        /// </summary>
        /// <param name="editor">The editor.</param>
        /// <param name="item">The item.</param>
        protected AssetEditorWindow(Editor editor, AssetItem item)
            : base(editor, false, ScrollBars.None)
        {
            _item = item ?? throw new ArgumentNullException(nameof(item));
            _item.AddReference(this);

            _toolstrip = new ToolStrip();
            _toolstrip.AddButton(editor.Icons.Find32, () => Editor.Windows.ContentWin.Select(_item)).LinkTooltip("Show and select in Content Window");
            _toolstrip.Parent = this;

            UpdateTitle();
        }
Exemple #4
0
        /// <summary>
        /// Initializes a new instance of the <see cref="AssetEditorWindow"/> class.
        /// </summary>
        /// <param name="editor">The editor.</param>
        /// <param name="item">The item.</param>
        protected AssetEditorWindow(Editor editor, AssetItem item)
            : base(editor, false, ScrollBars.None)
        {
            _item = item ?? throw new ArgumentNullException(nameof(item));
            _item.AddReference(this);

            _toolstrip = new ToolStrip();
            _toolstrip.ButtonClicked += OnToolstripButtonClicked;
            _toolstrip.AddButton(1000, editor.UI.GetIcon("Find32")).LinkTooltip("Show and select in Content Window");
            _toolstrip.Parent = this;

            UpdateTitle();
        }
Exemple #5
0
 /// <inheritdoc />
 public AssetSearchItem(string name, string type, AssetItem item, ContentFinder finder, float width, float height)
     : base(name, type, item, finder, width, height)
 {
     _asset = item;
     _asset.AddReference(this);
 }