Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cleanup namespaces #203

Merged
merged 1 commit into from
Apr 29, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions BarcodeStandard/BarcodeLib.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,6 @@
using System.Text.Json;
using System.Xml;
using System.Xml.Serialization;
using BarcodeLib;
using BarcodeLib.Symbologies;
using BarcodeStandard.Symbologies;
using SkiaSharp;

Expand Down Expand Up @@ -105,7 +103,10 @@ public Barcode(string data, Type iType)
/// <summary>
/// Gets or sets the label font. (Default is Microsoft Sans Serif, 10pt, Bold)
/// </summary>
public SKFont LabelFont { get; set; } = new SKFont(SKTypeface.FromFamilyName("Arial", SKFontStyle.Bold), 28); //LabelFont
public SKFont LabelFont { get; set; } = new SKFont{
Typeface = SKTypeface.FromFamilyName("Arial", SKFontStyle.Bold),
Size = 28,
}; //LabelFont
/// <summary>
/// Gets or sets the width of the image to be drawn. (Default is 300 pixels)
/// </summary>
Expand Down
4 changes: 2 additions & 2 deletions BarcodeStandard/IBarcode.cs
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
using System.Collections.Generic;

namespace BarcodeLib
namespace BarcodeStandard
{
/// <summary>
/// Barcode interface for symbology layout.
/// Written by: Brad Barnhill
/// </summary>
interface IBarcode
internal interface IBarcode
{
string Encoded_Value
{
Expand Down
4 changes: 1 addition & 3 deletions BarcodeStandard/Labels.cs
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
using SkiaSharp;
using System;
using System.Drawing;
using BarcodeStandard;

namespace BarcodeLib
namespace BarcodeStandard
{
class Labels
{
Expand Down
3 changes: 1 addition & 2 deletions BarcodeStandard/Symbologies/Blank.cs
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
using System;
using BarcodeStandard;

namespace BarcodeLib.Symbologies
namespace BarcodeStandard.Symbologies
{
/// <summary>
/// Blank encoding template
Expand Down
8 changes: 3 additions & 5 deletions BarcodeStandard/Symbologies/Codabar.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
using BarcodeStandard;

namespace BarcodeLib.Symbologies
namespace BarcodeStandard.Symbologies
{
/// <summary>
/// Codabar encoding
Expand All @@ -9,8 +7,8 @@ namespace BarcodeLib.Symbologies
internal class Codabar : BarcodeCommon, IBarcode
{
private readonly System.Collections.Hashtable Codabar_Code = new System.Collections.Hashtable(); //is initialized by init_Codabar()
public Codabar(string input)

internal Codabar(string input)
{
RawData = input;
}//Codabar
Expand Down
5 changes: 2 additions & 3 deletions BarcodeStandard/Symbologies/Code11.cs
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
using System;
using BarcodeStandard;

namespace BarcodeLib.Symbologies
namespace BarcodeStandard.Symbologies
{
/// <summary>
/// Code 11 encoding
Expand All @@ -11,7 +10,7 @@ internal class Code11 : BarcodeCommon, IBarcode
{
private readonly string[] C11_Code = { "101011", "1101011", "1001011", "1100101", "1011011", "1101101", "1001101", "1010011", "1101001", "110101", "101101", "1011001" };

public Code11(string input)
internal Code11(string input)
{
RawData = input;
}//Code11
Expand Down
7 changes: 3 additions & 4 deletions BarcodeStandard/Symbologies/Code128.cs
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
using System;
using System.Collections.Generic;
using BarcodeStandard;

namespace BarcodeLib.Symbologies
namespace BarcodeStandard.Symbologies
{
/// <summary>
/// Code 128 encoding
Expand All @@ -29,7 +28,7 @@ public enum TYPES : int { DYNAMIC, A, B, C };
/// Encodes data in Code128 format.
/// </summary>
/// <param name="input">Data to encode.</param>
public Code128(string input)
internal Code128(string input)
{
RawData = input;
}//Code128
Expand All @@ -39,7 +38,7 @@ public Code128(string input)
/// </summary>
/// <param name="input">Data to encode.</param>
/// <param name="type">Type of encoding to lock to. (Code 128A, Code 128B, Code 128C)</param>
public Code128(string input, TYPES type)
internal Code128(string input, TYPES type)
{
this.type = type;
RawData = input;
Expand Down
9 changes: 4 additions & 5 deletions BarcodeStandard/Symbologies/Code39.cs
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
using System;
using BarcodeStandard;

namespace BarcodeLib.Symbologies
namespace BarcodeStandard.Symbologies
{
/// <summary>
/// Code 39 encoding
Expand All @@ -18,7 +17,7 @@ internal class Code39 : BarcodeCommon, IBarcode
/// Encodes with Code39.
/// </summary>
/// <param name="input">Data to encode.</param>
public Code39(string input)
internal Code39(string input)
{
RawData = input;
}//Code39
Expand All @@ -28,7 +27,7 @@ public Code39(string input)
/// </summary>
/// <param name="input">Data to encode.</param>
/// <param name="allowExtended">Allow Extended Code 39 (Full Ascii mode).</param>
public Code39(string input, bool allowExtended)
internal Code39(string input, bool allowExtended)
{
RawData = input;
_allowExtended = allowExtended;
Expand All @@ -40,7 +39,7 @@ public Code39(string input, bool allowExtended)
/// <param name="input">Data to encode.</param>
/// <param name="allowExtended">Allow Extended Code 39 (Full Ascii mode).</param>
/// <param name="enableChecksum">Whether to calculate the Mod 43 checksum and encode it into the barcode</param>
public Code39(string input, bool allowExtended, bool enableChecksum)
internal Code39(string input, bool allowExtended, bool enableChecksum)
{
RawData = input;
_allowExtended = allowExtended;
Expand Down
4 changes: 2 additions & 2 deletions BarcodeStandard/Symbologies/Code93.cs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
using System;
using BarcodeStandard;

namespace BarcodeLib.Symbologies
namespace BarcodeStandard.Symbologies
{
/// <summary>
/// Code 93 encoding
Expand All @@ -15,7 +15,7 @@ internal class Code93 : BarcodeCommon, IBarcode
/// Encodes with Code93.
/// </summary>
/// <param name="input">Data to encode.</param>
public Code93(string input)
internal Code93(string input)
{
RawData = input;
}//Code93
Expand Down
5 changes: 2 additions & 3 deletions BarcodeStandard/Symbologies/EAN13.cs
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
using System;
using System.Collections;
using BarcodeStandard;

namespace BarcodeLib.Symbologies
namespace BarcodeStandard.Symbologies
{
/// <summary>
/// EAN-13 encoding
Expand All @@ -19,7 +18,7 @@ internal class EAN13 : BarcodeCommon, IBarcode

public string CountryAssigningManufacturerCode { get => _countryAssigningManufacturerCode; set => _countryAssigningManufacturerCode = value; }

public EAN13(string input, bool disableCountryCode = false)
internal EAN13(string input, bool disableCountryCode = false)
{
RawData = input;
DisableCountryCode = disableCountryCode;
Expand Down
5 changes: 2 additions & 3 deletions BarcodeStandard/Symbologies/EAN8.cs
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
using System;
using BarcodeStandard;

namespace BarcodeLib.Symbologies
namespace BarcodeStandard.Symbologies
{
/// <summary>
/// EAN-8 encoding
Expand All @@ -12,7 +11,7 @@ internal class EAN8 : BarcodeCommon, IBarcode
private readonly string[] EAN_CodeA = { "0001101", "0011001", "0010011", "0111101", "0100011", "0110001", "0101111", "0111011", "0110111", "0001011" };
private readonly string[] EAN_CodeC = { "1110010", "1100110", "1101100", "1000010", "1011100", "1001110", "1010000", "1000100", "1001000", "1110100" };

public EAN8(string input)
internal EAN8(string input)
{
RawData = input;

Expand Down
8 changes: 3 additions & 5 deletions BarcodeStandard/Symbologies/FIM.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
using BarcodeStandard;

namespace BarcodeLib.Symbologies
namespace BarcodeStandard.Symbologies
{
/// <summary>
/// FIM encoding
Expand All @@ -11,7 +9,7 @@ internal class FIM : BarcodeCommon, IBarcode
private readonly string[] FIM_Codes = { "110010011", "101101101", "110101011", "111010111", "101000101" };
public enum FIMTypes {FIM_A = 0, FIM_B, FIM_C, FIM_D, FIM_E};

public FIM(string input)
internal FIM(string input)
{
input = input.Trim();

Expand All @@ -37,7 +35,7 @@ public FIM(string input)
}//switch
}

public string Encode_FIM()
internal string Encode_FIM()
{
string encoded = "";
foreach (char c in RawData)
Expand Down
10 changes: 2 additions & 8 deletions BarcodeStandard/Symbologies/IATA2of5.cs
Original file line number Diff line number Diff line change
@@ -1,16 +1,10 @@
using BarcodeLib;
using BarcodeLib.Symbologies;
using System;
using System.Collections.Generic;
using System.Text;

namespace BarcodeStandard.Symbologies
namespace BarcodeStandard.Symbologies
{
internal class IATA2of5 : BarcodeCommon, IBarcode
{
private readonly string[] IATA2of5_Code = { "10101110111010", "11101010101110", "10111010101110", "11101110101010", "10101110101110", "11101011101010", "10111011101010", "10101011101110", "11101010111010", "10111010111010" };

public IATA2of5(string input)
internal IATA2of5(string input)
{
RawData = input;
}//Standard2of5
Expand Down
6 changes: 2 additions & 4 deletions BarcodeStandard/Symbologies/ISBN.cs
Original file line number Diff line number Diff line change
@@ -1,14 +1,12 @@
using BarcodeStandard;

namespace BarcodeLib.Symbologies
namespace BarcodeStandard.Symbologies
{
/// <summary>
/// ISBN encoding
/// Written by: Brad Barnhill
/// </summary>
internal class ISBN : BarcodeCommon, IBarcode
{
public ISBN(string input)
internal ISBN(string input)
{
RawData = input;
}
Expand Down
5 changes: 2 additions & 3 deletions BarcodeStandard/Symbologies/ITF14.cs
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
using System;
using BarcodeStandard;

namespace BarcodeLib.Symbologies
namespace BarcodeStandard.Symbologies
{
/// <summary>
/// ITF-14 encoding
Expand All @@ -11,7 +10,7 @@ internal class ITF14 : BarcodeCommon, IBarcode
{
private readonly string[] ITF14_Code = { "NNWWN", "WNNNW", "NWNNW", "WWNNN", "NNWNW", "WNWNN", "NWWNN", "NNNWW", "WNNWN", "NWNWN" };

public ITF14(string input)
internal ITF14(string input)
{
RawData = input;

Expand Down
6 changes: 2 additions & 4 deletions BarcodeStandard/Symbologies/Interleaved2of5.cs
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
using System;
using BarcodeStandard;
using Type = BarcodeStandard.Type;

namespace BarcodeLib.Symbologies
namespace BarcodeStandard.Symbologies
{
/// <summary>
/// Interleaved 2 of 5 encoding
Expand All @@ -13,7 +11,7 @@ internal class Interleaved2of5 : BarcodeCommon, IBarcode
private readonly string[] _i25Code = { "NNWWN", "WNNNW", "NWNNW", "WWNNN", "NNWNW", "WNWNN", "NWWNN", "NNNWW", "WNNWN", "NWNWN" };
private readonly Type _encodedType;

public Interleaved2of5(string input, Type encodedType)
internal Interleaved2of5(string input, Type encodedType)
{
_encodedType = encodedType;
RawData = input;
Expand Down
6 changes: 2 additions & 4 deletions BarcodeStandard/Symbologies/JAN13.cs
Original file line number Diff line number Diff line change
@@ -1,14 +1,12 @@
using BarcodeStandard;

namespace BarcodeLib.Symbologies
namespace BarcodeStandard.Symbologies
{
/// <summary>
/// JAN-13 encoding
/// Written by: Brad Barnhill
/// </summary>
internal class JAN13 : BarcodeCommon, IBarcode
{
public JAN13(string input)
internal JAN13(string input)
{
RawData = input;
}
Expand Down
6 changes: 2 additions & 4 deletions BarcodeStandard/Symbologies/MSI.cs
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
using System;
using BarcodeStandard;
using Type = BarcodeStandard.Type;

namespace BarcodeLib.Symbologies
namespace BarcodeStandard.Symbologies
{
internal class MSI : BarcodeCommon, IBarcode
{
Expand All @@ -13,7 +11,7 @@ internal class MSI : BarcodeCommon, IBarcode
private readonly string[] MSI_Code = { "100100100100", "100100100110", "100100110100", "100100110110", "100110100100", "100110100110", "100110110100", "100110110110", "110100100100", "110100100110" };
private Type Encoded_Type = Type.Unspecified;

public MSI(string input, Type encodedType)
internal MSI(string input, Type encodedType)
{
Encoded_Type = encodedType;
RawData = input;
Expand Down
5 changes: 2 additions & 3 deletions BarcodeStandard/Symbologies/Pharmacode.cs
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
using System;
using BarcodeStandard;

namespace BarcodeLib.Symbologies
namespace BarcodeStandard.Symbologies
{
/// <summary>
/// Pharmacode encoding
Expand All @@ -17,7 +16,7 @@ internal class Pharmacode : BarcodeCommon, IBarcode
/// Encodes with Pharmacode.
/// </summary>
/// <param name="input">Data to encode.</param>
public Pharmacode(string input)
internal Pharmacode(string input)
{
RawData = input;

Expand Down
5 changes: 2 additions & 3 deletions BarcodeStandard/Symbologies/Postnet.cs
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
using System;
using BarcodeStandard;

namespace BarcodeLib.Symbologies
namespace BarcodeStandard.Symbologies
{
/// <summary>
/// Postnet encoding
Expand All @@ -11,7 +10,7 @@ internal class Postnet : BarcodeCommon, IBarcode
{
private readonly string[] POSTNET_Code = { "11000", "00011", "00101", "00110", "01001", "01010", "01100", "10001", "10010", "10100" };

public Postnet(string input)
internal Postnet(string input)
{
RawData = input;
}//Postnet
Expand Down
Loading