Some working on streamlining the ui and creating a new 'simple' mode.
This commit is contained in:
parent
59cb80f894
commit
de0070eb35
7 changed files with 132 additions and 74 deletions
|
|
@ -130,15 +130,15 @@ namespace MatterHackers.MatterControl
|
|||
ActiveTheme.Instance.SecondaryAccentColor, new RGBA_Bytes(), unselectedTextColor, new RGBA_Bytes()));
|
||||
|
||||
//Add the tab contents for 'Advanced Controls'
|
||||
string sliceSettingsLabel = LocalizedString.Get("Settings").ToUpper();
|
||||
sliceSettingsWidget = new SliceSettingsWidget(sliceSettingsUiState);
|
||||
sliceTabPage = new TabPage(sliceSettingsWidget, sliceSettingsLabel);
|
||||
|
||||
string printerControlsLabel = LocalizedString.Get("Controls").ToUpper();
|
||||
manualControlsPage = new TabPage(manualPrinterControls, printerControlsLabel);
|
||||
this.AddTab(new SimpleTextTabWidget(manualControlsPage, "Controls Tab", TabTextSize,
|
||||
ActiveTheme.Instance.SecondaryAccentColor, new RGBA_Bytes(), unselectedTextColor, new RGBA_Bytes()));
|
||||
|
||||
string sliceSettingsLabel = LocalizedString.Get("Slice Settings").ToUpper();
|
||||
sliceSettingsWidget = new SliceSettingsWidget(sliceSettingsUiState);
|
||||
sliceTabPage = new TabPage(sliceSettingsWidget, sliceSettingsLabel);
|
||||
|
||||
this.AddTab(new SimpleTextTabWidget(sliceTabPage, "Slice Settings Tab", TabTextSize,
|
||||
ActiveTheme.Instance.SecondaryAccentColor, new RGBA_Bytes(), unselectedTextColor, new RGBA_Bytes()));
|
||||
|
||||
|
|
|
|||
|
|
@ -149,15 +149,15 @@ namespace MatterHackers.MatterControl
|
|||
RGBA_Bytes unselectedTextColor = ActiveTheme.Instance.TabLabelUnselected;
|
||||
|
||||
//Add the tab contents for 'Advanced Controls'
|
||||
string printerControlsLabel = LocalizedString.Get("Controls").ToUpper();
|
||||
advancedControls.AddTab(new SimpleTextTabWidget(new TabPage(manualPrinterControlsScrollArea, printerControlsLabel), "Controls Tab", textSize,
|
||||
ActiveTheme.Instance.PrimaryTextColor, new RGBA_Bytes(), unselectedTextColor, new RGBA_Bytes()));
|
||||
|
||||
string sliceSettingsLabel = LocalizedString.Get("Slice Settings").ToUpper();
|
||||
string sliceSettingsLabel = LocalizedString.Get("Settings").ToUpper();
|
||||
sliceSettingsWidget = new SliceSettingsWidget(sliceSettingsUiState);
|
||||
advancedControls.AddTab(new SimpleTextTabWidget(new TabPage(sliceSettingsWidget, sliceSettingsLabel), "Slice Settings Tab", textSize,
|
||||
ActiveTheme.Instance.PrimaryTextColor, new RGBA_Bytes(), unselectedTextColor, new RGBA_Bytes()));
|
||||
|
||||
string printerControlsLabel = LocalizedString.Get("Controls").ToUpper();
|
||||
advancedControls.AddTab(new SimpleTextTabWidget(new TabPage(manualPrinterControlsScrollArea, printerControlsLabel), "Controls Tab", textSize,
|
||||
ActiveTheme.Instance.PrimaryTextColor, new RGBA_Bytes(), unselectedTextColor, new RGBA_Bytes()));
|
||||
|
||||
string configurationLabel = LocalizedString.Get("Configuration").ToUpper();
|
||||
ScrollableWidget configurationControls = new PrinterConfigurationScrollWidget();
|
||||
advancedControls.AddTab(new SimpleTextTabWidget(new TabPage(configurationControls, configurationLabel), "Configuration Tab", textSize,
|
||||
|
|
|
|||
|
|
@ -26,7 +26,6 @@ The views and conclusions contained in the software and documentation are those
|
|||
of the authors and should not be interpreted as representing official policies,
|
||||
either expressed or implied, of the FreeBSD Project.
|
||||
*/
|
||||
//#define NEW_TWO_COLUMN_MODE
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
|
|
@ -43,6 +42,7 @@ using MatterHackers.VectorMath;
|
|||
using MatterHackers.MatterControl;
|
||||
using MatterHackers.MatterControl.PrintQueue;
|
||||
using MatterHackers.MatterControl.SlicerConfiguration;
|
||||
using MatterHackers.MatterControl.SettingsManagement;
|
||||
using MatterHackers.MatterControl.PrintLibrary;
|
||||
using MatterHackers.MatterControl.DataStorage;
|
||||
using MatterHackers.MatterControl.CustomWidgets;
|
||||
|
|
@ -194,31 +194,34 @@ namespace MatterHackers.MatterControl
|
|||
|
||||
double buildHeight = ActiveSliceSettings.Instance.BuildHeight;
|
||||
|
||||
#if NEW_TWO_COLUMN_MODE
|
||||
PartPreviewContent partViewContent = new PartPreviewContent(PrinterConnectionAndCommunication.Instance.ActivePrintItem, true, View3DWidget.AutoRotate.Enabled, false);
|
||||
partViewContent.AnchorAll();
|
||||
|
||||
ColumnTwo.AddChild(partViewContent);
|
||||
#else
|
||||
part3DView = new View3DWidget(PrinterConnectionAndCommunication.Instance.ActivePrintItem,
|
||||
new Vector3(ActiveSliceSettings.Instance.BedSize, buildHeight),
|
||||
ActiveSliceSettings.Instance.BedCenter,
|
||||
ActiveSliceSettings.Instance.BedShape,
|
||||
View3DWidget.WindowType.Embeded,
|
||||
View3DWidget.AutoRotate.Enabled);
|
||||
part3DView.Margin = new BorderDouble(bottom: 4);
|
||||
part3DView.AnchorAll();
|
||||
if (OemSettings.Instance.UseLiteInterface)
|
||||
{
|
||||
PartPreviewContent partViewContent = new PartPreviewContent(PrinterConnectionAndCommunication.Instance.ActivePrintItem, true, View3DWidget.AutoRotate.Enabled, false);
|
||||
partViewContent.AnchorAll();
|
||||
|
||||
partGcodeView = new ViewGcodeBasic(PrinterConnectionAndCommunication.Instance.ActivePrintItem,
|
||||
new Vector3(ActiveSliceSettings.Instance.BedSize, buildHeight),
|
||||
ActiveSliceSettings.Instance.BedCenter,
|
||||
ActiveSliceSettings.Instance.BedShape,
|
||||
false);
|
||||
partGcodeView.AnchorAll();
|
||||
ColumnTwo.AddChild(partViewContent);
|
||||
}
|
||||
else
|
||||
{
|
||||
part3DView = new View3DWidget(PrinterConnectionAndCommunication.Instance.ActivePrintItem,
|
||||
new Vector3(ActiveSliceSettings.Instance.BedSize, buildHeight),
|
||||
ActiveSliceSettings.Instance.BedCenter,
|
||||
ActiveSliceSettings.Instance.BedShape,
|
||||
View3DWidget.WindowType.Embeded,
|
||||
View3DWidget.AutoRotate.Enabled);
|
||||
part3DView.Margin = new BorderDouble(bottom: 4);
|
||||
part3DView.AnchorAll();
|
||||
|
||||
ColumnTwo.AddChild(part3DView);
|
||||
ColumnTwo.AddChild(partGcodeView);
|
||||
#endif
|
||||
partGcodeView = new ViewGcodeBasic(PrinterConnectionAndCommunication.Instance.ActivePrintItem,
|
||||
new Vector3(ActiveSliceSettings.Instance.BedSize, buildHeight),
|
||||
ActiveSliceSettings.Instance.BedCenter,
|
||||
ActiveSliceSettings.Instance.BedShape,
|
||||
false);
|
||||
partGcodeView.AnchorAll();
|
||||
|
||||
ColumnTwo.AddChild(part3DView);
|
||||
ColumnTwo.AddChild(partGcodeView);
|
||||
}
|
||||
|
||||
ColumnTwo.AnchorAll();
|
||||
}
|
||||
|
|
@ -245,6 +248,10 @@ namespace MatterHackers.MatterControl
|
|||
}
|
||||
else
|
||||
{
|
||||
if (OemSettings.Instance.UseLiteInterface)
|
||||
{
|
||||
return 2;
|
||||
}
|
||||
return 3;
|
||||
}
|
||||
}
|
||||
|
|
@ -273,16 +280,24 @@ namespace MatterHackers.MatterControl
|
|||
LoadCompactView();
|
||||
break;
|
||||
|
||||
#if NEW_TWO_COLUMN_MODE
|
||||
case 2:
|
||||
ApplicationController.Instance.WidescreenMode = false;
|
||||
LoadCompactView();
|
||||
LoadColumnTwo();
|
||||
LoadColumnThree();
|
||||
if (OemSettings.Instance.UseLiteInterface)
|
||||
{
|
||||
ApplicationController.Instance.WidescreenMode = false;
|
||||
LoadCompactView();
|
||||
LoadColumnTwo();
|
||||
LoadColumnThree();
|
||||
}
|
||||
else
|
||||
{
|
||||
ApplicationController.Instance.WidescreenMode = true;
|
||||
|
||||
LoadColumnOne();
|
||||
// make sure we restore the state of column one because LoadColumnThree is going to save it.
|
||||
LoadColumnTwo();
|
||||
LoadColumnThree();
|
||||
}
|
||||
break;
|
||||
#else
|
||||
case 2:
|
||||
#endif
|
||||
|
||||
case 3:
|
||||
ApplicationController.Instance.WidescreenMode = true;
|
||||
|
|
@ -325,40 +340,43 @@ namespace MatterHackers.MatterControl
|
|||
case 2:
|
||||
Padding = new BorderDouble(4);
|
||||
ColumnOne.Visible = true;
|
||||
#if NEW_TWO_COLUMN_MODE
|
||||
LeftBorderLine.Visible = true;
|
||||
RightBorderLine.Visible = false;
|
||||
ColumnTwo.Visible = true;
|
||||
ColumnThree.Visible = false;
|
||||
ColumnOne.HAnchor = Agg.UI.HAnchor.None;
|
||||
ColumnOne.Width = ColumnTheeFixedWidth; // it can hold the slice settings so it needs to be bigger.
|
||||
#else
|
||||
RightBorderLine.Visible = true;
|
||||
if (RightBorderLine.Hidden)
|
||||
if (OemSettings.Instance.UseLiteInterface)
|
||||
{
|
||||
LeftBorderLine.Visible = true;
|
||||
if (LeftBorderLine.Hidden)
|
||||
{
|
||||
ColumnThree.Visible = false;
|
||||
ColumnTwo.Visible = false;
|
||||
ColumnOne.HAnchor = Agg.UI.HAnchor.ParentLeftRight;
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
ColumnThree.Visible = false;
|
||||
ColumnTwo.Visible = true;
|
||||
ColumnOne.HAnchor = Agg.UI.HAnchor.None;
|
||||
}
|
||||
}
|
||||
RightBorderLine.Visible = false;
|
||||
ColumnTwo.Visible = true;
|
||||
ColumnThree.Visible = false;
|
||||
ColumnOne.HAnchor = Agg.UI.HAnchor.None;
|
||||
ColumnOne.Width = ColumnTheeFixedWidth; // it can hold the slice settings so it needs to be bigger.
|
||||
}
|
||||
else
|
||||
{
|
||||
LeftBorderLine.Visible = false;
|
||||
ColumnThree.Visible = true;
|
||||
ColumnTwo.Visible = false;
|
||||
ColumnOne.HAnchor = Agg.UI.HAnchor.ParentLeftRight;
|
||||
RightBorderLine.Visible = true;
|
||||
if (RightBorderLine.Hidden)
|
||||
{
|
||||
LeftBorderLine.Visible = true;
|
||||
if (LeftBorderLine.Hidden)
|
||||
{
|
||||
ColumnThree.Visible = false;
|
||||
ColumnTwo.Visible = false;
|
||||
ColumnOne.HAnchor = Agg.UI.HAnchor.ParentLeftRight;
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
ColumnThree.Visible = false;
|
||||
ColumnTwo.Visible = true;
|
||||
ColumnOne.HAnchor = Agg.UI.HAnchor.None;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
LeftBorderLine.Visible = false;
|
||||
ColumnThree.Visible = true;
|
||||
ColumnTwo.Visible = false;
|
||||
ColumnOne.HAnchor = Agg.UI.HAnchor.ParentLeftRight;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
break;
|
||||
|
||||
case 3:
|
||||
|
|
|
|||
|
|
@ -21,12 +21,21 @@ namespace MatterHackers.MatterControl.SettingsManagement
|
|||
{
|
||||
string oemSettings = StaticData.Instance.ReadAllText(Path.Combine("OEMSettings", "Settings.json"));
|
||||
instance = JsonConvert.DeserializeObject<OemSettings>(oemSettings) as OemSettings;
|
||||
#if false
|
||||
string output = JsonConvert.SerializeObject(instance, Formatting.Indented);
|
||||
using (StreamWriter outfile = new StreamWriter("Settings.json"))
|
||||
{
|
||||
outfile.Write(output);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
return instance;
|
||||
}
|
||||
}
|
||||
|
||||
public bool UseLiteInterface = false;
|
||||
|
||||
public string ThemeColor = "";
|
||||
|
||||
public string AffiliateCode = "";
|
||||
|
|
@ -52,8 +61,8 @@ namespace MatterHackers.MatterControl.SettingsManagement
|
|||
PreloadedLibraryFiles.Add("uno");
|
||||
PreloadedLibraryFiles.Add("dos");
|
||||
AffiliateCode = "testcode";
|
||||
string pathToOemSettings = Path.Combine(ApplicationDataStorage.Instance.ApplicationStaticDataPath, "OEMSettings", "Settings.json");
|
||||
File.WriteAllText(pathToOemSettings, JsonConvert.SerializeObject(this));
|
||||
string pathToOemSettings = Path.Combine(".", "OEMSettings", "Settings.json");
|
||||
File.WriteAllText(pathToOemSettings, JsonConvert.SerializeObject(this, Formatting.Indented));
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -161,6 +161,12 @@ namespace MatterHackers.MatterControl.SlicerConfiguration
|
|||
tabBar.MinimumSize = new Vector2(sideTabBarsMinimumWidth, tabBar.MinimumSize.y);
|
||||
}
|
||||
|
||||
if (sideTabBarsListForLayout.Count == 1)
|
||||
{
|
||||
sideTabBarsListForLayout[0].MinimumSize = new Vector2(0, 0);
|
||||
sideTabBarsListForLayout[0].Width = 0;
|
||||
}
|
||||
|
||||
// add in the ability to turn on and off help text
|
||||
{
|
||||
showHelpBox.TextColor = ActiveTheme.Instance.PrimaryTextColor;
|
||||
|
|
|
|||
|
|
@ -1 +1,26 @@
|
|||
{"AffiliateCode":"5NEP8W","ShowShopButton":true,"PrinterWhiteList":["Airwolf 3D","Type A Machines","Other","SeeMeCNC","Printrbot","Deezmaker","Blue Eagle Labs","RoBo 3D","Solidoodle","Portabee","Lulzbot","3D Stuffmaker","Velleman"],"PreloadedLibraryFiles":["Calibration - Box.stl"]}
|
||||
{
|
||||
"UseLiteInterface": false,
|
||||
"ThemeColor": "",
|
||||
"AffiliateCode": "5NEP8W",
|
||||
"WindowTitleExtra": "",
|
||||
"ShowShopButton": true,
|
||||
"CheckForUpdatesOnFirstRun": false,
|
||||
"PrinterWhiteList": [
|
||||
"Airwolf 3D",
|
||||
"Type A Machines",
|
||||
"Other",
|
||||
"SeeMeCNC",
|
||||
"Printrbot",
|
||||
"Deezmaker",
|
||||
"Blue Eagle Labs",
|
||||
"RoBo 3D",
|
||||
"Solidoodle",
|
||||
"Portabee",
|
||||
"Lulzbot",
|
||||
"3D Stuffmaker",
|
||||
"Velleman"
|
||||
],
|
||||
"PreloadedLibraryFiles": [
|
||||
"Calibration - Box.stl"
|
||||
]
|
||||
}
|
||||
|
|
@ -1,5 +1,5 @@
|
|||
Simple
|
||||
Single
|
||||
Settings
|
||||
Single
|
||||
Print
|
||||
layer_height
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue