Load and Unload Macros working better.
Fixed colors on redeem purchase disabled button
This commit is contained in:
parent
a241888635
commit
06b1512698
24 changed files with 87 additions and 72 deletions
|
|
@ -135,7 +135,7 @@ namespace MatterHackers.MatterControl
|
|||
//Add buttons to buttonContainer
|
||||
footerRow.AddChild(nextButton);
|
||||
footerRow.AddChild(hSpacer);
|
||||
footerRow.AddChild(cancelButton);
|
||||
footerRow.AddChild(closeButton);
|
||||
|
||||
updateControls(true);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -51,9 +51,9 @@ namespace MatterHackers.MatterControl
|
|||
contentRow.AddChild(new SetupAccountView(this.textImageButtonFactory));
|
||||
|
||||
footerRow.AddChild(new HorizontalSpacer());
|
||||
footerRow.AddChild(cancelButton);
|
||||
footerRow.AddChild(closeButton);
|
||||
|
||||
cancelButton.Text = "Back".Localize();
|
||||
closeButton.Text = "Back".Localize();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -213,7 +213,7 @@ namespace MatterHackers.MatterControl
|
|||
buttonContainer.AddChild(new HorizontalSpacer());
|
||||
|
||||
// the redeem design code button
|
||||
textImageButtonFactory.disabledTextColor = RGBA_Bytes.DarkGray;
|
||||
textImageButtonFactory.disabledTextColor = new RGBA_Bytes(textImageButtonFactory.normalTextColor, 100);
|
||||
Button redeemPurchaseButton = textImageButtonFactory.Generate("Redeem Purchase".Localize());
|
||||
redeemPurchaseButton.Enabled = true; // The library selector (the first library selected) is protected so we can't add to it.
|
||||
redeemPurchaseButton.Name = "Redeem Code Button";
|
||||
|
|
|
|||
|
|
@ -136,9 +136,9 @@ namespace MatterHackers.MatterControl
|
|||
contentRow.AddChild(rememberChoice);
|
||||
|
||||
syncButton.Visible = true;
|
||||
cancelButton.Visible = true;
|
||||
closeButton.Visible = true;
|
||||
|
||||
cancelButton.Click += (s, e) => UiThread.RunOnIdle(() =>
|
||||
closeButton.Click += (s, e) => UiThread.RunOnIdle(() =>
|
||||
{
|
||||
WizardWindow.Close();
|
||||
if (rememberChoice.Checked)
|
||||
|
|
@ -150,7 +150,7 @@ namespace MatterHackers.MatterControl
|
|||
//Add buttons to buttonContainer
|
||||
footerRow.AddChild(syncButton);
|
||||
footerRow.AddChild(new HorizontalSpacer());
|
||||
footerRow.AddChild(cancelButton);
|
||||
footerRow.AddChild(closeButton);
|
||||
|
||||
footerRow.Visible = true;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -61,9 +61,9 @@ namespace MatterHackers.MatterControl
|
|||
contentRow.AddChild(SliceSettingsWidget.CreatePrinterExtraControls());
|
||||
|
||||
footerRow.AddChild(new HorizontalSpacer());
|
||||
footerRow.AddChild(cancelButton);
|
||||
footerRow.AddChild(closeButton);
|
||||
|
||||
cancelButton.Text = "Back".Localize();
|
||||
closeButton.Text = "Back".Localize();
|
||||
|
||||
// Close this form if the active printer changes
|
||||
ActiveSliceSettings.ActivePrinterChanged.RegisterEvent((s, e) =>
|
||||
|
|
|
|||
|
|
@ -100,12 +100,12 @@ namespace MatterHackers.MatterControl
|
|||
exportButton.Click += (s, e) => UiThread.RunOnIdle(exportButton_Click);
|
||||
|
||||
exportButton.Visible = true;
|
||||
cancelButton.Visible = true;
|
||||
closeButton.Visible = true;
|
||||
|
||||
//Add buttons to buttonContainer
|
||||
footerRow.AddChild(exportButton);
|
||||
footerRow.AddChild(new HorizontalSpacer());
|
||||
footerRow.AddChild(cancelButton);
|
||||
footerRow.AddChild(closeButton);
|
||||
}
|
||||
|
||||
private GuiWidget CreateDetailInfo(string detailText)
|
||||
|
|
|
|||
|
|
@ -219,7 +219,7 @@ namespace MatterHackers.MatterControl
|
|||
footerRow.AddChild(mergeButton);
|
||||
|
||||
footerRow.AddChild(new HorizontalSpacer());
|
||||
footerRow.AddChild(cancelButton);
|
||||
footerRow.AddChild(closeButton);
|
||||
|
||||
if (settingsToImport.QualityLayers.Count == 0 && settingsToImport.MaterialLayers.Count == 0)
|
||||
{
|
||||
|
|
@ -270,7 +270,7 @@ namespace MatterHackers.MatterControl
|
|||
container.AddChild(successMessageWidget);
|
||||
|
||||
footerRow.AddChild(new HorizontalSpacer());
|
||||
footerRow.AddChild(cancelButton);
|
||||
footerRow.AddChild(closeButton);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -372,12 +372,12 @@ namespace MatterHackers.MatterControl
|
|||
});
|
||||
|
||||
importButton.Visible = true;
|
||||
cancelButton.Visible = true;
|
||||
closeButton.Visible = true;
|
||||
|
||||
//Add buttons to buttonContainer
|
||||
footerRow.AddChild(importButton);
|
||||
footerRow.AddChild(new HorizontalSpacer());
|
||||
footerRow.AddChild(cancelButton);
|
||||
footerRow.AddChild(closeButton);
|
||||
}
|
||||
|
||||
private GuiWidget CreateDetailInfo(string detailText)
|
||||
|
|
|
|||
|
|
@ -64,15 +64,15 @@ public class LicenseAgreementPage : WizardPage
|
|||
};
|
||||
|
||||
acceptButton.Visible = true;
|
||||
cancelButton.Visible = true;
|
||||
closeButton.Visible = true;
|
||||
|
||||
// Exit if EULA is not accepted
|
||||
cancelButton.Click += (s, e) => UiThread.RunOnIdle(MatterControlApplication.Instance.Close);
|
||||
closeButton.Click += (s, e) => UiThread.RunOnIdle(MatterControlApplication.Instance.Close);
|
||||
|
||||
//Add buttons to buttonContainer
|
||||
footerRow.AddChild(acceptButton);
|
||||
footerRow.AddChild(new HorizontalSpacer());
|
||||
footerRow.AddChild(cancelButton);
|
||||
footerRow.AddChild(closeButton);
|
||||
|
||||
footerRow.Visible = true;
|
||||
|
||||
|
|
|
|||
|
|
@ -34,7 +34,7 @@ namespace MatterHackers.MatterControl.SetupWizard
|
|||
var revertButton = textImageButtonFactory.Generate("Restore");
|
||||
footerRow.AddChild(revertButton);
|
||||
footerRow.AddChild(new HorizontalSpacer());
|
||||
footerRow.AddChild(cancelButton);
|
||||
footerRow.AddChild(closeButton);
|
||||
revertButton.Click += async (s, e) =>
|
||||
{
|
||||
int index = radioButtonList.IndexOf(radioButtonList.Where(r => r.Checked).FirstOrDefault());
|
||||
|
|
|
|||
|
|
@ -43,8 +43,8 @@ namespace MatterHackers.MatterControl
|
|||
RefreshStatus();
|
||||
|
||||
//Construct buttons
|
||||
cancelButton = whiteImageButtonFactory.Generate("Cancel".Localize(), centerText:true);
|
||||
cancelButton.Click += (s, e) => this.WizardWindow.ChangeToPage<AndroidConnectDevicePage>();
|
||||
closeButton = whiteImageButtonFactory.Generate("Cancel".Localize(), centerText:true);
|
||||
closeButton.Click += (s, e) => this.WizardWindow.ChangeToPage<AndroidConnectDevicePage>();
|
||||
|
||||
//Construct buttons
|
||||
nextButton = textImageButtonFactory.Generate("Continue".Localize());
|
||||
|
|
@ -54,7 +54,7 @@ namespace MatterHackers.MatterControl
|
|||
//Add buttons to buttonContainer
|
||||
footerRow.AddChild(nextButton);
|
||||
footerRow.AddChild(new GuiWidget() { HAnchor = HAnchor.ParentLeftRight });
|
||||
footerRow.AddChild(cancelButton);
|
||||
footerRow.AddChild(closeButton);
|
||||
|
||||
// Register for connection notifications
|
||||
PrinterConnectionAndCommunication.Instance.CommunicationStateChanged.RegisterEvent(ConnectionStatusChanged, ref unregisterEvents);
|
||||
|
|
|
|||
|
|
@ -81,7 +81,7 @@ namespace MatterHackers.MatterControl
|
|||
//Add buttons to buttonContainer
|
||||
footerRow.AddChild(nextButton);
|
||||
footerRow.AddChild(new HorizontalSpacer());
|
||||
footerRow.AddChild(cancelButton);
|
||||
footerRow.AddChild(closeButton);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -38,7 +38,7 @@ namespace MatterHackers.MatterControl.SetupWizard
|
|||
UiThread.RunOnIdle(WizardWindow.Close);
|
||||
});
|
||||
footerRow.AddChild(new HorizontalSpacer());
|
||||
footerRow.AddChild(cancelButton);
|
||||
footerRow.AddChild(closeButton);
|
||||
}
|
||||
|
||||
private void ReportProgress(SyncReportType report)
|
||||
|
|
|
|||
|
|
@ -12,7 +12,7 @@ namespace MatterHackers.MatterControl
|
|||
protected FlowLayoutWidget footerRow;
|
||||
|
||||
protected TextWidget headerLabel;
|
||||
protected Button cancelButton;
|
||||
protected Button closeButton;
|
||||
|
||||
protected TextImageButtonFactory textImageButtonFactory = new TextImageButtonFactory() { fontSize = 16 };
|
||||
protected TextImageButtonFactory whiteImageButtonFactory;
|
||||
|
|
@ -64,9 +64,9 @@ namespace MatterHackers.MatterControl
|
|||
|
||||
this.AnchorAll();
|
||||
|
||||
cancelButton = textImageButtonFactory.Generate(unlocalizedTextForCancelButton.Localize());
|
||||
cancelButton.Name = "Cancel Wizard Button";
|
||||
cancelButton.Click += (s, e) =>
|
||||
closeButton = textImageButtonFactory.Generate(unlocalizedTextForCancelButton.Localize());
|
||||
closeButton.Name = "Cancel Wizard Button";
|
||||
closeButton.Click += (s, e) =>
|
||||
{
|
||||
UiThread.RunOnIdle(() => WizardWindow?.Close());
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue