More Localization
Localization 2/10
This commit is contained in:
parent
ccc0eb898d
commit
69dc56d2fd
14 changed files with 164 additions and 92 deletions
|
|
@ -116,14 +116,16 @@ namespace MatterHackers.MatterControl.ActionBar
|
||||||
topRow.Name = "PrintStatusRow.ActivePrinterInfo.TopRow";
|
topRow.Name = "PrintStatusRow.ActivePrinterInfo.TopRow";
|
||||||
topRow.HAnchor = HAnchor.ParentLeftRight;
|
topRow.HAnchor = HAnchor.ParentLeftRight;
|
||||||
|
|
||||||
activePrintLabel = getPrintStatusLabel(new LocalizedString("Next Print:").Translated, pointSize: 11);
|
string nextPrintLbl = new LocalizedString("Next Print").Translated;
|
||||||
|
string nextPrintLblFull = string.Format("{0}:", nextPrintLbl);
|
||||||
|
activePrintLabel = getPrintStatusLabel(nextPrintLblFull, pointSize: 11);
|
||||||
activePrintLabel.VAnchor = VAnchor.ParentTop;
|
activePrintLabel.VAnchor = VAnchor.ParentTop;
|
||||||
|
|
||||||
topRow.AddChild(activePrintLabel);
|
topRow.AddChild(activePrintLabel);
|
||||||
|
|
||||||
activePrintName = getPrintStatusLabel("this is the biggest name we will allow", pointSize: 14);
|
activePrintName = getPrintStatusLabel(new LocalizedString("this is the biggest name we will allow").Translated, pointSize: 14);
|
||||||
activePrintName.AutoExpandBoundsToText = false;
|
activePrintName.AutoExpandBoundsToText = false;
|
||||||
activePrintStatus = getPrintStatusLabel("this is the biggest label we will allow - bigger", pointSize: 11);
|
activePrintStatus = getPrintStatusLabel(new LocalizedString("this is the biggest label we will allow - bigger").Translated, pointSize: 11);
|
||||||
activePrintStatus.AutoExpandBoundsToText = false;
|
activePrintStatus.AutoExpandBoundsToText = false;
|
||||||
activePrintStatus.Text = "";
|
activePrintStatus.Text = "";
|
||||||
activePrintStatus.Margin = new BorderDouble(top: 3);
|
activePrintStatus.Margin = new BorderDouble(top: 3);
|
||||||
|
|
@ -204,16 +206,20 @@ namespace MatterHackers.MatterControl.ActionBar
|
||||||
string timePrintedText;
|
string timePrintedText;
|
||||||
if (hoursPrinted > 0)
|
if (hoursPrinted > 0)
|
||||||
{
|
{
|
||||||
timePrintedText = string.Format("Print Time: {0}:{1:00}:{2:00}",
|
string printTimeLbl = new LocalizedString ("Print Time").Translated;
|
||||||
|
timePrintedText = string.Format("{3}: {0}:{1:00}:{2:00}",
|
||||||
hoursPrinted,
|
hoursPrinted,
|
||||||
minutesPrinted,
|
minutesPrinted,
|
||||||
secondsPrinted);
|
secondsPrinted,
|
||||||
|
printTimeLbl);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
timePrintedText = string.Format("Print Time: {0:00}:{1:00}",
|
string printTimeLbl = new LocalizedString ("Print Time").Translated;
|
||||||
|
timePrintedText = string.Format("{2}: {0:00}:{1:00}",
|
||||||
minutesPrinted,
|
minutesPrinted,
|
||||||
secondsPrinted);
|
secondsPrinted,
|
||||||
|
printTimeLbl);
|
||||||
}
|
}
|
||||||
|
|
||||||
int secondsRemaining = PrinterCommunication.Instance.SecondsRemaining;
|
int secondsRemaining = PrinterCommunication.Instance.SecondsRemaining;
|
||||||
|
|
@ -225,16 +231,20 @@ namespace MatterHackers.MatterControl.ActionBar
|
||||||
{
|
{
|
||||||
if (hoursRemaining > 0)
|
if (hoursRemaining > 0)
|
||||||
{
|
{
|
||||||
timeRemainingText = string.Format("Remaining (est): {0}:{1:00}:{2:00}",
|
string timeRemainingLbl = new LocalizedString ("Remaining").Translated;
|
||||||
|
timeRemainingText = string.Format("{3} (est): {0}:{1:00}:{2:00}",
|
||||||
hoursRemaining,
|
hoursRemaining,
|
||||||
minutesRemaining,
|
minutesRemaining,
|
||||||
secondsRemaining);
|
secondsRemaining,
|
||||||
|
timeRemainingLbl);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
timeRemainingText = string.Format("Remaining (est): {0:00}:{1:00}",
|
string timeRemainingLbl = new LocalizedString ("Remaining").Translated;
|
||||||
|
timeRemainingText = string.Format("{2} (est): {0:00}:{1:00}",
|
||||||
minutesRemaining,
|
minutesRemaining,
|
||||||
secondsRemaining);
|
secondsRemaining,
|
||||||
|
timeRemainingLbl);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (PrinterCommunication.Instance.PrintIsFinished)
|
else if (PrinterCommunication.Instance.PrintIsFinished)
|
||||||
|
|
@ -243,7 +253,9 @@ namespace MatterHackers.MatterControl.ActionBar
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
timeRemainingText = string.Format("Remaining (est): --:--",
|
string timeRemainingLbl = new LocalizedString ("Remaining").Translated;
|
||||||
|
timeRemainingText = string.Format("{0} (est): --:--",
|
||||||
|
timeRemainingLbl,
|
||||||
secondsPrinted / 60,
|
secondsPrinted / 60,
|
||||||
secondsPrinted % 60);
|
secondsPrinted % 60);
|
||||||
}
|
}
|
||||||
|
|
@ -256,12 +268,15 @@ namespace MatterHackers.MatterControl.ActionBar
|
||||||
//GC.WaitForFullGCComplete();
|
//GC.WaitForFullGCComplete();
|
||||||
|
|
||||||
string printPercentRemainingText;
|
string printPercentRemainingText;
|
||||||
printPercentRemainingText = string.Format("{0:0.0}% complete", PrinterCommunication.Instance.PercentComplete);
|
string printPercentCompleteTxt = new LocalizedString("complete").Translated;
|
||||||
|
printPercentRemainingText = string.Format("{0:0.0}% {1}", PrinterCommunication.Instance.PercentComplete,printPercentCompleteTxt);
|
||||||
|
|
||||||
switch (PrinterCommunication.Instance.CommunicationState)
|
switch (PrinterCommunication.Instance.CommunicationState)
|
||||||
{
|
{
|
||||||
case PrinterCommunication.CommunicationStates.PreparingToPrint:
|
case PrinterCommunication.CommunicationStates.PreparingToPrint:
|
||||||
activePrintLabel.Text = "Preparing To Print:";
|
string preparingPrintLbl = new LocalizedString("Preparing To Print").Translated;
|
||||||
|
string preparingPrintLblFull = string.Format("{0}:", preparingPrintLbl);
|
||||||
|
activePrintLabel.Text = preparingPrintLblFull;
|
||||||
//ActivePrintStatusText = ""; // set by slicer
|
//ActivePrintStatusText = ""; // set by slicer
|
||||||
activePrintInfo.Text = "";
|
activePrintInfo.Text = "";
|
||||||
break;
|
break;
|
||||||
|
|
@ -276,14 +291,18 @@ namespace MatterHackers.MatterControl.ActionBar
|
||||||
|
|
||||||
case PrinterCommunication.CommunicationStates.Paused:
|
case PrinterCommunication.CommunicationStates.Paused:
|
||||||
{
|
{
|
||||||
activePrintLabel.Text = "Printing Paused:";
|
string activePrintLblTxt = new LocalizedString ("Printing Paused").Translated;
|
||||||
|
string activePrintLblTxtFull = string.Format("{0}:", activePrintLblTxt);
|
||||||
|
activePrintLabel.Text = activePrintLblTxtFull;
|
||||||
ActivePrintStatusText = printPercentRemainingText;
|
ActivePrintStatusText = printPercentRemainingText;
|
||||||
activePrintInfo.Text = printTimeInfoText;
|
activePrintInfo.Text = printTimeInfoText;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case PrinterCommunication.CommunicationStates.FinishedPrint:
|
case PrinterCommunication.CommunicationStates.FinishedPrint:
|
||||||
activePrintLabel.Text = "Done Printing:";
|
string donePrintingTxt = new LocalizedString ("Done Printing").Translated;
|
||||||
|
string donePrintingTxtFull = string.Format ("{0}:", donePrintingTxt);
|
||||||
|
activePrintLabel.Text = donePrintingTxtFull;
|
||||||
ActivePrintStatusText = printPercentRemainingText;
|
ActivePrintStatusText = printPercentRemainingText;
|
||||||
activePrintInfo.Text = printTimeInfoText;
|
activePrintInfo.Text = printTimeInfoText;
|
||||||
break;
|
break;
|
||||||
|
|
|
||||||
|
|
@ -5,6 +5,7 @@ using System.Text;
|
||||||
|
|
||||||
using MatterHackers.Agg;
|
using MatterHackers.Agg;
|
||||||
using MatterHackers.Agg.UI;
|
using MatterHackers.Agg.UI;
|
||||||
|
using MatterHackers.Localizations;
|
||||||
|
|
||||||
namespace MatterHackers.MatterControl
|
namespace MatterHackers.MatterControl
|
||||||
{
|
{
|
||||||
|
|
@ -64,7 +65,7 @@ namespace MatterHackers.MatterControl
|
||||||
// TODO: This hack needs a unit test and then pass and then remove this line.
|
// TODO: This hack needs a unit test and then pass and then remove this line.
|
||||||
this.MinimumSize = new VectorMath.Vector2(0, numberInputField.Height);
|
this.MinimumSize = new VectorMath.Vector2(0, numberInputField.Height);
|
||||||
|
|
||||||
setButton = textImageButtonFactory.Generate("SET");
|
setButton = textImageButtonFactory.Generate("SET");
|
||||||
setButton.VAnchor = VAnchor.ParentCenter;
|
setButton.VAnchor = VAnchor.ParentCenter;
|
||||||
setButton.Margin = new BorderDouble(left: 6);
|
setButton.Margin = new BorderDouble(left: 6);
|
||||||
setButton.Visible = false;
|
setButton.Visible = false;
|
||||||
|
|
|
||||||
|
|
@ -83,7 +83,7 @@ namespace MatterHackers.MatterControl
|
||||||
UiThread.RunOnIdle(CloseOnIdle);
|
UiThread.RunOnIdle(CloseOnIdle);
|
||||||
}
|
}
|
||||||
|
|
||||||
void CloseOnIdle(object state)
|
void CloseOnIdle(object state)
|
||||||
{
|
{
|
||||||
Close();
|
Close();
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,25 +1,23 @@
|
||||||
<Properties>
|
<Properties>
|
||||||
<MonoDevelop.Ide.Workspace ActiveConfiguration="Debug" />
|
<MonoDevelop.Ide.Workspace ActiveConfiguration="Debug" />
|
||||||
<MonoDevelop.Ide.Workbench ActiveDocument="PrintLevelWizard.cs">
|
<MonoDevelop.Ide.Workbench ActiveDocument="c:\Users\Matter Hackers 1\Development\MatterControl\PartPreviewWindow\GcodeViewBasic.cs">
|
||||||
<Files>
|
<Files>
|
||||||
<File FileName="MatterControlApplication.cs" Line="1" Column="1" />
|
<File FileName="MatterControlApplication.cs" Line="1" Column="1" />
|
||||||
<File FileName="PrinterControls\PrinterConnections\SetupStepComPortOne.cs" Line="1" Column="1" />
|
<File FileName="SliceConfiguration\ActiveSliceSettings.cs" Line="1" Column="1" />
|
||||||
<File FileName="Localizations\LocalizedString.cs" Line="1" Column="1" />
|
<File FileName="SliceConfiguration\CuraEnginMappings.cs" Line="1" Column="1" />
|
||||||
<File FileName="..\agg-sharp\OpenGlGui\MeshViewerWidget.cs" Line="1" Column="1" />
|
<File FileName="PrinterControls\SDCardManager.cs" Line="1" Column="1" />
|
||||||
<File FileName="c:\Users\Matter Hackers 1\Development\MatterControl\SliceConfiguration\SlicingQueue.cs" Line="1" Column="1" />
|
<File FileName="ToolsPage\ToolsWidget.cs" Line="1" Column="1" />
|
||||||
<File FileName="PrintLevelWizard.cs" Line="343" Column="19" />
|
<File FileName="PrinterControls\TemperatureIndicator.cs" Line="299" Column="4" />
|
||||||
<File FileName="CustomWidgets\WizardControl.cs" Line="66" Column="87" />
|
<File FileName="c:\Users\Matter Hackers 1\Development\MatterControl\SliceConfiguration\SlicingQueue.cs" Line="189" Column="74" />
|
||||||
<File FileName="c:\Users\Matter Hackers 1\Development\agg-sharp\Gui\GUIWidget.cs" Line="1736" Column="1" />
|
<File FileName="CustomWidgets\EditableNumberDisplay.cs" Line="62" Column="46" />
|
||||||
<File FileName="SliceConfiguration\ActiveSliceSettings.cs" Line="434" Column="5" />
|
<File FileName="ActionBar\PrintActionRow.cs" Line="1" Column="1" />
|
||||||
<File FileName="SliceConfiguration\CuraEnginMappings.cs" Line="447" Column="39" />
|
<File FileName="..\agg-sharp\Gui\FileDialogs\FileDialog.cs" Line="1" Column="1" />
|
||||||
<File FileName="SliceConfiguration\SliceSettingsLayerSelector.cs" Line="1" Column="1" />
|
<File FileName="c:\Users\Matter Hackers 1\Development\agg-sharp\Gui\GUIWidget.cs" Line="1" Column="1" />
|
||||||
<File FileName="SliceConfiguration\SliceSettingsOrganizer.cs" Line="282" Column="18" />
|
<File FileName="c:\Users\Matter Hackers 1\Development\MatterControl\PartPreviewWindow\GcodeViewBasic.cs" Line="269" Column="92" />
|
||||||
</Files>
|
</Files>
|
||||||
</MonoDevelop.Ide.Workbench>
|
</MonoDevelop.Ide.Workbench>
|
||||||
<MonoDevelop.Ide.DebuggingService.Breakpoints>
|
<MonoDevelop.Ide.DebuggingService.Breakpoints>
|
||||||
<BreakpointStore>
|
<BreakpointStore />
|
||||||
<Breakpoint file="C:\Users\Matter Hackers 1\Development\mattercontrol\PartPreviewWindow\GcodeViewBasic.cs" line="264" column="1" />
|
|
||||||
</BreakpointStore>
|
|
||||||
</MonoDevelop.Ide.DebuggingService.Breakpoints>
|
</MonoDevelop.Ide.DebuggingService.Breakpoints>
|
||||||
<MonoDevelop.Ide.DebuggingService.PinnedWatches />
|
<MonoDevelop.Ide.DebuggingService.PinnedWatches />
|
||||||
</Properties>
|
</Properties>
|
||||||
|
|
@ -265,8 +265,10 @@ namespace MatterHackers.MatterControl.PartPreviewWindow
|
||||||
modelInfoContainer.HAnchor = HAnchor.ParentLeftRight;
|
modelInfoContainer.HAnchor = HAnchor.ParentLeftRight;
|
||||||
modelInfoContainer.Padding = new BorderDouble(5);
|
modelInfoContainer.Padding = new BorderDouble(5);
|
||||||
|
|
||||||
|
string printTimeLbl = new LocalizedString ("Print Time").Translated;
|
||||||
|
string printTimeLblFull = string.Format ("{0}:", printTimeLbl);
|
||||||
// put in the print time
|
// put in the print time
|
||||||
modelInfoContainer.AddChild(new TextWidget("Print Time:", textColor: RGBA_Bytes.White));
|
modelInfoContainer.AddChild(new TextWidget(printTimeLblFull, textColor: RGBA_Bytes.White));
|
||||||
{
|
{
|
||||||
string timeRemainingText = "---";
|
string timeRemainingText = "---";
|
||||||
|
|
||||||
|
|
@ -294,8 +296,10 @@ namespace MatterHackers.MatterControl.PartPreviewWindow
|
||||||
|
|
||||||
//modelInfoContainer.AddChild(new TextWidget("Size:", textColor: RGBA_Bytes.White));
|
//modelInfoContainer.AddChild(new TextWidget("Size:", textColor: RGBA_Bytes.White));
|
||||||
|
|
||||||
|
string filamentLengthLbl = new LocalizedString ("Filament Length").Translated;
|
||||||
|
string filamentLengthLblFull = string.Format ("{0}:", filamentLengthLbl);
|
||||||
// show the filament used
|
// show the filament used
|
||||||
modelInfoContainer.AddChild(new TextWidget("Filament Length:", textColor: RGBA_Bytes.White));
|
modelInfoContainer.AddChild(new TextWidget(filamentLengthLblFull, textColor: RGBA_Bytes.White));
|
||||||
{
|
{
|
||||||
double filamentUsed = gcodeViewWidget.LoadedGCode.GetFilamentUsedMm(ActiveSliceSettings.Instance.NozzleDiameter);
|
double filamentUsed = gcodeViewWidget.LoadedGCode.GetFilamentUsedMm(ActiveSliceSettings.Instance.NozzleDiameter);
|
||||||
|
|
||||||
|
|
@ -305,7 +309,9 @@ namespace MatterHackers.MatterControl.PartPreviewWindow
|
||||||
modelInfoContainer.AddChild(estimatedPrintTime);
|
modelInfoContainer.AddChild(estimatedPrintTime);
|
||||||
}
|
}
|
||||||
|
|
||||||
modelInfoContainer.AddChild(new TextWidget("Filament Volume:", textColor: RGBA_Bytes.White));
|
string filamentVolumeLbl = new LocalizedString ("Filament Volume").Translated;
|
||||||
|
string filamentVolumeLblFull = string.Format("{0}:", filamentVolumeLbl);
|
||||||
|
modelInfoContainer.AddChild(new TextWidget(filamentVolumeLblFull, textColor: RGBA_Bytes.White));
|
||||||
{
|
{
|
||||||
var density = 1.0;
|
var density = 1.0;
|
||||||
string filamentType = "PLA";
|
string filamentType = "PLA";
|
||||||
|
|
@ -326,7 +332,9 @@ namespace MatterHackers.MatterControl.PartPreviewWindow
|
||||||
modelInfoContainer.AddChild(estimatedPrintTime);
|
modelInfoContainer.AddChild(estimatedPrintTime);
|
||||||
}
|
}
|
||||||
|
|
||||||
modelInfoContainer.AddChild(new TextWidget("Weight:", textColor: RGBA_Bytes.White));
|
string weightLbl = new LocalizedString("Weight").Translated;
|
||||||
|
string weightLblFull = string.Format("{0}:", weightLbl);
|
||||||
|
modelInfoContainer.AddChild(new TextWidget(weightLblFull, textColor: RGBA_Bytes.White));
|
||||||
{
|
{
|
||||||
var density = 1.0;
|
var density = 1.0;
|
||||||
string filamentType = "PLA";
|
string filamentType = "PLA";
|
||||||
|
|
@ -386,7 +394,7 @@ namespace MatterHackers.MatterControl.PartPreviewWindow
|
||||||
layerInfoContainer.Padding = new BorderDouble(5);
|
layerInfoContainer.Padding = new BorderDouble(5);
|
||||||
|
|
||||||
// put in a show grid check box
|
// put in a show grid check box
|
||||||
CheckBox showGrid = new CheckBox("Show Grid", textColor: RGBA_Bytes.White);
|
CheckBox showGrid = new CheckBox(new LocalizedString("Show Grid").Translated, textColor: RGBA_Bytes.White);
|
||||||
showGrid.Checked = gcodeViewWidget.RenderGrid;
|
showGrid.Checked = gcodeViewWidget.RenderGrid;
|
||||||
showGrid.CheckedStateChanged += (sender, e) =>
|
showGrid.CheckedStateChanged += (sender, e) =>
|
||||||
{
|
{
|
||||||
|
|
@ -395,7 +403,7 @@ namespace MatterHackers.MatterControl.PartPreviewWindow
|
||||||
layerInfoContainer.AddChild(showGrid);
|
layerInfoContainer.AddChild(showGrid);
|
||||||
|
|
||||||
// put in a show moves checkbox
|
// put in a show moves checkbox
|
||||||
CheckBox showMoves = new CheckBox("Show Moves", textColor: RGBA_Bytes.White);
|
CheckBox showMoves = new CheckBox(new LocalizedString("Show Moves").Translated, textColor: RGBA_Bytes.White);
|
||||||
showMoves.Checked = gcodeViewWidget.RenderMoves;
|
showMoves.Checked = gcodeViewWidget.RenderMoves;
|
||||||
showMoves.CheckedStateChanged += (sender, e) =>
|
showMoves.CheckedStateChanged += (sender, e) =>
|
||||||
{
|
{
|
||||||
|
|
@ -625,7 +633,7 @@ namespace MatterHackers.MatterControl.PartPreviewWindow
|
||||||
this.AddChild(editCurrentLayerIndex);
|
this.AddChild(editCurrentLayerIndex);
|
||||||
gcodeViewWidget.ActiveLayerChanged += new EventHandler(gcodeViewWidget_ActiveLayerChanged);
|
gcodeViewWidget.ActiveLayerChanged += new EventHandler(gcodeViewWidget_ActiveLayerChanged);
|
||||||
|
|
||||||
setLayerButton = textImageButtonFactory.Generate("Go");
|
setLayerButton = textImageButtonFactory.Generate(new LocalizedString("Go").Translated);
|
||||||
setLayerButton.VAnchor = Agg.UI.VAnchor.ParentCenter;
|
setLayerButton.VAnchor = Agg.UI.VAnchor.ParentCenter;
|
||||||
setLayerButton.Click += new Button.ButtonEventHandler(layerCountTextWidget_EditComplete);
|
setLayerButton.Click += new Button.ButtonEventHandler(layerCountTextWidget_EditComplete);
|
||||||
this.AddChild(setLayerButton);
|
this.AddChild(setLayerButton);
|
||||||
|
|
|
||||||
|
|
@ -419,7 +419,9 @@ namespace MatterHackers.MatterControl.PartPreviewWindow
|
||||||
{
|
{
|
||||||
if (Meshes.Count > 0)
|
if (Meshes.Count > 0)
|
||||||
{
|
{
|
||||||
processingProgressControl.textWidget.Text = new LocalizedString("Making Copy:").Translated;
|
string makingCopyLabel = new LocalizedString("Making Copy").Translated;
|
||||||
|
string makingCopyLabelFull = string.Format ("{0}:", makingCopyLabel);
|
||||||
|
processingProgressControl.textWidget.Text = makingCopyLabelFull;
|
||||||
processingProgressControl.Visible = true;
|
processingProgressControl.Visible = true;
|
||||||
processingProgressControl.PercentComplete = 0;
|
processingProgressControl.PercentComplete = 0;
|
||||||
LockEditControls();
|
LockEditControls();
|
||||||
|
|
@ -587,7 +589,9 @@ namespace MatterHackers.MatterControl.PartPreviewWindow
|
||||||
{
|
{
|
||||||
if (Meshes.Count > 0)
|
if (Meshes.Count > 0)
|
||||||
{
|
{
|
||||||
processingProgressControl.textWidget.Text = "Loading Parts:";
|
string loadingPartLabel = new LocalizedString("Loading Parts").Translated;
|
||||||
|
string loadingPartLabelFull = string.Format("{0}:", loadingPartLabel);
|
||||||
|
processingProgressControl.textWidget.Text = loadingPartLabelFull;
|
||||||
processingProgressControl.Visible = true;
|
processingProgressControl.Visible = true;
|
||||||
processingProgressControl.PercentComplete = 0;
|
processingProgressControl.PercentComplete = 0;
|
||||||
LockEditControls();
|
LockEditControls();
|
||||||
|
|
@ -938,7 +942,7 @@ namespace MatterHackers.MatterControl.PartPreviewWindow
|
||||||
// put in the part info display
|
// put in the part info display
|
||||||
if(false)
|
if(false)
|
||||||
{
|
{
|
||||||
CheckBox expandPartInfoOptions = expandMenuOptionFactory.GenerateCheckBoxButton("Part Info", "icon_arrow_right_no_border_32x32.png", "icon_arrow_down_no_border_32x32.png");
|
CheckBox expandPartInfoOptions = expandMenuOptionFactory.GenerateCheckBoxButton(new LocalizedString("Part Info").Translated, "icon_arrow_right_no_border_32x32.png", "icon_arrow_down_no_border_32x32.png");
|
||||||
expandPartInfoOptions.Margin = new BorderDouble(bottom: 2);
|
expandPartInfoOptions.Margin = new BorderDouble(bottom: 2);
|
||||||
buttonRightPanel.AddChild(expandPartInfoOptions);
|
buttonRightPanel.AddChild(expandPartInfoOptions);
|
||||||
|
|
||||||
|
|
@ -953,7 +957,9 @@ namespace MatterHackers.MatterControl.PartPreviewWindow
|
||||||
};
|
};
|
||||||
|
|
||||||
PartInfoOptionContainer.Margin = new BorderDouble(8, 3);
|
PartInfoOptionContainer.Margin = new BorderDouble(8, 3);
|
||||||
TextWidget sizeInfo = new TextWidget("Size:", textColor: RGBA_Bytes.White);
|
string sizeInfoLbl = new LocalizedString("Size").Translated;
|
||||||
|
string sizeInfoLblFull = string.Format("{0}:", sizeInfoLbl);
|
||||||
|
TextWidget sizeInfo = new TextWidget(sizeInfoLblFull, textColor: RGBA_Bytes.White);
|
||||||
PartInfoOptionContainer.AddChild(sizeInfo);
|
PartInfoOptionContainer.AddChild(sizeInfo);
|
||||||
TextWidget xSizeInfo = new TextWidget(" x 10.1", pointSize: 10, textColor: RGBA_Bytes.White);
|
TextWidget xSizeInfo = new TextWidget(" x 10.1", pointSize: 10, textColor: RGBA_Bytes.White);
|
||||||
xSizeInfo.AutoExpandBoundsToText = true;
|
xSizeInfo.AutoExpandBoundsToText = true;
|
||||||
|
|
@ -1039,7 +1045,9 @@ namespace MatterHackers.MatterControl.PartPreviewWindow
|
||||||
scaleRatioContainer.HAnchor = HAnchor.ParentLeftRight;
|
scaleRatioContainer.HAnchor = HAnchor.ParentLeftRight;
|
||||||
scaleRatioContainer.Padding = new BorderDouble(5);
|
scaleRatioContainer.Padding = new BorderDouble(5);
|
||||||
|
|
||||||
TextWidget scaleRatioLabel = new TextWidget(new LocalizedString("Ratio:").Translated, textColor: RGBA_Bytes.White);
|
string scaleRatioLblTxt = new LocalizedString("Ratio").Translated;
|
||||||
|
string scaleRatioLblTxtFull = string.Format("{0}:", scaleRatioLblTxt);
|
||||||
|
TextWidget scaleRatioLabel = new TextWidget(scaleRatioLblTxtFull, textColor: RGBA_Bytes.White);
|
||||||
scaleRatioLabel.VAnchor = VAnchor.ParentCenter;
|
scaleRatioLabel.VAnchor = VAnchor.ParentCenter;
|
||||||
scaleRatioContainer.AddChild(scaleRatioLabel);
|
scaleRatioContainer.AddChild(scaleRatioLabel);
|
||||||
|
|
||||||
|
|
@ -1114,7 +1122,7 @@ namespace MatterHackers.MatterControl.PartPreviewWindow
|
||||||
|
|
||||||
buttonPanel.AddChild(presetScaleMenu);
|
buttonPanel.AddChild(presetScaleMenu);
|
||||||
|
|
||||||
applyScaleButton = whiteButtonFactory.Generate("Apply Scale", centerText: true);
|
applyScaleButton = whiteButtonFactory.Generate(new LocalizedString("Apply Scale").Translated, centerText: true);
|
||||||
applyScaleButton.Visible = false;
|
applyScaleButton.Visible = false;
|
||||||
applyScaleButton.Cursor = Cursors.Hand;
|
applyScaleButton.Cursor = Cursors.Hand;
|
||||||
buttonPanel.AddChild(applyScaleButton);
|
buttonPanel.AddChild(applyScaleButton);
|
||||||
|
|
@ -1178,7 +1186,9 @@ namespace MatterHackers.MatterControl.PartPreviewWindow
|
||||||
GuiWidget horizontalSpacer = new GuiWidget();
|
GuiWidget horizontalSpacer = new GuiWidget();
|
||||||
horizontalSpacer.HAnchor = HAnchor.ParentLeftRight;
|
horizontalSpacer.HAnchor = HAnchor.ParentLeftRight;
|
||||||
|
|
||||||
TextWidget degreesLabel = new TextWidget(new LocalizedString("Degrees:").Translated, textColor: RGBA_Bytes.White);
|
string degreesLabelTxt = new LocalizedString("Degrees").Translated;
|
||||||
|
string degreesLabelTxtFull = string.Format("{0}:", degreesLabelTxt);
|
||||||
|
TextWidget degreesLabel = new TextWidget(degreesLabelTxt, textColor: RGBA_Bytes.White);
|
||||||
degreesContainer.AddChild(degreesLabel);
|
degreesContainer.AddChild(degreesLabel);
|
||||||
degreesContainer.AddChild(horizontalSpacer);
|
degreesContainer.AddChild(horizontalSpacer);
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -342,24 +342,37 @@ namespace MatterHackers.MatterControl
|
||||||
|
|
||||||
Vector2 probeBackCenter = ActiveSliceSettings.Instance.GetPrintLevelSamplePosition(0);
|
Vector2 probeBackCenter = ActiveSliceSettings.Instance.GetPrintLevelSamplePosition(0);
|
||||||
|
|
||||||
|
string lowPrecisionPositionLbl = new LocalizedString ("Position").Translated;
|
||||||
|
string lowPrecisionLbl = new LocalizedString ("Low Precision").Translated;
|
||||||
GetCoarseBedHeight getCourseBedHeight = new GetCoarseBedHeight (printLevelWizard,
|
GetCoarseBedHeight getCourseBedHeight = new GetCoarseBedHeight (printLevelWizard,
|
||||||
new Vector3 (probeBackCenter, 10),
|
new Vector3 (probeBackCenter, 10),
|
||||||
string.Format ("{0} Position 1 - Low Precision", Step ()),
|
string.Format ("{0} {1} 1 - {2}", Step (),lowPrecisionPositionLbl, lowPrecisionLbl),
|
||||||
probePositions [0]);
|
probePositions [0]);
|
||||||
|
|
||||||
printLevelWizard.AddPage(getCourseBedHeight);
|
printLevelWizard.AddPage(getCourseBedHeight);
|
||||||
printLevelWizard.AddPage(new GetFineBedHeight(string.Format("{0} Position 1 - Medium Precision", Step()), probePositions[0]));
|
string precisionPositionLbl = new LocalizedString("Position").Translated;
|
||||||
printLevelWizard.AddPage(new GetUltraFineBedHeight(string.Format("{0} Position 1 - High Precision", Step()), probePositions[0]));
|
string medPrecisionLbl = new LocalizedString("Medium Precision").Translated;
|
||||||
|
printLevelWizard.AddPage(new GetFineBedHeight(string.Format("{0} {1} 1 - {2}", Step(), precisionPositionLbl, medPrecisionLbl), probePositions[0]));
|
||||||
|
string highPrecisionLbl = new LocalizedString("High Precision").Translated;
|
||||||
|
printLevelWizard.AddPage(new GetUltraFineBedHeight(string.Format("{0} {1} 1 - {2}", Step(), precisionPositionLbl, highPrecisionLbl), probePositions[0]));
|
||||||
|
|
||||||
Vector2 probeFrontLeft = ActiveSliceSettings.Instance.GetPrintLevelSamplePosition(1);
|
Vector2 probeFrontLeft = ActiveSliceSettings.Instance.GetPrintLevelSamplePosition(1);
|
||||||
printLevelWizard.AddPage(new GetCoarseBedHeight(printLevelWizard, new Vector3(probeFrontLeft, 10), string.Format("{0} Position 2 - Low Precision", Step()), probePositions[1]));
|
string positionLblTwo = new LocalizedString("Position").Translated;
|
||||||
printLevelWizard.AddPage(new GetFineBedHeight(string.Format("{0} Position 2 - Medium Precision", Step()), probePositions[1]));
|
string lowPrecisionTwoLbl = new LocalizedString("Low Precision").Translated;
|
||||||
printLevelWizard.AddPage(new GetUltraFineBedHeight(string.Format("{0} Position 2 - High Precision", Step()), probePositions[1]));
|
string medPrecisionTwoLbl = new LocalizedString("Medium Precision").Translated;
|
||||||
|
string highPrecisionTwoLbl = new LocalizedString("High Precision").Translated;
|
||||||
|
printLevelWizard.AddPage(new GetCoarseBedHeight(printLevelWizard, new Vector3(probeFrontLeft, 10), string.Format("{0} {1} 2 - {2}", Step(), positionLblTwo, lowPrecisionTwoLbl ), probePositions[1]));
|
||||||
|
printLevelWizard.AddPage(new GetFineBedHeight(string.Format("{0} {1} 2 - {2}", Step(), positionLblTwo,medPrecisionTwoLbl), probePositions[1]));
|
||||||
|
printLevelWizard.AddPage(new GetUltraFineBedHeight(string.Format("{0} {1} 2 - {2}", Step(), positionLblTwo,highPrecisionTwoLbl), probePositions[1]));
|
||||||
|
|
||||||
Vector2 probeFrontRight = ActiveSliceSettings.Instance.GetPrintLevelSamplePosition(2);
|
Vector2 probeFrontRight = ActiveSliceSettings.Instance.GetPrintLevelSamplePosition(2);
|
||||||
printLevelWizard.AddPage(new GetCoarseBedHeight(printLevelWizard, new Vector3(probeFrontRight, 10), string.Format("{0} Position 3 - Low Precision", Step()), probePositions[2]));
|
string positionLabelThree = new LocalizedString("Position").Translated;
|
||||||
printLevelWizard.AddPage(new GetFineBedHeight(string.Format("{0} Position 3 - Medium Precision", Step()), probePositions[2]));
|
string lowPrecisionLblThree = new LocalizedString("Low Precision").Translated;
|
||||||
printLevelWizard.AddPage(new GetUltraFineBedHeight(string.Format("{0} Position 3 - High Precision", Step()), probePositions[2]));
|
string medPrecisionLblThree = new LocalizedString("Medium Precision").Translated;
|
||||||
|
string highPrecisionLblThree = new LocalizedString("High Precision").Translated;
|
||||||
|
printLevelWizard.AddPage(new GetCoarseBedHeight(printLevelWizard, new Vector3(probeFrontRight, 10), string.Format("{0} {1} 3 - {2}", Step(), positionLabelThree, lowPrecisionLblThree), probePositions[2]));
|
||||||
|
printLevelWizard.AddPage(new GetFineBedHeight(string.Format("{0} {1} 3 - {2}", Step(),positionLabelThree, medPrecisionLblThree ), probePositions[2]));
|
||||||
|
printLevelWizard.AddPage(new GetUltraFineBedHeight(string.Format("{0} {1} 3 - {2}", Step(), positionLabelThree, highPrecisionLblThree ), probePositions[2]));
|
||||||
|
|
||||||
printLevelWizard.AddPage(new LastPageInstructions(doneInstructions, probePositions));
|
printLevelWizard.AddPage(new LastPageInstructions(doneInstructions, probePositions));
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -39,6 +39,7 @@ using MatterHackers.VectorMath;
|
||||||
using MatterHackers.Agg.Image;
|
using MatterHackers.Agg.Image;
|
||||||
using MatterHackers.MatterControl.DataStorage;
|
using MatterHackers.MatterControl.DataStorage;
|
||||||
using MatterHackers.MatterControl.FieldValidation;
|
using MatterHackers.MatterControl.FieldValidation;
|
||||||
|
using MatterHackers.Localizations;
|
||||||
|
|
||||||
namespace MatterHackers.MatterControl
|
namespace MatterHackers.MatterControl
|
||||||
{
|
{
|
||||||
|
|
@ -73,7 +74,9 @@ namespace MatterHackers.MatterControl
|
||||||
headerRow.Padding = new BorderDouble(0, 3, 0, 3);
|
headerRow.Padding = new BorderDouble(0, 3, 0, 3);
|
||||||
|
|
||||||
{
|
{
|
||||||
TextWidget elementHeader = new TextWidget(string.Format("Edit Macro:"), pointSize: 14);
|
string editMacroLabel = new LocalizedString("Edit Macro").Translated;
|
||||||
|
string editMacroLabelFull = string.Format("{0}:", editMacroLabel);
|
||||||
|
TextWidget elementHeader = new TextWidget(editMacroLabelFull, pointSize: 14);
|
||||||
elementHeader.TextColor = ActiveTheme.Instance.PrimaryTextColor;
|
elementHeader.TextColor = ActiveTheme.Instance.PrimaryTextColor;
|
||||||
elementHeader.HAnchor = HAnchor.ParentLeftRight;
|
elementHeader.HAnchor = HAnchor.ParentLeftRight;
|
||||||
elementHeader.VAnchor = Agg.UI.VAnchor.ParentBottom;
|
elementHeader.VAnchor = Agg.UI.VAnchor.ParentBottom;
|
||||||
|
|
@ -97,10 +100,10 @@ namespace MatterHackers.MatterControl
|
||||||
presetsFormContainer.AddChild(createMacroCommandContainer());
|
presetsFormContainer.AddChild(createMacroCommandContainer());
|
||||||
|
|
||||||
|
|
||||||
Button addMacroButton = textImageButtonFactory.Generate("Save");
|
Button addMacroButton = textImageButtonFactory.Generate(new LocalizedString("Save").Translated);
|
||||||
addMacroButton.Click += new ButtonBase.ButtonEventHandler(saveMacro_Click);
|
addMacroButton.Click += new ButtonBase.ButtonEventHandler(saveMacro_Click);
|
||||||
|
|
||||||
Button cancelPresetsButton = textImageButtonFactory.Generate("Cancel");
|
Button cancelPresetsButton = textImageButtonFactory.Generate(new LocalizedString("Cancel").Translated);
|
||||||
cancelPresetsButton.Click += (sender, e) =>
|
cancelPresetsButton.Click += (sender, e) =>
|
||||||
{
|
{
|
||||||
UiThread.RunOnIdle((state) =>
|
UiThread.RunOnIdle((state) =>
|
||||||
|
|
@ -131,7 +134,9 @@ namespace MatterHackers.MatterControl
|
||||||
container.Margin = new BorderDouble(0, 5);
|
container.Margin = new BorderDouble(0, 5);
|
||||||
BorderDouble elementMargin = new BorderDouble(top: 3);
|
BorderDouble elementMargin = new BorderDouble(top: 3);
|
||||||
|
|
||||||
TextWidget macroNameLabel = new TextWidget("Macro Name:", 0, 0, 12);
|
string macroNameLabelTxt = new LocalizedString("Macro Name").Translated;
|
||||||
|
string macroNameLabelTxtFull = string.Format("{0}:", macroNameLabelTxt);
|
||||||
|
TextWidget macroNameLabel = new TextWidget( macroNameLabelTxtFull, 0, 0, 12);
|
||||||
macroNameLabel.TextColor = ActiveTheme.Instance.PrimaryTextColor;
|
macroNameLabel.TextColor = ActiveTheme.Instance.PrimaryTextColor;
|
||||||
macroNameLabel.HAnchor = HAnchor.ParentLeftRight;
|
macroNameLabel.HAnchor = HAnchor.ParentLeftRight;
|
||||||
macroNameLabel.Margin = new BorderDouble(0, 0, 0, 1);
|
macroNameLabel.Margin = new BorderDouble(0, 0, 0, 1);
|
||||||
|
|
@ -139,7 +144,9 @@ namespace MatterHackers.MatterControl
|
||||||
macroNameInput = new MHTextEditWidget(windowController.ActiveMacro.Name);
|
macroNameInput = new MHTextEditWidget(windowController.ActiveMacro.Name);
|
||||||
macroNameInput.HAnchor = HAnchor.ParentLeftRight;
|
macroNameInput.HAnchor = HAnchor.ParentLeftRight;
|
||||||
|
|
||||||
macroNameError = new TextWidget("Give your macro a name.", 0, 0, 10);
|
string giveMacroANameLbl = new LocalizedString("Give your macro a name").Translated;
|
||||||
|
string giveMacroANameLblFull = string.Format ("{0}.", giveMacroANameLbl);
|
||||||
|
macroNameError = new TextWidget(giveMacroANameLblFull, 0, 0, 10);
|
||||||
macroNameError.TextColor = RGBA_Bytes.White;
|
macroNameError.TextColor = RGBA_Bytes.White;
|
||||||
macroNameError.HAnchor = HAnchor.ParentLeftRight;
|
macroNameError.HAnchor = HAnchor.ParentLeftRight;
|
||||||
macroNameError.Margin = elementMargin;
|
macroNameError.Margin = elementMargin;
|
||||||
|
|
@ -157,7 +164,9 @@ namespace MatterHackers.MatterControl
|
||||||
container.Margin = new BorderDouble(0, 5);
|
container.Margin = new BorderDouble(0, 5);
|
||||||
BorderDouble elementMargin = new BorderDouble(top: 3);
|
BorderDouble elementMargin = new BorderDouble(top: 3);
|
||||||
|
|
||||||
TextWidget macroCommandLabel = new TextWidget("Macro Commands:", 0, 0, 12);
|
string macroCommandLblTxt = new LocalizedString("Macro Commands").Translated;
|
||||||
|
string macroCommandLblTxtFull = string.Format ("{0}:", macroCommandLblTxt);
|
||||||
|
TextWidget macroCommandLabel = new TextWidget(macroCommandLblTxtFull, 0, 0, 12);
|
||||||
macroCommandLabel.TextColor = ActiveTheme.Instance.PrimaryTextColor;
|
macroCommandLabel.TextColor = ActiveTheme.Instance.PrimaryTextColor;
|
||||||
macroCommandLabel.HAnchor = HAnchor.ParentLeftRight;
|
macroCommandLabel.HAnchor = HAnchor.ParentLeftRight;
|
||||||
macroCommandLabel.Margin = new BorderDouble(0, 0, 0, 1);
|
macroCommandLabel.Margin = new BorderDouble(0, 0, 0, 1);
|
||||||
|
|
@ -165,7 +174,9 @@ namespace MatterHackers.MatterControl
|
||||||
macroCommandInput = new MHTextEditWidget(windowController.ActiveMacro.Value, pixelHeight: 120, multiLine: true);
|
macroCommandInput = new MHTextEditWidget(windowController.ActiveMacro.Value, pixelHeight: 120, multiLine: true);
|
||||||
macroCommandInput.HAnchor = HAnchor.ParentLeftRight;
|
macroCommandInput.HAnchor = HAnchor.ParentLeftRight;
|
||||||
|
|
||||||
macroCommandError = new TextWidget("This should be in 'Gcode'.", 0, 0, 10);
|
string shouldBeGCodeLbl = new LocalizedString("This should be in 'Gcode'").Translated;
|
||||||
|
string shouldBeGCodeLblFull = string.Format("{0}.", shouldBeGCodeLbl);
|
||||||
|
macroCommandError = new TextWidget(shouldBeGCodeLblFull, 0, 0, 10);
|
||||||
macroCommandError.TextColor = RGBA_Bytes.White;
|
macroCommandError.TextColor = RGBA_Bytes.White;
|
||||||
macroCommandError.HAnchor = HAnchor.ParentLeftRight;
|
macroCommandError.HAnchor = HAnchor.ParentLeftRight;
|
||||||
macroCommandError.Margin = elementMargin;
|
macroCommandError.Margin = elementMargin;
|
||||||
|
|
@ -259,7 +270,9 @@ namespace MatterHackers.MatterControl
|
||||||
headerRow.Padding = new BorderDouble(0, 3, 0, 3);
|
headerRow.Padding = new BorderDouble(0, 3, 0, 3);
|
||||||
|
|
||||||
{
|
{
|
||||||
TextWidget elementHeader = new TextWidget(string.Format("Macro Presets:"), pointSize: 14);
|
string macroPresetsLabel = new LocalizedString("Macro Presets").Translated;
|
||||||
|
string macroPresetsLabelFull = string.Format("{0}:", macroPresetsLabel);
|
||||||
|
TextWidget elementHeader = new TextWidget(macroPresetsLabelFull, pointSize: 14);
|
||||||
elementHeader.TextColor = ActiveTheme.Instance.PrimaryTextColor;
|
elementHeader.TextColor = ActiveTheme.Instance.PrimaryTextColor;
|
||||||
elementHeader.HAnchor = HAnchor.ParentLeftRight;
|
elementHeader.HAnchor = HAnchor.ParentLeftRight;
|
||||||
elementHeader.VAnchor = Agg.UI.VAnchor.ParentBottom;
|
elementHeader.VAnchor = Agg.UI.VAnchor.ParentBottom;
|
||||||
|
|
@ -296,7 +309,7 @@ namespace MatterHackers.MatterControl
|
||||||
hSpacer.HAnchor = Agg.UI.HAnchor.ParentLeftRight;
|
hSpacer.HAnchor = Agg.UI.HAnchor.ParentLeftRight;
|
||||||
macroRow.AddChild(hSpacer);
|
macroRow.AddChild(hSpacer);
|
||||||
|
|
||||||
Button editLink = linkButtonFactory.Generate("edit");
|
Button editLink = linkButtonFactory.Generate(new LocalizedString("edit").Translated);
|
||||||
editLink.Margin = new BorderDouble(right: 5);
|
editLink.Margin = new BorderDouble(right: 5);
|
||||||
editLink.Click += (sender, e) =>
|
editLink.Click += (sender, e) =>
|
||||||
{
|
{
|
||||||
|
|
@ -304,7 +317,7 @@ namespace MatterHackers.MatterControl
|
||||||
};
|
};
|
||||||
macroRow.AddChild(editLink);
|
macroRow.AddChild(editLink);
|
||||||
|
|
||||||
Button removeLink = linkButtonFactory.Generate("remove");
|
Button removeLink = linkButtonFactory.Generate(new LocalizedString("remove").Translated);
|
||||||
removeLink.Click += (sender, e) =>
|
removeLink.Click += (sender, e) =>
|
||||||
{
|
{
|
||||||
m.Delete();
|
m.Delete();
|
||||||
|
|
@ -318,10 +331,10 @@ namespace MatterHackers.MatterControl
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
Button addMacroButton = textImageButtonFactory.Generate("Add", "icon_circle_plus.png");
|
Button addMacroButton = textImageButtonFactory.Generate(new LocalizedString("Add").Translated, "icon_circle_plus.png");
|
||||||
addMacroButton.Click += new ButtonBase.ButtonEventHandler(addMacro_Click);
|
addMacroButton.Click += new ButtonBase.ButtonEventHandler(addMacro_Click);
|
||||||
|
|
||||||
Button cancelPresetsButton = textImageButtonFactory.Generate("Close");
|
Button cancelPresetsButton = textImageButtonFactory.Generate(new LocalizedString("Close").Translated);
|
||||||
cancelPresetsButton.Click += (sender, e) => { this.windowController.Close(); };
|
cancelPresetsButton.Click += (sender, e) => { this.windowController.Close(); };
|
||||||
|
|
||||||
FlowLayoutWidget buttonRow = new FlowLayoutWidget();
|
FlowLayoutWidget buttonRow = new FlowLayoutWidget();
|
||||||
|
|
@ -369,7 +382,7 @@ namespace MatterHackers.MatterControl
|
||||||
public EditMacrosWindow(IEnumerable<DataStorage.CustomCommands> macros, EventHandler functionToCallOnSave)
|
public EditMacrosWindow(IEnumerable<DataStorage.CustomCommands> macros, EventHandler functionToCallOnSave)
|
||||||
: base(360, 420)
|
: base(360, 420)
|
||||||
{
|
{
|
||||||
Title = "Macro Editor";
|
Title = new LocalizedString("Macro Editor").Translated;
|
||||||
this.functionToCallOnSave = functionToCallOnSave;
|
this.functionToCallOnSave = functionToCallOnSave;
|
||||||
BackgroundColor = ActiveTheme.Instance.PrimaryBackgroundColor;
|
BackgroundColor = ActiveTheme.Instance.PrimaryBackgroundColor;
|
||||||
ChangeToMacroList();
|
ChangeToMacroList();
|
||||||
|
|
|
||||||
|
|
@ -38,6 +38,7 @@ using MatterHackers.Agg.UI;
|
||||||
using MatterHackers.VectorMath;
|
using MatterHackers.VectorMath;
|
||||||
using MatterHackers.Agg.Image;
|
using MatterHackers.Agg.Image;
|
||||||
using MatterHackers.MatterControl.DataStorage;
|
using MatterHackers.MatterControl.DataStorage;
|
||||||
|
using MatterHackers.Localizations;
|
||||||
|
|
||||||
namespace MatterHackers.MatterControl
|
namespace MatterHackers.MatterControl
|
||||||
{
|
{
|
||||||
|
|
@ -62,7 +63,9 @@ namespace MatterHackers.MatterControl
|
||||||
headerRow.Padding = new BorderDouble(0, 3, 0, 3);
|
headerRow.Padding = new BorderDouble(0, 3, 0, 3);
|
||||||
|
|
||||||
{
|
{
|
||||||
TextWidget elementHeader = new TextWidget(string.Format("Temperature Shortcut Presets:"), pointSize: 14);
|
string tempShortcutPresetLbl = new LocalizedString("Temperature Shortcut Presets").Translated;
|
||||||
|
string tempShortcutPresetLblFull = string.Format ("{0}:", tempShortcutPresetLbl);
|
||||||
|
TextWidget elementHeader = new TextWidget(tempShortcutPresetLblFull, pointSize: 14);
|
||||||
elementHeader.TextColor = ActiveTheme.Instance.PrimaryTextColor;
|
elementHeader.TextColor = ActiveTheme.Instance.PrimaryTextColor;
|
||||||
elementHeader.HAnchor = HAnchor.ParentLeftRight;
|
elementHeader.HAnchor = HAnchor.ParentLeftRight;
|
||||||
elementHeader.VAnchor = Agg.UI.VAnchor.ParentBottom;
|
elementHeader.VAnchor = Agg.UI.VAnchor.ParentBottom;
|
||||||
|
|
@ -108,7 +111,8 @@ namespace MatterHackers.MatterControl
|
||||||
labelLabelContainer.Height = 16;
|
labelLabelContainer.Height = 16;
|
||||||
labelLabelContainer.Margin = new BorderDouble(3, 0);
|
labelLabelContainer.Margin = new BorderDouble(3, 0);
|
||||||
|
|
||||||
TextWidget labelLabel = new TextWidget(string.Format("Label"), textColor: ActiveTheme.Instance.PrimaryTextColor, pointSize: 10);
|
string labelLabelTxt = new LocalizedString("Label").Translated;
|
||||||
|
TextWidget labelLabel = new TextWidget(string.Format(labelLabelTxt), textColor: ActiveTheme.Instance.PrimaryTextColor, pointSize: 10);
|
||||||
labelLabel.HAnchor = HAnchor.ParentLeft;
|
labelLabel.HAnchor = HAnchor.ParentLeft;
|
||||||
labelLabel.VAnchor = VAnchor.ParentCenter;
|
labelLabel.VAnchor = VAnchor.ParentCenter;
|
||||||
|
|
||||||
|
|
@ -120,13 +124,13 @@ namespace MatterHackers.MatterControl
|
||||||
tempLabelContainer.Height = 16;
|
tempLabelContainer.Height = 16;
|
||||||
tempLabelContainer.Margin = new BorderDouble(3, 0);
|
tempLabelContainer.Margin = new BorderDouble(3, 0);
|
||||||
|
|
||||||
TextWidget tempLabel = new TextWidget(string.Format("Temp (C)"), textColor: ActiveTheme.Instance.PrimaryTextColor, pointSize: 10);
|
TextWidget tempLabel = new TextWidget(string.Format("Temp (C)"), textColor: ActiveTheme.Instance.PrimaryTextColor, pointSize: 10);
|
||||||
tempLabel.HAnchor = HAnchor.ParentLeft;
|
tempLabel.HAnchor = HAnchor.ParentLeft;
|
||||||
tempLabel.VAnchor = VAnchor.ParentCenter;
|
tempLabel.VAnchor = VAnchor.ParentCenter;
|
||||||
|
|
||||||
tempLabelContainer.AddChild(tempLabel);
|
tempLabelContainer.AddChild(tempLabel);
|
||||||
|
|
||||||
leftRightLabels.AddChild(hLabelSpacer);
|
leftRightLabels.AddChild(hLabelSpacer);
|
||||||
leftRightLabels.AddChild(labelLabelContainer);
|
leftRightLabels.AddChild(labelLabelContainer);
|
||||||
leftRightLabels.AddChild(tempLabelContainer);
|
leftRightLabels.AddChild(tempLabelContainer);
|
||||||
|
|
||||||
|
|
@ -141,7 +145,8 @@ namespace MatterHackers.MatterControl
|
||||||
FlowLayoutWidget leftRightEdit = new FlowLayoutWidget();
|
FlowLayoutWidget leftRightEdit = new FlowLayoutWidget();
|
||||||
leftRightEdit.Padding = new BorderDouble(3);
|
leftRightEdit.Padding = new BorderDouble(3);
|
||||||
leftRightEdit.HAnchor |= Agg.UI.HAnchor.ParentLeftRight;
|
leftRightEdit.HAnchor |= Agg.UI.HAnchor.ParentLeftRight;
|
||||||
TextWidget label = new TextWidget(string.Format("Preset {0}.", preset_count), textColor: ActiveTheme.Instance.PrimaryTextColor);
|
string presetLabelTxt = new LocalizedString ("Preset").Translated;
|
||||||
|
TextWidget label = new TextWidget(string.Format("{1} {0}.", preset_count,presetLabelTxt ), textColor: ActiveTheme.Instance.PrimaryTextColor);
|
||||||
label.VAnchor = VAnchor.ParentCenter;
|
label.VAnchor = VAnchor.ParentCenter;
|
||||||
leftRightEdit.AddChild(label);
|
leftRightEdit.AddChild(label);
|
||||||
|
|
||||||
|
|
@ -176,7 +181,7 @@ namespace MatterHackers.MatterControl
|
||||||
GuiWidget hSpacer = new GuiWidget();
|
GuiWidget hSpacer = new GuiWidget();
|
||||||
hSpacer.HAnchor = HAnchor.ParentLeftRight;
|
hSpacer.HAnchor = HAnchor.ParentLeftRight;
|
||||||
|
|
||||||
TextWidget maxWidgetLabel = new TextWidget("Max Temp.", textColor: ActiveTheme.Instance.PrimaryTextColor);
|
TextWidget maxWidgetLabel = new TextWidget(new LocalizedString("Max Temp.").Translated, textColor: ActiveTheme.Instance.PrimaryTextColor);
|
||||||
maxWidgetLabel.VAnchor = VAnchor.ParentCenter;
|
maxWidgetLabel.VAnchor = VAnchor.ParentCenter;
|
||||||
leftRightEdit.AddChild(maxWidgetLabel);
|
leftRightEdit.AddChild(maxWidgetLabel);
|
||||||
leftRightEdit.AddChild(hSpacer);
|
leftRightEdit.AddChild(hSpacer);
|
||||||
|
|
@ -195,10 +200,10 @@ namespace MatterHackers.MatterControl
|
||||||
|
|
||||||
ShowAsSystemWindow();
|
ShowAsSystemWindow();
|
||||||
|
|
||||||
Button savePresetsButton = textImageButtonFactory.Generate("Save");
|
Button savePresetsButton = textImageButtonFactory.Generate(new LocalizedString("Save").Translated);
|
||||||
savePresetsButton.Click += new ButtonBase.ButtonEventHandler(save_Click);
|
savePresetsButton.Click += new ButtonBase.ButtonEventHandler(save_Click);
|
||||||
|
|
||||||
Button cancelPresetsButton = textImageButtonFactory.Generate("Cancel");
|
Button cancelPresetsButton = textImageButtonFactory.Generate(new LocalizedString("Cancel").Translated);
|
||||||
cancelPresetsButton.Click += (sender, e) => { CloseOnIdle(); };
|
cancelPresetsButton.Click += (sender, e) => { CloseOnIdle(); };
|
||||||
|
|
||||||
FlowLayoutWidget buttonRow = new FlowLayoutWidget();
|
FlowLayoutWidget buttonRow = new FlowLayoutWidget();
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
/*
|
/*
|
||||||
Copyright (c) 2013, Lars Brubaker
|
Copyright (c) 2013, Lars Brubaker
|
||||||
All rights reserved.
|
All rights reserved.
|
||||||
|
|
||||||
|
|
@ -295,7 +295,7 @@ namespace MatterHackers.MatterControl
|
||||||
string sliderLabelDefinitions = GetTemperaturePresets();
|
string sliderLabelDefinitions = GetTemperaturePresets();
|
||||||
|
|
||||||
SortedDictionary<double, string> labels = new SortedDictionary<double, string>() {};
|
SortedDictionary<double, string> labels = new SortedDictionary<double, string>() {};
|
||||||
labels.Add(0.0,new LocalizedString("OFF").Translated);
|
labels.Add(0.0,"OFF");
|
||||||
|
|
||||||
string[] labelItems = sliderLabelDefinitions.Split(',');
|
string[] labelItems = sliderLabelDefinitions.Split(',');
|
||||||
for (int i = 0; i < labelItems.Length / 2; i++)
|
for (int i = 0; i < labelItems.Length / 2; i++)
|
||||||
|
|
|
||||||
|
|
@ -509,15 +509,15 @@ namespace MatterHackers.MatterControl
|
||||||
{
|
{
|
||||||
if (LayerHeight > NozzleDiameter)
|
if (LayerHeight > NozzleDiameter)
|
||||||
{
|
{
|
||||||
string error = "'Layer Height' must be less than or equal to the 'Nozzle Diameter'.";
|
string error = new LocalizedString("'Layer Height' must be less than or equal to the 'Nozzle Diameter'.").Translated;
|
||||||
string details = string.Format("Layer Height = {0}\nNozzle Diameter = {1}", LayerHeight, NozzleDiameter);
|
string details = string.Format("Layer Height = {0}\nNozzle Diameter = {1}", LayerHeight, NozzleDiameter);
|
||||||
string location = "Location: 'Advanced Controls' -> 'Slice Settings' -> 'Print' -> 'Layers/Perimeters'";
|
string location = new LocalizedString("Location: 'Advanced Controls' -> 'Slice Settings' -> 'Print' -> 'Layers/Perimeters'").Translated;
|
||||||
StyledMessageBox.ShowMessageBox(string.Format("{0}\n\n{1}\n\n{2}", error, details, location), "Slice Error");
|
StyledMessageBox.ShowMessageBox(string.Format("{0}\n\n{1}\n\n{2}", error, details, location), "Slice Error");
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
else if (FirstLayerHeight > NozzleDiameter)
|
else if (FirstLayerHeight > NozzleDiameter)
|
||||||
{
|
{
|
||||||
string error = "First Layer Height' must be less than or equal to the 'Nozzle Diameter'.";
|
string error = new LocalizedString("First Layer Height' must be less than or equal to the 'Nozzle Diameter'.").Translated;
|
||||||
string details = string.Format("First Layer Height = {0}\nNozzle Diameter = {1}", FirstLayerHeight, NozzleDiameter);
|
string details = string.Format("First Layer Height = {0}\nNozzle Diameter = {1}", FirstLayerHeight, NozzleDiameter);
|
||||||
string location = "Location: 'Advanced Controls' -> 'Slice Settings' -> 'Print' -> 'Layers/Perimeters'";
|
string location = "Location: 'Advanced Controls' -> 'Slice Settings' -> 'Print' -> 'Layers/Perimeters'";
|
||||||
StyledMessageBox.ShowMessageBox(string.Format("{0}\n\n{1}\n\n{2}", error, details, location), "Slice Error");
|
StyledMessageBox.ShowMessageBox(string.Format("{0}\n\n{1}\n\n{2}", error, details, location), "Slice Error");
|
||||||
|
|
|
||||||
|
|
@ -210,11 +210,15 @@ namespace MatterHackers.MatterControl
|
||||||
|
|
||||||
void SetMenuItems()
|
void SetMenuItems()
|
||||||
{
|
{
|
||||||
|
string importTxt = new LocalizedString ("Import").Translated;
|
||||||
|
string importTxtFull = string.Format ("{0}", importTxt);
|
||||||
|
string exportTxt = new LocalizedString("Export").Translated;
|
||||||
|
string exportTxtFull = string.Format ("{0}", exportTxt);
|
||||||
//Set the name and callback function of the menu items
|
//Set the name and callback function of the menu items
|
||||||
slicerOptionsMenuItems = new TupleList<string, Func<bool>>
|
slicerOptionsMenuItems = new TupleList<string, Func<bool>>
|
||||||
{
|
{
|
||||||
{"Import", ImportQueueMenu_Click},
|
{importTxtFull, ImportQueueMenu_Click},
|
||||||
{"Export", ExportQueueMenu_Click},
|
{exportTxtFull, ExportQueueMenu_Click},
|
||||||
};
|
};
|
||||||
|
|
||||||
//Add the menu items to the menu itself
|
//Add the menu items to the menu itself
|
||||||
|
|
|
||||||
|
|
@ -59,7 +59,7 @@ namespace MatterHackers.MatterControl
|
||||||
|
|
||||||
public OrganizerSettingsData(string slicerConfigName, string presentationName, DataEditTypes dataEditType, string extraSettings = "", string helpText = "")
|
public OrganizerSettingsData(string slicerConfigName, string presentationName, DataEditTypes dataEditType, string extraSettings = "", string helpText = "")
|
||||||
{
|
{
|
||||||
this.ExtraSettings = extraSettings;
|
this.ExtraSettings = extraSettings;
|
||||||
this.SlicerConfigName = slicerConfigName;
|
this.SlicerConfigName = slicerConfigName;
|
||||||
this.PresentationName = presentationName;
|
this.PresentationName = presentationName;
|
||||||
this.DataEditType = dataEditType;
|
this.DataEditType = dataEditType;
|
||||||
|
|
@ -86,7 +86,7 @@ namespace MatterHackers.MatterControl
|
||||||
|
|
||||||
public OrganizerSubGroup(string groupName)
|
public OrganizerSubGroup(string groupName)
|
||||||
{
|
{
|
||||||
this.name = groupName;
|
this.name = groupName;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -14,6 +14,7 @@ using MatterHackers.Agg.UI;
|
||||||
using MatterHackers.VectorMath;
|
using MatterHackers.VectorMath;
|
||||||
using MatterHackers.MatterControl.DataStorage;
|
using MatterHackers.MatterControl.DataStorage;
|
||||||
using MatterHackers.MatterControl.PrintQueue;
|
using MatterHackers.MatterControl.PrintQueue;
|
||||||
|
using MatterHackers.Localizations;
|
||||||
|
|
||||||
namespace MatterHackers.MatterControl.ToolsPage
|
namespace MatterHackers.MatterControl.ToolsPage
|
||||||
{
|
{
|
||||||
|
|
@ -65,18 +66,18 @@ namespace MatterHackers.MatterControl.ToolsPage
|
||||||
buttonPanel.HAnchor = HAnchor.ParentLeftRight;
|
buttonPanel.HAnchor = HAnchor.ParentLeftRight;
|
||||||
buttonPanel.Padding = new BorderDouble(0, 3);
|
buttonPanel.Padding = new BorderDouble(0, 3);
|
||||||
{
|
{
|
||||||
Button addToLibrary = textImageButtonFactory.Generate("Import", "icon_import_white_32x32.png");
|
Button addToLibrary = textImageButtonFactory.Generate(new LocalizedString("Import").Translated, "icon_import_white_32x32.png");
|
||||||
buttonPanel.AddChild(addToLibrary);
|
buttonPanel.AddChild(addToLibrary);
|
||||||
addToLibrary.Margin = new BorderDouble(0, 0, 3, 0);
|
addToLibrary.Margin = new BorderDouble(0, 0, 3, 0);
|
||||||
addToLibrary.Click += new ButtonBase.ButtonEventHandler(loadFile_Click);
|
addToLibrary.Click += new ButtonBase.ButtonEventHandler(loadFile_Click);
|
||||||
|
|
||||||
deleteFromLibraryButton = textImageButtonFactory.Generate("Delete");
|
deleteFromLibraryButton = textImageButtonFactory.Generate(new LocalizedString("Delete").Translated);
|
||||||
deleteFromLibraryButton.Margin = new BorderDouble(3, 0);
|
deleteFromLibraryButton.Margin = new BorderDouble(3, 0);
|
||||||
deleteFromLibraryButton.Click += new ButtonBase.ButtonEventHandler(deleteFromQueueButton_Click);
|
deleteFromLibraryButton.Click += new ButtonBase.ButtonEventHandler(deleteFromQueueButton_Click);
|
||||||
deleteFromLibraryButton.Visible = false;
|
deleteFromLibraryButton.Visible = false;
|
||||||
buttonPanel.AddChild(deleteFromLibraryButton);
|
buttonPanel.AddChild(deleteFromLibraryButton);
|
||||||
|
|
||||||
addToQueueButton = textImageButtonFactory.Generate("Add to Queue");
|
addToQueueButton = textImageButtonFactory.Generate(new LocalizedString("Add to Queue").Translated);
|
||||||
addToQueueButton.Margin = new BorderDouble(3, 0);
|
addToQueueButton.Margin = new BorderDouble(3, 0);
|
||||||
addToQueueButton.Click += new ButtonBase.ButtonEventHandler(addToQueueButton_Click);
|
addToQueueButton.Click += new ButtonBase.ButtonEventHandler(addToQueueButton_Click);
|
||||||
addToQueueButton.Visible = false;
|
addToQueueButton.Visible = false;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue