Exemple #1
0
        public MainWindow()
        {
            InitializeComponent();

            TextCompositionManager.AddPreviewTextInputHandler(tbSearch, OnPreviewTextInput);
            TextCompositionManager.AddPreviewTextInputStartHandler(tbSearch, OnPreviewTextInputStart);
            TextCompositionManager.AddPreviewTextInputUpdateHandler(tbSearch, OnPreviewTextInputUpdate);
        }
Exemple #2
0
        public MainView()
        {
            InputManager.Current.PreNotifyInput += PreNotifyInput;
            // This is where we handle all the rest of the keys
            TextCompositionManager.AddPreviewTextInputStartHandler(
                Application.Current.MainWindow,
                PreviewTextInputHandler);

            InitializeComponent();
        }
Exemple #3
0
        public MainWindow()
        {
            InitializeComponent();

            TextCompositionManager.AddPreviewTextInputHandler(TB, OnPreviewTextInput);
            TextCompositionManager.AddPreviewTextInputStartHandler(TB, OnPreviewTextInputStart);
            TextCompositionManager.AddPreviewTextInputUpdateHandler(TB, OnPreviewTextInputUpdate);

            kbd = new KeyboardDevice();
            kbd.KeyboardDeviceFound     += OnKeyboardDeviceFound;
            kbd.KeyboardDeviceConnected += OnKeyboardDeviceConnected;
        }
Exemple #4
0
        private void LoadSetting()
        {
            if (App.GV.Scale == 0)
            {
                App.GV.Scale = 1;
            }
            App.LastDir = App.RootDir;

            tb_Fps.SetBinding(TextBox.TextProperty, new Binding()
            {
                Source = App.GV, Path = new PropertyPath("Speed")
            });
            lb_Scale.SetBinding(Label.ContentProperty, new Binding()
            {
                Source = App.GV, Path = new PropertyPath("Scale")
            });
            lb_Width.SetBinding(ContentProperty, new Binding()
            {
                Source = App.GV, Path = new PropertyPath("FrameWidth")
            });
            lb_Height.SetBinding(ContentProperty, new Binding()
            {
                Source = App.GV, Path = new PropertyPath("FrameHeight")
            });

            //lb_PosX.SetBinding(ContentProperty, new Binding() { Source = App.GV, Path = new PropertyPath("PosX") });
            //lb_PosY.SetBinding(ContentProperty, new Binding() { Source = App.GV, Path = new PropertyPath("PosY") });

            tb_PosX.SetBinding(TextBox.TextProperty, new Binding()
            {
                Source = App.GV, Path = new PropertyPath("PosX")
            });
            tb_PosY.SetBinding(TextBox.TextProperty, new Binding()
            {
                Source = App.GV, Path = new PropertyPath("PosY")
            });

            chb_Alpha.SetBinding(CheckBox.IsCheckedProperty, new Binding()
            {
                Source = App.GV, Path = new PropertyPath("Alpha")
            });
            chb_IsLoop.SetBinding(CheckBox.IsCheckedProperty, new Binding()
            {
                Source = App.GV, Path = new PropertyPath("IsLoop")
            });
            chb_PreMultiplyAlpha.SetBinding(CheckBox.IsCheckedProperty, new Binding()
            {
                Source = App.GV, Path = new PropertyPath("PreMultiplyAlpha")
            });
            TextCompositionManager.AddPreviewTextInputStartHandler(tb_Fps, tb_Fps_PreviewTextInput);
        }
Exemple #5
0
        private void LoadSetting()
        {
            if (App.GV.Scale == 0)
            {
                App.GV.Scale = 1;
            }

            if (Properties.Settings.Default.LastSelectDir == "")
            {
                App.LastDir = App.RootDir;
            }
            else
            {
                App.LastDir = Properties.Settings.Default.LastSelectDir;
            }
            tb_Fps.SetBinding(TextBox.TextProperty, new Binding()
            {
                Source = App.GV, Path = new PropertyPath("Speed")
            });
            tb_Spine_Scale.SetBinding(TextBox.TextProperty, new Binding()
            {
                Source = App.GV, Path = new PropertyPath("Scale")
            });
            tb_Scale.SetBinding(TextBox.TextProperty, new Binding()
            {
                Source = App.GV, Path = new PropertyPath("Scale"), StringFormat = "{0}%"
            });
            lb_Width.SetBinding(ContentProperty, new Binding()
            {
                Source = App.GV, Path = new PropertyPath("FrameWidth")
            });
            lb_Height.SetBinding(ContentProperty, new Binding()
            {
                Source = App.GV, Path = new PropertyPath("FrameHeight")
            });
            tb_PosX.SetBinding(TextBox.TextProperty, new Binding()
            {
                Source = App.GV, Path = new PropertyPath("PosX")
            });
            tb_PosY.SetBinding(TextBox.TextProperty, new Binding()
            {
                Source = App.GV, Path = new PropertyPath("PosY")
            });
            tb_Rotation.SetBinding(TextBox.TextProperty, new Binding()
            {
                Source = App.GV, Path = new PropertyPath("Rotation")
            });

            tb_BG_PosX.SetBinding(TextBox.TextProperty, new Binding()
            {
                Source = App.GV, Path = new PropertyPath("PosBGX")
            });
            tb_BG_PosY.SetBinding(TextBox.TextProperty, new Binding()
            {
                Source = App.GV, Path = new PropertyPath("PosBGY")
            });
            chb_UseBG.SetBinding(CheckBox.IsCheckedProperty, new Binding()
            {
                Source = App.GV, Path = new PropertyPath("UseBG")
            });
            lb_ImagePath.SetBinding(ContentProperty, new Binding()
            {
                Source = App.GV, Path = new PropertyPath("SelectBG")
            });
            chb_ControlBG.SetBinding(CheckBox.IsCheckedProperty, new Binding()
            {
                Source = App.GV, Path = new PropertyPath("ControlBG")
            });


            chb_Alpha.SetBinding(CheckBox.IsCheckedProperty, new Binding()
            {
                Source = App.GV, Path = new PropertyPath("Alpha")
            });
            chb_IsLoop.SetBinding(CheckBox.IsCheckedProperty, new Binding()
            {
                Source = App.GV, Path = new PropertyPath("IsLoop")
            });
            chb_PreMultiplyAlpha.SetBinding(CheckBox.IsCheckedProperty, new Binding()
            {
                Source = App.GV, Path = new PropertyPath("PreMultiplyAlpha")
            });
            chb_FilpX.SetBinding(CheckBox.IsCheckedProperty, new Binding()
            {
                Source = App.GV, Path = new PropertyPath("FilpX")
            });
            chb_FilpY.SetBinding(CheckBox.IsCheckedProperty, new Binding()
            {
                Source = App.GV, Path = new PropertyPath("FilpY")
            });


            TextCompositionManager.AddPreviewTextInputStartHandler(tb_Fps, tb_Fps_PreviewTextInput);
            sl_Loading.SetBinding(Slider.ValueProperty, new Binding()
            {
                Source = App.GV, Path = new PropertyPath("Lock")
            });
            lb_Loading.SetBinding(ContentProperty, new Binding()
            {
                Source = App.GV, Path = new PropertyPath("LoadingProcess")
            });
            GridAttributes.ColumnDefinitions[0].Width = new GridLength(34);
            gs_Control.Visibility    = Visibility.Hidden;
            tc_Control.SelectedIndex = 4;
        }