From 8e2a8625d5e4216f935e74177ee0a979d4d4dff0 Mon Sep 17 00:00:00 2001 From: AJ Date: Fri, 8 Mar 2019 07:48:53 -0500 Subject: [PATCH] Cleanup --- ExportDXF/Bend.cs | 18 +++++------ ExportDXF/BendDirection.cs | 4 +-- ExportDXF/BendOrientation.cs | 4 +-- ExportDXF/Bounds.cs | 48 ++++++++++++++-------------- ExportDXF/DrawingInfo.cs | 2 +- ExportDXF/Forms/MainForm.cs | 10 ++---- ExportDXF/Helper.cs | 2 +- ExportDXF/IViewFlipDecider.cs | 2 +- ExportDXF/Item.cs | 2 +- ExportDXF/Program.cs | 11 ++----- ExportDXF/Properties/AssemblyInfo.cs | 13 ++++---- ExportDXF/ViewHelper.cs | 2 +- 12 files changed, 54 insertions(+), 64 deletions(-) diff --git a/ExportDXF/Bend.cs b/ExportDXF/Bend.cs index 295434a..0c127c1 100644 --- a/ExportDXF/Bend.cs +++ b/ExportDXF/Bend.cs @@ -1,14 +1,14 @@ namespace ExportDXF { - class Bend - { - public BendDirection Direction { get; set; } + internal class Bend + { + public BendDirection Direction { get; set; } - public double ParallelBendAngle { get; set; } + public double ParallelBendAngle { get; set; } - public double Angle { get; set; } + public double Angle { get; set; } - public double X { get; set; } - public double Y { get; set; } - } -} + public double X { get; set; } + public double Y { get; set; } + } +} \ No newline at end of file diff --git a/ExportDXF/BendDirection.cs b/ExportDXF/BendDirection.cs index 6c5ac6a..728d7f6 100644 --- a/ExportDXF/BendDirection.cs +++ b/ExportDXF/BendDirection.cs @@ -1,8 +1,8 @@ namespace ExportDXF { - enum BendDirection + internal enum BendDirection { Up, Down } -} +} \ No newline at end of file diff --git a/ExportDXF/BendOrientation.cs b/ExportDXF/BendOrientation.cs index ab675f1..f7cc4df 100644 --- a/ExportDXF/BendOrientation.cs +++ b/ExportDXF/BendOrientation.cs @@ -1,9 +1,9 @@ namespace ExportDXF { - enum BendOrientation + internal enum BendOrientation { Vertical, Horizontal, Unknown } -} +} \ No newline at end of file diff --git a/ExportDXF/Bounds.cs b/ExportDXF/Bounds.cs index 1987a21..bee2f69 100644 --- a/ExportDXF/Bounds.cs +++ b/ExportDXF/Bounds.cs @@ -1,30 +1,30 @@ namespace ExportDXF { - class Bounds - { - public double X { get; set; } - public double Y { get; set; } - public double Width { get; set; } - public double Height { get; set; } + internal class Bounds + { + public double X { get; set; } + public double Y { get; set; } + public double Width { get; set; } + public double Height { get; set; } - public double Left - { - get { return X; } - } + public double Left + { + get { return X; } + } - public double Right - { - get { return X + Width; } - } + public double Right + { + get { return X + Width; } + } - public double Bottom - { - get { return Y; } - } + public double Bottom + { + get { return Y; } + } - public double Top - { - get { return Y + Height; } - } - } -} + public double Top + { + get { return Y + Height; } + } + } +} \ No newline at end of file diff --git a/ExportDXF/DrawingInfo.cs b/ExportDXF/DrawingInfo.cs index 835f467..42c1c6c 100644 --- a/ExportDXF/DrawingInfo.cs +++ b/ExportDXF/DrawingInfo.cs @@ -46,4 +46,4 @@ namespace ExportDXF return dwg; } } -} +} \ No newline at end of file diff --git a/ExportDXF/Forms/MainForm.cs b/ExportDXF/Forms/MainForm.cs index 7dd27b0..91021d3 100644 --- a/ExportDXF/Forms/MainForm.cs +++ b/ExportDXF/Forms/MainForm.cs @@ -1,5 +1,4 @@ -using OfficeOpenXml; -using SolidWorks.Interop.sldworks; +using SolidWorks.Interop.sldworks; using SolidWorks.Interop.swconst; using System; using System.Collections.Generic; @@ -97,7 +96,6 @@ namespace ExportDXF.Forms private void button2_Click(object sender, EventArgs e) { - } private void Worker_DoWork(object sender, DoWorkEventArgs e) @@ -437,7 +435,7 @@ namespace ExportDXF.Forms var drawingModel = templateDrawing as ModelDoc2; drawingModel.ViewZoomtofit2(); - + if (HideModelSketches(view)) { // delete the current view that has sketches shown @@ -674,8 +672,6 @@ namespace ExportDXF.Forms .Cast() .Where(c => !c.IsHidden(true)); - - var componentGroups = assemblyComponents .GroupBy(c => c.GetTitle() + c.ReferencedConfiguration); @@ -730,4 +726,4 @@ namespace ExportDXF.Forms public string Name { get; set; } public IViewFlipDecider ViewFlipDecider { get; set; } } -} +} \ No newline at end of file diff --git a/ExportDXF/Helper.cs b/ExportDXF/Helper.cs index 2332f4d..db59c22 100644 --- a/ExportDXF/Helper.cs +++ b/ExportDXF/Helper.cs @@ -228,4 +228,4 @@ namespace ExportDXF return Math.Round(d / ScaleFactor, 8); } } -} +} \ No newline at end of file diff --git a/ExportDXF/IViewFlipDecider.cs b/ExportDXF/IViewFlipDecider.cs index eac0cad..d928bfb 100644 --- a/ExportDXF/IViewFlipDecider.cs +++ b/ExportDXF/IViewFlipDecider.cs @@ -75,4 +75,4 @@ namespace ExportDXF } } } -} +} \ No newline at end of file diff --git a/ExportDXF/Item.cs b/ExportDXF/Item.cs index ed9cbde..4f6090a 100644 --- a/ExportDXF/Item.cs +++ b/ExportDXF/Item.cs @@ -24,4 +24,4 @@ namespace ExportDXF public Component2 Component { get; set; } } -} +} \ No newline at end of file diff --git a/ExportDXF/Program.cs b/ExportDXF/Program.cs index 33a0629..4552c40 100644 --- a/ExportDXF/Program.cs +++ b/ExportDXF/Program.cs @@ -1,24 +1,19 @@ using System; -using System.Collections.Generic; -using System.IO; -using System.Linq; using System.Windows.Forms; namespace ExportDXF { - static class Program + internal static class Program { /// /// The main entry point for the application. /// [STAThread] - static void Main() + private static void Main() { Application.EnableVisualStyles(); Application.SetCompatibleTextRenderingDefault(false); Application.Run(new Forms.MainForm()); } - - } -} +} \ No newline at end of file diff --git a/ExportDXF/Properties/AssemblyInfo.cs b/ExportDXF/Properties/AssemblyInfo.cs index c56f72e..82f89b7 100644 --- a/ExportDXF/Properties/AssemblyInfo.cs +++ b/ExportDXF/Properties/AssemblyInfo.cs @@ -1,8 +1,7 @@ using System.Reflection; -using System.Runtime.CompilerServices; using System.Runtime.InteropServices; -// General Information about an assembly is controlled through the following +// General Information about an assembly is controlled through the following // set of attributes. Change these attribute values to modify the information // associated with an assembly. [assembly: AssemblyTitle("ExportDXF")] @@ -14,8 +13,8 @@ using System.Runtime.InteropServices; [assembly: AssemblyTrademark("")] [assembly: AssemblyCulture("")] -// Setting ComVisible to false makes the types in this assembly not visible -// to COM components. If you need to access a type in this assembly from +// Setting ComVisible to false makes the types in this assembly not visible +// to COM components. If you need to access a type in this assembly from // COM, set the ComVisible attribute to true on that type. [assembly: ComVisible(false)] @@ -25,12 +24,12 @@ using System.Runtime.InteropServices; // Version information for an assembly consists of the following four values: // // Major Version -// Minor Version +// Minor Version // Build Number // Revision // -// You can specify all the values or you can default the Build and Revision Numbers +// You can specify all the values or you can default the Build and Revision Numbers // by using the '*' as shown below: // [assembly: AssemblyVersion("1.0.*")] [assembly: AssemblyVersion("1.0.0.0")] -[assembly: AssemblyFileVersion("1.0.0.0")] +[assembly: AssemblyFileVersion("1.0.0.0")] \ No newline at end of file diff --git a/ExportDXF/ViewHelper.cs b/ExportDXF/ViewHelper.cs index f94d40c..f9c7238 100644 --- a/ExportDXF/ViewHelper.cs +++ b/ExportDXF/ViewHelper.cs @@ -270,4 +270,4 @@ namespace ExportDXF return Math.Round(angleInRadians * 180.0 / Math.PI, 8); } } -} +} \ No newline at end of file