From 025702da2b8e4cc7e7222f12f5b53a3d91487c5f Mon Sep 17 00:00:00 2001 From: jlewin Date: Wed, 24 Apr 2019 11:40:25 -0700 Subject: [PATCH] Fix whitespace --- .../ApplicationView/ApplicationController.cs | 28 +++++++++++-------- .../PartPreviewWindow/PartTabPage.cs | 6 +--- .../PartPreviewWindow/PrinterTabPage.cs | 1 - 3 files changed, 17 insertions(+), 18 deletions(-) diff --git a/MatterControlLib/ApplicationView/ApplicationController.cs b/MatterControlLib/ApplicationView/ApplicationController.cs index 7ca21234b..faedc99b2 100644 --- a/MatterControlLib/ApplicationView/ApplicationController.cs +++ b/MatterControlLib/ApplicationView/ApplicationController.cs @@ -109,7 +109,7 @@ namespace MatterHackers.MatterControl public class WorkspacesChangedEventArgs : EventArgs { - public WorkspacesChangedEventArgs(PartWorkspace workspace, OperationType operation) + public WorkspacesChangedEventArgs(PartWorkspace workspace, OperationType operation) { this.Operation = operation; this.Workspace = workspace; @@ -161,7 +161,7 @@ namespace MatterHackers.MatterControl if (staticData.DirectoryExists(themesPath)) { var themeFiles = staticData.GetDirectories(themesPath).SelectMany(d => staticData.GetFiles(d).Where(p => Path.GetExtension(p) == ".json")); - foreach(var themeFile in themeFiles) + foreach (var themeFile in themeFiles) { themes[Path.GetFileNameWithoutExtension(themeFile)] = themeFile; } @@ -361,7 +361,7 @@ namespace MatterHackers.MatterControl // Persist all pending changes in all workspaces to disk foreach (var workspace in this.Workspaces) { - await this.Tasks.Execute("Saving ".Localize() + $" \"{workspace.Name}\" ...", workspace, workspace.SceneContext.SaveChanges); + await this.Tasks.Execute("Saving ".Localize() + $" \"{workspace.Name}\" ...", workspace, workspace.SceneContext.SaveChanges); } // Project workspace definitions to serializable structure @@ -1295,7 +1295,7 @@ namespace MatterHackers.MatterControl using (new SelectionMaintainer(scene)) { scene.UndoBuffer.AddAndDo(new ReplaceCommand(new[] { sceneItem }, new[] { component })); - } // Invalidate image to kick off rebuild of ImageConverter stack + } // Invalidate image to kick off rebuild of ImageConverter stack imageObject.Invalidate(InvalidateType.Image); return Task.CompletedTask; @@ -1660,7 +1660,7 @@ namespace MatterHackers.MatterControl public static TypeFace GetTypeFace(NamedTypeFace Name) { - if(!TypeFaceCache.ContainsKey(Name)) + if (!TypeFaceCache.ContainsKey(Name)) { TypeFace typeFace = new TypeFace(); var file = Path.Combine("Fonts", $"{Name}.ttf"); @@ -1724,8 +1724,8 @@ namespace MatterHackers.MatterControl if (LoadCachedFile(cacheKey, cacheScope) is string cachedFile) { // Load from cache and deserialize - return Task.FromResult( - JsonConvert.DeserializeObject(cachedFile)); + return Task.FromResult( + JsonConvert.DeserializeObject(cachedFile)); } try @@ -1873,6 +1873,7 @@ namespace MatterHackers.MatterControl public DragDropData DragDropData { get; set; } = new DragDropData(); public string ShortProductName => "MatterControl"; + public string ProductName => "MatterHackers: MatterControl"; public void SwitchToPurchasedLibrary() @@ -2030,7 +2031,6 @@ namespace MatterHackers.MatterControl this.Workspaces.Add(workspace); } - private string loadedUserTabs = null; public async Task RestoreUserTabs() @@ -2190,12 +2190,15 @@ namespace MatterHackers.MatterControl public IEnumerable RegisteredSceneOperations => registeredSceneOperations; public static IObject3D ClipboardItem { get; internal set; } + public Action ShareLibraryItem { get; set; } public List Workspaces { get; } = new List(); public AppViewState ViewState { get; } = new AppViewState(); + public Uri HelpArticleSource { get; set; } + public Dictionary HelpArticlesByID { get; set; } public string MainTabKey { get; internal set; } @@ -2203,12 +2206,13 @@ namespace MatterHackers.MatterControl public static List StartupActions { get; } = new List(); public static List StartupTasks { get; } = new List(); + public static Type ServicesStatusType { get; set; } public bool PrinterTabSelected { get; set; } = false; /// - /// Indicates if any ActivePrinter is running a print task, either in paused or printing states + /// Gets a value indicating whether any ActivePrinter is running a print task, either in paused or printing states /// public bool AnyPrintTaskRunning => this.ActivePrinters.Any(p => p.Connection.Printing || p.Connection.Paused || p.Connection.CommunicationState == CommunicationStates.PreparingToPrint); @@ -2272,7 +2276,7 @@ namespace MatterHackers.MatterControl printer.Connection.PrintingItemName = printItemName; var errors = printer.ValidateSettings(); - if(errors.Any(e => e.ErrorLevel == ValidationErrorLevel.Error)) + if (errors.Any(e => e.ErrorLevel == ValidationErrorLevel.Error)) { this.ShowValidationErrors("Export Error".Localize(), errors); } @@ -3307,7 +3311,7 @@ Support and tutorials: break; case Keys.Insert: - if(keyEvent.Shift) + if (keyEvent.Shift) { view3D.sceneContext.Paste(); keyEvent.Handled = true; @@ -3331,7 +3335,7 @@ Support and tutorials: keyEvent.Handled = true; keyEvent.SuppressKeyPress = true; } - foreach(var interactionVolume in view3D.InteractionLayer.InteractionVolumes) + foreach (var interactionVolume in view3D.InteractionLayer.InteractionVolumes) { interactionVolume.CancelOpperation(); } diff --git a/MatterControlLib/PartPreviewWindow/PartTabPage.cs b/MatterControlLib/PartPreviewWindow/PartTabPage.cs index 984654b65..ef22cc84a 100644 --- a/MatterControlLib/PartPreviewWindow/PartTabPage.cs +++ b/MatterControlLib/PartPreviewWindow/PartTabPage.cs @@ -28,15 +28,11 @@ either expressed or implied, of the FreeBSD Project. */ using System; -using System.Linq; using MatterHackers.Agg; using MatterHackers.Agg.Platform; using MatterHackers.Agg.UI; -using MatterHackers.Localizations; using MatterHackers.MatterControl.CustomWidgets; using MatterHackers.MatterControl.Library; -using MatterHackers.MatterControl.PrintLibrary; -using MatterHackers.MeshVisualizer; using MatterHackers.VectorMath; namespace MatterHackers.MatterControl.PartPreviewWindow @@ -56,7 +52,7 @@ namespace MatterHackers.MatterControl.PartPreviewWindow protected LibraryListView favoritesBar; public PartTabPage(PartWorkspace workspace, ThemeConfig theme, string tabTitle) - : base (tabTitle) + : base(tabTitle) { this.sceneContext = workspace.SceneContext; this.theme = theme; diff --git a/MatterControlLib/PartPreviewWindow/PrinterTabPage.cs b/MatterControlLib/PartPreviewWindow/PrinterTabPage.cs index 6639a93d7..da4f0f56a 100644 --- a/MatterControlLib/PartPreviewWindow/PrinterTabPage.cs +++ b/MatterControlLib/PartPreviewWindow/PrinterTabPage.cs @@ -37,7 +37,6 @@ using MatterHackers.MatterControl.ConfigurationPage.PrintLeveling; using MatterHackers.MatterControl.CustomWidgets; using MatterHackers.MatterControl.PrinterCommunication; using MatterHackers.MatterControl.SlicerConfiguration; -using MatterHackers.MeshVisualizer; using MatterHackers.VectorMath; using static MatterHackers.MatterControl.StyledMessageBox;