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>>
|
2016-04-11 08:25:40 -07:00
|
|
|
|
{
|
|
|
|
|
|
{"Settings".Localize(), openPrintingPanel_Click},
|
|
|
|
|
|
{"Controls".Localize(), openControlsPanel_Click},
|
|
|
|
|
|
{"Terminal".Localize(), openTerminalPanel_Click},
|
|
|
|
|
|
};
|
2015-05-19 14:43:24 -07:00
|
|
|
|
}
|
|
|
|
|
|
|
2016-04-11 08:25:40 -07:00
|
|
|
|
private bool openPrintingPanel_Click()
|
2015-05-19 14:43:24 -07:00
|
|
|
|
{
|
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;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
2016-04-11 08:25:40 -07:00
|
|
|
|
private bool openControlsPanel_Click()
|
2015-05-19 14:43:24 -07:00
|
|
|
|
{
|
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;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
2016-04-11 08:25:40 -07:00
|
|
|
|
private bool openTerminalPanel_Click()
|
2015-05-19 14:43:24 -07:00
|
|
|
|
{
|
2015-06-11 12:06:40 -07:00
|
|
|
|
UiThread.RunOnIdle(TerminalWindow.Show);
|
2015-05-19 14:43:24 -07:00
|
|
|
|
return true;
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|