Пример #1
0
 private void selectbutton_Click(object sender, RoutedEventArgs e)
 {
     try
     {
         using (FileStream fs = new FileStream(Evennote.OpenImageInWindow().ToString().Remove(0, 8), FileMode.Open, FileAccess.Read))
         {
             imagelabel.Content = fs.Name.Split('\\').Last();
             image = new byte[fs.Length];
             fs.Read(image, 0, (int)fs.Length);
             fs.Close();
         }
     }
     catch { }
 }
Пример #2
0
        private void open_image_button(object sender, RoutedEventArgs e)
        {
            BitmapFrame image = Evennote.OpenImageInWindow();

            if (image == null)
            {
                return;
            }

            var temp = Clipboard.GetDataObject();

            Clipboard.SetImage(image);
            richTextBox.Paste();
            Clipboard.Clear();
            Clipboard.SetDataObject(temp);
        }