Renamed MainScreenTabView -> FirstPanelTabView
This commit is contained in:
parent
00e2ecda9d
commit
7eec6753e2
5 changed files with 15 additions and 14 deletions
|
|
@ -88,7 +88,7 @@ namespace MatterHackers.MatterControl
|
|||
this.LeftPanel.AddChild(new PrintProgressBar());
|
||||
|
||||
// construct the main controls tab control
|
||||
mainControlsTabControl = new MainScreenTabView(queueDataView);
|
||||
mainControlsTabControl = new FirstPanelTabView(queueDataView);
|
||||
|
||||
advancedControlsButtonFactory.normalTextColor = ActiveTheme.Instance.PrimaryTextColor;
|
||||
advancedControlsButtonFactory.hoverTextColor = ActiveTheme.Instance.PrimaryTextColor;
|
||||
|
|
|
|||
|
|
@ -51,9 +51,9 @@ using MatterHackers.MatterControl.PrintHistory;
|
|||
|
||||
namespace MatterHackers.MatterControl
|
||||
{
|
||||
class MainScreenTabView : TabControl
|
||||
class FirstPanelTabView : TabControl
|
||||
{
|
||||
static int tabStateBeforeChangePanels = 0;
|
||||
public static int firstPanelCurrentTab = 0;
|
||||
|
||||
TabPage QueueTabPage;
|
||||
TabPage LibraryTabPage;
|
||||
|
|
@ -65,7 +65,7 @@ namespace MatterHackers.MatterControl
|
|||
QueueDataView queueDataView;
|
||||
event EventHandler unregisterEvents;
|
||||
|
||||
public MainScreenTabView(QueueDataView queueDataView)
|
||||
public FirstPanelTabView(QueueDataView queueDataView)
|
||||
{
|
||||
this.queueDataView = queueDataView;
|
||||
this.TabBar.BackgroundColor = ActiveTheme.Instance.PrimaryBackgroundColor;
|
||||
|
|
@ -101,7 +101,7 @@ namespace MatterHackers.MatterControl
|
|||
|
||||
WidescreenPanel.PreChangePannels.RegisterEvent(SaveCurrentTab, ref unregisterEvents);
|
||||
|
||||
SelectedTabIndex = tabStateBeforeChangePanels;
|
||||
SelectedTabIndex = firstPanelCurrentTab;
|
||||
}
|
||||
|
||||
void NumQueueItemsChanged(object sender, EventArgs widgetEvent)
|
||||
|
|
@ -113,7 +113,7 @@ namespace MatterHackers.MatterControl
|
|||
|
||||
void SaveCurrentTab(object sender, EventArgs e)
|
||||
{
|
||||
tabStateBeforeChangePanels = SelectedTabIndex;
|
||||
firstPanelCurrentTab = SelectedTabIndex;
|
||||
}
|
||||
|
||||
public override void OnClosed(EventArgs e)
|
||||
|
|
@ -241,7 +241,7 @@ namespace MatterHackers.MatterControl
|
|||
ColumnOne.VAnchor = VAnchor.ParentBottomTop;
|
||||
ColumnOne.AddChild(new ActionBarPlus(queueDataView));
|
||||
ColumnOne.AddChild(new PrintProgressBar());
|
||||
ColumnOne.AddChild(new MainScreenTabView(queueDataView));
|
||||
ColumnOne.AddChild(new FirstPanelTabView(queueDataView));
|
||||
ColumnOne.Width = 500; //Ordering here matters - must go after children are added
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -96,7 +96,7 @@
|
|||
<Compile Include="ActionBar\TemperatureWidgetExtruder.cs" />
|
||||
<Compile Include="ApplicationView\ApplicationMenuRow.cs" />
|
||||
<Compile Include="ApplicationView\CompactSlidePanel.cs" />
|
||||
<Compile Include="ApplicationView\MainScreenTabView.cs" />
|
||||
<Compile Include="ApplicationView\FirstPanelTabView.cs" />
|
||||
<Compile Include="ConfigurationPage\LanguageSelector.cs" />
|
||||
<Compile Include="ConfigurationPage\PrintLeveling\LevelWizard2Point.cs" />
|
||||
<Compile Include="ConfigurationPage\PrintLeveling\InstructionsPage.cs" />
|
||||
|
|
|
|||
|
|
@ -33,6 +33,7 @@ using MatterHackers.Agg;
|
|||
using MatterHackers.Agg.Image;
|
||||
using MatterHackers.Agg.PlatformAbstract;
|
||||
using MatterHackers.Agg.UI;
|
||||
using MatterHackers.MatterControl;
|
||||
using MatterHackers.MatterControl.DataStorage;
|
||||
using MatterHackers.MatterControl.PrinterCommunication;
|
||||
using MatterHackers.VectorMath;
|
||||
|
|
@ -41,6 +42,8 @@ namespace MatterHackers.MatterControl.PrintQueue
|
|||
{
|
||||
public class QueueDataView : ScrollableWidget
|
||||
{
|
||||
public static int selectedQueueItemIndex = -1;
|
||||
|
||||
event EventHandler unregisterEvents;
|
||||
|
||||
// make this private so it can only be built from the Instance
|
||||
|
|
@ -193,8 +196,6 @@ namespace MatterHackers.MatterControl.PrintQueue
|
|||
}
|
||||
}
|
||||
|
||||
static int lastSelectedTabOnAnyView = -1;
|
||||
|
||||
public int SelectedIndex
|
||||
{
|
||||
get
|
||||
|
|
@ -343,14 +344,14 @@ namespace MatterHackers.MatterControl.PrintQueue
|
|||
|
||||
PrinterConnectionAndCommunication.Instance.ActivePrintItemChanged.RegisterEvent(PrintItemChange, ref unregisterEvents);
|
||||
|
||||
WidescreenPanel.PreChangePannels.RegisterEvent(SaveCurrentTab, ref unregisterEvents);
|
||||
WidescreenPanel.PreChangePannels.RegisterEvent(SaveCurrentlySelctedItemIndex, ref unregisterEvents);
|
||||
|
||||
SelectedIndex = lastSelectedTabOnAnyView;
|
||||
SelectedIndex = selectedQueueItemIndex;
|
||||
}
|
||||
|
||||
void SaveCurrentTab(object sender, EventArgs e)
|
||||
void SaveCurrentlySelctedItemIndex(object sender, EventArgs e)
|
||||
{
|
||||
lastSelectedTabOnAnyView = SelectedIndex;
|
||||
selectedQueueItemIndex = SelectedIndex;
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue