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; } }
protected override void ApplyTheme() { base.ApplyTheme(); this.applyBtn.Image = ResourcesProcessor.GetImage("dialog.ok"); this.cancelBtn.Image = ResourcesProcessor.GetImage("dialog.cancel"); }
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"); }