source: trunk/CrypPlugins/WorkspaceManager/View/VisualComponents/BottomBox.xaml.cs @ 1837

Last change on this file since 1837 was 1837, checked in by matkovic, 11 years ago
  • added image import functionality
File size: 2.1 KB
Line 
1using System;
2using System.Collections.Generic;
3using System.Linq;
4using System.Text;
5using System.Windows;
6using System.Windows.Controls;
7using System.Windows.Data;
8using System.Windows.Documents;
9using System.Windows.Input;
10using System.Windows.Media;
11using System.Windows.Media.Imaging;
12using System.Windows.Navigation;
13using System.Windows.Shapes;
14using System.Windows.Media.Animation;
15
16namespace WorkspaceManager.View.VisualComponents
17{
18    public class ImageSelectedEventArgs : EventArgs
19    {
20        public Uri uri;
21    }
22
23    /// <summary>
24    /// Interaktionslogik für Settings.xaml
25    /// </summary>
26    public partial class BottomBox : UserControl
27    {
28        public event EventHandler<ImageSelectedEventArgs> ImageSelected;
29
30        public BottomBox()
31        {
32            this.Loaded += new RoutedEventHandler(BottomBox_Loaded);
33            InitializeComponent();
34        }
35
36        void BottomBox_Loaded(object sender, RoutedEventArgs e)
37        {
38
39        }
40
41        private void Main_MouseEnter(object sender, MouseEventArgs e)
42        {
43            //Sub.Visibility = Visibility.Collapsed;
44            Main.BeginStoryboard((this.Resources["IncrementHeigth"] as Storyboard));
45            //(this.Resources["Up"] as Storyboard).Stop(Sub);
46        }
47
48        private void Main_MouseLeave(object sender, MouseEventArgs e)
49        {
50            //Sub.Visibility = Visibility.Visible;
51            Main.BeginStoryboard((this.Resources["DecrementHeigth"] as Storyboard));
52            //Sub.BeginStoryboard((this.Resources["Up"] as Storyboard));
53        }
54
55        private void Button_Click(object sender, RoutedEventArgs e)
56        {
57            System.Windows.Forms.OpenFileDialog diag = new System.Windows.Forms.OpenFileDialog();
58            if (diag.ShowDialog() == System.Windows.Forms.DialogResult.OK)
59            {
60                Uri uriLocal = new Uri(diag.FileName);
61
62                if (ImageSelected != null)
63                    ImageSelected.Invoke(this, new ImageSelectedEventArgs() { uri = uriLocal });
64            }
65        }
66    }
67}
Note: See TracBrowser for help on using the repository browser.