2015-05-19 14:43:24 -07:00
|
|
|
|
using MatterHackers.Agg;
|
|
|
|
|
|
using MatterHackers.Agg.UI;
|
|
|
|
|
|
using MatterHackers.Localizations;
|
|
|
|
|
|
using MatterHackers.MatterControl.DataStorage;
|
|
|
|
|
|
using MatterHackers.MatterControl.PrinterCommunication;
|
|
|
|
|
|
using MatterHackers.MatterControl.PrinterControls.PrinterConnections;
|
|
|
|
|
|
using MatterHackers.MatterControl.PrintQueue;
|
|
|
|
|
|
using MatterHackers.VectorMath;
|
|
|
|
|
|
using System;
|
|
|
|
|
|
using System.IO;
|
|
|
|
|
|
|
|
|
|
|
|
namespace MatterHackers.MatterControl
|
|
|
|
|
|
{
|
2015-05-20 17:34:55 -07:00
|
|
|
|
public class MenuOptionSettings : MenuBase
|
2015-05-19 14:43:24 -07:00
|
|
|
|
{
|
|
|
|
|
|
static public PopOutTextTabWidget sliceSettingsPopOut = null;
|
|
|
|
|
|
static public PopOutTextTabWidget controlsPopOut = null;
|
|
|
|
|
|
|
|
|
|
|
|
public MenuOptionSettings()
|
2015-06-05 11:17:28 -07:00
|
|
|
|
: base("View".Localize())
|
2015-05-19 14:43:24 -07:00
|
|
|
|
{
|
2015-08-28 17:55:50 -07:00
|
|
|
|
|
2015-05-19 14:43:24 -07:00
|
|
|
|
}
|
|
|
|
|
|
|
2015-05-20 17:34:55 -07:00
|
|
|
|
override protected TupleList<string, Func<bool>> GetMenuItems()
|
2015-05-19 14:43:24 -07:00
|
|
|
|
{
|
2015-05-20 17:34:55 -07:00
|
|
|
|
return new TupleList<string, Func<bool>>
|
2015-05-19 14:43:24 -07:00
|
|
|
|
{
|
2015-05-26 10:51:43 -07:00
|
|
|
|
{LocalizedString.Get("Settings"), openPrintingPannel_Click},
|
2015-05-19 14:43:24 -07:00
|
|
|
|
{LocalizedString.Get("Controls"), openControlsPannel_Click},
|
2015-06-05 11:17:28 -07:00
|
|
|
|
{LocalizedString.Get("Terminal"), openTermanialPannel_Click},
|
2015-05-19 14:43:24 -07:00
|
|
|
|
};
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
private bool openPrintingPannel_Click()
|
|
|
|
|
|
{
|
2015-06-11 12:06:40 -07:00
|
|
|
|
UiThread.RunOnIdle(() =>
|
2015-05-19 14:43:24 -07:00
|
|
|
|
{
|
|
|
|
|
|
if (sliceSettingsPopOut != null)
|
|
|
|
|
|
{
|
|
|
|
|
|
sliceSettingsPopOut.ShowInWindow();
|
|
|
|
|
|
}
|
|
|
|
|
|
});
|
|
|
|
|
|
return true;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
private bool openControlsPannel_Click()
|
|
|
|
|
|
{
|
2015-06-11 12:06:40 -07:00
|
|
|
|
UiThread.RunOnIdle(() =>
|
2015-05-19 14:43:24 -07:00
|
|
|
|
{
|
|
|
|
|
|
if (controlsPopOut != null)
|
|
|
|
|
|
{
|
|
|
|
|
|
controlsPopOut.ShowInWindow();
|
|
|
|
|
|
}
|
|
|
|
|
|
});
|
|
|
|
|
|
return true;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
private bool openTermanialPannel_Click()
|
|
|
|
|
|
{
|
2015-06-11 12:06:40 -07:00
|
|
|
|
UiThread.RunOnIdle(TerminalWindow.Show);
|
2015-05-19 14:43:24 -07:00
|
|
|
|
return true;
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|