/// <summary> /// Encodes the raw data into binary form representing bars and spaces. Also generates an Image of the barcode. /// </summary> /// <param name="iType">Type of encoding to use.</param> /// <param name="Data">Raw data to encode.</param> /// <returns>Image representing the barcode.</returns> public static Image DoEncode(BARCODE_ENCODE_TYPE iType, string Data) { using (Barcode b = new Barcode()) { return(b.Encode(iType, Data)); }//using }
/// <summary> /// Encodes the raw data into binary form representing bars and spaces. Also generates an Image of the barcode. /// </summary> /// <param name="iType">Type of encoding to use.</param> /// <param name="Data">Raw data to encode.</param> /// <param name="IncludeLabel">Include the label at the bottom of the image with data encoded.</param> /// <param name="DrawColor">Foreground color</param> /// <param name="BackColor">Background color</param> /// <param name="Width">Width of the resulting barcode.(pixels)</param> /// <param name="Height">Height of the resulting barcode.(pixels)</param> /// <returns>Image representing the barcode.</returns> public static Image DoEncode(BARCODE_ENCODE_TYPE iType, string Data, bool IncludeLabel, Color DrawColor, Color BackColor, int Width, int Height) { using (Barcode b = new Barcode()) { b.IncludeLabel = IncludeLabel; return(b.Encode(iType, Data, DrawColor, BackColor, Width, Height)); }//using }
/// <summary> /// Encodes the raw data into binary form representing bars and spaces. Also generates an Image of the barcode. /// </summary> /// <param name="iType">Type of encoding to use.</param> /// <param name="Data">Raw data to encode.</param> /// <param name="IncludeLabel">Include the label at the bottom of the image with data encoded.</param> /// <returns>Image representing the barcode.</returns> public static Image DoEncode(BARCODE_ENCODE_TYPE iType, string Data, bool IncludeLabel) { using (Barcode b = new Barcode()) { b.IncludeLabel = IncludeLabel; return(b.Encode(iType, Data)); }//using }
/// <summary> /// Encodes the raw data into binary form representing bars and spaces. Also generates an Image of the barcode. /// </summary> /// <param name="iType">Type of encoding to use.</param> /// <param name="Data">Raw data to encode.</param> /// <param name="XML">XML representation of the data and the image of the barcode.</param> /// <returns>Image representing the barcode.</returns> public static Image DoEncode(BARCODE_ENCODE_TYPE iType, string Data, ref string XML) { using (Barcode b = new Barcode()) { Image i = b.Encode(iType, Data); XML = b.XML; return(i); }//using }
}//(Image)Encode(TYPE, string) /// <summary> /// Encodes the raw data into binary form representing bars and spaces. Also generates an Image of the barcode. /// </summary> /// <param name="iType">Type of encoding to use.</param> internal Image Encode(BARCODE_ENCODE_TYPE iType) { Encoded_Type = iType; return(Encode()); }//Encode()
}//(Image)Encode(Type, string, Color, Color) /// <summary> /// Encodes the raw data into binary form representing bars and spaces. Also generates an Image of the barcode. /// </summary> /// <param name="iType">Type of encoding to use.</param> /// <param name="StringToEncode">Raw data to encode.</param> /// <returns>Image representing the barcode.</returns> public Image Encode(BARCODE_ENCODE_TYPE iType, string StringToEncode) { Raw_Data = StringToEncode; return(Encode(iType)); }//(Image)Encode(TYPE, string)
}//Encode(TYPE, string, Color, Color, int, int) /// <summary> /// Encodes the raw data into binary form representing bars and spaces. Also generates an Image of the barcode. /// </summary> /// <param name="iType">Type of encoding to use.</param> /// <param name="StringToEncode">Raw data to encode.</param> /// <param name="DrawColor">Foreground color</param> /// <param name="BackColor">Background color</param> /// <returns>Image representing the barcode.</returns> public Image Encode(BARCODE_ENCODE_TYPE iType, string StringToEncode, Color ForeColor, Color BackColor) { this.BackColor = BackColor; this.ForeColor = ForeColor; return(Encode(iType, StringToEncode)); }//(Image)Encode(Type, string, Color, Color)
}//Encode(TYPE, string, int, int) /// <summary> /// Encodes the raw data into binary form representing bars and spaces. Also generates an Image of the barcode. /// </summary> /// <param name="iType">Type of encoding to use.</param> /// <param name="StringToEncode">Raw data to encode.</param> /// <param name="DrawColor">Foreground color</param> /// <param name="BackColor">Background color</param> /// <param name="Width">Width of the resulting barcode.(pixels)</param> /// <param name="Height">Height of the resulting barcode.(pixels)</param> /// <returns>Image representing the barcode.</returns> public Image Encode(BARCODE_ENCODE_TYPE iType, string StringToEncode, Color ForeColor, Color BackColor, int Width, int Height) { this.Width = Width; this.Height = Height; return(Encode(iType, StringToEncode, ForeColor, BackColor)); }//Encode(TYPE, string, Color, Color, int, int)
/// <summary> /// Encodes the raw data into binary form representing bars and spaces. Also generates an Image of the barcode. /// </summary> /// <param name="iType">Type of encoding to use.</param> /// <param name="StringToEncode">Raw data to encode.</param> /// <param name="Width">Width of the resulting barcode.(pixels)</param> /// <param name="Height">Height of the resulting barcode.(pixels)</param> /// <returns>Image representing the barcode.</returns> public Image Encode(BARCODE_ENCODE_TYPE iType, string StringToEncode, int Width, int Height) { this.Width = Width; this.Height = Height; return(Encode(iType, StringToEncode)); }//Encode(TYPE, string, int, int)
}//Barcode public Barcode(string data, BARCODE_ENCODE_TYPE iType) { this.Raw_Data = data; this.Encoded_Type = iType; }
public MSI(string input, BARCODE_ENCODE_TYPE EncodedType) { Encoded_Type = EncodedType; Raw_Data = input; }//MSI