Merge branch 'design_tools' of https://github.com/MatterHackers/MatterControl into design_tools
This commit is contained in:
commit
9cb56d672f
3 changed files with 12 additions and 24 deletions
|
|
@ -89,12 +89,12 @@ namespace MatterHackers.MatterControl.CustomWidgets
|
|||
context.ContainerReloaded += ActiveContainer_Reloaded;
|
||||
|
||||
bool printerConnected = false;
|
||||
PrinterConnection.Instance.CommunicationStateChanged.RegisterEvent(async (s, e) =>
|
||||
PrinterConnection.Instance.CommunicationStateChanged.RegisterEvent((s, e) =>
|
||||
{
|
||||
bool isConnected = PrinterConnection.Instance.PrinterIsConnected;
|
||||
if (printerConnected != isConnected)
|
||||
{
|
||||
await DisplayContainerContent(ActiveContainer);
|
||||
DisplayContainerContent(ActiveContainer);
|
||||
printerConnected = isConnected;
|
||||
}
|
||||
}, ref unregisterEvents);
|
||||
|
|
@ -142,24 +142,12 @@ namespace MatterHackers.MatterControl.CustomWidgets
|
|||
|
||||
public IEnumerable<ListViewItem> Items => items;
|
||||
|
||||
/*
|
||||
* bool isTraceable = listViewItem.Model is ILibraryPrintItem;
|
||||
bool hasID = !string.IsNullOrEmpty(listViewItem.Model.ID);
|
||||
List<ListViewItem> acquireItems,
|
||||
if (hasID
|
||||
&& isTraceable
|
||||
&& thumbnail == null)
|
||||
{
|
||||
// Schedule for collection, display default thumb until then
|
||||
acquireItems.Add(listViewItem);
|
||||
}
|
||||
*/
|
||||
/// <summary>
|
||||
/// Empties the list children and repopulates the list with the source container content
|
||||
/// </summary>
|
||||
/// <param name="sourceContainer">The container to load</param>
|
||||
/// <returns>Async Task</returns>
|
||||
private async Task DisplayContainerContent(ILibraryContainer sourceContainer)
|
||||
private void DisplayContainerContent(ILibraryContainer sourceContainer)
|
||||
{
|
||||
if (sourceContainer == null)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -73,11 +73,11 @@ namespace MatterHackers.MatterControl.PartPreviewWindow
|
|||
};
|
||||
createItems.AddChild(container);
|
||||
|
||||
var createPart = ApplicationController.Instance.Theme.BreadCrumbButtonFactory.Generate("Create Part");
|
||||
var createPart = ApplicationController.Instance.Theme.BreadCrumbButtonFactory.Generate("Create Part".Localize());
|
||||
createPart.HAnchor = HAnchor.ParentLeft;
|
||||
container.AddChild(createPart);
|
||||
|
||||
var createPrinter = ApplicationController.Instance.Theme.BreadCrumbButtonFactory.Generate("Create Printer");
|
||||
var createPrinter = ApplicationController.Instance.Theme.BreadCrumbButtonFactory.Generate("Create Printer".Localize());
|
||||
createPrinter.HAnchor = HAnchor.ParentLeft;
|
||||
container.AddChild(createPrinter);
|
||||
createPrinter.Click += (s, e) =>
|
||||
|
|
@ -100,6 +100,13 @@ namespace MatterHackers.MatterControl.PartPreviewWindow
|
|||
}
|
||||
};
|
||||
|
||||
var importButton = ApplicationController.Instance.Theme.BreadCrumbButtonFactory.Generate("Import".Localize());
|
||||
importButton.Click += (s, e) =>
|
||||
{
|
||||
UiThread.RunOnIdle(() => WizardWindow.Show<ImportSettingsPage>("ImportSettingsPage", "Import Settings Page"));
|
||||
};
|
||||
container.AddChild(importButton);
|
||||
|
||||
var existingLabel = new TextWidget("Open Existing".Localize() + ":", textColor: ActiveTheme.Instance.PrimaryTextColor)
|
||||
{
|
||||
Margin = new BorderDouble(top: 15, bottom: 15)
|
||||
|
|
|
|||
|
|
@ -79,13 +79,6 @@ namespace MatterHackers.MatterControl.SlicerConfiguration
|
|||
|
||||
MenuItem menuItem;
|
||||
|
||||
menuItem = overflowDropdown.CreateMenuItem("Import".Localize());
|
||||
menuItem.Click += (s, e) =>
|
||||
{
|
||||
UiThread.RunOnIdle(() => WizardWindow.Show<ImportSettingsPage>("ImportSettingsPage", "Import Settings Page"));
|
||||
};
|
||||
popupContainer.AddChild(menuItem);
|
||||
|
||||
menuItem = overflowDropdown.CreateMenuItem("Export".Localize());
|
||||
menuItem.Click += (s, e) =>
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue