Made MatterControl run as a .net standard app
Moving matter control to a lib and creating a new exe to run it
This commit is contained in:
parent
8b4790e493
commit
bed90234e7
485 changed files with 283 additions and 571 deletions
|
|
@ -0,0 +1,46 @@
|
|||
// Copyright (c) 2016-2017 Nicolas Musset. All rights reserved.
|
||||
// This file is licensed under the MIT license.
|
||||
// See the LICENSE.md file in the project root for more information.
|
||||
|
||||
using Markdig.Syntax;
|
||||
using MatterHackers.Agg;
|
||||
using MatterHackers.Agg.UI;
|
||||
using MatterHackers.MatterControl;
|
||||
|
||||
namespace Markdig.Renderers.Agg
|
||||
{
|
||||
public class CodeBlockX : FlowLeftRightWithWrapping
|
||||
{
|
||||
private ThemeConfig theme;
|
||||
|
||||
public CodeBlockX(ThemeConfig theme)
|
||||
{
|
||||
this.theme = theme;
|
||||
this.HAnchor = HAnchor.Stretch;
|
||||
this.VAnchor = VAnchor.Fit;
|
||||
this.Margin = 12;
|
||||
this.Padding = 6;
|
||||
this.BackgroundColor = theme.MinimalShade;
|
||||
}
|
||||
}
|
||||
|
||||
public class AggCodeBlockRenderer : AggObjectRenderer<CodeBlock>
|
||||
{
|
||||
private ThemeConfig theme;
|
||||
|
||||
public AggCodeBlockRenderer(ThemeConfig theme)
|
||||
{
|
||||
this.theme = theme;
|
||||
}
|
||||
|
||||
protected override void Write(AggRenderer renderer, CodeBlock obj)
|
||||
{
|
||||
//var paragraph = new Paragraph();
|
||||
//paragraph.SetResourceReference(FrameworkContentElement.StyleProperty, Styles.CodeBlockStyleKey);
|
||||
|
||||
renderer.Push(new CodeBlockX(theme));
|
||||
renderer.WriteLeafRawLines(obj);
|
||||
renderer.Pop();
|
||||
}
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue