Use .Localize extension function

This commit is contained in:
John Lewin 2017-01-04 07:23:30 -08:00
parent 06af3e220e
commit ace89e1e5a
48 changed files with 193 additions and 193 deletions

View file

@ -62,7 +62,7 @@ namespace MatterHackers.MatterControl
cancelButton.HAnchor = HAnchor.ParentRight;
this.AddChild(cancelButton);
this.Title = LocalizedString.Get("About MatterControl");
this.Title = "About MatterControl".Localize();
this.AlwaysOnTopOfMain = true;
this.ShowAsSystemWindow();
}

View file

@ -69,8 +69,8 @@ namespace MatterHackers.MatterControl.ContactForm
AnchorAll();
cancelButton = textImageButtonFactory.Generate("Cancel".Localize());
submitButton = textImageButtonFactory.Generate(LocalizedString.Get("Submit"));
doneButton = textImageButtonFactory.Generate(LocalizedString.Get("Done"));
submitButton = textImageButtonFactory.Generate("Submit".Localize());
doneButton = textImageButtonFactory.Generate("Done".Localize());
doneButton.Visible = false;
DoLayout(subjectText, bodyText);
@ -115,7 +115,7 @@ namespace MatterHackers.MatterControl.ContactForm
labelContainer.HAnchor = HAnchor.ParentLeftRight;
labelContainer.Height = 30;
TextWidget formLabel = new TextWidget(LocalizedString.Get("How can we improve?"), pointSize: 16);
TextWidget formLabel = new TextWidget("How can we improve?".Localize(), pointSize: 16);
formLabel.TextColor = ActiveTheme.Instance.PrimaryTextColor;
formLabel.VAnchor = VAnchor.ParentTop;
formLabel.HAnchor = HAnchor.ParentLeft;
@ -133,7 +133,7 @@ namespace MatterHackers.MatterControl.ContactForm
messageContainer.BackgroundColor = ActiveTheme.Instance.SecondaryBackgroundColor;
messageContainer.Padding = new BorderDouble(10);
submissionStatus = new TextWidget(LocalizedString.Get("Submitting your information..."), pointSize: 13);
submissionStatus = new TextWidget("Submitting your information...".Localize(), pointSize: 13);
submissionStatus.AutoExpandBoundsToText = true;
submissionStatus.Margin = new BorderDouble(0, 5);
submissionStatus.TextColor = ActiveTheme.Instance.PrimaryTextColor;
@ -146,7 +146,7 @@ namespace MatterHackers.MatterControl.ContactForm
formContainer.BackgroundColor = ActiveTheme.Instance.SecondaryBackgroundColor;
formContainer.Padding = new BorderDouble(10);
formContainer.AddChild(LabelGenerator(LocalizedString.Get("Subject*")));
formContainer.AddChild(LabelGenerator("Subject*".Localize()));
questionInput = new MHTextEditWidget(subjectText);
questionInput.HAnchor = HAnchor.ParentLeftRight;
@ -155,7 +155,7 @@ namespace MatterHackers.MatterControl.ContactForm
questionErrorMessage = ErrorMessageGenerator();
formContainer.AddChild(questionErrorMessage);
formContainer.AddChild(LabelGenerator(LocalizedString.Get("Message*")));
formContainer.AddChild(LabelGenerator("Message*".Localize()));
detailInput = new MHTextEditWidget(bodyText, pixelHeight: 120, multiLine: true);
detailInput.HAnchor = HAnchor.ParentLeftRight;
@ -164,7 +164,7 @@ namespace MatterHackers.MatterControl.ContactForm
detailErrorMessage = ErrorMessageGenerator();
formContainer.AddChild(detailErrorMessage);
formContainer.AddChild(LabelGenerator(LocalizedString.Get("Email Address*")));
formContainer.AddChild(LabelGenerator("Email Address*".Localize()));
emailInput = new MHTextEditWidget();
emailInput.HAnchor = HAnchor.ParentLeftRight;
@ -173,7 +173,7 @@ namespace MatterHackers.MatterControl.ContactForm
emailErrorMessage = ErrorMessageGenerator();
formContainer.AddChild(emailErrorMessage);
formContainer.AddChild(LabelGenerator(LocalizedString.Get("Name*")));
formContainer.AddChild(LabelGenerator("Name*".Localize()));
nameInput = new MHTextEditWidget();
nameInput.HAnchor = HAnchor.ParentLeftRight;
@ -258,13 +258,13 @@ namespace MatterHackers.MatterControl.ContactForm
private void onPostRequestSucceeded(object sender, EventArgs e)
{
submissionStatus.Text = LocalizedString.Get("Thank you! Your information has been submitted.");
submissionStatus.Text = "Thank you! Your information has been submitted.".Localize();
doneButton.Visible = true;
}
private void onPostRequestFailed(object sender, ResponseErrorEventArgs e)
{
submissionStatus.Text = LocalizedString.Get("Sorry! We weren't able to submit your request.");
submissionStatus.Text = "Sorry! We weren't able to submit your request.".Localize();
doneButton.Visible = true;
}
@ -320,7 +320,7 @@ namespace MatterHackers.MatterControl.ContactForm
: base(500, 550)
{
AlwaysOnTopOfMain = true;
Title = LocalizedString.Get("MatterControl: Submit Feedback");
Title = "MatterControl: Submit Feedback".Localize();
BackgroundColor = ActiveTheme.Instance.PrimaryBackgroundColor;

View file

@ -214,7 +214,7 @@ namespace MatterHackers.MatterControl.ActionBar
topRow.Name = "PrintStatusRow.ActivePrinterInfo.TopRow";
topRow.HAnchor = HAnchor.ParentLeftRight;
string nextPrintLabel = LocalizedString.Get("Next Print");
string nextPrintLabel = "Next Print".Localize();
string nextPrintLabelFull = string.Format("{0}:", nextPrintLabel);
activePrintLabel = getPrintStatusLabel(nextPrintLabelFull, pointSize: 11);
activePrintLabel.VAnchor = VAnchor.ParentTop;
@ -272,16 +272,16 @@ namespace MatterHackers.MatterControl.ActionBar
switch (PrinterConnectionAndCommunication.Instance.CommunicationState)
{
case PrinterConnectionAndCommunication.CommunicationStates.Disconnected:
return LocalizedString.Get("Not connected. Press 'Connect' to enable printing.");
return "Not connected. Press 'Connect' to enable printing.".Localize();
case PrinterConnectionAndCommunication.CommunicationStates.AttemptingToConnect:
string attemptToConnect = LocalizedString.Get("Attempting to Connect");
string attemptToConnect = "Attempting to Connect".Localize();
string attemptToConnectFull = string.Format("{0}...", attemptToConnect);
return attemptToConnectFull;
case PrinterConnectionAndCommunication.CommunicationStates.ConnectionLost:
case PrinterConnectionAndCommunication.CommunicationStates.FailedToConnect:
return LocalizedString.Get("Unable to communicate with printer.");
return "Unable to communicate with printer.".Localize();
default:
return "";
@ -371,7 +371,7 @@ namespace MatterHackers.MatterControl.ActionBar
}
else
{
this.activePrintName.Text = LocalizedString.Get("No items in the print queue");
this.activePrintName.Text = "No items in the print queue".Localize();
}
}
@ -385,8 +385,8 @@ namespace MatterHackers.MatterControl.ActionBar
int totalMinutesInPrint = (int)(totalSecondsInPrint / 60 - totalHoursInPrint * 60);
totalSecondsInPrint = totalSecondsInPrint % 60;
string estimatedTimeLabel = LocalizedString.Get("Estimated Print Time");
string calculatingLabel = LocalizedString.Get("Calculating...");
string estimatedTimeLabel = "Estimated Print Time".Localize();
string calculatingLabel = "Calculating...".Localize();
string totalPrintTimeText;
if (totalSecondsInPrint > 0)
@ -404,7 +404,7 @@ namespace MatterHackers.MatterControl.ActionBar
{
if (totalSecondsInPrint < 0)
{
totalPrintTimeText = string.Format("{0}", LocalizedString.Get("Streaming GCode..."));
totalPrintTimeText = string.Format("{0}", "Streaming GCode...".Localize());
}
else
{
@ -415,13 +415,13 @@ namespace MatterHackers.MatterControl.ActionBar
//GC.WaitForFullGCComplete();
string printPercentRemainingText;
string printPercentCompleteText = LocalizedString.Get("complete");
string printPercentCompleteText = "complete".Localize();
printPercentRemainingText = string.Format("{0:0.0}% {1}", PrinterConnectionAndCommunication.Instance.PercentComplete, printPercentCompleteText);
switch (PrinterConnectionAndCommunication.Instance.CommunicationState)
{
case PrinterConnectionAndCommunication.CommunicationStates.PreparingToPrint:
string preparingPrintLabel = LocalizedString.Get("Preparing To Print");
string preparingPrintLabel = "Preparing To Print".Localize();
string preparingPrintLabelFull = string.Format("{0}:", preparingPrintLabel);
activePrintLabel.Text = preparingPrintLabelFull;
//ActivePrintStatusText = ""; // set by slicer
@ -437,7 +437,7 @@ namespace MatterHackers.MatterControl.ActionBar
case PrinterConnectionAndCommunication.CommunicationStates.Paused:
{
string activePrintLabelText = LocalizedString.Get("Printing Paused");
string activePrintLabelText = "Printing Paused".Localize();
string activePrintLabelTextFull = string.Format("{0}:", activePrintLabelText);
activePrintLabel.Text = activePrintLabelTextFull;
ActivePrintStatusText = totalPrintTimeText;
@ -445,14 +445,14 @@ namespace MatterHackers.MatterControl.ActionBar
break;
case PrinterConnectionAndCommunication.CommunicationStates.FinishedPrint:
string donePrintingText = LocalizedString.Get("Done Printing");
string donePrintingText = "Done Printing".Localize();
string donePrintingTextFull = string.Format("{0}:", donePrintingText);
activePrintLabel.Text = donePrintingTextFull;
ActivePrintStatusText = totalPrintTimeText;
break;
default:
string nextPrintLabelActive = LocalizedString.Get("Next Print");
string nextPrintLabelActive = "Next Print".Localize();
string nextPrintLabelActiveFull = string.Format("{0}: ", nextPrintLabelActive);
activePrintLabel.Text = nextPrintLabelActiveFull;
@ -462,11 +462,11 @@ namespace MatterHackers.MatterControl.ActionBar
}
else
{
string nextPrintLabel = LocalizedString.Get("Next Print");
string nextPrintLabel = "Next Print".Localize();
string nextPrintLabelFull = string.Format("{0}:", nextPrintLabel);
activePrintLabel.Text = nextPrintLabelFull;
ActivePrintStatusText = string.Format(LocalizedString.Get("Press 'Add' to choose an item to print"));
ActivePrintStatusText = string.Format("Press 'Add' to choose an item to print".Localize());
}
}
}
@ -626,7 +626,7 @@ namespace MatterHackers.MatterControl.ActionBar
topRow.Name = "PrintStatusRow.ActivePrinterInfo.TopRow";
topRow.HAnchor = HAnchor.ParentLeftRight;
string nextPrintLabel = LocalizedString.Get("Next Print");
string nextPrintLabel = "Next Print".Localize();
string nextPrintLabelFull = string.Format("{0}:", nextPrintLabel);
activePrintLabel = getPrintStatusLabel(nextPrintLabelFull, pointSize: 11);
activePrintLabel.VAnchor = VAnchor.ParentTop;
@ -804,7 +804,7 @@ namespace MatterHackers.MatterControl.ActionBar
}
else
{
this.activePrintName.Text = LocalizedString.Get("No items in the print queue");
this.activePrintName.Text = "No items in the print queue".Localize();
}
}
@ -818,8 +818,8 @@ namespace MatterHackers.MatterControl.ActionBar
int totalMinutesInPrint = (int)(totalSecondsInPrint / 60 - totalHoursInPrint * 60);
totalSecondsInPrint = totalSecondsInPrint % 60;
string estimatedTimeLabel = LocalizedString.Get("Est. Print Time");
string calculatingLabel = LocalizedString.Get("Calculating...");
string estimatedTimeLabel = "Est. Print Time".Localize();
string calculatingLabel = "Calculating...".Localize();
string totalPrintTimeText;
if (totalSecondsInPrint > 0)
@ -837,7 +837,7 @@ namespace MatterHackers.MatterControl.ActionBar
{
if (totalSecondsInPrint < 0)
{
totalPrintTimeText = string.Format("{0}", LocalizedString.Get("Streaming GCode..."));
totalPrintTimeText = string.Format("{0}", "Streaming GCode...".Localize());
}
else
{
@ -848,13 +848,13 @@ namespace MatterHackers.MatterControl.ActionBar
//GC.WaitForFullGCComplete();
string printPercentRemainingText;
string printPercentCompleteText = LocalizedString.Get("complete");
string printPercentCompleteText = "complete".Localize();
printPercentRemainingText = string.Format("{0:0.0}% {1}", PrinterConnectionAndCommunication.Instance.PercentComplete, printPercentCompleteText);
switch (PrinterConnectionAndCommunication.Instance.CommunicationState)
{
case PrinterConnectionAndCommunication.CommunicationStates.PreparingToPrint:
string preparingPrintLabel = LocalizedString.Get("Preparing To Print");
string preparingPrintLabel = "Preparing To Print".Localize();
string preparingPrintLabelFull = string.Format("{0}:", preparingPrintLabel);
activePrintLabel.Text = preparingPrintLabelFull;
//ActivePrintStatusText = ""; // set by slicer
@ -870,7 +870,7 @@ namespace MatterHackers.MatterControl.ActionBar
case PrinterConnectionAndCommunication.CommunicationStates.Paused:
{
string activePrintLabelText = LocalizedString.Get("Printing Paused");
string activePrintLabelText = "Printing Paused".Localize();
string activePrintLabelTextFull = string.Format("{0}:", activePrintLabelText);
activePrintLabel.Text = activePrintLabelTextFull;
ActivePrintStatusText = totalPrintTimeText;
@ -878,14 +878,14 @@ namespace MatterHackers.MatterControl.ActionBar
break;
case PrinterConnectionAndCommunication.CommunicationStates.FinishedPrint:
string donePrintingText = LocalizedString.Get("Done Printing");
string donePrintingText = "Done Printing".Localize();
string donePrintingTextFull = string.Format("{0}:", donePrintingText);
activePrintLabel.Text = donePrintingTextFull;
ActivePrintStatusText = totalPrintTimeText;
break;
default:
string nextPrintLabelActive = LocalizedString.Get("Next Print");
string nextPrintLabelActive = "Next Print".Localize();
string nextPrintLabelActiveFull = string.Format("{0}: ", nextPrintLabelActive);
activePrintLabel.Text = nextPrintLabelActiveFull;
@ -895,11 +895,11 @@ namespace MatterHackers.MatterControl.ActionBar
}
else
{
string nextPrintLabel = LocalizedString.Get("Next Print");
string nextPrintLabel = "Next Print".Localize();
string nextPrintLabelFull = string.Format("{0}:", nextPrintLabel);
activePrintLabel.Text = nextPrintLabelFull;
ActivePrintStatusText = string.Format(LocalizedString.Get("Press 'Add' to choose an item to print"));
ActivePrintStatusText = string.Format("Press 'Add' to choose an item to print".Localize());
}
}
}

View file

@ -105,7 +105,7 @@ namespace MatterHackers.MatterControl
TextImageButtonFactory advancedControlsButtonFactory = new TextImageButtonFactory();
advancedControlsButtonFactory.fontSize = 14;
advancedControlsButtonFactory.invertImageLocation = false;
backButton = advancedControlsButtonFactory.Generate(LocalizedString.Get("Back"), StaticData.Instance.LoadIcon("icon_arrow_left_32x32.png", 32,32));
backButton = advancedControlsButtonFactory.Generate("Back".Localize(), StaticData.Instance.LoadIcon("icon_arrow_left_32x32.png", 32,32));
backButton.ToolTipText = "Switch to Queue, Library and History".Localize();
backButton.Margin = new BorderDouble(right: 3);
backButton.VAnchor = VAnchor.ParentBottom;

View file

@ -84,7 +84,7 @@ namespace MatterHackers.MatterControl
invertImageLocation = true
};
Button advancedControlsLinkButton = advancedControlsButtonFactory.Generate(LocalizedString.Get("Settings\n& Controls"),
Button advancedControlsLinkButton = advancedControlsButtonFactory.Generate("Settings\n& Controls".Localize(),
StaticData.Instance.LoadIcon("icon_arrow_right_32x32.png", 32,32));
advancedControlsLinkButton.Name = "SettingsAndControls";
advancedControlsLinkButton.ToolTipText = "Switch to Settings, Controls and Options".Localize();

View file

@ -60,15 +60,15 @@ namespace MatterHackers.MatterControl
this.Margin = new BorderDouble(top: 4);
QueueTabPage = new TabPage(new QueueDataWidget(queueDataView), LocalizedString.Get("Queue").ToUpper());
QueueTabPage = new TabPage(new QueueDataWidget(queueDataView), "Queue".Localize().ToUpper());
this.AddTab(new SimpleTextTabWidget(QueueTabPage, "Queue Tab", 15,
ActiveTheme.Instance.TabLabelSelected, new RGBA_Bytes(), unselectedTextColor, new RGBA_Bytes()));
LibraryTabPage = new TabPage(new PrintLibraryWidget(), LocalizedString.Get("Library").ToUpper());
LibraryTabPage = new TabPage(new PrintLibraryWidget(), "Library".Localize().ToUpper());
this.AddTab(new SimpleTextTabWidget(LibraryTabPage, "Library Tab", 15,
ActiveTheme.Instance.TabLabelSelected, new RGBA_Bytes(), unselectedTextColor, new RGBA_Bytes()));
HistoryTabPage = new TabPage(new PrintHistoryWidget(), LocalizedString.Get("History").ToUpper());
HistoryTabPage = new TabPage(new PrintHistoryWidget(), "History".Localize().ToUpper());
this.AddTab(new SimpleTextTabWidget(HistoryTabPage, "History Tab", 15,
ActiveTheme.Instance.TabLabelSelected, new RGBA_Bytes(), unselectedTextColor, new RGBA_Bytes()));
@ -84,7 +84,7 @@ namespace MatterHackers.MatterControl
private void NumQueueItemsChanged(object sender, EventArgs widgetEvent)
{
string queueStringBeg = LocalizedString.Get("Queue").ToUpper();
string queueStringBeg = "Queue".Localize().ToUpper();
string queueString = string.Format("{1} ({0})", QueueData.Instance.ItemCount, queueStringBeg);
QueueTabPage.Text = string.Format(queueString, QueueData.Instance.ItemCount);
}

View file

@ -20,7 +20,7 @@ namespace MatterHackers.MatterControl.ConfigurationPage
private Button configureNotificationSettingsButton;
public CloudSettingsWidget()
: base(LocalizedString.Get("Cloud"))
: base("Cloud".Localize())
{
mainContainer.AddChild(new HorizontalLine(separatorLineColor));
@ -137,7 +137,7 @@ namespace MatterHackers.MatterControl.ConfigurationPage
configureNotificationSettingsButton.VAnchor = VAnchor.ParentCenter;
configureNotificationSettingsButton.Click += new EventHandler(configureNotificationSettingsButton_Click);
notificationSettingsLabel = new TextWidget(LocalizedString.Get("Notifications"));
notificationSettingsLabel = new TextWidget("Notifications".Localize());
notificationSettingsLabel.AutoExpandBoundsToText = true;
notificationSettingsLabel.TextColor = ActiveTheme.Instance.PrimaryTextColor;
notificationSettingsLabel.VAnchor = VAnchor.ParentCenter;

View file

@ -40,19 +40,19 @@ namespace MatterHackers.MatterControl.ConfigurationPage.PrintLeveling
public class LevelWizard3Point : LevelWizardBase
{
private string pageOneStepText = "Print Leveling Overview".Localize();
private string pageOneInstructionsTextOne = LocalizedString.Get("Welcome to the print leveling wizard. Here is a quick overview on what we are going to do.");
private string pageOneInstructionsTextTwo = LocalizedString.Get("'Home' the printer");
private string pageOneInstructionsTextThree = LocalizedString.Get("Sample the bed at three points");
private string pageOneInstructionsTextFour = LocalizedString.Get("Turn auto leveling on");
private string pageOneInstructionsText5 = LocalizedString.Get("You should be done in about 3 minutes.");
private string pageOneInstructionsText6 = LocalizedString.Get("Note: Be sure the tip of the extruder is clean.");
private string pageOneInstructionsText7 = LocalizedString.Get("Click 'Next' to continue.");
private string pageOneInstructionsTextOne = "Welcome to the print leveling wizard. Here is a quick overview on what we are going to do.".Localize();
private string pageOneInstructionsTextTwo = "'Home' the printer".Localize();
private string pageOneInstructionsTextThree = "Sample the bed at three points".Localize();
private string pageOneInstructionsTextFour = "Turn auto leveling on".Localize();
private string pageOneInstructionsText5 = "You should be done in about 3 minutes.".Localize();
private string pageOneInstructionsText6 = "Note: Be sure the tip of the extruder is clean.".Localize();
private string pageOneInstructionsText7 = "Click 'Next' to continue.".Localize();
public LevelWizard3Point(LevelWizardBase.RuningState runningState)
: base(500, 370, 9)
{
string printLevelWizardTitle = LocalizedString.Get("MatterControl");
string printLevelWizardTitleFull = LocalizedString.Get("Print Leveling Wizard");
string printLevelWizardTitle = "MatterControl".Localize();
string printLevelWizardTitleFull = "Print Leveling Wizard".Localize();
Title = string.Format("{0} - {1}", printLevelWizardTitle, printLevelWizardTitleFull);
List<ProbePosition> probePositions = new List<ProbePosition>(3);
probePositions.Add(new ProbePosition());
@ -74,10 +74,10 @@ namespace MatterHackers.MatterControl.ConfigurationPage.PrintLeveling
string homingPageInstructions = string.Format("{0}:\n\n\t• {1}\n\n{2}", homingPageInstructionsTextOne, homingPageInstructionsTextTwo, homingPageInstructionsTextThree);
printLevelWizard.AddPage(new HomePrinterPage(homingPageStepText, homingPageInstructions));
string positionLabel = LocalizedString.Get("Position");
string lowPrecisionLabel = LocalizedString.Get("Low Precision");
string medPrecisionLabel = LocalizedString.Get("Medium Precision");
string highPrecisionLabel = LocalizedString.Get("High Precision");
string positionLabel = "Position".Localize();
string lowPrecisionLabel = "Low Precision".Localize();
string medPrecisionLabel = "Medium Precision".Localize();
string highPrecisionLabel = "High Precision".Localize();
bool allowLessThanZero = ActiveSliceSettings.Instance.GetValue<bool>(SettingsKey.z_can_be_negative);

View file

@ -51,15 +51,15 @@ namespace MatterHackers.MatterControl.ConfigurationPage.PrintLeveling
protected static readonly string requiredPageInstructions2 = "The next few screens will walk your through the print leveling wizard.";
protected static readonly string homingPageStepText = "Homing The Printer".Localize();
protected static readonly string homingPageInstructionsTextOne = LocalizedString.Get("The printer should now be 'homing'. Once it is finished homing we will move it to the first point to sample.\n\nTo complete the next few steps you will need");
protected static readonly string homingPageInstructionsTextTwo = LocalizedString.Get("A standard sheet of paper");
protected static readonly string homingPageInstructionsTextThree = LocalizedString.Get("We will use this paper to measure the distance between the extruder and the bed.\n\nClick 'Next' to continue.");
protected static readonly string homingPageInstructionsTextOne = "The printer should now be 'homing'. Once it is finished homing we will move it to the first point to sample.\n\nTo complete the next few steps you will need".Localize();
protected static readonly string homingPageInstructionsTextTwo = "A standard sheet of paper".Localize();
protected static readonly string homingPageInstructionsTextThree = "We will use this paper to measure the distance between the extruder and the bed.\n\nClick 'Next' to continue.".Localize();
protected static readonly string doneInstructionsText = LocalizedString.Get("Congratulations!\n\nAuto Print Leveling is now configured and enabled.");
protected static readonly string doneInstructionsTextTwo = LocalizedString.Get("Remove the paper");
protected static readonly string doneInstructionsTextThree = LocalizedString.Get("To re-calibrate the printer, or to turn off Auto Print Leveling, the print leveling controls can be found under 'Options'->'Calibration'.\n\nClick 'Done' to close this window.");
protected static readonly string stepTextBeg = LocalizedString.Get("Step");
protected static readonly string stepTextEnd = LocalizedString.Get("of");
protected static readonly string doneInstructionsText = "Congratulations!\n\nAuto Print Leveling is now configured and enabled.".Localize();
protected static readonly string doneInstructionsTextTwo = "Remove the paper".Localize();
protected static readonly string doneInstructionsTextThree = "To re-calibrate the printer, or to turn off Auto Print Leveling, the print leveling controls can be found under 'Options'->'Calibration'.\n\nClick 'Done' to close this window.".Localize();
protected static readonly string stepTextBeg = "Step".Localize();
protected static readonly string stepTextEnd = "of".Localize();
protected WizardControl printLevelWizard;

View file

@ -286,13 +286,13 @@ namespace MatterHackers.MatterControl.ConfigurationPage.PrintLeveling
public class GetCoarseBedHeight : FindBedHeight
{
private static string setZHeightCoarseInstruction1 = LocalizedString.Get("Using the [Z] controls on this screen, we will now take a coarse measurement of the extruder height at this position.");
private static string setZHeightCoarseInstruction1 = "Using the [Z] controls on this screen, we will now take a coarse measurement of the extruder height at this position.".Localize();
private static string setZHeightCourseInstructTextOne = "Place the paper under the extruder".Localize();
private static string setZHeightCourseInstructTextTwo = "Using the above controls".Localize();
private static string setZHeightCourseInstructTextThree = LocalizedString.Get("Press [Z-] until there is resistance to moving the paper");
private static string setZHeightCourseInstructTextFour = LocalizedString.Get("Press [Z+] once to release the paper");
private static string setZHeightCourseInstructTextFive = LocalizedString.Get("Finally click 'Next' to continue.");
private static string setZHeightCourseInstructTextThree = "Press [Z-] until there is resistance to moving the paper".Localize();
private static string setZHeightCourseInstructTextFour = "Press [Z+] once to release the paper".Localize();
private static string setZHeightCourseInstructTextFive = "Finally click 'Next' to continue.".Localize();
private static string setZHeightCoarseInstruction2 = string.Format("\t• {0}\n\t• {1}\n\t• {2}\n\t• {3}\n\n{4}", setZHeightCourseInstructTextOne, setZHeightCourseInstructTextTwo, setZHeightCourseInstructTextThree, setZHeightCourseInstructTextFour, setZHeightCourseInstructTextFive);
protected Vector3 probeStartPosition;
@ -336,10 +336,10 @@ namespace MatterHackers.MatterControl.ConfigurationPage.PrintLeveling
public class GetFineBedHeight : FindBedHeight
{
private static string setZHeightFineInstruction1 = LocalizedString.Get("We will now refine our measurement of the extruder height at this position.");
private static string setZHeightFineInstructionTextOne = LocalizedString.Get("Press [Z-] until there is resistance to moving the paper");
private static string setZHeightFineInstructionTextTwo = LocalizedString.Get("Press [Z+] once to release the paper");
private static string setZHeightFineInstructionTextThree = LocalizedString.Get("Finally click 'Next' to continue.");
private static string setZHeightFineInstruction1 = "We will now refine our measurement of the extruder height at this position.".Localize();
private static string setZHeightFineInstructionTextOne = "Press [Z-] until there is resistance to moving the paper".Localize();
private static string setZHeightFineInstructionTextTwo = "Press [Z+] once to release the paper".Localize();
private static string setZHeightFineInstructionTextThree = "Finally click 'Next' to continue.".Localize();
private static string setZHeightFineInstruction2 = string.Format("\t• {0}\n\t• {1}\n\n{2}", setZHeightFineInstructionTextOne, setZHeightFineInstructionTextTwo, setZHeightFineInstructionTextThree);
public GetFineBedHeight(string pageDescription, List<ProbePosition> probePositions, int probePositionsBeingEditedIndex, bool allowLessThan0)
@ -350,9 +350,9 @@ namespace MatterHackers.MatterControl.ConfigurationPage.PrintLeveling
public class GetUltraFineBedHeight : FindBedHeight
{
private static string setZHeightFineInstruction1 = LocalizedString.Get("We will now finalize our measurement of the extruder height at this position.");
private static string setHeightFineInstructionTextOne = LocalizedString.Get("Press [Z-] one click PAST the first hint of resistance");
private static string setHeightFineInstructionTextTwo = LocalizedString.Get("Finally click 'Next' to continue.");
private static string setZHeightFineInstruction1 = "We will now finalize our measurement of the extruder height at this position.".Localize();
private static string setHeightFineInstructionTextOne = "Press [Z-] one click PAST the first hint of resistance".Localize();
private static string setHeightFineInstructionTextTwo = "Finally click 'Next' to continue.".Localize();
private static string setZHeightFineInstruction2 = string.Format("\t• {0}\n\n\n{1}", setHeightFineInstructionTextOne, setHeightFineInstructionTextTwo);
public GetUltraFineBedHeight(string pageDescription, List<ProbePosition> probePositions, int probePositionsBeingEditedIndex, bool allowLessThan0)

View file

@ -93,7 +93,7 @@ namespace MatterHackers.MatterControl
{
DisableableWidget container = new DisableableWidget();
AltGroupBox themeControlsGroupBox = new AltGroupBox(LocalizedString.Get("Theme Settings"));
AltGroupBox themeControlsGroupBox = new AltGroupBox("Theme Settings".Localize());
themeControlsGroupBox.TextColor = ActiveTheme.Instance.PrimaryTextColor;
themeControlsGroupBox.BorderColor = ActiveTheme.Instance.PrimaryTextColor;
themeControlsGroupBox.HAnchor = Agg.UI.HAnchor.ParentLeftRight;
@ -153,7 +153,7 @@ namespace MatterHackers.MatterControl
public void AddReleaseOptions(FlowLayoutWidget controlsTopToBottom)
{
AltGroupBox releaseOptionsGroupBox = new AltGroupBox(LocalizedString.Get("Update Feed"));
AltGroupBox releaseOptionsGroupBox = new AltGroupBox("Update Feed".Localize());
releaseOptionsGroupBox.Margin = new BorderDouble(0);
releaseOptionsGroupBox.TextColor = ActiveTheme.Instance.PrimaryTextColor;

View file

@ -173,7 +173,7 @@ namespace MatterHackers.MatterControl
bringBackButtonFactory.normalFillColor = RGBA_Bytes.Gray;
bringBackButtonFactory.normalTextColor = ActiveTheme.Instance.PrimaryTextColor;
Button bringBackToTabButton = bringBackButtonFactory.Generate(LocalizedString.Get("Restore"));
Button bringBackToTabButton = bringBackButtonFactory.Generate("Restore".Localize());
bringBackToTabButton.ToolTipText = "Bring the Window back into this Tab".Localize();
bringBackToTabButton.VAnchor = VAnchor.ParentCenter;
bringBackToTabButton.Cursor = Cursors.Hand;
@ -188,7 +188,7 @@ namespace MatterHackers.MatterControl
});
};
TextWidget windowedModeMessage = new TextWidget(LocalizedString.Get("WINDOWED MODE: This tab has been moved to a separate window."),
TextWidget windowedModeMessage = new TextWidget("WINDOWED MODE: This tab has been moved to a separate window.".Localize(),
pointSize: 10, textColor: ActiveTheme.Instance.PrimaryTextColor);
windowedModeMessage.VAnchor = VAnchor.ParentCenter;

View file

@ -145,7 +145,7 @@ namespace MatterHackers.MatterControl
case MessageType.OK:
{
Title = "MatterControl - " + "Alert".Localize();
Button okButton = textImageButtonFactory.Generate(LocalizedString.Get("Ok"), centerText: true);
Button okButton = textImageButtonFactory.Generate("Ok".Localize(), centerText: true);
okButton.Name = "Ok Button";
okButton.Cursor = Cursors.Hand;
okButton.Click += new EventHandler(okButton_Click);

View file

@ -41,8 +41,8 @@ namespace MatterHackers.MatterControl
partIsGCode = true;
}
string McExportFileTitleBeg = LocalizedString.Get("MatterControl");
string McExportFileTitleEnd = LocalizedString.Get("Export File");
string McExportFileTitleBeg = "MatterControl".Localize();
string McExportFileTitleEnd = "Export File".Localize();
string McExportFileTitleFull = string.Format("{0}: {1}", McExportFileTitleBeg, McExportFileTitleEnd);
this.Title = McExportFileTitleFull;
@ -92,7 +92,7 @@ namespace MatterHackers.MatterControl
if (!partIsGCode)
{
string exportStlText = LocalizedString.Get("Export as");
string exportStlText = "Export as".Localize();
string exportStlTextFull = string.Format("{0} STL", exportStlText);
Button exportAsStlButton = textImageButtonFactory.Generate(exportStlTextFull);
@ -104,7 +104,7 @@ namespace MatterHackers.MatterControl
if (!partIsGCode)
{
string exportAmfText = LocalizedString.Get("Export as");
string exportAmfText = "Export as".Localize();
string exportAmfTextFull = string.Format("{0} AMF", exportAmfText);
Button exportAsAmfButton = textImageButtonFactory.Generate(exportAmfTextFull);
@ -223,7 +223,7 @@ namespace MatterHackers.MatterControl
if (OsInformation.OperatingSystem == OSType.Windows
|| OsInformation.OperatingSystem == OSType.X11)
{
showInFolderAfterSave = new CheckBox(LocalizedString.Get("Show file in folder after save"), ActiveTheme.Instance.PrimaryTextColor, 10);
showInFolderAfterSave = new CheckBox("Show file in folder after save".Localize(), ActiveTheme.Instance.PrimaryTextColor, 10);
showInFolderAfterSave.HAnchor = HAnchor.ParentLeft;
showInFolderAfterSave.Cursor = Cursors.Hand;
//showInFolderAfterSave.Margin = new BorderDouble(top: 10);
@ -232,8 +232,8 @@ namespace MatterHackers.MatterControl
if (!showExportGCodeButton)
{
string noGCodeMessageTextBeg = LocalizedString.Get("Note");
string noGCodeMessageTextEnd = LocalizedString.Get("To enable GCode export, select a printer profile.");
string noGCodeMessageTextBeg = "Note".Localize();
string noGCodeMessageTextEnd = "To enable GCode export, select a printer profile.".Localize();
string noGCodeMessageTextFull = string.Format("{0}: {1}", noGCodeMessageTextBeg, noGCodeMessageTextEnd);
TextWidget noGCodeMessage = new TextWidget(noGCodeMessageTextFull, textColor: ActiveTheme.Instance.PrimaryTextColor, pointSize: 10);
noGCodeMessage.HAnchor = HAnchor.ParentLeft;

View file

@ -90,7 +90,7 @@ namespace MatterHackers.MatterControl.CreatorPlugins
public void AddElements()
{
Title = LocalizedString.Get("Design Add-ons");
Title = "Design Add-ons".Localize();
FlowLayoutWidget topToBottom = new FlowLayoutWidget(FlowDirection.TopToBottom);
topToBottom.AnchorAll();
@ -101,7 +101,7 @@ namespace MatterHackers.MatterControl.CreatorPlugins
headerRow.Margin = new BorderDouble(0, 3, 0, 0);
headerRow.Padding = new BorderDouble(0, 3, 0, 3);
{
string elementHeaderLabelBeg = LocalizedString.Get("Select a Design Tool");
string elementHeaderLabelBeg = "Select a Design Tool".Localize();
string elementHeaderLabelFull = string.Format("{0}:", elementHeaderLabelBeg);
string elementHeaderLabel = elementHeaderLabelFull;
TextWidget elementHeader = new TextWidget(string.Format(elementHeaderLabel), pointSize: 14);

View file

@ -15,8 +15,8 @@ namespace MatterHackers.MatterControl
: base(300, 500)
{
BackgroundColor = backgroundColor;
string savePartSheetTitle = LocalizedString.Get("MatterControl");
string savePartSheetTitleFull = LocalizedString.Get("Saving to Parts Sheet");
string savePartSheetTitle = "MatterControl".Localize();
string savePartSheetTitleFull = "Saving to Parts Sheet".Localize();
Title = string.Format("{0} - {1}", savePartSheetTitle, savePartSheetTitleFull);
this.totalParts = totalParts;

View file

@ -106,14 +106,14 @@ namespace MatterHackers.MatterControl
buttonBar.HAnchor = Agg.UI.HAnchor.ParentLeftRight;
buttonBar.Padding = new BorderDouble(0, 3);
backButton = textImageButtonFactory.Generate(LocalizedString.Get("Back"), centerText: true);
backButton = textImageButtonFactory.Generate("Back".Localize(), centerText: true);
backButton.Click += new EventHandler(back_Click);
nextButton = textImageButtonFactory.Generate(LocalizedString.Get("Next"), centerText: true);
nextButton = textImageButtonFactory.Generate("Next".Localize(), centerText: true);
nextButton.Name = "Next Button";
nextButton.Click += new EventHandler(next_Click);
doneButton = textImageButtonFactory.Generate(LocalizedString.Get("Done"), centerText: true);
doneButton = textImageButtonFactory.Generate("Done".Localize(), centerText: true);
doneButton.Name = "Done Button";
doneButton.Click += done_Click;

View file

@ -63,13 +63,13 @@ namespace MatterHackers.MatterControl.EeProm
FlowLayoutWidget row = new FlowLayoutWidget();
row.HAnchor = Agg.UI.HAnchor.ParentLeftRight;
row.BackgroundColor = ActiveTheme.Instance.PrimaryBackgroundColor;
GuiWidget descriptionWidget = AddDescription(LocalizedString.Get("Description"));
GuiWidget descriptionWidget = AddDescription("Description".Localize());
descriptionWidget.Margin = new BorderDouble(left: 3);
row.AddChild(descriptionWidget);
CreateSpacer(row);
GuiWidget valueText = new TextWidget(LocalizedString.Get("Value"), textColor: ActiveTheme.Instance.PrimaryTextColor);
GuiWidget valueText = new TextWidget("Value".Localize(), textColor: ActiveTheme.Instance.PrimaryTextColor);
valueText.VAnchor = Agg.UI.VAnchor.ParentCenter;
valueText.Margin = new BorderDouble(left: 5, right: 60);
row.AddChild(valueText);
@ -186,7 +186,7 @@ namespace MatterHackers.MatterControl.EeProm
this.AddChild(topToBottom);
Title = LocalizedString.Get("Firmware EEPROM Settings");
Title = "Firmware EEPROM Settings".Localize();
ShowAsSystemWindow();

View file

@ -362,9 +362,9 @@ namespace MatterHackers.MatterControl.PrintHistory
string end = maxLengthName.Substring(maxLengthName.Length - amountRemaining, amountRemaining);
maxLengthName = start + end;
}
string notFoundMessage = LocalizedString.Get("Oops! Could not find this file:");
string notFoundMessage = "Oops! Could not find this file:".Localize();
string message = "{0}:\n'{1}'".FormatWith(notFoundMessage, maxLengthName);
string titleLabel = LocalizedString.Get("Item not Found");
string titleLabel = "Item not Found".Localize();
StyledMessageBox.ShowMessageBox(onConfirmRemove, message, titleLabel, StyledMessageBox.MessageType.OK);
});
}

View file

@ -220,7 +220,7 @@ namespace MatterHackers.MatterControl.PrintLibrary
double oldWidth = editButtonFactory.FixedWidth;
editButtonFactory.FixedWidth = 0;
Button searchButton = editButtonFactory.Generate(LocalizedString.Get("Search"), centerText: true);
Button searchButton = editButtonFactory.Generate("Search".Localize(), centerText: true);
searchButton.Name = "Search Library Button";
searchButton.Click += searchButtonClick;
editButtonFactory.FixedWidth = oldWidth;
@ -314,7 +314,7 @@ namespace MatterHackers.MatterControl.PrintLibrary
buttonPanel.RemoveAllChildren();
// the add button
{
addToLibraryButton = textImageButtonFactory.Generate(LocalizedString.Get("Add"), "icon_circle_plus.png");
addToLibraryButton = textImageButtonFactory.Generate("Add".Localize(), "icon_circle_plus.png");
addToLibraryButton.Enabled = false; // The library selector (the first library selected) is protected so we can't add to it.
addToLibraryButton.ToolTipText = "Add an .stl, .amf, .gcode or .zip file to the Library".Localize();
addToLibraryButton.Name = "Library Add Button";
@ -325,7 +325,7 @@ namespace MatterHackers.MatterControl.PrintLibrary
// the create folder button
{
createFolderButton = textImageButtonFactory.Generate(LocalizedString.Get("Create Folder"));
createFolderButton = textImageButtonFactory.Generate("Create Folder".Localize());
createFolderButton.Enabled = false; // The library selector (the first library selected) is protected so we can't add to it.
createFolderButton.Name = "Create Folder From Library Button";
buttonPanel.AddChild(createFolderButton);

View file

@ -46,7 +46,7 @@ namespace MatterHackers.MatterControl.PartPreviewWindow
: base(750, 550)
{
UseOpenGL = true;
string partPreviewTitle = LocalizedString.Get("MatterControl");
string partPreviewTitle = "MatterControl".Localize();
Title = string.Format("{0}: ", partPreviewTitle) + Path.GetFileName(printItem.Name);
this.Name = "Part Preview Window";

View file

@ -126,7 +126,7 @@ namespace MatterHackers.MatterControl.PartPreviewWindow
// set the progress label text
processingProgressControl.PercentComplete = 0;
processingProgressControl.Visible = true;
string makingCopyLabel = LocalizedString.Get("Aligning");
string makingCopyLabel = "Aligning".Localize();
string makingCopyLabelFull = string.Format("{0}:", makingCopyLabel);
processingProgressControl.ProcessType = makingCopyLabelFull;

View file

@ -77,7 +77,7 @@ namespace MatterHackers.MatterControl.PartPreviewWindow
{
if (MeshGroups.Count > 0)
{
string progressArrangeParts = LocalizedString.Get("Arranging Parts");
string progressArrangeParts = "Arranging Parts".Localize();
string progressArrangePartsFull = string.Format("{0}:", progressArrangeParts);
processingProgressControl.ProcessType = progressArrangePartsFull;
processingProgressControl.Visible = true;

View file

@ -68,7 +68,7 @@ namespace MatterHackers.MatterControl.PartPreviewWindow
if (MeshGroups.Count > 0
&& SelectedMeshGroupIndex != -1)
{
string makingCopyLabel = LocalizedString.Get("Making Copy");
string makingCopyLabel = "Making Copy".Localize();
string makingCopyLabelFull = string.Format("{0}:", makingCopyLabel);
processingProgressControl.ProcessType = makingCopyLabelFull;
processingProgressControl.Visible = true;

View file

@ -42,7 +42,7 @@ namespace MatterHackers.MatterControl.PartPreviewWindow
{
private void GroupSelected()
{
string makingCopyLabel = LocalizedString.Get("Grouping");
string makingCopyLabel = "Grouping".Localize();
string makingCopyLabelFull = string.Format("{0}:", makingCopyLabel);
processingProgressControl.ProcessType = makingCopyLabelFull;

View file

@ -48,7 +48,7 @@ namespace MatterHackers.MatterControl.PartPreviewWindow
{
SelectedMeshGroupIndex = 0;
}
string makingCopyLabel = LocalizedString.Get("Ungrouping");
string makingCopyLabel = "Ungrouping".Localize();
string makingCopyLabelFull = string.Format("{0}:", makingCopyLabel);
processingProgressControl.ProcessType = makingCopyLabelFull;

View file

@ -187,7 +187,7 @@ namespace MatterHackers.MatterControl.PartPreviewWindow
buttonBottomPanel.Padding = new BorderDouble(3, 3);
buttonBottomPanel.BackgroundColor = ActiveTheme.Instance.PrimaryBackgroundColor;
generateGCodeButton = textImageButtonFactory.Generate(LocalizedString.Get("Generate"));
generateGCodeButton = textImageButtonFactory.Generate("Generate".Localize());
generateGCodeButton.Name = "Generate Gcode Button";
generateGCodeButton.Click += new EventHandler(generateButton_Click);
buttonBottomPanel.AddChild(generateGCodeButton);
@ -201,7 +201,7 @@ namespace MatterHackers.MatterControl.PartPreviewWindow
if (windowMode == WindowMode.StandAlone)
{
Button closeButton = textImageButtonFactory.Generate(LocalizedString.Get("Close"));
Button closeButton = textImageButtonFactory.Generate("Close".Localize());
layerSelectionButtonsPanel.AddChild(closeButton);
closeButton.Click += (sender, e) =>
{
@ -641,7 +641,7 @@ namespace MatterHackers.MatterControl.PartPreviewWindow
// put in a show grid check box
{
CheckBox showGrid = new CheckBox(LocalizedString.Get("Print Bed"), textColor: ActiveTheme.Instance.PrimaryTextColor);
CheckBox showGrid = new CheckBox("Print Bed".Localize(), textColor: ActiveTheme.Instance.PrimaryTextColor);
showGrid.Checked = gcodeViewWidget.RenderGrid;
meshViewerWidget.RenderBed = showGrid.Checked;
showGrid.CheckedStateChanged += (sender, e) =>
@ -654,7 +654,7 @@ namespace MatterHackers.MatterControl.PartPreviewWindow
// put in a show moves checkbox
{
CheckBox showMoves = new CheckBox(LocalizedString.Get("Moves"), textColor: ActiveTheme.Instance.PrimaryTextColor);
CheckBox showMoves = new CheckBox("Moves".Localize(), textColor: ActiveTheme.Instance.PrimaryTextColor);
showMoves.Checked = gcodeViewWidget.RenderMoves;
showMoves.CheckedStateChanged += (sender, e) =>
{
@ -665,7 +665,7 @@ namespace MatterHackers.MatterControl.PartPreviewWindow
// put in a show Retractions checkbox
{
CheckBox showRetractions = new CheckBox(LocalizedString.Get("Retractions"), textColor: ActiveTheme.Instance.PrimaryTextColor);
CheckBox showRetractions = new CheckBox("Retractions".Localize(), textColor: ActiveTheme.Instance.PrimaryTextColor);
showRetractions.Checked = gcodeViewWidget.RenderRetractions;
showRetractions.CheckedStateChanged += (sender, e) =>
{
@ -676,7 +676,7 @@ namespace MatterHackers.MatterControl.PartPreviewWindow
// put in a show speed checkbox
{
showSpeeds = new CheckBox(LocalizedString.Get("Speeds"), textColor: ActiveTheme.Instance.PrimaryTextColor);
showSpeeds = new CheckBox("Speeds".Localize(), textColor: ActiveTheme.Instance.PrimaryTextColor);
showSpeeds.Checked = gcodeViewWidget.RenderSpeeds;
//showSpeeds.Checked = gradient.Visible;
showSpeeds.CheckedStateChanged += (sender, e) =>
@ -700,7 +700,7 @@ namespace MatterHackers.MatterControl.PartPreviewWindow
// put in a simulate extrusion checkbox
{
CheckBox simulateExtrusion = new CheckBox(LocalizedString.Get("Extrusion"), textColor: ActiveTheme.Instance.PrimaryTextColor);
CheckBox simulateExtrusion = new CheckBox("Extrusion".Localize(), textColor: ActiveTheme.Instance.PrimaryTextColor);
simulateExtrusion.Checked = gcodeViewWidget.SimulateExtrusion;
simulateExtrusion.CheckedStateChanged += (sender, e) =>
{
@ -711,7 +711,7 @@ namespace MatterHackers.MatterControl.PartPreviewWindow
// put in a render extrusion transparent checkbox
{
CheckBox transparentExtrusion = new CheckBox(LocalizedString.Get("Transparent"), textColor: ActiveTheme.Instance.PrimaryTextColor)
CheckBox transparentExtrusion = new CheckBox("Transparent".Localize(), textColor: ActiveTheme.Instance.PrimaryTextColor)
{
Checked = gcodeViewWidget.TransparentExtrusion,
Margin = new BorderDouble(5, 0, 0, 0),
@ -1243,7 +1243,7 @@ namespace MatterHackers.MatterControl.PartPreviewWindow
this.AddChild(editCurrentLayerIndex);
gcodeViewWidget.ActiveLayerChanged += new EventHandler(gcodeViewWidget_ActiveLayerChanged);
setLayerButton = textImageButtonFactory.Generate(LocalizedString.Get("Go"));
setLayerButton = textImageButtonFactory.Generate("Go".Localize());
setLayerButton.VAnchor = Agg.UI.VAnchor.ParentCenter;
setLayerButton.Click += new EventHandler(layerCountTextWidget_EditComplete);
this.AddChild(setLayerButton);

View file

@ -2195,12 +2195,12 @@ namespace MatterHackers.MatterControl.PrinterCommunication
// make sure we don't have a left over print task
activePrintTask = null;
connectionFailureMessage = LocalizedString.Get("Unknown Reason");
connectionFailureMessage = "Unknown Reason".Localize();
if (PrinterIsConnected)
{
#if DEBUG
throw new Exception(LocalizedString.Get("You can only connect when not currently connected."));
throw new Exception("You can only connect when not currently connected.".Localize());
#else
return;
#endif
@ -2239,7 +2239,7 @@ namespace MatterHackers.MatterControl.PrinterCommunication
catch (System.ArgumentOutOfRangeException e)
{
PrinterOutputCache.Instance.WriteLine("Exception:" + e.Message);
connectionFailureMessage = LocalizedString.Get("Unsupported Baud Rate");
connectionFailureMessage = "Unsupported Baud Rate".Localize();
OnConnectionFailed(null);
}
catch (Exception ex)
@ -2255,7 +2255,7 @@ namespace MatterHackers.MatterControl.PrinterCommunication
// port is already opened in another instance or process, then report the connection problem back to the user
connectionFailureMessage = (serialPortIsAlreadyOpen ?
string.Format("{0} in use", this.ComPort) :
LocalizedString.Get("Port not found"));
"Port not found".Localize());
OnConnectionFailed(null);
}
@ -2308,7 +2308,7 @@ namespace MatterHackers.MatterControl.PrinterCommunication
{
connectThread.Join(JoinThreadTimeoutMs); //Halt connection thread
Disable();
connectionFailureMessage = LocalizedString.Get("Canceled");
connectionFailureMessage = "Canceled".Localize();
OnConnectionFailed(null);
return false;
}

View file

@ -90,7 +90,7 @@ namespace MatterHackers.MatterControl.PrinterControls
feedRateLeftToRight = new FlowLayoutWidget();
feedRateLeftToRight.HAnchor = HAnchor.ParentLeftRight;
feedRateDescription = new TextWidget(LocalizedString.Get("Speed Multiplier"));
feedRateDescription = new TextWidget("Speed Multiplier".Localize());
feedRateDescription.MinimumSize = new Vector2(140, 0) * GuiWidget.DeviceScale;
feedRateDescription.TextColor = ActiveTheme.Instance.PrimaryTextColor;
feedRateDescription.VAnchor = VAnchor.ParentCenter;
@ -121,7 +121,7 @@ namespace MatterHackers.MatterControl.PrinterControls
textImageButtonFactory.normalBorderColor = new RGBA_Bytes(ActiveTheme.Instance.PrimaryTextColor, 200);
textImageButtonFactory.hoverBorderColor = new RGBA_Bytes(ActiveTheme.Instance.PrimaryTextColor, 200);
Button setFeedRateButton = textImageButtonFactory.Generate(LocalizedString.Get("Set"));
Button setFeedRateButton = textImageButtonFactory.Generate("Set".Localize());
setFeedRateButton.VAnchor = VAnchor.ParentCenter;
feedRateLeftToRight.AddChild(setFeedRateButton);
@ -136,7 +136,7 @@ namespace MatterHackers.MatterControl.PrinterControls
leftToRight.HAnchor = HAnchor.ParentLeftRight;
leftToRight.Margin = new BorderDouble(top: 10);
extrusionDescription = new TextWidget(LocalizedString.Get("Extrusion Multiplier"));
extrusionDescription = new TextWidget("Extrusion Multiplier".Localize());
extrusionDescription.MinimumSize = new Vector2(140, 0) * GuiWidget.DeviceScale;
extrusionDescription.TextColor = ActiveTheme.Instance.PrimaryTextColor;
extrusionDescription.VAnchor = VAnchor.ParentCenter;
@ -162,7 +162,7 @@ namespace MatterHackers.MatterControl.PrinterControls
extrusionValue.Margin = new BorderDouble(0, 0, 5, 0);
extrusionValue.VAnchor = VAnchor.ParentCenter;
textImageButtonFactory.FixedHeight = (int)extrusionValue.Height + 1;
Button setExtrusionButton = textImageButtonFactory.Generate(LocalizedString.Get("Set"));
Button setExtrusionButton = textImageButtonFactory.Generate("Set".Localize());
setExtrusionButton.VAnchor = VAnchor.ParentCenter;
leftToRight.AddChild(setExtrusionButton);
}

View file

@ -124,7 +124,7 @@ namespace MatterHackers.MatterControl.PrinterControls
if (buttonCount == 0)
{
TextWidget noMacrosFound = new TextWidget(LocalizedString.Get("No macros are currently set up for this printer."), pointSize: 10);
TextWidget noMacrosFound = new TextWidget("No macros are currently set up for this printer.".Localize(), pointSize: 10);
noMacrosFound.TextColor = ActiveTheme.Instance.PrimaryTextColor;
macroButtonContainer.AddChild(noMacrosFound);
}
@ -221,7 +221,7 @@ namespace MatterHackers.MatterControl.PrinterControls
if (buttonCount == 0)
{
TextWidget noMacrosFound = new TextWidget(LocalizedString.Get("No macros are currently set up for this printer."), pointSize: 10);
TextWidget noMacrosFound = new TextWidget("No macros are currently set up for this printer.".Localize(), pointSize: 10);
noMacrosFound.TextColor = ActiveTheme.Instance.PrimaryTextColor;
macroButtonContainer.AddChild(noMacrosFound);
}

View file

@ -195,7 +195,7 @@ namespace MatterHackers.MatterControl.PrinterControls
homeIconImageWidget.OriginRelativeParent += new Vector2(0, 2) * GuiWidget.DeviceScale;
RGBA_Bytes oldColor = this.textImageButtonFactory.normalFillColor;
textImageButtonFactory.normalFillColor = new RGBA_Bytes(180, 180, 180);
homeAllButton = textImageButtonFactory.Generate(LocalizedString.Get("ALL"));
homeAllButton = textImageButtonFactory.Generate("ALL".Localize());
this.textImageButtonFactory.normalFillColor = oldColor;
homeAllButton.ToolTipText = "Home X, Y and Z".Localize();
homeAllButton.Margin = new BorderDouble(0, 0, 6, 0);

View file

@ -103,7 +103,7 @@ namespace MatterHackers.MatterControl
leftRightEdit.HAnchor |= Agg.UI.HAnchor.ParentLeftRight;
TextWidget positionLabel;
string whichPositionText = LocalizedString.Get("Position");
string whichPositionText = "Position".Localize();
positionLabel = new TextWidget("{0} {1,-5}".FormatWith(whichPositionText, row + 1), textColor: ActiveTheme.Instance.PrimaryTextColor);
positionLabel.VAnchor = VAnchor.ParentCenter;

View file

@ -50,7 +50,7 @@ namespace MatterHackers.MatterControl
: base(560, 420)
{
AlwaysOnTopOfMain = true;
Title = LocalizedString.Get("Macro Editor");
Title = "Macro Editor".Localize();
this.FunctionToCallOnSave = functionToCallOnSave;
BackgroundColor = ActiveTheme.Instance.PrimaryBackgroundColor;
ChangeToMacroList();
@ -130,7 +130,7 @@ namespace MatterHackers.MatterControl
headerRow.Padding = new BorderDouble(0, 3, 0, 3);
{
string editMacroLabel = LocalizedString.Get("Edit Macro");
string editMacroLabel = "Edit Macro".Localize();
string editMacroLabelFull = string.Format("{0}:", editMacroLabel);
TextWidget elementHeader = new TextWidget(editMacroLabelFull, pointSize: 14);
elementHeader.TextColor = ActiveTheme.Instance.PrimaryTextColor;
@ -189,7 +189,7 @@ namespace MatterHackers.MatterControl
container.Margin = new BorderDouble(0, 5);
BorderDouble elementMargin = new BorderDouble(top: 3);
string macroCommandLabelTxt = LocalizedString.Get("Macro Commands");
string macroCommandLabelTxt = "Macro Commands".Localize();
string macroCommandLabelTxtFull = string.Format("{0}:", macroCommandLabelTxt);
TextWidget macroCommandLabel = new TextWidget(macroCommandLabelTxtFull, 0, 0, 12);
macroCommandLabel.TextColor = ActiveTheme.Instance.PrimaryTextColor;
@ -202,7 +202,7 @@ namespace MatterHackers.MatterControl
macroCommandInput.VAnchor = VAnchor.ParentBottomTop;
macroCommandInput.ActualTextEditWidget.VAnchor = VAnchor.ParentBottomTop;
string shouldBeGCodeLabel = LocalizedString.Get("This should be in 'G-Code'");
string shouldBeGCodeLabel = "This should be in 'G-Code'".Localize();
string shouldBeGCodeLabelFull = string.Format("{0}.", shouldBeGCodeLabel);
macroCommandError = new TextWidget(shouldBeGCodeLabelFull, 0, 0, 10);
macroCommandError.TextColor = ActiveTheme.Instance.PrimaryTextColor;
@ -232,7 +232,7 @@ namespace MatterHackers.MatterControl
macroNameInput = new MHTextEditWidget(GCodeMacro.FixMacroName(windowController.ActiveMacro.Name));
macroNameInput.HAnchor = HAnchor.ParentLeftRight;
string giveMacroANameLabel = LocalizedString.Get("Give the macro a name");
string giveMacroANameLabel = "Give the macro a name".Localize();
string giveMacroANameLabelFull = string.Format("{0}.", giveMacroANameLabel);
macroNameError = new TextWidget(giveMacroANameLabelFull, 0, 0, 10);
macroNameError.TextColor = ActiveTheme.Instance.PrimaryTextColor;
@ -336,7 +336,7 @@ namespace MatterHackers.MatterControl
headerRow.Padding = new BorderDouble(0, 3, 0, 3);
{
string macroPresetsLabel = LocalizedString.Get("Macro Presets");
string macroPresetsLabel = "Macro Presets".Localize();
string macroPresetsLabelFull = string.Format("{0}:", macroPresetsLabel);
TextWidget elementHeader = new TextWidget(macroPresetsLabelFull, pointSize: 14);
elementHeader.TextColor = ActiveTheme.Instance.PrimaryTextColor;

View file

@ -61,7 +61,7 @@ namespace MatterHackers.MatterControl
headerRow.Padding = new BorderDouble(0, 3, 0, 3);
{
string tempShortcutPresetLabel = LocalizedString.Get("Temperature Shortcut Presets");
string tempShortcutPresetLabel = "Temperature Shortcut Presets".Localize();
string tempShortcutPresetLabelFull = string.Format("{0}:", tempShortcutPresetLabel);
TextWidget elementHeader = new TextWidget(tempShortcutPresetLabelFull, pointSize: 14);
elementHeader.TextColor = ActiveTheme.Instance.PrimaryTextColor;
@ -107,7 +107,7 @@ namespace MatterHackers.MatterControl
labelLabelContainer.Height = 16;
labelLabelContainer.Margin = new BorderDouble(3, 0);
string labelLabelTxt = LocalizedString.Get("Label");
string labelLabelTxt = "Label".Localize();
TextWidget labelLabel = new TextWidget(string.Format(labelLabelTxt), textColor: ActiveTheme.Instance.PrimaryTextColor, pointSize: 10);
labelLabel.HAnchor = HAnchor.ParentLeft;
labelLabel.VAnchor = VAnchor.ParentCenter;
@ -140,7 +140,7 @@ namespace MatterHackers.MatterControl
FlowLayoutWidget leftRightEdit = new FlowLayoutWidget();
leftRightEdit.Padding = new BorderDouble(3);
leftRightEdit.HAnchor |= Agg.UI.HAnchor.ParentLeftRight;
string presetLabelTxt = LocalizedString.Get("Preset");
string presetLabelTxt = "Preset".Localize();
TextWidget label = new TextWidget(string.Format("{1} {0}", preset_count, presetLabelTxt), textColor: ActiveTheme.Instance.PrimaryTextColor);
label.VAnchor = VAnchor.ParentCenter;
leftRightEdit.AddChild(label);
@ -170,7 +170,7 @@ namespace MatterHackers.MatterControl
leftRightEdit.Padding = new BorderDouble(3);
leftRightEdit.HAnchor |= Agg.UI.HAnchor.ParentLeftRight;
TextWidget maxWidgetLabel = new TextWidget(LocalizedString.Get("Max Temp"), textColor: ActiveTheme.Instance.PrimaryTextColor);
TextWidget maxWidgetLabel = new TextWidget("Max Temp".Localize(), textColor: ActiveTheme.Instance.PrimaryTextColor);
maxWidgetLabel.VAnchor = VAnchor.ParentCenter;
leftRightEdit.AddChild(maxWidgetLabel);
leftRightEdit.AddChild(new HorizontalSpacer());

View file

@ -25,7 +25,7 @@ namespace MatterHackers.MatterControl.PrinterControls.PrinterConnections
printerBaudRateContainer = createPrinterBaudRateContainer();
contentRow.AddChild(printerBaudRateContainer);
{
nextButton = textImageButtonFactory.Generate(LocalizedString.Get("Continue"));
nextButton = textImageButtonFactory.Generate("Continue".Localize());
nextButton.Click += new EventHandler(NextButton_Click);
//Add buttons to buttonContainer
@ -43,7 +43,7 @@ namespace MatterHackers.MatterControl.PrinterControls.PrinterConnections
container.VAnchor = VAnchor.ParentBottomTop;
BorderDouble elementMargin = new BorderDouble(top: 3);
string baudRateLabelText = LocalizedString.Get("Baud Rate");
string baudRateLabelText = "Baud Rate".Localize();
string baudRateLabelTextFull = string.Format("{0}:", baudRateLabelText);
TextWidget baudRateLabel = new TextWidget(baudRateLabelTextFull, 0, 0, 12);
@ -58,16 +58,16 @@ namespace MatterHackers.MatterControl.PrinterControls.PrinterConnections
baudRateMessageContainer.Margin = elementMargin;
baudRateMessageContainer.HAnchor = HAnchor.ParentLeftRight;
printerBaudRateError = new TextWidget(LocalizedString.Get("Select the baud rate."), 0, 0, 10);
printerBaudRateError = new TextWidget("Select the baud rate.".Localize(), 0, 0, 10);
printerBaudRateError.TextColor = ActiveTheme.Instance.PrimaryTextColor;
printerBaudRateError.AutoExpandBoundsToText = true;
printerBaudRateHelpLink = linkButtonFactory.Generate(LocalizedString.Get("What's this?"));
printerBaudRateHelpLink = linkButtonFactory.Generate("What's this?".Localize());
printerBaudRateHelpLink.Margin = new BorderDouble(left: 5);
printerBaudRateHelpLink.VAnchor = VAnchor.ParentBottom;
printerBaudRateHelpLink.Click += new EventHandler(printerBaudRateHelp_Click);
printerBaudRateHelpMessage = new TextWidget(LocalizedString.Get("The term 'Baud Rate' roughly means the speed at which\ndata is transmitted. Baud rates may differ from printer to\nprinter. Refer to your printer manual for more info.\n\nTip: If you are uncertain - try 250000."), 0, 0, 10);
printerBaudRateHelpMessage = new TextWidget("The term 'Baud Rate' roughly means the speed at which\ndata is transmitted. Baud rates may differ from printer to\nprinter. Refer to your printer manual for more info.\n\nTip: If you are uncertain - try 250000.".Localize(), 0, 0, 10);
printerBaudRateHelpMessage.TextColor = ActiveTheme.Instance.PrimaryTextColor;
printerBaudRateHelpMessage.Margin = new BorderDouble(top: 10);
printerBaudRateHelpMessage.Visible = false;
@ -110,7 +110,7 @@ namespace MatterHackers.MatterControl.PrinterControls.PrinterConnections
baudRateContainer.AddChild(baudOption);
}
otherBaudRateRadioButton = new RadioButton(LocalizedString.Get("Other"));
otherBaudRateRadioButton = new RadioButton("Other".Localize());
otherBaudRateRadioButton.Margin = baudRateMargin;
otherBaudRateRadioButton.TextColor = ActiveTheme.Instance.PrimaryTextColor;
@ -184,7 +184,7 @@ namespace MatterHackers.MatterControl.PrinterControls.PrinterConnections
{
printerBaudRateHelpLink.Visible = false;
printerBaudRateError.TextColor = RGBA_Bytes.Red;
printerBaudRateError.Text = LocalizedString.Get("Oops! Please select a baud rate.");
printerBaudRateError.Text = "Oops! Please select a baud rate.".Localize();
}
if (baudRate != null)
@ -198,7 +198,7 @@ namespace MatterHackers.MatterControl.PrinterControls.PrinterConnections
{
printerBaudRateHelpLink.Visible = false;
printerBaudRateError.TextColor = RGBA_Bytes.Red;
printerBaudRateError.Text = LocalizedString.Get("Oops! Baud Rate must be an integer.");
printerBaudRateError.Text = "Oops! Baud Rate must be an integer.".Localize();
return false;
}
}
@ -222,7 +222,7 @@ namespace MatterHackers.MatterControl.PrinterControls.PrinterConnections
return otherBaudRateInput.Text;
}
throw new Exception(LocalizedString.Get("Could not find a selected button."));
throw new Exception("Could not find a selected button.".Localize());
}
}
}

View file

@ -68,7 +68,7 @@ namespace MatterHackers.MatterControl.PrinterControls.PrinterConnections
container.VAnchor = VAnchor.ParentBottomTop;
BorderDouble elementMargin = new BorderDouble(top: 3);
string serialPortLabel = LocalizedString.Get("Serial Port");
string serialPortLabel = "Serial Port".Localize();
string serialPortLabelFull = string.Format("{0}:", serialPortLabel);
TextWidget comPortLabel = new TextWidget(serialPortLabelFull, 0, 0, 12);
@ -193,7 +193,7 @@ namespace MatterHackers.MatterControl.PrinterControls.PrinterConnections
//If there are still no com ports show a message to that effect
if (portIndex == 0)
{
TextWidget comPortOption = new TextWidget(LocalizedString.Get("No COM ports available"));
TextWidget comPortOption = new TextWidget("No COM ports available".Localize());
comPortOption.Margin = new BorderDouble(3, 6, 5, 6);
comPortOption.TextColor = ActiveTheme.Instance.PrimaryTextColor;
comPortContainer.AddChild(comPortOption);
@ -222,7 +222,7 @@ namespace MatterHackers.MatterControl.PrinterControls.PrinterConnections
}
}
throw new Exception(LocalizedString.Get("Could not find a selected button."));
throw new Exception("Could not find a selected button.".Localize());
}
}

View file

@ -33,22 +33,22 @@ namespace MatterHackers.MatterControl.PrinterControls.PrinterConnections
container.Margin = new BorderDouble(5);
BorderDouble elementMargin = new BorderDouble(top: 5);
TextWidget printerMessageOne = new TextWidget(LocalizedString.Get("MatterControl will now attempt to auto-detect printer."), 0, 0, 10);
TextWidget printerMessageOne = new TextWidget("MatterControl will now attempt to auto-detect printer.".Localize(), 0, 0, 10);
printerMessageOne.Margin = new BorderDouble(0, 10, 0, 5);
printerMessageOne.TextColor = ActiveTheme.Instance.PrimaryTextColor;
printerMessageOne.HAnchor = HAnchor.ParentLeftRight;
printerMessageOne.Margin = elementMargin;
string printerMessageTwoTxt = LocalizedString.Get("Disconnect printer");
string printerMessageTwoTxtEnd = LocalizedString.Get("if currently connected");
string printerMessageTwoTxt = "Disconnect printer".Localize();
string printerMessageTwoTxtEnd = "if currently connected".Localize();
string printerMessageTwoTxtFull = string.Format("1.) {0} ({1}).", printerMessageTwoTxt, printerMessageTwoTxtEnd);
TextWidget printerMessageTwo = new TextWidget(printerMessageTwoTxtFull, 0, 0, 12);
printerMessageTwo.TextColor = ActiveTheme.Instance.PrimaryTextColor;
printerMessageTwo.HAnchor = HAnchor.ParentLeftRight;
printerMessageTwo.Margin = elementMargin;
string printerMessageThreeTxt = LocalizedString.Get("Press");
string printerMessageThreeTxtEnd = LocalizedString.Get("Continue");
string printerMessageThreeTxt = "Press".Localize();
string printerMessageThreeTxtEnd = "Continue".Localize();
string printerMessageThreeFull = string.Format("2.) {0} '{1}'.", printerMessageThreeTxt, printerMessageThreeTxtEnd);
TextWidget printerMessageThree = new TextWidget(printerMessageThreeFull, 0, 0, 12);
printerMessageThree.TextColor = ActiveTheme.Instance.PrimaryTextColor;
@ -65,17 +65,17 @@ namespace MatterHackers.MatterControl.PrinterControls.PrinterConnections
setupManualConfigurationOrSkipConnectionWidget.HAnchor = HAnchor.ParentLeftRight;
setupManualConfigurationOrSkipConnectionWidget.Margin = elementMargin;
Button manualLink = linkButtonFactory.Generate(LocalizedString.Get("Manually Configure Connection"));
Button manualLink = linkButtonFactory.Generate("Manually Configure Connection".Localize());
manualLink.Margin = new BorderDouble(0, 5);
manualLink.Click += (s, e) => UiThread.RunOnIdle(WizardWindow.ChangeToPage<SetupStepComPortManual>);
string printerMessageFourText = LocalizedString.Get("or");
string printerMessageFourText = "or".Localize();
TextWidget printerMessageFour = new TextWidget(printerMessageFourText, 0, 0, 10);
printerMessageFour.TextColor = ActiveTheme.Instance.PrimaryTextColor;
printerMessageFour.HAnchor = HAnchor.ParentLeftRight;
printerMessageFour.Margin = elementMargin;
Button skipConnectionLink = linkButtonFactory.Generate(LocalizedString.Get("Skip Connection Setup"));
Button skipConnectionLink = linkButtonFactory.Generate("Skip Connection Setup".Localize());
skipConnectionLink.Margin = new BorderDouble(0, 8);
skipConnectionLink.Click += SkipConnectionLink_Click;

View file

@ -24,12 +24,12 @@ namespace MatterHackers.MatterControl.PrinterControls.PrinterConnections
public SetupStepInstallDriver()
{
headerLabel.Text = string.Format(LocalizedString.Get("Install Communication Driver"));
headerLabel.Text = string.Format("Install Communication Driver".Localize());
printerDriverContainer = createPrinterDriverContainer();
contentRow.AddChild(printerDriverContainer);
{
//Construct buttons
installButton = textImageButtonFactory.Generate(LocalizedString.Get("Install Driver"));
installButton = textImageButtonFactory.Generate("Install Driver".Localize());
installButton.Click += (sender, e) =>
{
UiThread.RunOnIdle(() =>
@ -42,7 +42,7 @@ namespace MatterHackers.MatterControl.PrinterControls.PrinterConnections
});
};
skipButton = textImageButtonFactory.Generate(LocalizedString.Get("Skip"));
skipButton = textImageButtonFactory.Generate("Skip".Localize());
skipButton.Click += (s, e) => WizardWindow.ChangeToSetupBaudOrComPortOne();
//Add buttons to buttonContainer
@ -59,12 +59,12 @@ namespace MatterHackers.MatterControl.PrinterControls.PrinterConnections
container.Margin = new BorderDouble(0, 5);
BorderDouble elementMargin = new BorderDouble(top: 3);
printerDriverMessage = new TextWidget(LocalizedString.Get("This printer requires a driver for communication."), 0, 0, 10);
printerDriverMessage = new TextWidget("This printer requires a driver for communication.".Localize(), 0, 0, 10);
printerDriverMessage.TextColor = ActiveTheme.Instance.PrimaryTextColor;
printerDriverMessage.HAnchor = HAnchor.ParentLeftRight;
printerDriverMessage.Margin = elementMargin;
TextWidget printerDriverMessageTwo = new TextWidget(LocalizedString.Get("Driver located. Would you like to install?"), 0, 0, 10);
TextWidget printerDriverMessageTwo = new TextWidget("Driver located. Would you like to install?".Localize(), 0, 0, 10);
printerDriverMessageTwo.TextColor = ActiveTheme.Instance.PrimaryTextColor;
printerDriverMessageTwo.HAnchor = HAnchor.ParentLeftRight;
printerDriverMessageTwo.Margin = elementMargin;

View file

@ -163,7 +163,7 @@ namespace MatterHackers.MatterControl
FlowLayoutWidget extruderActualIndicator = new FlowLayoutWidget(Agg.UI.FlowDirection.LeftToRight);
extruderActualIndicator.Margin = new BorderDouble(3, 0);
string extruderActualLabelTxt = LocalizedString.Get("Actual");
string extruderActualLabelTxt = "Actual".Localize();
string extruderActualLabelTxtFull = string.Format("{0}: ", extruderActualLabelTxt);
TextWidget extruderActualLabel = new TextWidget(extruderActualLabelTxtFull, pointSize: 10);
extruderActualLabel.TextColor = ActiveTheme.Instance.PrimaryTextColor;
@ -177,7 +177,7 @@ namespace MatterHackers.MatterControl
extruderActualIndicator.AddChild(extruderActualLabel);
extruderActualIndicator.AddChild(actualTempIndicator);
string extruderAboutLabelTxt = LocalizedString.Get("Target");
string extruderAboutLabelTxt = "Target".Localize();
string extruderAboutLabelTxtFull = string.Format("{0}: ", extruderAboutLabelTxt);
TextWidget extruderTargetLabel = new TextWidget(extruderAboutLabelTxtFull, pointSize: 10);
@ -223,7 +223,7 @@ namespace MatterHackers.MatterControl
FlowLayoutWidget presetsContainer = new FlowLayoutWidget();
presetsContainer.Margin = new BorderDouble(3, 0);
string presetsLabelTxt = LocalizedString.Get("Presets");
string presetsLabelTxt = "Presets".Localize();
string presetsLabelTxtFull = string.Format("{0}: ", presetsLabelTxt);
TextWidget presetsLabel = new TextWidget(presetsLabelTxtFull, pointSize: 10);
@ -425,14 +425,14 @@ namespace MatterHackers.MatterControl
public class ExtruderTemperatureControlWidget : TemperatureControlBase
{
public ExtruderTemperatureControlWidget()
: base(0, LocalizedString.Get("Extruder Temperature"), LocalizedString.Get("Extruder Temperature Settings"))
: base(0, "Extruder Temperature".Localize(), "Extruder Temperature Settings".Localize())
{
AddChildElements();
AddHandlers();
}
public ExtruderTemperatureControlWidget(int extruderIndex0Based)
: base(extruderIndex0Based, string.Format("{0} {1}", "Extruder Temperature".Localize(), extruderIndex0Based + 1), LocalizedString.Get("Extruder Temperature Settings"))
: base(extruderIndex0Based, string.Format("{0} {1}", "Extruder Temperature".Localize(), extruderIndex0Based + 1), "Extruder Temperature Settings".Localize())
{
AddChildElements();
AddHandlers();
@ -532,7 +532,7 @@ namespace MatterHackers.MatterControl
public class BedTemperatureControlWidget : TemperatureControlBase
{
public BedTemperatureControlWidget()
: base(0, LocalizedString.Get("Bed Temperature"), LocalizedString.Get("Bed Temperature Settings"))
: base(0, "Bed Temperature".Localize(), "Bed Temperature Settings".Localize())
{
AddChildElements();
AddHandlers();

View file

@ -97,7 +97,7 @@ namespace MatterHackers.MatterControl
{
AlwaysOnTopOfMain = true;
this.AddChild(new TerminalWidget(true));
Title = LocalizedString.Get("MatterControl - Terminal");
Title = "MatterControl - Terminal".Localize();
this.ShowAsSystemWindow();
MinimumSize = minSize;
this.Name = "Gcode Terminal";

View file

@ -451,7 +451,7 @@ namespace MatterHackers.MatterControl
}
}
TextWidget eMinusControlLabel = new TextWidget(LocalizedString.Get("Retract"), pointSize: 11);
TextWidget eMinusControlLabel = new TextWidget("Retract".Localize(), pointSize: 11);
eMinusControlLabel.TextColor = ActiveTheme.Instance.PrimaryTextColor;
eMinusControlLabel.VAnchor = Agg.UI.VAnchor.ParentCenter;
eMinusButtonAndText.AddChild(eMinusControlLabel);
@ -497,7 +497,7 @@ namespace MatterHackers.MatterControl
}
}
TextWidget ePlusControlLabel = new TextWidget(LocalizedString.Get("Extrude"), pointSize: 11);
TextWidget ePlusControlLabel = new TextWidget("Extrude".Localize(), pointSize: 11);
ePlusControlLabel.TextColor = ActiveTheme.Instance.PrimaryTextColor;
ePlusControlLabel.VAnchor = Agg.UI.VAnchor.ParentCenter;
ePlusButtonAndText.AddChild(ePlusControlLabel);

View file

@ -177,7 +177,7 @@ namespace MatterHackers.MatterControl.PrintQueue
buttonPanel1.Padding = new BorderDouble(0, 3);
buttonPanel1.MinimumSize = new Vector2(0, 46);
{
addToQueueButton = textImageButtonFactory.Generate(LocalizedString.Get("Add"), StaticData.Instance.LoadIcon("icon_plus.png", 32, 32));
addToQueueButton = textImageButtonFactory.Generate("Add".Localize(), StaticData.Instance.LoadIcon("icon_plus.png", 32, 32));
addToQueueButton.ToolTipText = "Add an .stl, .amf, .gcode or .zip file to the Queue".Localize();
buttonPanel1.AddChild(addToQueueButton);
addToQueueButton.Margin = new BorderDouble(0, 0, 3, 0);
@ -186,7 +186,7 @@ namespace MatterHackers.MatterControl.PrintQueue
// put in the creator button
{
createButton = textImageButtonFactory.Generate(LocalizedString.Get("Create"), StaticData.Instance.LoadIcon("icon_creator.png", 32, 32));
createButton = textImageButtonFactory.Generate("Create".Localize(), StaticData.Instance.LoadIcon("icon_creator.png", 32, 32));
createButton.ToolTipText = "Choose a Create Tool to generate custom designs".Localize();
createButton.Name = "Design Tool Button";
buttonPanel1.AddChild(createButton);
@ -201,7 +201,7 @@ namespace MatterHackers.MatterControl.PrintQueue
if (OemSettings.Instance.ShowShopButton)
{
shopButton = textImageButtonFactory.Generate(LocalizedString.Get("Buy Materials"), StaticData.Instance.LoadIcon("icon_shopping_cart_32x32.png", 32,32));
shopButton = textImageButtonFactory.Generate("Buy Materials".Localize(), StaticData.Instance.LoadIcon("icon_shopping_cart_32x32.png", 32,32));
shopButton.ToolTipText = "Shop online for printing materials".Localize();
shopButton.Name = "Buy Materials Button";
buttonPanel1.AddChild(shopButton);

View file

@ -183,10 +183,10 @@ namespace MatterHackers.MatterControl.PrintQueue
string end = maxLengthName.Substring(maxLengthName.Length - amountRemaining, amountRemaining);
maxLengthName = start + end;
}
string notFoundMessage = LocalizedString.Get("Oops! Could not find this file");
string notFoundMessageEnd = LocalizedString.Get("Would you like to remove it from the queue");
string notFoundMessage = "Oops! Could not find this file".Localize();
string notFoundMessageEnd = "Would you like to remove it from the queue".Localize();
string message = "{0}:\n'{1}'\n\n{2}?".FormatWith(notFoundMessage, maxLengthName, notFoundMessageEnd);
string titleLabel = LocalizedString.Get("Item not Found");
string titleLabel = "Item not Found".Localize();
StyledMessageBox.ShowMessageBox(onConfirmRemove, message, titleLabel, StyledMessageBox.MessageType.YES_NO, "Remove".Localize(), "Cancel".Localize());
});
}
@ -243,8 +243,8 @@ namespace MatterHackers.MatterControl.PrintQueue
partLabel.TextColor = WidgetTextColor;
partLabel.MinimumSize = new Vector2(1, 16);
string partStatusLabelTxt = LocalizedString.Get("Status").ToUpper();
string partStatusLabelTxtTest = LocalizedString.Get("Queued to Print");
string partStatusLabelTxt = "Status".Localize().ToUpper();
string partStatusLabelTxtTest = "Queued to Print".Localize();
string partStatusLabelTxtFull = "{0}: {1}".FormatWith(partStatusLabelTxt, partStatusLabelTxtTest);
partStatus = new TextWidget(partStatusLabelTxtFull, pointSize: 10);

View file

@ -62,7 +62,7 @@ namespace MatterHackers.MatterControl
nextButton.Click += (s, e) => this.WizardWindow.ChangeToSetupPrinterForm();
nextButton.Visible = false;
Button configureButton = whiteImageButtonFactory.Generate(LocalizedString.Get("Configure"), centerText: true);
Button configureButton = whiteImageButtonFactory.Generate("Configure".Localize(), centerText: true);
configureButton.Margin = new BorderDouble(0, 0, 10, 0);
configureButton.Click += (s, e) =>
{

View file

@ -74,7 +74,7 @@ namespace MatterHackers.MatterControl.SlicerConfiguration
{
this.presetsContext = presetsContext;
this.AlwaysOnTopOfMain = true;
this.Title = LocalizedString.Get("Slice Presets Editor");
this.Title = "Slice Presets Editor".Localize();
this.MinimumSize = new Vector2(640, 480);
this.AnchorAll();

View file

@ -51,14 +51,14 @@ namespace MatterHackers.MatterControl.SlicerConfiguration
this.AnchorAll();
this.Padding = new BorderDouble(3, 0);
var noConnectionMessageContainer = new AltGroupBox(new TextWidget(LocalizedString.Get("No Printer Selected"), pointSize: 18, textColor: ActiveTheme.Instance.SecondaryAccentColor));
var noConnectionMessageContainer = new AltGroupBox(new TextWidget("No Printer Selected".Localize(), pointSize: 18, textColor: ActiveTheme.Instance.SecondaryAccentColor));
noConnectionMessageContainer.Margin = new BorderDouble(top: 10);
noConnectionMessageContainer.BorderColor = ActiveTheme.Instance.PrimaryTextColor;
noConnectionMessageContainer.HAnchor = Agg.UI.HAnchor.ParentLeftRight;
noConnectionMessageContainer.Height = 90;
string noConnectionString = LocalizedString.Get("No printer is currently selected. Please select a printer to edit slice settings.");
noConnectionString += "\n\n" + LocalizedString.Get("NOTE: You need to select a printer, but do not need to connect to it.");
string noConnectionString = "No printer is currently selected. Please select a printer to edit slice settings.".Localize();
noConnectionString += "\n\n" + "NOTE: You need to select a printer, but do not need to connect to it.".Localize();
TextWidget noConnectionMessage = new TextWidget(noConnectionString, pointSize: 10);
noConnectionMessage.Margin = new BorderDouble(5);
noConnectionMessage.TextColor = ActiveTheme.Instance.PrimaryTextColor;

View file

@ -121,7 +121,7 @@ namespace MatterHackers.MatterControl.SlicerConfiguration
public void QueuePartForSlicing(PrintItemWrapper itemToQueue)
{
itemToQueue.DoneSlicing = false;
string preparingToSliceModelTxt = LocalizedString.Get("Preparing to slice model");
string preparingToSliceModelTxt = "Preparing to slice model".Localize();
string peparingToSliceModelFull = string.Format("{0}...", preparingToSliceModelTxt);
itemToQueue.OnSlicingOutputMessage(new StringEventArgs(peparingToSliceModelFull));
lock(listOfSlicingItems)

@ -1 +1 @@
Subproject commit b54405f158af34e95040218b2f30d0ea102b730a
Subproject commit 1deb485ac42cde7f77586b8173045e8c02678738