fixing android

This commit is contained in:
Lars Brubaker 2018-11-02 18:09:55 -07:00
parent 915625fa25
commit 0fb4196edd
2 changed files with 12 additions and 4 deletions

View file

@ -30,7 +30,9 @@ either expressed or implied, of the FreeBSD Project.
using System;
using System.Collections.Generic;
using System.Diagnostics;
#if !__ANDROID__
using Markdig.Agg;
#endif
using MatterHackers.Agg;
using MatterHackers.Agg.UI;
using MatterHackers.Localizations;
@ -99,10 +101,12 @@ namespace MatterHackers.MatterControl.ConfigurationPage.PrintLeveling
// start heating up the extruder
printer.Connection.SetTargetHotendTemperature(0, printer.Settings.GetValue<double>(SettingsKey.temperature));
#if !__ANDROID__
var markdownText = printer.Settings.GetValue(SettingsKey.trim_filament_markdown);
var markdownWidget = new MarkdownWidget(theme);
markdownWidget.Markdown = markdownText = markdownText.Replace("\\n", "\n");
trimFilamentPage.ContentRow.AddChild(markdownWidget);
#endif
}
};
yield return trimFilamentPage;
@ -119,10 +123,12 @@ namespace MatterHackers.MatterControl.ConfigurationPage.PrintLeveling
{
BecomingActive = () =>
{
#if !__ANDROID__
var markdownText = printer.Settings.GetValue(SettingsKey.insert_filament_markdown);
var markdownWidget = new MarkdownWidget(theme);
markdownWidget.Markdown = markdownText = markdownText.Replace("\\n", "\n");
insertFilamentPage.ContentRow.AddChild(markdownWidget);
#endif
// turn off the fan
printer.Connection.FanSpeed0To255 = 0;
@ -277,10 +283,12 @@ namespace MatterHackers.MatterControl.ConfigurationPage.PrintLeveling
BecomingActive = () =>
{
runningCleanPage.ShowWizardFinished();
#if !__ANDROID__
var markdownText = printer.Settings.GetValue(SettingsKey.running_clean_markdown);
var markdownWidget = new MarkdownWidget(theme);
markdownWidget.Markdown = markdownText = markdownText.Replace("\\n", "\n");
runningCleanPage.ContentRow.AddChild(markdownWidget);
#endif
var runningTime = Stopwatch.StartNew();
runningGCodeCommands = UiThread.SetInterval(() =>

View file

@ -135,9 +135,9 @@ namespace MatterHackers.MatterControl
usbStatus.HasUsbPermission = usbStatus.IsDriverLoadable && FrostedSerialPort.HasPermissionToDevice(serialPort);
contentRow.AddChild(printerNameLabel);
ContentRow.AddChild(printerNameLabel);
contentRow.AddChild(new CriteriaRow(
ContentRow.AddChild(new CriteriaRow(
"USB Connection",
"Retry",
"No USB device found. Check and reseat cables and try again",
@ -145,7 +145,7 @@ namespace MatterHackers.MatterControl
() => UiThread.RunOnIdle(RefreshStatus),
theme));
contentRow.AddChild(new CriteriaRow(
ContentRow.AddChild(new CriteriaRow(
"USB Driver",
"Fix",
usbStatus.Summary,
@ -160,7 +160,7 @@ namespace MatterHackers.MatterControl
},
theme));
contentRow.AddChild(new CriteriaRow(
ContentRow.AddChild(new CriteriaRow(
"USB Permission",
"Request Permission",
"Click the 'Request Permission' button to gain Android access rights",