/// <summary>
 /// Initialize stream and hexeditor
 /// </summary>
 private void InitializeMStreamReplace()
 {
     ReplaceHexEdit.CloseProvider();
     _replaceMs = new MemoryStream(1);
     _replaceMs.WriteByte(0);
     ReplaceHexEdit.Stream = _replaceMs;
 }
        /// <summary>
        /// Initialize stream and hexeditor
        /// </summary>
        private void InitializeMStreamReplace(byte[] replaceData = null)
        {
            ReplaceHexEdit.CloseProvider();

            _replaceMs = new MemoryStream(1);

            if (replaceData != null && replaceData.Length > 0)
            {
                foreach (byte b in replaceData)
                {
                    _replaceMs.WriteByte(b);
                }
            }
            else
            {
                _replaceMs.WriteByte(0);
            }

            ReplaceHexEdit.Stream = _replaceMs;
        }