Exemple #1
0
        /// <summary>
        /// メイン処理.
        /// </summary>
        public MainWindow()
        {
            InitializeComponent();

            KeyUp += new System.Windows.Input.KeyEventHandler(Event_KeyUp);

            txtBreakFlg.Content     = breakFlg ? "停止中" : "実行中";
            txtBossYusenFlg.Content = bossYusenFlg.ToString();


            // 5-1
            txtPointX.Text       = "370";
            txtPointY.Text       = "550";
            txtDragAndDropX.Text = "0";
            txtDragAndDropY.Text = "50";
            // 5-2
            //txtPointX.Text = "1280";
            //txtPointY.Text = "786";
            //txtDragAndDropX.Text = "0";
            //txtDragAndDropY.Text = "0";
            // B2
            //txtPointX.Text = "1320";
            //txtPointY.Text = "280";
            //txtDragAndDropX.Text = "0";
            //txtDragAndDropY.Text = "350";
            // B4
            //txtPointX.Text = "1090";
            //txtPointY.Text = "570";
            //txtDragAndDropX.Text = "-140";
            //txtDragAndDropY.Text = "180";
        }
 public GeographyTextBox()
     : base()
 {
     TextChanged    += GeographyTextBox_TextChanged;
     GotFocus       += new RoutedEventHandler(GeographyTextBox_GotFocus);
     LostFocus      += new RoutedEventHandler(GeographyTextBox_LostFocus);
     PreviewKeyDown += new System.Windows.Input.KeyEventHandler(GeographyTextBox_PreviewKeyDown);
     _exValue        = Text;
 }
Exemple #3
0
 public void AddEventHandlers(RoutedEventHandler DeleteControlLineButton_Click,
                              TextChangedEventHandler SubfolderName_Changed, TextChangedEventHandler BindKey_Changed,
                              System.Windows.Input.KeyEventHandler BindKey_KeyDown)
 {
     DeleteKeyButton.Click        += DeleteControlLineButton_Click;
     SubfolderTextBox.TextChanged += SubfolderName_Changed;
     KeyTextBox.TextChanged       += BindKey_Changed;
     KeyTextBox.PreviewKeyDown    += BindKey_KeyDown;
 }
Exemple #4
0
        public ControlLine CreateControlLine(RoutedEventHandler DeleteControlLineButton_Click,
                                             TextChangedEventHandler SubfolderName_Changed, TextChangedEventHandler BindKey_Changed,
                                             System.Windows.Input.KeyEventHandler BindKey_KeyDown)
        {
            var cl = new ControlLine(BindingLines.Count);

            cl.AddEventHandlers(DeleteControlLineButton_Click, SubfolderName_Changed, BindKey_Changed, BindKey_KeyDown);
            BindingLines.Add(cl);
            return(cl);
        }
Exemple #5
0
        public ControlLine CreateControlLine(RoutedEventHandler DeleteControlLineButton_Click,
                                             TextChangedEventHandler SubfolderName_Changed, TextChangedEventHandler BindKey_Changed,
                                             System.Windows.Input.KeyEventHandler BindKey_KeyDown, string bindedKey, string subfolderName, bool?isMoveFileMode)
        {
            var cl = new ControlLine(BindingLines.Count);

            cl.FillData(bindedKey, subfolderName, isMoveFileMode);
            cl.AddEventHandlers(DeleteControlLineButton_Click, SubfolderName_Changed, BindKey_Changed, BindKey_KeyDown);
            BindingLines.Add(cl);
            return(cl);
        }
        public Diffusion(UserControl m)
        {
            InitializeComponent(); // Initialisation de la fenetre de diffusion

            userContr = m;
            medContr  = new mediaControl(TopM, this);
            v         = new VisualBrush(TopM); // creation du pinceau visual brush (copie colle ce qui a dans topm)

            v.Stretch     = Stretch.Uniform;
            LeftRect.Fill = BotRect.Fill = RightRect.Fill = v;

            KeyDown += new System.Windows.Input.KeyEventHandler(medContr.OnButtonKeyDown); // Instcription a l'event "pression de touche"
            Closing += OnWindowClosing;                                                    // Inscrption a l'event closing #observer
        }
Exemple #7
0
        public Window1()
        {
            InitializeComponent();
            toggleFilter.Click    += new RoutedEventHandler(toggleFilter_Click);
            addRemovePlugin.Click += new RoutedEventHandler(addRemovePlugin_Click);
            clearInk.Click        += new RoutedEventHandler(clearInk_Click);
            isPluginActive.Click  += new RoutedEventHandler(isPluginActive_Click);
            EnableElement.Click   += new RoutedEventHandler(EnableElement_Click);
            KeyDown += new System.Windows.Input.KeyEventHandler(Window1_KeyDown);

            inkSurface            = new StylusControl();
            inkSurface.Background = Brushes.Yellow;
            this.root.Children.Add(inkSurface);

            this.WindowState = WindowState.Maximized;
            //timer = new DispatcherTimer(TimeSpan.FromSeconds(2d), DispatcherPriority.Normal, new EventHandler(Tick), this.Dispatcher);
        }
Exemple #8
0
        private void Challenge(string url,
                               Action <IdentityManager.Credential, Exception> callback, IdentityManager.GenerateTokenOptions options)
        {
            LoginGrid.Visibility = System.Windows.Visibility.Visible;

            TitleTextBlock.Text = string.Format("Login to access: \n{0}", url);

            if (!challengeAttemptsPerUrl.ContainsKey(url))
            {
                challengeAttemptsPerUrl.Add(url, 0);
            }

            RoutedEventHandler handleClick = null;

            handleClick = (s, e) =>
            {
                IdentityManager.Current.GenerateCredentialAsync(url, UserTextBox.Text, PasswordTextBox.Text,
                                                                (credential, ex) =>
                {
                    challengeAttemptsPerUrl[url]++;
                    if (ex == null || challengeAttemptsPerUrl[url] == 3)
                    {
                        LoginLoadLayerButton.Click -= handleClick;
                        callback(credential, ex);
                        LoggedInUserButton.Content = credential.UserName;
                    }
                }, options);
            };
            LoginLoadLayerButton.Click += handleClick;

            System.Windows.Input.KeyEventHandler handleEnterKeyDown = null;
            handleEnterKeyDown = (s, e) =>
            {
                if (e.Key == System.Windows.Input.Key.Enter)
                {
                    PasswordTextBox.KeyDown -= handleEnterKeyDown;
                    handleClick(null, null);
                }
            };
            PasswordTextBox.KeyDown += handleEnterKeyDown;
        }
Exemple #9
0
 public FilteredGridManager(DataGrid dg, Panel txtSearchPanel, KeyEventHandler keyUpEvent)
     : base(dg, txtSearchPanel, keyUpEvent)
 {
     _centerCellStyle = Application.Current.FindResource("CenterDataGridCellStyle") as Style;
     _adjConv         = new AdjustValueConverter();
 }