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;
|
2016-02-13 11:49:09 -08:00
|
|
|
|
using System.Collections.Generic;
|
2015-05-19 14:43:24 -07:00
|
|
|
|
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
|
|
|
|
}
|
|
|
|
|
|
|
2016-02-13 11:49:09 -08:00
|
|
|
|
override protected IEnumerable<MenuItemAction> GetMenuItems()
|
2015-05-19 14:43:24 -07:00
|
|
|
|
{
|
2016-02-13 11:49:09 -08:00
|
|
|
|
return new List<MenuItemAction>
|
2015-05-19 14:43:24 -07:00
|
|
|
|
{
|
2016-04-14 15:42:42 -07:00
|
|
|
|
new MenuItemAction("Settings".Localize(), openPrintingPanel_Click),
|
|
|
|
|
|
new MenuItemAction("Controls".Localize(), openControlsPanel_Click),
|
|
|
|
|
|
new MenuItemAction("Terminal".Localize(), openTermanialPanel_Click),
|
2015-05-19 14:43:24 -07:00
|
|
|
|
};
|
|
|
|
|
|
}
|
|
|
|
|
|
|
2016-04-14 15:42:42 -07:00
|
|
|
|
private void 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();
|
|
|
|
|
|
}
|
|
|
|
|
|
});
|
|
|
|
|
|
}
|
|
|
|
|
|
|
2016-04-14 15:42:42 -07:00
|
|
|
|
private void 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();
|
|
|
|
|
|
}
|
|
|
|
|
|
});
|
|
|
|
|
|
}
|
|
|
|
|
|
|
2016-04-14 15:42:42 -07:00
|
|
|
|
private void openTermanialPanel_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
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|