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

Last change on this file since 1892 was 1892, checked in by matkovic, 11 years ago

-Fullscreen enhanced
-TextInput added
-Picture scaling added
-Textinput scaling added
-Textinput format command added
-Several style changes
-Progressbar redesigned
-Last log message now appearing
-IControlContainer commenced
-Several icons added
-Plugin state now stored and loaded
-Plugin height and width now storing and loading
-Several misc changes

File size: 2.5 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    /// <summary>
19    /// Interaktionslogik für Settings.xaml
20    /// </summary>
21    public partial class BottomBox : UserControl
22    {
23        public event EventHandler<ImageSelectedEventArgs> ImageSelected;
24        public event EventHandler<AddTextEventArgs> AddText;
25
26        public BottomBox()
27        {
28            this.Loaded += new RoutedEventHandler(BottomBox_Loaded);
29            InitializeComponent();
30        }
31
32        void BottomBox_Loaded(object sender, RoutedEventArgs e)
33        {
34
35        }
36
37        private void Main_MouseEnter(object sender, MouseEventArgs e)
38        {
39            //Sub.Visibility = Visibility.Collapsed;
40            Main.BeginStoryboard((this.Resources["IncrementHeigth"] as Storyboard));
41            //(this.Resources["Up"] as Storyboard).Stop(Sub);
42        }
43
44        private void Main_MouseLeave(object sender, MouseEventArgs e)
45        {
46            //Sub.Visibility = Visibility.Visible;
47            Main.BeginStoryboard((this.Resources["DecrementHeigth"] as Storyboard));
48            //Sub.BeginStoryboard((this.Resources["Up"] as Storyboard));
49        }
50
51        private void Button_Click(object sender, RoutedEventArgs e)
52        {
53            Button btn = sender as Button;
54            if (btn.Name == "ADDIMG")
55            {
56                System.Windows.Forms.OpenFileDialog diag = new System.Windows.Forms.OpenFileDialog();
57                if (diag.ShowDialog() == System.Windows.Forms.DialogResult.OK)
58                {
59                    Uri uriLocal = new Uri(diag.FileName);
60
61                    if (ImageSelected != null)
62                        ImageSelected.Invoke(this, new ImageSelectedEventArgs() { uri = uriLocal });
63                }
64                return;
65            }
66
67            if (btn.Name == "ADDTXT")
68            {
69                if (AddText != null)
70                    AddText.Invoke(this, new AddTextEventArgs());
71            }
72        }
73    }
74
75    public class ImageSelectedEventArgs : EventArgs
76    {
77        public Uri uri;
78    }
79
80    public class AddTextEventArgs : EventArgs
81    {
82    }
83
84}
Note: See TracBrowser for help on using the repository browser.