2015-04-08 15:20:10 -07:00
|
|
|
|
using MatterHackers.Agg;
|
2014-12-09 15:16:08 -08:00
|
|
|
|
using MatterHackers.Agg.UI;
|
|
|
|
|
|
using MatterHackers.Localizations;
|
|
|
|
|
|
using MatterHackers.MatterControl.ContactForm;
|
2015-07-14 17:59:41 -07:00
|
|
|
|
using MatterHackers.MatterControl.AboutPage;
|
2014-12-09 15:16:08 -08:00
|
|
|
|
using MatterHackers.VectorMath;
|
2015-04-08 15:20:10 -07:00
|
|
|
|
using System;
|
2014-12-09 15:16:08 -08:00
|
|
|
|
|
|
|
|
|
|
namespace MatterHackers.MatterControl
|
|
|
|
|
|
{
|
2015-05-20 17:34:55 -07:00
|
|
|
|
public class MenuOptionHelp : MenuBase
|
2015-04-08 15:20:10 -07:00
|
|
|
|
{
|
|
|
|
|
|
public MenuOptionHelp()
|
2015-05-20 17:34:55 -07:00
|
|
|
|
: base("Help".Localize())
|
2015-04-08 15:20:10 -07:00
|
|
|
|
{
|
|
|
|
|
|
}
|
2014-12-09 15:16:08 -08:00
|
|
|
|
|
2015-05-20 17:34:55 -07:00
|
|
|
|
override protected TupleList<string, Func<bool>> GetMenuItems()
|
2015-04-08 15:20:10 -07:00
|
|
|
|
{
|
2015-05-20 17:34:55 -07:00
|
|
|
|
return new TupleList<string, Func<bool>>
|
2015-04-08 15:20:10 -07:00
|
|
|
|
{
|
2015-05-22 12:36:07 -07:00
|
|
|
|
{"Getting Started".Localize(), gettingStarted_Click},
|
|
|
|
|
|
{"View Help".Localize(), help_Click},
|
|
|
|
|
|
{"Release Notes".Localize(), notes_Click},
|
|
|
|
|
|
{"------------------------", nothing_Click},
|
|
|
|
|
|
{"Report a Bug".Localize(), bug_Click},
|
|
|
|
|
|
{"Check For Update".Localize(), checkForUpdate_Click},
|
|
|
|
|
|
{"------------------------", nothing_Click},
|
|
|
|
|
|
{"About MatterControl".Localize(), about_Click},
|
2014-12-09 15:16:08 -08:00
|
|
|
|
};
|
2015-04-08 15:20:10 -07:00
|
|
|
|
}
|
2014-12-09 15:16:08 -08:00
|
|
|
|
|
2015-04-08 15:20:10 -07:00
|
|
|
|
private bool bug_Click()
|
|
|
|
|
|
{
|
2015-06-11 12:06:40 -07:00
|
|
|
|
UiThread.RunOnIdle(() =>
|
2015-04-08 15:20:10 -07:00
|
|
|
|
{
|
|
|
|
|
|
ContactFormWindow.Open();
|
|
|
|
|
|
});
|
|
|
|
|
|
return true;
|
|
|
|
|
|
}
|
2014-12-09 15:16:08 -08:00
|
|
|
|
|
2015-04-08 15:20:10 -07:00
|
|
|
|
private bool help_Click()
|
|
|
|
|
|
{
|
2015-06-11 12:06:40 -07:00
|
|
|
|
UiThread.RunOnIdle(() =>
|
2015-04-08 15:20:10 -07:00
|
|
|
|
{
|
2015-01-22 12:27:18 -08:00
|
|
|
|
MatterControlApplication.Instance.LaunchBrowser("http://www.mattercontrol.com/articles");
|
2015-04-08 15:20:10 -07:00
|
|
|
|
});
|
|
|
|
|
|
return true;
|
|
|
|
|
|
}
|
2014-12-09 15:16:08 -08:00
|
|
|
|
|
2015-05-22 12:33:59 -07:00
|
|
|
|
private bool checkForUpdate_Click()
|
|
|
|
|
|
{
|
2015-06-11 12:06:40 -07:00
|
|
|
|
UiThread.RunOnIdle(() =>
|
2015-05-22 12:33:59 -07:00
|
|
|
|
{
|
|
|
|
|
|
ApplicationMenuRow.AlwaysShowUpdateStatus = true;
|
|
|
|
|
|
UpdateControlData.Instance.CheckForUpdateUserRequested();
|
2015-08-10 15:44:19 -07:00
|
|
|
|
CheckForUpdateWindow.Show();
|
2015-05-22 12:33:59 -07:00
|
|
|
|
});
|
|
|
|
|
|
return true;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
2015-04-08 15:20:10 -07:00
|
|
|
|
private bool about_Click()
|
|
|
|
|
|
{
|
2015-06-11 13:53:53 -07:00
|
|
|
|
UiThread.RunOnIdle(AboutWindow.Show);
|
2015-04-08 15:20:10 -07:00
|
|
|
|
return true;
|
|
|
|
|
|
}
|
2014-12-09 15:16:08 -08:00
|
|
|
|
|
2015-05-22 12:33:59 -07:00
|
|
|
|
private bool nothing_Click()
|
|
|
|
|
|
{
|
|
|
|
|
|
return true;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
2015-04-08 15:20:10 -07:00
|
|
|
|
private bool notes_Click()
|
2014-12-09 15:16:08 -08:00
|
|
|
|
{
|
2015-06-11 12:06:40 -07:00
|
|
|
|
UiThread.RunOnIdle(() =>
|
2014-12-09 15:16:08 -08:00
|
|
|
|
{
|
2015-01-22 12:27:18 -08:00
|
|
|
|
MatterControlApplication.Instance.LaunchBrowser("http://wiki.mattercontrol.com/Release_Notes");
|
2015-04-08 15:20:10 -07:00
|
|
|
|
});
|
2014-12-09 15:16:08 -08:00
|
|
|
|
return true;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
2015-04-08 15:20:10 -07:00
|
|
|
|
private bool gettingStarted_Click()
|
|
|
|
|
|
{
|
2015-06-11 12:06:40 -07:00
|
|
|
|
UiThread.RunOnIdle(() =>
|
2015-04-08 15:20:10 -07:00
|
|
|
|
{
|
2015-01-22 12:27:18 -08:00
|
|
|
|
MatterControlApplication.Instance.LaunchBrowser("http://www.mattercontrol.com/articles/mattercontrol-getting-started");
|
2015-04-08 15:20:10 -07:00
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
return true;
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|