Put in a hack for the printer edit button.
This commit is contained in:
parent
dd72281bc2
commit
ce13f6f59c
6 changed files with 38 additions and 13 deletions
|
|
@ -29,11 +29,13 @@ either expressed or implied, of the FreeBSD Project.
|
|||
|
||||
using MatterHackers.Agg;
|
||||
using MatterHackers.Agg.UI;
|
||||
using MatterHackers.GuiAutomation;
|
||||
using MatterHackers.Localizations;
|
||||
using MatterHackers.MatterControl.PrinterCommunication;
|
||||
using MatterHackers.MatterControl.PrinterControls.PrinterConnections;
|
||||
using MatterHackers.MatterControl.SlicerConfiguration;
|
||||
using System;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace MatterHackers.MatterControl.ActionBar
|
||||
{
|
||||
|
|
@ -171,6 +173,7 @@ namespace MatterHackers.MatterControl.ActionBar
|
|||
private void EditButton_Click(object sender, EventArgs e)
|
||||
{
|
||||
Button editButton = sender as Button;
|
||||
editButton.ToolTipText = "Edit Printer Settings".Localize();
|
||||
if (editButton != null)
|
||||
{
|
||||
editButton.Closed += (s, e2) =>
|
||||
|
|
@ -184,17 +187,24 @@ namespace MatterHackers.MatterControl.ActionBar
|
|||
|
||||
private void AutomationTest()
|
||||
{
|
||||
AutomationRunner test = new AutomationRunner("C:/TestImages");
|
||||
test.Wait(2);
|
||||
test.ClickByName("SettingsAndControls");
|
||||
test.Wait(2);
|
||||
test.ClickImage("BackButton.png");
|
||||
|
||||
//ImageIO.SaveImageData("test.png", test.GetCurrentScreen());
|
||||
AutomationRunner testRunner = new AutomationRunner(inputType: AutomationRunner.InputType.Simulated);
|
||||
if (testRunner.NameExists("SettingsAndControls"))
|
||||
{
|
||||
testRunner.ClickByName("SettingsAndControls", 5);
|
||||
testRunner.Wait(.5);
|
||||
}
|
||||
testRunner.ClickByName("SETTINGS Tab");
|
||||
testRunner.ClickByName("Printer Tab");
|
||||
testRunner.ClickByName("Connection Tab", 5);
|
||||
testRunner.MoveToByName("Printer Name Edit", 5);
|
||||
testRunner.MoveToByName("Auto Connect Checkbox", 5);
|
||||
testRunner.MoveToByName("Baud Rate Edit", 5);
|
||||
testRunner.MoveToByName("Printer Name Edit", 5);
|
||||
testRunner.Dispose();
|
||||
}
|
||||
|
||||
|
||||
protected override void AddHandlers()
|
||||
protected override void AddHandlers()
|
||||
{
|
||||
ActiveSliceSettings.ActivePrinterChanged.RegisterEvent(onActivePrinterChanged, ref unregisterEvents);
|
||||
PrinterConnectionAndCommunication.Instance.EnableChanged.RegisterEvent(onPrinterStatusChanged, ref unregisterEvents);
|
||||
|
|
|
|||
|
|
@ -45,6 +45,7 @@ using System.Collections.Generic;
|
|||
using System.IO;
|
||||
using System.Threading.Tasks;
|
||||
using MatterHackers.Localizations;
|
||||
using MatterHackers.Agg.ImageProcessing;
|
||||
|
||||
namespace MatterHackers.MatterControl
|
||||
{
|
||||
|
|
@ -115,7 +116,9 @@ namespace MatterHackers.MatterControl
|
|||
if (noThumbnailImage.Width == 0)
|
||||
{
|
||||
StaticData.Instance.LoadIcon(noThumbnailFileName, noThumbnailImage);
|
||||
noThumbnailImage.InvertLightness();
|
||||
StaticData.Instance.LoadIcon(buildingThumbnailFileName, buildingThumbnailImage);
|
||||
buildingThumbnailImage.InvertLightness();
|
||||
}
|
||||
this.thumbnailImage = new ImageBuffer(buildingThumbnailImage);
|
||||
|
||||
|
|
|
|||
|
|
@ -52,6 +52,7 @@ using System.Threading;
|
|||
using System.Threading.Tasks;
|
||||
using MatterHackers.GCodeVisualizer;
|
||||
using Gaming.Game;
|
||||
using MatterHackers.GuiAutomation;
|
||||
|
||||
namespace MatterHackers.MatterControl
|
||||
{
|
||||
|
|
|
|||
|
|
@ -687,7 +687,8 @@ namespace MatterHackers.MatterControl.SlicerConfiguration
|
|||
var intEditWidget = new MHNumberEdit(currentValue, pixelWidth: intEditWidth, tabIndex: tabIndexForItem++)
|
||||
{
|
||||
ToolTipText = settingData.HelpText,
|
||||
SelectAllOnFocus = true
|
||||
SelectAllOnFocus = true,
|
||||
Name = settingData.PresentationName + " Edit",
|
||||
};
|
||||
intEditWidget.ActuallNumberEdit.EditComplete += (sender, e) =>
|
||||
{
|
||||
|
|
@ -1045,8 +1046,12 @@ namespace MatterHackers.MatterControl.SlicerConfiguration
|
|||
|
||||
case OrganizerSettingsData.DataEditTypes.STRING:
|
||||
{
|
||||
var stringEdit = new MHTextEditWidget(sliceSettingValue, pixelWidth: 120, tabIndex: tabIndexForItem++);
|
||||
var stringEdit = new MHTextEditWidget(sliceSettingValue, pixelWidth: 120, tabIndex: tabIndexForItem++)
|
||||
{
|
||||
Name = settingData.PresentationName + " Edit",
|
||||
};
|
||||
stringEdit.ToolTipText = settingData.HelpText;
|
||||
|
||||
stringEdit.ActualTextEditWidget.EditComplete += (sender, e) =>
|
||||
{
|
||||
SaveSetting(settingData.SlicerConfigName, ((TextEditWidget)sender).Text);
|
||||
|
|
|
|||
|
|
@ -11,7 +11,7 @@ Simple
|
|||
Connection
|
||||
Description
|
||||
MatterControl.PrinterName
|
||||
Connection
|
||||
Details
|
||||
MatterControl.AutoConnect
|
||||
MatterControl.BaudRate
|
||||
MatterControl.ComPort
|
||||
|
|
@ -72,7 +72,7 @@ Intermediate
|
|||
Connection
|
||||
Description
|
||||
MatterControl.PrinterName
|
||||
Connection
|
||||
Details
|
||||
MatterControl.AutoConnect
|
||||
MatterControl.BaudRate
|
||||
MatterControl.ComPort
|
||||
|
|
@ -272,7 +272,7 @@ Advanced
|
|||
Connection
|
||||
Description
|
||||
MatterControl.PrinterName
|
||||
Connection
|
||||
Details
|
||||
MatterControl.AutoConnect
|
||||
MatterControl.BaudRate
|
||||
MatterControl.ComPort
|
||||
|
|
|
|||
|
|
@ -4849,3 +4849,9 @@ Translated:Connection Info
|
|||
English:Camera Monitoring
|
||||
Translated:Camera Monitoring
|
||||
|
||||
English:Details
|
||||
Translated:Details
|
||||
|
||||
English:Edit Printer Settings
|
||||
Translated:Edit Printer Settings
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue