diff --git a/MatterControl.Printing/NamedAction.cs b/MatterControl.Printing/NamedAction.cs index 3188d503e..abb828ca8 100644 --- a/MatterControl.Printing/NamedAction.cs +++ b/MatterControl.Printing/NamedAction.cs @@ -37,10 +37,15 @@ namespace MatterHackers.MatterControl public class NamedAction { public string Title { get; set; } + public string Shortcut { get; set; } + public Action Action { get; set; } + public ImageBuffer Icon { get; set; } + public Func IsEnabled { get; set; } + public string ID { get; set; } } @@ -51,13 +56,16 @@ namespace MatterHackers.MatterControl public class NamedBoolAction : NamedAction { public Func GetIsActive { get; set; } + public Action SetIsActive { get; set; } } public abstract class LocalizedAction { public Func TitleResolver { get; set; } + public string Title => this.TitleResolver?.Invoke(); + public ImageBuffer Icon { get; set; } } diff --git a/MatterControlLib/Library/Providers/GraphConfig.cs b/MatterControlLib/Library/Providers/GraphConfig.cs index a227b4eb1..5d94754d2 100644 --- a/MatterControlLib/Library/Providers/GraphConfig.cs +++ b/MatterControlLib/Library/Providers/GraphConfig.cs @@ -1,5 +1,5 @@ /* -Copyright (c) 2017, John Lewin +Copyright (c) 2019, John Lewin All rights reserved. Redistribution and use in source and binary forms, with or without @@ -44,11 +44,17 @@ namespace MatterHackers.MatterControl.Library public string OperationID { get; set; } public string Title { get; set; } + public IEnumerable MappedTypes { get; set; } + public Func Operation { get; set; } + public Func IsEnabled { get; set; } + public Func IsVisible { get; set; } + public Func IconCollector { get; set; } + public Type ResultType { get; set; } }