Changed the suppression logic for welcome page
issue: MatterHackers/MCCentral#4647 Consider showing welcome screen until the user opts-out
This commit is contained in:
parent
726b14f9c0
commit
5c4b9f92c2
7 changed files with 41 additions and 20 deletions
|
|
@ -2027,8 +2027,6 @@ namespace MatterHackers.MatterControl
|
|||
AddPrintersTabRightElement?.Invoke(this, new WidgetSourceEventArgs(sourceExentionArea));
|
||||
}
|
||||
|
||||
private string doNotAskAgainMessage = "Don't remind me again".Localize();
|
||||
|
||||
public async Task PrintPart(EditContext editContext, PrinterConfig printer, IProgress<ProgressStatus> reporter, CancellationToken cancellationToken, bool overrideAllowGCode = false)
|
||||
{
|
||||
var partFilePath = editContext.SourceFilePath;
|
||||
|
|
@ -2093,7 +2091,7 @@ If you experience adhesion problems, please re-run leveling."
|
|||
&& hideGCodeWarning == null
|
||||
&& !overrideAllowGCode)
|
||||
{
|
||||
var hideGCodeWarningCheckBox = new CheckBox(doNotAskAgainMessage)
|
||||
var hideGCodeWarningCheckBox = new CheckBox("Don't remind me again".Localize())
|
||||
{
|
||||
TextColor = this.Theme.TextColor,
|
||||
Margin = new BorderDouble(top: 6, left: 6),
|
||||
|
|
@ -3186,7 +3184,7 @@ If you experience adhesion problems, please re-run leveling."
|
|||
await applicationController.Tasks.Execute(task.Title, task.Action);
|
||||
}
|
||||
|
||||
if (UserSettings.Instance.get(UserSettingsKey.ShownWelcomeMessage) != "true")
|
||||
if (ApplicationSettings.Instance.get(ApplicationSettingsKey.ShownWelcomeMessage) != "false")
|
||||
{
|
||||
UiThread.RunOnIdle(() =>
|
||||
{
|
||||
|
|
|
|||
|
|
@ -95,7 +95,13 @@ namespace MatterHackers.MatterControl
|
|||
menuItem.Click += (s, e) => ApplicationController.Instance.ShowApplicationHelp();
|
||||
|
||||
menuItem = popupMenu.CreateMenuItem("Interface Tour".Localize(), AggContext.StaticData.LoadIcon("tour.png", 16, 16, menuTheme.InvertIcons));
|
||||
menuItem.Click += (s, e) => ApplicationController.Instance.ShowInterfaceTour();
|
||||
menuItem.Click += (s, e) =>
|
||||
{
|
||||
UiThread.RunOnIdle(() =>
|
||||
{
|
||||
DialogWindow.Show<WelcomePage>();
|
||||
});
|
||||
};
|
||||
|
||||
popupMenu.CreateSeparator();
|
||||
|
||||
|
|
|
|||
|
|
@ -13,6 +13,7 @@ namespace MatterHackers.MatterControl
|
|||
public const string SuppressAuthPanel = nameof(SuppressAuthPanel);
|
||||
public const string HardwareHasCamera = nameof(HardwareHasCamera);
|
||||
public const string HideGCodeWarning = nameof(HideGCodeWarning);
|
||||
public const string ShownWelcomeMessage = nameof(ShownWelcomeMessage);
|
||||
public const string DesktopPosition = nameof(DesktopPosition);
|
||||
public const string WindowSize = nameof(WindowSize);
|
||||
public const string MainWindowMaximized = nameof(MainWindowMaximized);
|
||||
|
|
|
|||
|
|
@ -68,7 +68,6 @@ namespace MatterHackers.MatterControl
|
|||
public const string ThemeName = nameof(ThemeName);
|
||||
public const string ThumbnailRenderingMode = nameof(ThumbnailRenderingMode);
|
||||
public const string UpdateFeedType = nameof(UpdateFeedType);
|
||||
public const string ShownWelcomeMessage = nameof(ShownWelcomeMessage);
|
||||
}
|
||||
|
||||
public class UserSettings
|
||||
|
|
|
|||
|
|
@ -40,14 +40,16 @@ namespace MatterHackers.MatterControl
|
|||
public class WelcomePage : DialogPage
|
||||
{
|
||||
public WelcomePage()
|
||||
: base("Done".Localize())
|
||||
{
|
||||
this.WindowTitle = "MatterControl".Localize();
|
||||
|
||||
this.HeaderText = "Welcome to MatterControl".Localize();
|
||||
this.HeaderText = "A Quick Tour of MatterControl".Localize();
|
||||
|
||||
var welcome = @"Thank you for installing MatterControl. We are excited to help you bring your ideas to life. This new version includes hundreds of improvements and new features.
|
||||
var welcome = @"Thank you for installing MatterControl. We are excited to help bring your ideas to life. This new version includes hundreds of improvements and new features.
|
||||
|
||||
Feature Overview:
|
||||
|
||||
Features:
|
||||
• Simple Setup
|
||||
• Automatic Leveling
|
||||
• Built in 3D Design Tools
|
||||
|
|
@ -55,7 +57,7 @@ Features:
|
|||
• SMS / Email Notifications
|
||||
• Enhanced 64 Bit support
|
||||
|
||||
Click 'Next' to for a quick tour of the interface";
|
||||
Click 'Next' to continue the tour of the interface";
|
||||
|
||||
var textWidget = new WrappedTextWidget(welcome)
|
||||
{
|
||||
|
|
@ -66,7 +68,29 @@ Click 'Next' to for a quick tour of the interface";
|
|||
|
||||
contentRow.AddChild(textWidget);
|
||||
|
||||
var nextButton = new TextButton("Tour".Localize(), theme)
|
||||
contentRow.AddChild(new VerticalSpacer());
|
||||
|
||||
var showWelcomPageCheckBox = new CheckBox("Don't remind me again".Localize())
|
||||
{
|
||||
TextColor = theme.TextColor,
|
||||
Margin = new BorderDouble(top: 6, left: 6),
|
||||
HAnchor = Agg.UI.HAnchor.Left,
|
||||
Checked = ApplicationSettings.Instance.get(ApplicationSettingsKey.ShownWelcomeMessage) == "false"
|
||||
};
|
||||
showWelcomPageCheckBox.Click += (sender, e) =>
|
||||
{
|
||||
if (showWelcomPageCheckBox.Checked)
|
||||
{
|
||||
ApplicationSettings.Instance.set(ApplicationSettingsKey.ShownWelcomeMessage, "false");
|
||||
}
|
||||
else
|
||||
{
|
||||
ApplicationSettings.Instance.set(ApplicationSettingsKey.ShownWelcomeMessage, "true");
|
||||
}
|
||||
};
|
||||
contentRow.AddChild(showWelcomPageCheckBox);
|
||||
|
||||
var nextButton = new TextButton("Next".Localize(), theme)
|
||||
{
|
||||
Name = "Next Button",
|
||||
BackgroundColor = theme.MinimalShade
|
||||
|
|
@ -83,12 +107,5 @@ Click 'Next' to for a quick tour of the interface";
|
|||
|
||||
this.AddPageAction(nextButton);
|
||||
}
|
||||
|
||||
protected override void OnCancel(out bool abortCancel)
|
||||
{
|
||||
UserSettings.Instance.set(UserSettingsKey.ShownWelcomeMessage, "true");
|
||||
|
||||
base.OnCancel(out abortCancel);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1 +1 @@
|
|||
Subproject commit 2aeb6d95c9c411cc80ca1fb3f51098beabcb5074
|
||||
Subproject commit 4ae7af9be45d448e56f7363398aef4ade38674b1
|
||||
|
|
@ -1 +1 @@
|
|||
Subproject commit a2d4c18991cb7d1ab92f8e1ad6d2921bd5b22c2d
|
||||
Subproject commit 1a7c1f13a128f6cbabf04c92e47435285db26c92
|
||||
Loading…
Add table
Add a link
Reference in a new issue