Merge branch 'development' of https://github.com/MatterHackers/MatterControl into development

This commit is contained in:
Kevin Pope 2014-04-10 16:43:00 -07:00
commit caecb3586a
14 changed files with 363 additions and 84 deletions

View file

@ -46,13 +46,13 @@ namespace MatterHackers.MatterControl.ActionBar
protected override void AddChildElements()
{
actionBarButtonFactory.invertImageLocation = false;
string connectString = "CONNECT".Localize();
string connectString = "Connect".Localize().ToUpper();
connectPrinterButton = actionBarButtonFactory.Generate(connectString, "icon_power_32x32.png");
connectPrinterButton.Margin = new BorderDouble(0, 0, 3);
connectPrinterButton.VAnchor = VAnchor.ParentCenter;
connectPrinterButton.Cursor = Cursors.Hand;
string disconnectString = "DISCONNECT".Localize();
string disconnectString = "Disconnect".Localize().ToUpper();
disconnectPrinterButton = actionBarButtonFactory.Generate(disconnectString, "icon_power_32x32.png");
disconnectPrinterButton.Margin = new BorderDouble(0, 0, 3);
disconnectPrinterButton.VAnchor = VAnchor.ParentCenter;
@ -88,7 +88,7 @@ namespace MatterHackers.MatterControl.ActionBar
FlowLayoutWidget leftToRight = new FlowLayoutWidget();
leftToRight.Margin = new BorderDouble(5, 0);
string optionsString = LocalizedString.Get("OPTIONS");
string optionsString = "Options".Localize().ToUpper();
TextWidget optionsText = new TextWidget(optionsString, textColor: ActiveTheme.Instance.PrimaryTextColor);
optionsText.VAnchor = Agg.UI.VAnchor.ParentCenter;
optionsText.Margin = new BorderDouble(0, 0, 3, 0);
@ -139,7 +139,7 @@ namespace MatterHackers.MatterControl.ActionBar
{
if (ActivePrinterProfile.Instance.ActivePrinter == null)
{
OpenConnectionWindow();
OpenConnectionWindow(ConnectToActivePrinter);
}
else
{
@ -159,12 +159,15 @@ namespace MatterHackers.MatterControl.ActionBar
OpenConnectionWindow();
}
void OpenConnectionWindow()
public delegate void ConnectOnSelectFunction();
ConnectOnSelectFunction functionToCallOnSelect;
void OpenConnectionWindow(ConnectOnSelectFunction functionToCallOnSelect = null)
{
if (this.connectionWindowIsOpen == false)
{
connectionWindow = new ConnectionWindow();
this.connectionWindowIsOpen = true;
this.functionToCallOnSelect = functionToCallOnSelect;
connectionWindow.Closed += new EventHandler(ConnectionWindow_Closed);
}
else
@ -188,7 +191,12 @@ namespace MatterHackers.MatterControl.ActionBar
void onActivePrinterChanged(object sender, EventArgs e)
{
connectPrinterButton.Enabled = true;
connectPrinterButton.Enabled = true;
if (functionToCallOnSelect != null)
{
functionToCallOnSelect();
functionToCallOnSelect = null;
}
}
void onDisconnectButtonClick(object sender, MouseEventArgs e)

View file

@ -117,15 +117,11 @@ namespace MatterHackers.MatterControl
}
Button restartButton;
Dictionary<string, string> languageDict;
private void AddLanguageControls(FlowLayoutWidget controlsTopToBottomLayout)
{
CreateLanguageDict();
DisableableWidget container = new DisableableWidget();
GroupBox languageControlsGroupBox = new GroupBox(LocalizedString.Get("Language Settings"));
languageControlsGroupBox.TextColor = ActiveTheme.Instance.PrimaryTextColor;
languageControlsGroupBox.BorderColor = ActiveTheme.Instance.PrimaryTextColor;
@ -137,22 +133,7 @@ namespace MatterHackers.MatterControl
FlowLayoutWidget controlsContainer = new FlowLayoutWidget();
controlsContainer.HAnchor = HAnchor.ParentLeftRight;
string languageCode = UserSettings.Instance.get("Language");
string languageVerbose = "Default";
foreach(KeyValuePair<string, string> entry in languageDict)
{
if (languageCode == entry.Value)
{
languageVerbose = entry.Key;
}
}
LanguageSelector languageSelector = new LanguageSelector(languageVerbose);
foreach (KeyValuePair<string, string> entry in languageDict)
{
languageSelector.AddItem(entry.Key,entry.Value);
}
LanguageSelector languageSelector = new LanguageSelector();
languageSelector.Margin = new BorderDouble(0);
languageSelector.SelectionChanged += new EventHandler(LanguageDropList_SelectionChanged);
@ -182,22 +163,17 @@ namespace MatterHackers.MatterControl
UiThread.RunOnIdle((state) =>
{
//horrible hack - to be replaced
MatterControlApplication app = (MatterControlApplication)this.Parent.Parent.Parent.Parent.Parent.Parent.Parent.Parent.Parent;
GuiWidget parent = this;
while (parent as MatterControlApplication == null)
{
parent = parent.Parent;
}
MatterControlApplication app = parent as MatterControlApplication;
app.RestartOnClose = true;
app.Close();
});
}
private void CreateLanguageDict()
{
languageDict = new Dictionary<string, string>();
languageDict["Default"] = "EN";
languageDict["English"] = "EN";
languageDict["Español"] = "ES";
languageDict["Français"] = "FR";
languageDict["Deutsch"] = "DE";
}
private void LanguageDropList_SelectionChanged(object sender, EventArgs e)
{
string languageCode = ((DropDownList)sender).SelectedLabel;
@ -231,7 +207,7 @@ namespace MatterHackers.MatterControl
ImageWidget eePromIcon = new ImageWidget(eePromImage);
eePromIcon.Margin = new BorderDouble (right: 6);
Button openEePromWindow = textImageButtonFactory.Generate(LocalizedString.Get("CONFIGURE"));
Button openEePromWindow = textImageButtonFactory.Generate("Configure".Localize().ToUpper());
openEePromWindow.Click += (sender, e) =>
{
#if false // This is to force the creation of the repetier window for testing when we don't have repetier firmware.
@ -335,7 +311,7 @@ namespace MatterHackers.MatterControl
this.textImageButtonFactory.FixedHeight = TallButtonHeight;
Button runPrintLevelingButton = textImageButtonFactory.Generate(LocalizedString.Get("CONFIGURE"));
Button runPrintLevelingButton = textImageButtonFactory.Generate("Configure".Localize().ToUpper());
runPrintLevelingButton.Margin = new BorderDouble(left:6);
runPrintLevelingButton.VAnchor = VAnchor.ParentCenter;
runPrintLevelingButton.Click += new ButtonBase.ButtonEventHandler(runPrintLeveling_Click);
@ -350,12 +326,12 @@ namespace MatterHackers.MatterControl
ImageWidget levelingIcon = new ImageWidget(levelingImage);
levelingIcon.Margin = new BorderDouble (right: 6);
enablePrintLevelingButton = textImageButtonFactory.Generate(LocalizedString.Get("ENABLE"));
enablePrintLevelingButton = textImageButtonFactory.Generate("Enable".Localize().ToUpper());
enablePrintLevelingButton.Margin = new BorderDouble(left:6);
enablePrintLevelingButton.VAnchor = VAnchor.ParentCenter;
enablePrintLevelingButton.Click += new ButtonBase.ButtonEventHandler(enablePrintLeveling_Click);
disablePrintLevelingButton = textImageButtonFactory.Generate(LocalizedString.Get("DISABLE"));
disablePrintLevelingButton = textImageButtonFactory.Generate("Disable".Localize().ToUpper());
disablePrintLevelingButton.Margin = new BorderDouble(left:6);
disablePrintLevelingButton.VAnchor = VAnchor.ParentCenter;
disablePrintLevelingButton.Click += new ButtonBase.ButtonEventHandler(disablePrintLeveling_Click);

View file

@ -10,17 +10,15 @@ using MatterHackers.VectorMath;
using MatterHackers.MatterControl.DataStorage;
using MatterHackers.Localizations;
namespace MatterHackers.MatterControl
{
public class LanguageSelector : StyledDropDownList
{
{
Dictionary<string, string> languageDict;
public LanguageSelector(string selection)
: base(selection)
public LanguageSelector()
: base("Default")
{
//string pathToModels = Path.Combine(ApplicationDataStorage.Instance.ApplicationStaticDataPath, "PrinterSettings", manufacturer);
//if (Directory.Exists(pathToModels))
//{
@ -32,7 +30,34 @@ namespace MatterHackers.MatterControl
//}
this.MinimumSize = new Vector2(this.LocalBounds.Width, this.LocalBounds.Height);
CreateLanguageDict();
string languageCode = UserSettings.Instance.get("Language");
foreach (KeyValuePair<string, string> entry in languageDict)
{
AddItem(entry.Key, entry.Value);
}
foreach (KeyValuePair<string, string> entry in languageDict)
{
if (languageCode == entry.Value)
{
SelectedLabel = entry.Key;
break;
}
}
}
private void CreateLanguageDict()
{
languageDict = new Dictionary<string, string>();
languageDict["Default"] = "EN";
languageDict["English"] = "EN";
languageDict["Español"] = "ES";
languageDict["Français"] = "FR";
languageDict["Deutsch"] = "DE";
}
}
}

38
Launcher/Launcher.cs Normal file
View file

@ -0,0 +1,38 @@
using System;
using System.Collections.Generic;
using System.Runtime.InteropServices;
using System.Linq;
using System.Text;
using System.IO;
using System.Diagnostics;
namespace MatterHackers.MatterControl.Launcher
{
public class LauncherApp
{
public LauncherApp()
{
}
[STAThread]
public static void Main(string[] args)
{
if (args.Length == 2 && File.Exists(args[0]))
{
ProcessStartInfo runAppLauncherStartInfo = new ProcessStartInfo();
runAppLauncherStartInfo.FileName = args[0];
int timeToWait = 0;
int.TryParse(args[1], out timeToWait);
Stopwatch waitTime = new Stopwatch();
waitTime.Start();
while (waitTime.ElapsedMilliseconds < timeToWait)
{
}
Process.Start(runAppLauncherStartInfo);
}
}
}
}

50
Launcher/Launcher.csproj Normal file
View file

@ -0,0 +1,50 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="4.0">
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Release</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProductVersion>8.0.50727</ProductVersion>
<SchemaVersion>2.0</SchemaVersion>
<OutputType>Exe</OutputType>
<ProjectGuid>{3DF4CB3D-9A03-4256-9A81-70523AAD828B}</ProjectGuid>
<OutputPath>bin\Release\</OutputPath>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>MatterHackers.MatterControl.Launcher</RootNamespace>
<AssemblyName>Launcher</AssemblyName>
<FileUpgradeFlags>
</FileUpgradeFlags>
<UpgradeBackupLocation>
</UpgradeBackupLocation>
<OldToolsVersion>2.0</OldToolsVersion>
<ReleaseVersion>0.8.2</ReleaseVersion>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>True</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>False</Optimize>
<OutputPath>bin\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<AllowUnsafeBlocks>True</AllowUnsafeBlocks>
<PlatformTarget>AnyCPU</PlatformTarget>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>pdbonly</DebugType>
<Optimize>True</Optimize>
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<AllowUnsafeBlocks>True</AllowUnsafeBlocks>
<PlatformTarget>AnyCPU</PlatformTarget>
</PropertyGroup>
<ItemGroup>
<Reference Include="System" />
</ItemGroup>
<ItemGroup>
</ItemGroup>
<ItemGroup>
<Compile Include="Launcher.cs" />
</ItemGroup>
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
</Project>

View file

@ -316,6 +316,10 @@
<Project>{AE37DE1F-22F7-49EE-8732-FC6BC8DC58D9}</Project>
<Name>Tesselate</Name>
</ProjectReference>
<ProjectReference Include="Launcher\Launcher.csproj">
<Project>{3DF4CB3D-9A03-4256-9A81-70523AAD828B}</Project>
<Name>Launcher</Name>
</ProjectReference>
<ProjectReference Include="PrinterDriverInstaller\InfInstaller.csproj">
<Project>{990A9AD3-B6A4-407B-9DFC-9C722AF7C9B9}</Project>
<Name>InfInstaller</Name>

View file

@ -58,6 +58,8 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "OutlineCreator", "..\Matter
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MatterSlice", "..\MatterSlice\MatterSlice.csproj", "{C46CA728-DD2F-4DD1-971A-AAA89D9DFF95}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Launcher", "Launcher\Launcher.csproj", "{3DF4CB3D-9A03-4256-9A81-70523AAD828B}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
@ -224,6 +226,12 @@ Global
{C46CA728-DD2F-4DD1-971A-AAA89D9DFF95}.Release|Any CPU.ActiveCfg = Release|Any CPU
{C46CA728-DD2F-4DD1-971A-AAA89D9DFF95}.Release|Any CPU.Build.0 = Release|Any CPU
{C46CA728-DD2F-4DD1-971A-AAA89D9DFF95}.Release|x86.ActiveCfg = Release|Any CPU
{3DF4CB3D-9A03-4256-9A81-70523AAD828B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{3DF4CB3D-9A03-4256-9A81-70523AAD828B}.Debug|Any CPU.Build.0 = Debug|Any CPU
{3DF4CB3D-9A03-4256-9A81-70523AAD828B}.Debug|x86.ActiveCfg = Debug|Any CPU
{3DF4CB3D-9A03-4256-9A81-70523AAD828B}.Release|Any CPU.ActiveCfg = Release|Any CPU
{3DF4CB3D-9A03-4256-9A81-70523AAD828B}.Release|Any CPU.Build.0 = Release|Any CPU
{3DF4CB3D-9A03-4256-9A81-70523AAD828B}.Release|x86.ActiveCfg = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE

View file

@ -274,6 +274,13 @@ namespace MatterHackers.MatterControl
if (firstDraw)
{
string desktopPosition = ApplicationSettings.Instance.get("DesktopPosition");
if (desktopPosition != null && desktopPosition != "")
{
string[] sizes = desktopPosition.Split(',');
DesktopPosition = new Point2D(int.Parse(sizes[0]), int.Parse(sizes[1]));
}
firstDraw = false;
foreach (string arg in commandLineArgs)
{
@ -317,11 +324,25 @@ namespace MatterHackers.MatterControl
{
// save the last size of the window so we can restore it next time.
ApplicationSettings.Instance.set("WindowSize", string.Format("{0},{1}", Width, Height));
ApplicationSettings.Instance.set("DesktopPosition", string.Format("{0},{1}", DesktopPosition.x, DesktopPosition.y));
PrinterCommunication.Instance.Disable();
//Close connection to the local datastore
Datastore.Instance.Exit();
PrinterCommunication.Instance.HaltConnectionThread();
SlicingQueue.Instance.ShutDownSlicingThread();
if (RestartOnClose)
{
string appPathAndFile = System.Reflection.Assembly.GetExecutingAssembly().Location;
string pathToAppFolder = Path.GetDirectoryName(appPathAndFile);
ProcessStartInfo runAppLauncherStartInfo = new ProcessStartInfo();
runAppLauncherStartInfo.Arguments = "\"{0}\" \"{1}\"".FormatWith(appPathAndFile, 1000);
runAppLauncherStartInfo.FileName = Path.Combine(pathToAppFolder, "Launcher.exe");
runAppLauncherStartInfo.WindowStyle = ProcessWindowStyle.Hidden;
runAppLauncherStartInfo.CreateNoWindow = true;
Process.Start(runAppLauncherStartInfo);
}
base.OnClosed(e);
}

View file

@ -130,9 +130,10 @@ namespace MatterHackers.MatterControl.PartPreviewWindow
gcodeDispalyWidget = new GuiWidget(HAnchor.ParentLeftRight, Agg.UI.VAnchor.ParentBottomTop);
string startingMessage = LocalizedString.Get("No GCode Available...");
string startingMessage = "";
if (printItem != null)
{
startingMessage = LocalizedString.Get("No GCode Available...");
startingMessage = LocalizedString.Get("Loading GCode...");
if (Path.GetExtension(printItem.FileLocation).ToUpper() == ".GCODE")
{
@ -205,7 +206,7 @@ namespace MatterHackers.MatterControl.PartPreviewWindow
{
BorderDouble buttonMargin = new BorderDouble(top: 3);
string label = LocalizedString.Get("MODEL");
string label = "MODEL".Localize().ToUpper();
expandModelOptions = expandMenuOptionFactory.GenerateCheckBoxButton(label, "icon_arrow_right_no_border_32x32.png", "icon_arrow_down_no_border_32x32.png");
expandModelOptions.Margin = new BorderDouble(bottom: 2);
buttonRightPanel.AddChild(expandModelOptions);
@ -216,7 +217,7 @@ namespace MatterHackers.MatterControl.PartPreviewWindow
//modelOptionsContainer.Visible = false;
buttonRightPanel.AddChild(modelOptionsContainer);
expandLayerOptions = expandMenuOptionFactory.GenerateCheckBoxButton(LocalizedString.Get("LAYER"), "icon_arrow_right_no_border_32x32.png", "icon_arrow_down_no_border_32x32.png");
expandLayerOptions = expandMenuOptionFactory.GenerateCheckBoxButton("Layer".Localize().ToUpper(), "icon_arrow_right_no_border_32x32.png", "icon_arrow_down_no_border_32x32.png");
expandLayerOptions.Margin = new BorderDouble(bottom: 2);
//buttonRightPanel.AddChild(expandLayerOptions);
@ -225,7 +226,7 @@ namespace MatterHackers.MatterControl.PartPreviewWindow
layerOptionsContainer.Visible = false;
buttonRightPanel.AddChild(layerOptionsContainer);
expandDisplayOptions = expandMenuOptionFactory.GenerateCheckBoxButton(LocalizedString.Get("DISPLAY"), "icon_arrow_right_no_border_32x32.png", "icon_arrow_down_no_border_32x32.png");
expandDisplayOptions = expandMenuOptionFactory.GenerateCheckBoxButton("Display".Localize().ToUpper(), "icon_arrow_right_no_border_32x32.png", "icon_arrow_down_no_border_32x32.png");
expandDisplayOptions.Margin = new BorderDouble(bottom: 2);
buttonRightPanel.AddChild(expandDisplayOptions);
expandDisplayOptions.Checked = true;
@ -263,10 +264,10 @@ namespace MatterHackers.MatterControl.PartPreviewWindow
modelInfoContainer.HAnchor = HAnchor.ParentLeftRight;
modelInfoContainer.Padding = new BorderDouble(5);
string printTimeLbl = LocalizedString.Get ("PRINT TIME");
string printTimeLblFull = string.Format ("{0}:", printTimeLbl);
string printTimeLabel = "Print Time".Localize().ToUpper();
string printTimeLabelFull = string.Format ("{0}:", printTimeLabel);
// put in the print time
modelInfoContainer.AddChild(new TextWidget(printTimeLblFull, textColor: ActiveTheme.Instance.PrimaryTextColor, pointSize:10));
modelInfoContainer.AddChild(new TextWidget(printTimeLabelFull, textColor: ActiveTheme.Instance.PrimaryTextColor, pointSize:10));
{
string timeRemainingText = "---";
@ -294,7 +295,7 @@ namespace MatterHackers.MatterControl.PartPreviewWindow
//modelInfoContainer.AddChild(new TextWidget("Size:", textColor: ActiveTheme.Instance.PrimaryTextColor));
string filamentLengthLbl = LocalizedString.Get ("FILAMENT LENGTH");
string filamentLengthLbl = "Filament Length".Localize().ToUpper();
string filamentLengthLblFull = string.Format ("{0}:", filamentLengthLbl);
// show the filament used
modelInfoContainer.AddChild(new TextWidget(filamentLengthLblFull, textColor: ActiveTheme.Instance.PrimaryTextColor, pointSize: 9));
@ -307,9 +308,9 @@ namespace MatterHackers.MatterControl.PartPreviewWindow
modelInfoContainer.AddChild(estimatedPrintTime);
}
string filamentVolumeLbl = LocalizedString.Get ("FILAMENT VOLUME");
string filamentVolumeLblFull = string.Format("{0}:", filamentVolumeLbl);
modelInfoContainer.AddChild(new TextWidget(filamentVolumeLblFull, textColor: ActiveTheme.Instance.PrimaryTextColor, pointSize: 9));
string filamentVolumeLabel = "Filament Volume".Localize().ToUpper();
string filamentVolumeLabelFull = string.Format("{0}:", filamentVolumeLabel);
modelInfoContainer.AddChild(new TextWidget(filamentVolumeLabelFull, textColor: ActiveTheme.Instance.PrimaryTextColor, pointSize: 9));
{
double filamentMm3 = gcodeViewWidget.LoadedGCode.GetFilamentCubicMm(ActiveSliceSettings.Instance.FilamentDiameter);
@ -319,9 +320,9 @@ namespace MatterHackers.MatterControl.PartPreviewWindow
modelInfoContainer.AddChild(estimatedPrintTime);
}
string weightLbl = LocalizedString.Get("EST. WEIGHT");
string weightLblFull = string.Format("{0}:", weightLbl);
modelInfoContainer.AddChild(new TextWidget(weightLblFull, pointSize: 9, textColor: ActiveTheme.Instance.PrimaryTextColor));
string weightLabel = "Est. Weight".Localize().ToUpper();
string weightLabelFull = string.Format("{0}:", weightLabel);
modelInfoContainer.AddChild(new TextWidget(weightLabelFull, pointSize: 9, textColor: ActiveTheme.Instance.PrimaryTextColor));
{
var density = 1.0;
string filamentType = "PLA";

View file

@ -119,18 +119,20 @@ namespace MatterHackers.MatterControl.PrintHistory
buttonContainer.Margin = new BorderDouble(0);
buttonContainer.HAnchor = Agg.UI.HAnchor.ParentLeftRight;
{
TextWidget statusIndicator = new TextWidget("Status: Completed", pointSize:8);
TextWidget statusIndicator = new TextWidget("Status: Completed".Localize(), pointSize:8);
statusIndicator.Margin = new BorderDouble(right: 3);
//buttonContainer.AddChild(statusIndicator);
TextWidget timeLabel = new TextWidget("PRINT TIME: ", pointSize:8);
string printTimeLabel = "Print Time".Localize().ToUpper();
string printTimeLabelFull = string.Format("{0}: ", printTimeLabel);
TextWidget timeLabel = new TextWidget(printTimeLabelFull, pointSize: 8);
timeLabel.TextColor = timeTextColor;
TextWidget timeIndicator;
int minutes = printTask.PrintTimeMinutes;
if (minutes < 0)
{
timeIndicator = new TextWidget("Unknown");
timeIndicator = new TextWidget("Unknown".Localize());
}
else if (minutes > 60)
{
@ -147,7 +149,7 @@ namespace MatterHackers.MatterControl.PrintHistory
buttonContainer.AddChild(timeLabel);
buttonContainer.AddChild(timeIndicator);
printAgainLink = linkButtonFactory.Generate(LocalizedString.Get("Print Again"));
printAgainLink = linkButtonFactory.Generate("Print Again".Localize());
printAgainLink.Margin = new BorderDouble(left: 0, right: 10);
printAgainLink.VAnchor = VAnchor.ParentCenter;
@ -176,7 +178,8 @@ namespace MatterHackers.MatterControl.PrintHistory
startTimeContainer.HAnchor = Agg.UI.HAnchor.ParentLeftRight;
startTimeContainer.Padding = new BorderDouble(0, 3);
TextWidget startLabel = new TextWidget("START:", pointSize: 8);
string startLabelFull = "{0}:".FormatWith("Start".Localize().ToUpper());
TextWidget startLabel = new TextWidget(startLabelFull, pointSize: 8);
startLabel.TextColor = timeTextColor;
string startTimeString = printTask.PrintStart.ToString("MMM d yyyy h:mm ") + printTask.PrintStart.ToString("tt").ToLower();
@ -192,7 +195,8 @@ namespace MatterHackers.MatterControl.PrintHistory
endTimeContainer.HAnchor = Agg.UI.HAnchor.ParentLeftRight;
endTimeContainer.Padding = new BorderDouble(0, 3);
TextWidget endLabel = new TextWidget("END:", pointSize: 8);
string endLabelFull = "{0}:".FormatWith("End".Localize().ToUpper());
TextWidget endLabel = new TextWidget(endLabelFull, pointSize: 8);
endLabel.TextColor = timeTextColor;
string endTimeString;
@ -202,7 +206,7 @@ namespace MatterHackers.MatterControl.PrintHistory
}
else
{
endTimeString = "Unknown";
endTimeString = "Unknown".Localize();
}
TextWidget endDate = new TextWidget(endTimeString, pointSize: 12);

View file

@ -246,7 +246,7 @@ namespace MatterHackers.MatterControl
ImageWidget eePromIcon = new ImageWidget(eePromImage);
eePromIcon.Margin = new BorderDouble (right: 6);
Button openEePromWindow = textImageButtonFactory.Generate(LocalizedString.Get("CONFIGURE"));
Button openEePromWindow = textImageButtonFactory.Generate("Configure".Localize().ToUpper());
openEePromWindow.Click += (sender, e) =>
{
#if false // This is to force the creation of the repetier window for testing when we don't have repetier firmware.
@ -547,7 +547,7 @@ namespace MatterHackers.MatterControl
ImageWidget terminalIcon = new ImageWidget(terminalImage);
terminalIcon.Margin = new BorderDouble (right: 6);
Button showTerminal = textImageButtonFactory.Generate(LocalizedString.Get("SHOW TERMINAL"));
Button showTerminal = textImageButtonFactory.Generate("Show Terminal".Localize().ToUpper());
showTerminal.Margin = new BorderDouble(0);
showTerminal.Click += (sender, e) =>
{
@ -565,14 +565,14 @@ namespace MatterHackers.MatterControl
private GuiWidget CreateSdCardManagerContainer()
{
GroupBox terminalControlsContainer;
terminalControlsContainer = new GroupBox("SD Card Printing");
GroupBox sdCardControlsContainer;
sdCardControlsContainer = new GroupBox("SD Card Printing");
terminalControlsContainer.Margin = new BorderDouble(top: 10);
terminalControlsContainer.TextColor = ActiveTheme.Instance.PrimaryTextColor;
terminalControlsContainer.BorderColor = ActiveTheme.Instance.PrimaryTextColor;
terminalControlsContainer.HAnchor = Agg.UI.HAnchor.ParentLeftRight;
terminalControlsContainer.Height = 68;
sdCardControlsContainer.Margin = new BorderDouble(top: 10);
sdCardControlsContainer.TextColor = ActiveTheme.Instance.PrimaryTextColor;
sdCardControlsContainer.BorderColor = ActiveTheme.Instance.PrimaryTextColor;
sdCardControlsContainer.HAnchor = Agg.UI.HAnchor.ParentLeftRight;
sdCardControlsContainer.Height = 68;
{
FlowLayoutWidget buttonBar = new FlowLayoutWidget();
@ -583,7 +583,7 @@ namespace MatterHackers.MatterControl
this.textImageButtonFactory.FixedHeight = TallButtonHeight;
Button showSDPrintingPannel = textImageButtonFactory.Generate("SD CARD MANAGER");
Button showSDPrintingPannel = textImageButtonFactory.Generate("SD Card Manager".ToUpper());
showSDPrintingPannel.Margin = new BorderDouble(left: 10);
showSDPrintingPannel.Click += (sender, e) =>
{
@ -591,10 +591,10 @@ namespace MatterHackers.MatterControl
};
buttonBar.AddChild(showSDPrintingPannel);
terminalControlsContainer.AddChild(buttonBar);
sdCardControlsContainer.AddChild(buttonBar);
}
return terminalControlsContainer;
return sdCardControlsContainer;
}
private void SetDisplayAttributes()
@ -623,7 +623,7 @@ namespace MatterHackers.MatterControl
movementControlsContainer.SetEnableLevel(DisableableWidget.EnableLevel.Disabled);
fanControlsContainer.SetEnableLevel(DisableableWidget.EnableLevel.Disabled);
tuningAdjustmentControlsContainer.SetEnableLevel(DisableableWidget.EnableLevel.Disabled);
terminalCommunicationsContainer.SetEnableLevel(DisableableWidget.EnableLevel.Disabled);
terminalCommunicationsContainer.SetEnableLevel(DisableableWidget.EnableLevel.Enabled);
sdCardManagerContainer.SetEnableLevel(DisableableWidget.EnableLevel.Disabled);
macroControls.SetEnableLevel(DisableableWidget.EnableLevel.Disabled);
}
@ -738,7 +738,7 @@ namespace MatterHackers.MatterControl
GuiWidget spacer = new GuiWidget();
spacer.HAnchor = HAnchor.ParentLeftRight;
disableMotors = textImageButtonFactory.Generate(LocalizedString.Get("UNLOCK"));
disableMotors = textImageButtonFactory.Generate("Unlock".Localize().ToUpper());
disableMotors.Margin = new BorderDouble(0);
disableMotors.Click += new ButtonBase.ButtonEventHandler(disableMotors_Click);

View file

@ -1932,3 +1932,24 @@ Translated:You cannot move any lower. This position on your bed is too low for t
English:Edit Preset
Translated:Edit Preset
English:Slice-Engine
Translated:Slice-Engine
English:Status: Completed
Translated:Status: Completed
English:Unlock
Translated:Unlock
English:Show Terminal
Translated:Show Terminal
English:Configure
Translated:Configure
English:Disable
Translated:Disable
English:Est. Weight
Translated:Est. Weight

View file

@ -1816,3 +1816,123 @@ Translated:MatterContol
English:Saving to Parts Sheet
Translated:Saving to Parts Sheet
English:The default temperature to set the bed to. Can sometimes be overriden on the first layer. Set to 0 to eliminate bed temperature commands.
Translated:The default temperature to set the bed to. Can sometimes be overriden on the first layer. Set to 0 to eliminate bed temperature commands.
English:The default temperature to set the extruder to. Can sometimes be overriden on the first layer.
Translated:The default temperature to set the extruder to. Can sometimes be overriden on the first layer.
English:Macro Editor
Translated:Macro Editor
English:Macro Presets
Translated:Macro Presets
English:Edit Macro
Translated:Edit Macro
English:Macro Name
Translated:Macro Name
English:Give your macro a name
Translated:Give your macro a name
English:Macro Commands
Translated:Macro Commands
English:This should be in 'Gcode'
Translated:This should be in 'Gcode'
English:3D Printer Setup
Translated:3D Printer Setup
English:Give your printer a name.
Translated:Give your printer a name.
English:Select Make
Translated:Select Make
English:Select the printer manufacturer
Translated:Select the printer manufacturer
English:Select the printer model
Translated:Select the printer model
English:Save & Continue
Translated:Save & Continue
English:MatterControl will now attempt to auto-detect printer.
Translated:MatterControl will now attempt to auto-detect printer.
English:Disconnect printer
Translated:Disconnect printer
English:if currently connected
Translated:if currently connected
English:Press
Translated:Press
English:Continue
Translated:Continue
English:Manual Configuration
Translated:Manual Configuration
English:Setup Manual Configuration
Translated:Setup Manual Configuration
English:or
Translated:or
English:Skip Printer Connection
Translated:Skip Printer Connection
English:You can either
Translated:You can either
English:You can also
Translated:You can also
English:Extruder Temperature Settings
Translated:Extruder Temperature Settings
English:Temperature Shortcut Presets
Translated:Temperature Shortcut Presets
English:Label
Translated:Label
English:Preset
Translated:Preset
English:Max Temp.
Translated:Max Temp.
English:Bed Temperature Settings
Translated:Bed Temperature Settings
English:Movement Speeds
Translated:Movement Speeds
English:Extruder
Translated:Extruder
English:Power on and connect printer
Translated:Power on and connect printer
English:Attempting to connect
Translated:Attempting to connect
English:Connection succeeded
Translated:Connection succeeded
English:You cannot move any lower. This position on your bed is too low for the extruder to reach. You need to raise your bed, or adjust your limits to allow the extruder to go lower.
Translated:You cannot move any lower. This position on your bed is too low for the extruder to reach. You need to raise your bed, or adjust your limits to allow the extruder to go lower.
English:Edit Preset
Translated:Edit Preset
English:Slice-Engine
Translated:Slice-Engine

View file

@ -5,4 +5,7 @@ should appear at the bottom of that file.
There is a folder for each langage. The names of these folders
match the ISO 639 standard which can be found at:
http://en.wikipedia.org/wiki/List_of_ISO_639-1_codes
http://en.wikipedia.org/wiki/List_of_ISO_639-1_codes
Special thanks to:
Filip Bartoszek - original German Translation