public ToolItem(ToolListConfiguration model) { this.Icon = ShellIcon.GetIconFor(string.IsNullOrEmpty(model.Icon) ? model.Path : model.Icon); this.Model = model; this.Header = model.Name; this.Description = model.Path == null ? null : model.Path; this.IsUac = model.AsAdmin; }
private void SetTools() { if (this.tools != null) { return; } this.tools = new List <MenuItem>(); var configuredTools = this.configService.GetCurrentConfiguration().Packages.Tools; foreach (var item in configuredTools) { this.tools.Add(new MenuItem { Command = MsixHeroRoutedUICommands.RunTool, Icon = new Image { Source = ShellIcon.GetIconFor(string.IsNullOrEmpty(item.Icon) ? item.Path : item.Icon) }, Header = item.Name, CommandParameter = item }); } }