コード例 #1
0
        /// <summary>
        /// <c>PixelInformation</c> initiliser takes the specified pixel and generates its unique information.
        /// </summary>
        /// <param name="par">Parent object (PixelManager)</param>
        /// <param name="x">X Location of the pixel</param>
        /// <param name="y">Y Location of the pixel</param>
        /// <returns>Initilised <c>PixelInformation</c> class.</returns>
        public PixelInformation(PixelManager par, int x, int y)
        {
            parent = par;

            this.x = x;
            this.y = y;

            getImageInformation();
            setupLetterMap();
            breakDown = hash.ToCharArray();
        }
コード例 #2
0
        /// <summary>
        /// The constructor for <c>FrankEncoding</c> will collect the 3 provided file locations, open / create them
        /// and then initialise the <c>PixelManager</c>.
        /// </summary>
        /// <param name="coverFile">The file you want to encode using.</param>
        /// <param name="inputFile">The file you wish to encode.</param>
        /// <param name="outputFile">The outputted encoded file.</param>
        /// <returns>An initialised <c>FrankEncoding</c> file.</returns>
        public FrankEncoding(string coverFile, string inputFile, string outputFile)
            : base(coverFile, Action.Encoding, inputFile, outputFile)
        {
            if (!isValid())
            {
                return;
            }

            Console.WriteLine("Initialising encoder.");
            manager = new PixelManager(this);

            if (manager.isValid())
            {
                return;
            }

            setValid(false);
        }
コード例 #3
0
 /// <summary>
 /// The constructor for the <c>HexCharacter</c> class which will return back a HexCharacter object.
 /// </summary>
 /// <param name="par">The PixelManager which initialised it.</param>
 /// <param name="let">The letter this object is in charge of.</param>
 /// <returns>
 /// An initialised <c>HexCharacter</c> class.
 /// </returns>
 public HexCharacter(PixelManager par, string let)
 {
     parent = par;
     letter = let;
 }