Beispiel #1
0
 private void displayToolStripMenuItem_Click(object sender, EventArgs e)
 {
     try
     {
         ScaleWriter sd = new ScaleWriter();
         sd.InsertMessage(richTextBox1.Text);
         sd.SetConfig("text");
         Form two = new Form()
         {
             Text = "Image Display",
             BackgroundImageLayout = ImageLayout.Stretch,
             BackgroundImage       = sd.Encrypt(),
             Icon = ((Icon)(new ComponentResourceManager(typeof(View)).GetObject("$this.Icon")))
         };
         two.Show();
     }
     catch (Exception ex)
     {
         MessageBox.Show(ex.Message);
     }
 }
Beispiel #2
0
 private void saveToolStripMenuItem_Click(object sender, EventArgs e)
 {
     try
     {
         SaveFileDialog sv = new SaveFileDialog();
         sv.Filter       = "PNG Image (*.png*)|*.png*";
         sv.DefaultExt   = "png";
         sv.AddExtension = true;
         if (sv.ShowDialog() == DialogResult.OK)
         {
             ScaleWriter sw = new ScaleWriter(sv.FileName);
             sw.InsertMessage(richTextBox1.Text);
             sw.SetConfig("text");
             sw.Save();
         }
     }
     catch (Exception ex)
     {
         MessageBox.Show(ex.Message);
     }
 }