Making static data compile time and universal
This commit is contained in:
parent
0fd5b7a0f9
commit
506f2b273f
141 changed files with 13671 additions and 355 deletions
|
|
@ -322,7 +322,7 @@ namespace MatterHackers.MatterControl
|
|||
|
||||
static CalibrationPad()
|
||||
{
|
||||
activeIcon = AggContext.StaticData.LoadIcon("fa-check_16.png", 16, 16, true);
|
||||
activeIcon = StaticData.Instance.LoadIcon("fa-check_16.png", 16, 16, true);
|
||||
inactiveIcon = new ImageBuffer(16, 16);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -146,7 +146,7 @@ namespace MatterHackers.MatterControl.CustomWidgets
|
|||
{
|
||||
string imageFile = this.ControlIsPinned ? "Pushpin_16x.png" : "PushpinUnpin_16x.png";
|
||||
|
||||
var pinTabButton = new IconButton(AggContext.StaticData.LoadIcon(imageFile, 16, 16, theme.InvertIcons), theme)
|
||||
var pinTabButton = new IconButton(StaticData.Instance.LoadIcon(imageFile, 16, 16, theme.InvertIcons), theme)
|
||||
{
|
||||
Name = "Pin Settings Button"
|
||||
};
|
||||
|
|
|
|||
|
|
@ -60,7 +60,7 @@ namespace MatterHackers.MatterControl.CustomWidgets
|
|||
this.ActionArea.VAnchor = VAnchor.Stretch;
|
||||
this.ActionArea.MinimumSize = new Vector2(0, titleText.Height);
|
||||
|
||||
var editButton = new IconButton(AggContext.StaticData.LoadIcon("icon_edit.png", 16, 16, theme.InvertIcons), theme)
|
||||
var editButton = new IconButton(StaticData.Instance.LoadIcon("icon_edit.png", 16, 16, theme.InvertIcons), theme)
|
||||
{
|
||||
ToolTipText = editToolTipText ?? "Edit".Localize(),
|
||||
Name = helpArticle.Name + " Edit"
|
||||
|
|
|
|||
|
|
@ -41,7 +41,7 @@ namespace MatterHackers.MatterControl.CustomWidgets
|
|||
public InlineListItemEdit(string title, ThemeConfig theme, string automationName, bool boldFont = false)
|
||||
: base(title, theme, automationName, boldFont)
|
||||
{
|
||||
var removeButton = new IconButton(AggContext.StaticData.LoadIcon("remove.png", 16, 16, theme.InvertIcons), theme)
|
||||
var removeButton = new IconButton(StaticData.Instance.LoadIcon("remove.png", 16, 16, theme.InvertIcons), theme)
|
||||
{
|
||||
ToolTipText = "Delete".Localize(),
|
||||
Visible = true,
|
||||
|
|
|
|||
|
|
@ -73,7 +73,7 @@ namespace MatterHackers.MatterControl.CustomWidgets
|
|||
this.ActionArea.VAnchor = VAnchor.Stretch;
|
||||
this.ActionArea.MinimumSize = new Vector2(0, titleText.Height);
|
||||
|
||||
saveButton = new IconButton(AggContext.StaticData.LoadIcon("fa-save_16.png", 16, 16, theme.InvertIcons), theme)
|
||||
saveButton = new IconButton(StaticData.Instance.LoadIcon("fa-save_16.png", 16, 16, theme.InvertIcons), theme)
|
||||
{
|
||||
ToolTipText = "Save".Localize(),
|
||||
Visible = false,
|
||||
|
|
@ -104,7 +104,7 @@ namespace MatterHackers.MatterControl.CustomWidgets
|
|||
|
||||
rightPanel = new FlowLayoutWidget();
|
||||
|
||||
var icon = editable ? AggContext.StaticData.LoadIcon("icon_edit.png", 16, 16, theme.InvertIcons) : new ImageBuffer(16, 16);
|
||||
var icon = editable ? StaticData.Instance.LoadIcon("icon_edit.png", 16, 16, theme.InvertIcons) : new ImageBuffer(16, 16);
|
||||
|
||||
editButton = new IconButton(icon, theme)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -59,7 +59,7 @@ namespace MatterHackers.MatterControl.CustomWidgets
|
|||
{
|
||||
this.CloseAllChildren();
|
||||
|
||||
var upbutton = new IconButton(AggContext.StaticData.LoadIcon(Path.Combine("Library", "upfolder_20.png"), 20, 20, theme.InvertIcons), theme)
|
||||
var upbutton = new IconButton(StaticData.Instance.LoadIcon(Path.Combine("Library", "upfolder_20.png"), 20, 20, theme.InvertIcons), theme)
|
||||
{
|
||||
VAnchor = VAnchor.Fit | VAnchor.Center,
|
||||
Enabled = currentContainer.Parent != null,
|
||||
|
|
|
|||
|
|
@ -505,8 +505,8 @@ namespace MatterHackers.MatterControl.CustomWidgets
|
|||
|
||||
public TreeExpandWidget(ThemeConfig theme)
|
||||
{
|
||||
arrowRight = AggContext.StaticData.LoadIcon("fa-angle-right_12.png", 12, 12, theme.InvertIcons);
|
||||
arrowDown = AggContext.StaticData.LoadIcon("fa-angle-down_12.png", 12, 12, theme.InvertIcons);
|
||||
arrowRight = StaticData.Instance.LoadIcon("fa-angle-right_12.png", 12, 12, theme.InvertIcons);
|
||||
arrowDown = StaticData.Instance.LoadIcon("fa-angle-down_12.png", 12, 12, theme.InvertIcons);
|
||||
placeholder = new ImageBuffer(16, 16);
|
||||
|
||||
this.Margin = new BorderDouble(right: 4);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue