Changed Changing some delegate defs to use EventHandler<> instead.
Took out some EventHandler new s that were from old code Now Provider code Create Folder in library and working some in provider. New tests in MatterSlice
This commit is contained in:
parent
edbcbd5cd1
commit
f6d32a62a5
17 changed files with 234 additions and 55 deletions
|
|
@ -40,8 +40,6 @@ namespace MatterHackers.MatterControl.HtmlParsing
|
|||
private static List<string> voidElements = new List<string>() { "area", "base", "br", "col", "command", "embed", "hr", "img", "input", "keygen", "link", "meta", "param", "source", "track", "wbr" };
|
||||
private Stack<ElementState> elementQueue = new Stack<ElementState>();
|
||||
|
||||
public delegate void ProcessContent(HtmlParser htmlParser, string content);
|
||||
|
||||
public ElementState CurrentElementState { get { return elementQueue.Peek(); } }
|
||||
|
||||
public static string UrlDecode(string htmlContent)
|
||||
|
|
@ -52,7 +50,7 @@ namespace MatterHackers.MatterControl.HtmlParsing
|
|||
|
||||
return decoded;
|
||||
}
|
||||
public void ParseHtml(string htmlContent, ProcessContent addContentFunction, ProcessContent closeContentFunction)
|
||||
public void ParseHtml(string htmlContent, Action<HtmlParser, string> addContentFunction, Action<HtmlParser, string> closeContentFunction)
|
||||
{
|
||||
elementQueue.Push(new ElementState());
|
||||
|
||||
|
|
|
|||
|
|
@ -82,9 +82,7 @@ namespace MatterHackers.MatterControl.ActionBar
|
|||
}
|
||||
}
|
||||
|
||||
public delegate void AddIconToPrintStatusRowDelegate(GuiWidget iconContainer);
|
||||
|
||||
public static event AddIconToPrintStatusRowDelegate AddIconToPrintStatusRow
|
||||
public static event Action<GuiWidget> AddIconToPrintStatusRow
|
||||
{
|
||||
add
|
||||
{
|
||||
|
|
@ -99,7 +97,7 @@ namespace MatterHackers.MatterControl.ActionBar
|
|||
}
|
||||
}
|
||||
|
||||
private static event AddIconToPrintStatusRowDelegate privateAddIconToPrintStatusRow;
|
||||
private static event Action<GuiWidget> privateAddIconToPrintStatusRow;
|
||||
|
||||
private event EventHandler unregisterEvents;
|
||||
private string ActivePrintStatusText
|
||||
|
|
|
|||
|
|
@ -205,6 +205,7 @@
|
|||
<Compile Include="PrinterControls\TerminalWindow\TextScrollWidget.cs" />
|
||||
<Compile Include="PrinterControls\TerminalWindow\TerminalWidget.cs" />
|
||||
<Compile Include="PrintHistory\PrintHistoryData.cs" />
|
||||
<Compile Include="PrintLibrary\CreateFolderWindow.cs" />
|
||||
<Compile Include="PrintLibrary\LibraryRowItemCollection.cs" />
|
||||
<Compile Include="PrintLibrary\LibraryRowItemPart.cs" />
|
||||
<Compile Include="PrintLibrary\Provider\LibraryProviderFactory.cs" />
|
||||
|
|
|
|||
|
|
@ -12,18 +12,16 @@ namespace MatterHackers.MatterControl
|
|||
{
|
||||
public class SaveAsWindow : SystemWindow
|
||||
{
|
||||
private CheckBox addToLibraryOption;
|
||||
private Action<SaveAsReturnInfo> functionToCallOnSaveAs;
|
||||
private TextImageButtonFactory textImageButtonFactory = new TextImageButtonFactory();
|
||||
private MHTextEditWidget textToAddWidget;
|
||||
private CheckBox addToLibraryOption;
|
||||
|
||||
public delegate void SetPrintItemWrapperAndSave(SaveAsReturnInfo returnInfo);
|
||||
|
||||
private SetPrintItemWrapperAndSave functionToCallOnSaveAs;
|
||||
|
||||
public SaveAsWindow(SetPrintItemWrapperAndSave functionToCallOnSaveAs)
|
||||
public SaveAsWindow(Action<SaveAsReturnInfo> functionToCallOnSaveAs)
|
||||
: base(480, 250)
|
||||
{
|
||||
Title = "MatterControl - Save As";
|
||||
AlwaysOnTopOfMain = true;
|
||||
|
||||
this.functionToCallOnSaveAs = functionToCallOnSaveAs;
|
||||
|
||||
|
|
@ -40,7 +38,7 @@ namespace MatterHackers.MatterControl
|
|||
|
||||
//Creates Text and adds into header
|
||||
{
|
||||
string saveAsLabel = "Save New Design to Queue:";
|
||||
string saveAsLabel = "Save New Design to Queue".Localize() + ":";
|
||||
TextWidget elementHeader = new TextWidget(saveAsLabel, pointSize: 14);
|
||||
elementHeader.TextColor = ActiveTheme.Instance.PrimaryTextColor;
|
||||
elementHeader.HAnchor = HAnchor.ParentLeftRight;
|
||||
|
|
@ -60,24 +58,24 @@ namespace MatterHackers.MatterControl
|
|||
middleRowContainer.BackgroundColor = ActiveTheme.Instance.SecondaryBackgroundColor;
|
||||
}
|
||||
|
||||
string fileNameLabel = "Design Name";
|
||||
string fileNameLabel = "Design Name".Localize();
|
||||
TextWidget textBoxHeader = new TextWidget(fileNameLabel, pointSize: 12);
|
||||
textBoxHeader.TextColor = ActiveTheme.Instance.PrimaryTextColor;
|
||||
textBoxHeader.Margin = new BorderDouble(5);
|
||||
textBoxHeader.HAnchor = HAnchor.ParentLeft;
|
||||
|
||||
string fileNameLabelFull = "Enter the name of your design.";
|
||||
string fileNameLabelFull = "Enter the name of your design.".Localize(); ;
|
||||
TextWidget textBoxHeaderFull = new TextWidget(fileNameLabelFull, pointSize: 9);
|
||||
textBoxHeaderFull.TextColor = ActiveTheme.Instance.PrimaryTextColor;
|
||||
textBoxHeaderFull.Margin = new BorderDouble(5);
|
||||
textBoxHeaderFull.HAnchor = HAnchor.ParentLeftRight;
|
||||
|
||||
//Adds text box and check box to the above container
|
||||
textToAddWidget = new MHTextEditWidget("", pixelWidth: 300, messageWhenEmptyAndNotSelected: "Enter a Design Name Here");
|
||||
textToAddWidget = new MHTextEditWidget("", pixelWidth: 300, messageWhenEmptyAndNotSelected: "Enter a Design Name Here".Localize());
|
||||
textToAddWidget.HAnchor = HAnchor.ParentLeftRight;
|
||||
textToAddWidget.Margin = new BorderDouble(5);
|
||||
|
||||
addToLibraryOption = new CheckBox("Also save to Library", ActiveTheme.Instance.PrimaryTextColor);
|
||||
addToLibraryOption = new CheckBox("Also save to Library".Localize(), ActiveTheme.Instance.PrimaryTextColor);
|
||||
addToLibraryOption.Margin = new BorderDouble(5);
|
||||
addToLibraryOption.HAnchor = HAnchor.ParentLeftRight;
|
||||
|
||||
|
|
@ -107,7 +105,7 @@ namespace MatterHackers.MatterControl
|
|||
//Adds SaveAs and Close Button to button container
|
||||
buttonRow.AddChild(new HorizontalSpacer());
|
||||
|
||||
Button cancelButton = textImageButtonFactory.Generate("Cancel", centerText: true);
|
||||
Button cancelButton = textImageButtonFactory.Generate("Cancel".Localize(), centerText: true);
|
||||
cancelButton.Visible = true;
|
||||
cancelButton.Cursor = Cursors.Hand;
|
||||
buttonRow.AddChild(cancelButton);
|
||||
|
|
@ -131,11 +129,25 @@ namespace MatterHackers.MatterControl
|
|||
SubmitForm();
|
||||
}
|
||||
|
||||
private void SubmitForm()
|
||||
{
|
||||
string newName = textToAddWidget.ActualTextEditWidget.Text;
|
||||
if (newName != "")
|
||||
{
|
||||
string fileName = Path.ChangeExtension(Path.GetRandomFileName(), ".amf");
|
||||
string fileNameAndPath = Path.Combine(ApplicationDataStorage.Instance.ApplicationLibraryDataPath, fileName);
|
||||
|
||||
SaveAsReturnInfo returnInfo = new SaveAsReturnInfo(newName, fileNameAndPath, addToLibraryOption.Checked);
|
||||
functionToCallOnSaveAs(returnInfo);
|
||||
CloseOnIdle();
|
||||
}
|
||||
}
|
||||
|
||||
public class SaveAsReturnInfo
|
||||
{
|
||||
public string fileNameAndPath;
|
||||
public bool placeInLibrary;
|
||||
public string newName;
|
||||
public bool placeInLibrary;
|
||||
public PrintItemWrapper printItemWrapper;
|
||||
|
||||
public SaveAsReturnInfo(string newName, string fileNameAndPath, bool placeInLibrary)
|
||||
|
|
@ -153,19 +165,5 @@ namespace MatterHackers.MatterControl
|
|||
printItemWrapper = new PrintItemWrapper(printItem);
|
||||
}
|
||||
}
|
||||
|
||||
private void SubmitForm()
|
||||
{
|
||||
string newName = textToAddWidget.ActualTextEditWidget.Text;
|
||||
if (newName != "")
|
||||
{
|
||||
string fileName = Path.ChangeExtension(Path.GetRandomFileName(), ".amf");
|
||||
string fileNameAndPath = Path.Combine(ApplicationDataStorage.Instance.ApplicationLibraryDataPath, fileName);
|
||||
|
||||
SaveAsReturnInfo returnInfo = new SaveAsReturnInfo(newName, fileNameAndPath, addToLibraryOption.Checked);
|
||||
functionToCallOnSaveAs(returnInfo);
|
||||
CloseOnIdle();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -61,7 +61,7 @@ namespace MatterHackers.MatterControl.PartPreviewWindow
|
|||
{
|
||||
internal HeightValueDisplay heightDisplay;
|
||||
private readonly int EditButtonHeight = 44;
|
||||
private AfterSaveCallback afterSaveCallback = null;
|
||||
private Action afterSaveCallback = null;
|
||||
private Button applyScaleButton;
|
||||
private List<MeshGroup> asynchMeshGroups = new List<MeshGroup>();
|
||||
private List<ScaleRotateTranslate> asynchMeshGroupTransforms = new List<ScaleRotateTranslate>();
|
||||
|
|
@ -420,8 +420,6 @@ namespace MatterHackers.MatterControl.PartPreviewWindow
|
|||
};
|
||||
}
|
||||
|
||||
public delegate void AfterSaveCallback();
|
||||
|
||||
public enum AutoRotate { Enabled, Disabled };
|
||||
|
||||
public enum OpenMode { Viewing, Editing }
|
||||
|
|
@ -1932,7 +1930,7 @@ namespace MatterHackers.MatterControl.PartPreviewWindow
|
|||
}
|
||||
}
|
||||
|
||||
private void MergeAndSavePartsToCurrentMeshFile(AfterSaveCallback eventToCallAfterSave = null)
|
||||
private void MergeAndSavePartsToCurrentMeshFile(Action eventToCallAfterSave = null)
|
||||
{
|
||||
editorThatRequestedSave = true;
|
||||
afterSaveCallback = eventToCallAfterSave;
|
||||
|
|
|
|||
141
PrintLibrary/CreateFolderWindow.cs
Normal file
141
PrintLibrary/CreateFolderWindow.cs
Normal file
|
|
@ -0,0 +1,141 @@
|
|||
using MatterHackers.Agg;
|
||||
using MatterHackers.Agg.UI;
|
||||
using MatterHackers.Localizations;
|
||||
using MatterHackers.MatterControl.CustomWidgets;
|
||||
using MatterHackers.MatterControl.DataStorage;
|
||||
using System;
|
||||
using System.IO;
|
||||
|
||||
namespace MatterHackers.MatterControl
|
||||
{
|
||||
public class CreateFolderWindow : SystemWindow
|
||||
{
|
||||
private Action<CreateFolderReturnInfo> functionToCallToCreateNamedFolder;
|
||||
private TextImageButtonFactory textImageButtonFactory = new TextImageButtonFactory();
|
||||
private MHTextEditWidget textToAddWidget;
|
||||
|
||||
public CreateFolderWindow(Action<CreateFolderReturnInfo> functionToCallToCreateNamedFolder)
|
||||
: base(480, 180)
|
||||
{
|
||||
Title = "MatterControl - Create Folder";
|
||||
AlwaysOnTopOfMain = true;
|
||||
|
||||
this.functionToCallToCreateNamedFolder = functionToCallToCreateNamedFolder;
|
||||
|
||||
FlowLayoutWidget topToBottom = new FlowLayoutWidget(FlowDirection.TopToBottom);
|
||||
topToBottom.AnchorAll();
|
||||
topToBottom.Padding = new BorderDouble(3, 0, 3, 5);
|
||||
|
||||
// Creates Header
|
||||
FlowLayoutWidget headerRow = new FlowLayoutWidget(FlowDirection.LeftToRight);
|
||||
headerRow.HAnchor = HAnchor.ParentLeftRight;
|
||||
headerRow.Margin = new BorderDouble(0, 3, 0, 0);
|
||||
headerRow.Padding = new BorderDouble(0, 3, 0, 3);
|
||||
BackgroundColor = ActiveTheme.Instance.PrimaryBackgroundColor;
|
||||
|
||||
//Creates Text and adds into header
|
||||
{
|
||||
string createFolderLabel = "Create New Folder:".Localize();
|
||||
TextWidget elementHeader = new TextWidget(createFolderLabel, pointSize: 14);
|
||||
elementHeader.TextColor = ActiveTheme.Instance.PrimaryTextColor;
|
||||
elementHeader.HAnchor = HAnchor.ParentLeftRight;
|
||||
elementHeader.VAnchor = Agg.UI.VAnchor.ParentBottom;
|
||||
|
||||
headerRow.AddChild(elementHeader);
|
||||
topToBottom.AddChild(headerRow);
|
||||
this.AddChild(topToBottom);
|
||||
}
|
||||
|
||||
//Creates container in the middle of window
|
||||
FlowLayoutWidget middleRowContainer = new FlowLayoutWidget(FlowDirection.TopToBottom);
|
||||
{
|
||||
middleRowContainer.HAnchor = HAnchor.ParentLeftRight;
|
||||
middleRowContainer.VAnchor = VAnchor.ParentBottomTop;
|
||||
middleRowContainer.Padding = new BorderDouble(5);
|
||||
middleRowContainer.BackgroundColor = ActiveTheme.Instance.SecondaryBackgroundColor;
|
||||
}
|
||||
|
||||
string fileNameLabel = "Folder Name".Localize();
|
||||
TextWidget textBoxHeader = new TextWidget(fileNameLabel, pointSize: 12);
|
||||
textBoxHeader.TextColor = ActiveTheme.Instance.PrimaryTextColor;
|
||||
textBoxHeader.Margin = new BorderDouble(5);
|
||||
textBoxHeader.HAnchor = HAnchor.ParentLeft;
|
||||
|
||||
//Adds text box and check box to the above container
|
||||
textToAddWidget = new MHTextEditWidget("", pixelWidth: 300, messageWhenEmptyAndNotSelected: "Enter a Folder Name Here".Localize());
|
||||
textToAddWidget.HAnchor = HAnchor.ParentLeftRight;
|
||||
textToAddWidget.Margin = new BorderDouble(5);
|
||||
|
||||
middleRowContainer.AddChild(textBoxHeader);
|
||||
middleRowContainer.AddChild(textToAddWidget);
|
||||
middleRowContainer.AddChild(new HorizontalSpacer());
|
||||
topToBottom.AddChild(middleRowContainer);
|
||||
|
||||
//Creates button container on the bottom of window
|
||||
FlowLayoutWidget buttonRow = new FlowLayoutWidget(FlowDirection.LeftToRight);
|
||||
{
|
||||
BackgroundColor = ActiveTheme.Instance.PrimaryBackgroundColor;
|
||||
buttonRow.HAnchor = HAnchor.ParentLeftRight;
|
||||
buttonRow.Padding = new BorderDouble(0, 3);
|
||||
}
|
||||
|
||||
Button createFolderButton = textImageButtonFactory.Generate("Create".Localize(), centerText: true);
|
||||
createFolderButton.Visible = true;
|
||||
createFolderButton.Cursor = Cursors.Hand;
|
||||
buttonRow.AddChild(createFolderButton);
|
||||
|
||||
createFolderButton.Click += new EventHandler(createFolderButton_Click);
|
||||
textToAddWidget.ActualTextEditWidget.EnterPressed += new KeyEventHandler(ActualTextEditWidget_EnterPressed);
|
||||
|
||||
//Adds Create and Close Button to button container
|
||||
buttonRow.AddChild(new HorizontalSpacer());
|
||||
|
||||
Button cancelButton = textImageButtonFactory.Generate("Cancel".Localize(), centerText: true);
|
||||
cancelButton.Visible = true;
|
||||
cancelButton.Cursor = Cursors.Hand;
|
||||
buttonRow.AddChild(cancelButton);
|
||||
cancelButton.Click += (sender, e) =>
|
||||
{
|
||||
CloseOnIdle();
|
||||
};
|
||||
|
||||
topToBottom.AddChild(buttonRow);
|
||||
|
||||
ShowAsSystemWindow();
|
||||
}
|
||||
|
||||
private void ActualTextEditWidget_EnterPressed(object sender, KeyEventArgs keyEvent)
|
||||
{
|
||||
SubmitForm();
|
||||
}
|
||||
|
||||
private void createFolderButton_Click(object sender, EventArgs mouseEvent)
|
||||
{
|
||||
SubmitForm();
|
||||
}
|
||||
|
||||
private void SubmitForm()
|
||||
{
|
||||
string newName = textToAddWidget.ActualTextEditWidget.Text;
|
||||
if (newName != "")
|
||||
{
|
||||
string fileName = Path.ChangeExtension(Path.GetRandomFileName(), ".amf");
|
||||
string fileNameAndPath = Path.Combine(ApplicationDataStorage.Instance.ApplicationLibraryDataPath, fileName);
|
||||
|
||||
CreateFolderReturnInfo returnInfo = new CreateFolderReturnInfo(newName);
|
||||
functionToCallToCreateNamedFolder(returnInfo);
|
||||
CloseOnIdle();
|
||||
}
|
||||
}
|
||||
|
||||
public class CreateFolderReturnInfo
|
||||
{
|
||||
public string newName;
|
||||
|
||||
public CreateFolderReturnInfo(string newName)
|
||||
{
|
||||
this.newName = newName;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -92,9 +92,7 @@ namespace MatterHackers.MatterControl.PrintLibrary
|
|||
this.SelectedItems.Clear();
|
||||
}
|
||||
|
||||
public delegate void SelectedValueChangedEventHandler(object sender, EventArgs e);
|
||||
|
||||
public event SelectedValueChangedEventHandler SelectedValueChanged;
|
||||
public event Action<object, EventArgs> SelectedValueChanged;
|
||||
|
||||
public delegate void HoverValueChangedEventHandler(object sender, EventArgs e);
|
||||
|
||||
|
|
@ -283,7 +281,7 @@ namespace MatterHackers.MatterControl.PrintLibrary
|
|||
|
||||
itemHolder.MouseEnterBounds += new EventHandler(itemToAdd_MouseEnterBounds);
|
||||
itemHolder.MouseLeaveBounds += new EventHandler(itemToAdd_MouseLeaveBounds);
|
||||
itemHolder.MouseDownInBounds += new MouseEventHandler(itemHolder_MouseDownInBounds);
|
||||
itemHolder.MouseDownInBounds += itemHolder_MouseDownInBounds;
|
||||
itemHolder.ParentChanged += new EventHandler(itemHolder_ParentChanged);
|
||||
}
|
||||
|
||||
|
|
@ -353,7 +351,7 @@ namespace MatterHackers.MatterControl.PrintLibrary
|
|||
FlowLayoutWidget itemHolder = (FlowLayoutWidget)sender;
|
||||
itemHolder.MouseEnterBounds -= new EventHandler(itemToAdd_MouseEnterBounds);
|
||||
itemHolder.MouseLeaveBounds -= new EventHandler(itemToAdd_MouseLeaveBounds);
|
||||
itemHolder.MouseDownInBounds -= new MouseEventHandler(itemHolder_MouseDownInBounds);
|
||||
itemHolder.MouseDownInBounds -= itemHolder_MouseDownInBounds;
|
||||
itemHolder.ParentChanged -= new EventHandler(itemHolder_ParentChanged);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -43,6 +43,7 @@ namespace MatterHackers.MatterControl.PrintLibrary
|
|||
{
|
||||
public class PrintLibraryWidget : GuiWidget
|
||||
{
|
||||
private CreateFolderWindow createFolderWindow = null;
|
||||
private TextImageButtonFactory textImageButtonFactory = new TextImageButtonFactory();
|
||||
private TextImageButtonFactory editButtonFactory = new TextImageButtonFactory();
|
||||
private TextWidget navigationLabel;
|
||||
|
|
@ -154,6 +155,15 @@ namespace MatterHackers.MatterControl.PrintLibrary
|
|||
createFolderButton.Margin = new BorderDouble(0, 0, 3, 0);
|
||||
createFolderButton.Click += new EventHandler((sender, e) =>
|
||||
{
|
||||
if (createFolderWindow == null)
|
||||
{
|
||||
createFolderWindow = new CreateFolderWindow(CreateNamedFolder);
|
||||
createFolderWindow.Closed += new EventHandler(CreateFolderWindow_Closed);
|
||||
}
|
||||
else
|
||||
{
|
||||
createFolderWindow.BringToFront();
|
||||
}
|
||||
}
|
||||
);
|
||||
}
|
||||
|
|
@ -194,6 +204,16 @@ namespace MatterHackers.MatterControl.PrintLibrary
|
|||
AddHandlers();
|
||||
}
|
||||
|
||||
private void CreateFolderWindow_Closed(object sender, EventArgs e)
|
||||
{
|
||||
this.createFolderWindow = null;
|
||||
}
|
||||
|
||||
private void CreateNamedFolder(CreateFolderWindow.CreateFolderReturnInfo returnInfo)
|
||||
{
|
||||
LibraryProvider.Instance.AddCollectionToLibrary(returnInfo.newName);
|
||||
}
|
||||
|
||||
private void CreateEditBarButtons()
|
||||
{
|
||||
itemOperationButtons = new FlowLayoutWidget();
|
||||
|
|
|
|||
|
|
@ -121,7 +121,13 @@ namespace MatterHackers.MatterControl.PrintLibrary.Provider
|
|||
|
||||
public override void AddCollectionToLibrary(string collectionName)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
string directoryPath = Path.Combine(rootPath, currentDirectory, collectionName);
|
||||
if (!Directory.Exists(directoryPath))
|
||||
{
|
||||
Directory.CreateDirectory(directoryPath);
|
||||
GetFilesInCurrentDirectory();
|
||||
LibraryProvider.OnDataReloaded(null);
|
||||
}
|
||||
}
|
||||
|
||||
public override void AddFilesToLibrary(IList<string> files, List<ProviderLocatorNode> providerLocator, ReportProgressRatio reportProgress = null, RunWorkerCompletedEventHandler callback = null)
|
||||
|
|
|
|||
|
|
@ -474,7 +474,7 @@ namespace MatterHackers.MatterControl.PrintQueue
|
|||
{
|
||||
itemHolder.MouseEnterBounds += new EventHandler(itemToAdd_MouseEnterBounds);
|
||||
itemHolder.MouseLeaveBounds += new EventHandler(itemToAdd_MouseLeaveBounds);
|
||||
itemHolder.MouseDownInBounds += new MouseEventHandler(itemHolder_MouseDownInBounds);
|
||||
itemHolder.MouseDownInBounds += itemHolder_MouseDownInBounds;
|
||||
itemHolder.ParentChanged += new EventHandler(itemHolder_ParentChanged);
|
||||
}
|
||||
|
||||
|
|
@ -514,7 +514,7 @@ namespace MatterHackers.MatterControl.PrintQueue
|
|||
FlowLayoutWidget itemHolder = (FlowLayoutWidget)sender;
|
||||
itemHolder.MouseEnterBounds -= new EventHandler(itemToAdd_MouseEnterBounds);
|
||||
itemHolder.MouseLeaveBounds -= new EventHandler(itemToAdd_MouseLeaveBounds);
|
||||
itemHolder.MouseDownInBounds -= new MouseEventHandler(itemHolder_MouseDownInBounds);
|
||||
itemHolder.MouseDownInBounds -= itemHolder_MouseDownInBounds;
|
||||
itemHolder.ParentChanged -= new EventHandler(itemHolder_ParentChanged);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -79,12 +79,12 @@ namespace MatterHackers.MatterControl.PrinterControls.PrinterConnections
|
|||
|
||||
public class ActionLinkFactory
|
||||
{
|
||||
public ActionLink Generate(string linkText, int fontSize, GuiWidget.MouseEventHandler clickEvent)
|
||||
public ActionLink Generate(string linkText, int fontSize, EventHandler<MouseEventArgs> clickEvent)
|
||||
{
|
||||
ActionLink actionLink = new ActionLink(linkText, fontSize);
|
||||
if (clickEvent != null)
|
||||
{
|
||||
actionLink.MouseUp += new GuiWidget.MouseEventHandler(clickEvent);
|
||||
actionLink.MouseUp += clickEvent;
|
||||
}
|
||||
return actionLink;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -326,10 +326,10 @@ namespace MatterHackers.MatterControl.PrinterControls.PrinterConnections
|
|||
|
||||
private void BindBaudRateHandlers()
|
||||
{
|
||||
otherBaudRateRadioButton.CheckedStateChanged += new RadioButton.CheckedStateChangedEventHandler(BindBaudRate_Select);
|
||||
otherBaudRateRadioButton.CheckedStateChanged += BindBaudRate_Select;
|
||||
foreach (BaudRateRadioButton button in BaudRateButtonsList)
|
||||
{
|
||||
button.CheckedStateChanged += new RadioButton.CheckedStateChangedEventHandler(BindBaudRate_Select);
|
||||
button.CheckedStateChanged += BindBaudRate_Select;
|
||||
}
|
||||
BindBaudRate_Select(null, null);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -142,10 +142,10 @@ namespace MatterHackers.MatterControl.PrinterControls.PrinterConnections
|
|||
|
||||
private void BindBaudRateHandlers()
|
||||
{
|
||||
otherBaudRateRadioButton.CheckedStateChanged += new RadioButton.CheckedStateChangedEventHandler(BindBaudRate_Select);
|
||||
otherBaudRateRadioButton.CheckedStateChanged += BindBaudRate_Select;
|
||||
foreach (BaudRateRadioButton button in BaudRateButtonsList)
|
||||
{
|
||||
button.CheckedStateChanged += new RadioButton.CheckedStateChangedEventHandler(BindBaudRate_Select);
|
||||
button.CheckedStateChanged += BindBaudRate_Select;
|
||||
}
|
||||
BindBaudRate_Select(null, null);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -92,7 +92,7 @@ namespace MatterHackers.MatterControl.PrinterControls.PrinterConnections
|
|||
|
||||
printerNameInput = new MHTextEditWidget(this.ActivePrinter.Name);
|
||||
printerNameInput.HAnchor = HAnchor.ParentLeftRight;
|
||||
printerNameInput.KeyPressed += new KeyPressEventHandler(PrinterNameInput_KeyPressed);
|
||||
printerNameInput.KeyPressed += PrinterNameInput_KeyPressed;
|
||||
|
||||
printerNameError = new TextWidget(LocalizedString.Get("Give your printer a name."), 0, 0, 10);
|
||||
printerNameError.TextColor = ActiveTheme.Instance.PrimaryTextColor;
|
||||
|
|
|
|||
|
|
@ -3322,3 +3322,24 @@ Translated:Open
|
|||
English:Checking For Update...
|
||||
Translated:Checking For Update...
|
||||
|
||||
English:Create Folder
|
||||
Translated:Create Folder
|
||||
|
||||
English:Redeem
|
||||
Translated:Redeem
|
||||
|
||||
English:First Layer Height = {0}\nNozzle Diameter = {1}
|
||||
Translated:First Layer Height = {0}\nNozzle Diameter = {1}
|
||||
|
||||
English:Location: 'Settings & Controls' -> 'Settings' -> 'General' -> 'Layers/Surface'
|
||||
Translated:Location: 'Settings & Controls' -> 'Settings' -> 'General' -> 'Layers/Surface'
|
||||
|
||||
English:Create New Folder:
|
||||
Translated:Create New Folder:
|
||||
|
||||
English:Folder Name
|
||||
Translated:Folder Name
|
||||
|
||||
English:Enter a Folder Name Here
|
||||
Translated:Enter a Folder Name Here
|
||||
|
||||
|
|
|
|||
|
|
@ -1 +1 @@
|
|||
Subproject commit fbe5373c24241f37e23fa37f09e8aa9060137e07
|
||||
Subproject commit f2c88b744b6db1667ee3c3bea675bdb4881460bd
|
||||
|
|
@ -1 +1 @@
|
|||
Subproject commit 99b590af81cf6ddfa46a3f16a9b6a2e11d472c69
|
||||
Subproject commit 5849699cef05ccd1abb7e593fb4f6f70898db133
|
||||
Loading…
Add table
Add a link
Reference in a new issue