コード例 #1
0
        public void UpdateState()
        {
            if (this._internalMenuStripItem == null)
            {
                return;
            }

            // Update item enability
            this._internalMenuStripItem.Enabled = this.IsEnabled;

            // Update item visibility
            this._internalMenuStripItem.Visible = this.IsVisible;

            // Update display text
            this._internalMenuStripItem.Text = this.DisplayText;

            // Update image
            if (this.ImageKey == null)
            {
                return;
            }

            var icon = ResourcesProcessor.GetImage($"menu.{this.ImageKey}");

            if (icon == null)
            {
                return;
            }

            if (this._internalMenuStripItem.Image != icon)
            {
                this._internalMenuStripItem.Image = icon;
            }
        }
コード例 #2
0
        protected override void ApplyTheme()
        {
            base.ApplyTheme();

            this.applyBtn.Image  = ResourcesProcessor.GetImage("dialog.ok");
            this.cancelBtn.Image = ResourcesProcessor.GetImage("dialog.cancel");
        }
コード例 #3
0
ファイル: WtItemEditor.cs プロジェクト: segrived/WTManager
        protected override void ApplyTheme()
        {
            this.AddItemButton.Image    = ResourcesProcessor.GetImage("dialog.add");
            this.EditItemButton.Image   = ResourcesProcessor.GetImage("dialog.edit");
            this.RemoveItemButton.Image = ResourcesProcessor.GetImage("dialog.remove");

            this.UpItemButton.Image   = ResourcesProcessor.GetImage("dialog.up");
            this.DownItemButton.Image = ResourcesProcessor.GetImage("dialog.down");
        }