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"); }
// This method gets called by the runtime. Use this method to add services to the container. public void ConfigureServices(IServiceCollection services) { services.AddControllersWithViews(); var resources = ResourcesProcessor.Get(System.Environment.CurrentDirectory + "\\Resources"); services.AddSingleton(resources); }
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"); }
protected override IEnumerable <ComboBoxItem> GetItems() { yield return(new ComboBoxItem("<Default>", null)); foreach (string themeName in ResourcesProcessor.GetThemesList()) { yield return(new ComboBoxItem(themeName)); } }
private void UpdateTrayIcon() { this._notifyIcon.Icon = ResourcesProcessor.GetIcon("tray"); }