private void encodeBtn_Click(object sender, EventArgs e) { ImageMap iMap = new ImageMap(image); bool result = iMap.encode(messageBox.Text, passBox.Text.GetHashCode()); if (result == false) { MessageBox.Show("Sorry, you need to use a larger image or a smaller message."); return; } Bitmap newImage = iMap.getBitmap(); EncodedImageWindow newWindow = new EncodedImageWindow(newImage); newWindow.Show(); }
private void decodeBtn_Click(object sender, EventArgs e) { ImageMap iMap = new ImageMap(image); messageBox.Text = iMap.decode(passBox.Text.GetHashCode()); }