Exemple #1
0
 private void ButtonWindowSelectionTimer_Click(object sender, System.Windows.RoutedEventArgs e)
 {
     try
     {
         System.Windows.MessageBox.Show("10秒後に選択されます。");
         WindowSelectionFrame = new FreeEcho.FEWindowSelectionFrame.WindowSelectionFrame();
         WindowSelectionFrame.StartWindowSelection();
         SelectionTimer.Start();
     }
     catch
     {
     }
 }
Exemple #2
0
        private void WindowSelectionFrame_MouseLeftButtonUpEvent(object sender, FreeEcho.FEWindowSelectionFrame.MouseLeftButtonUpEventArgs e)
        {
            try
            {
                System.Text.StringBuilder string_data = new System.Text.StringBuilder(GetWindowTextLength(WindowSelectionFrame.SelectedHwnd) + 1);
                GetWindowText(WindowSelectionFrame.SelectedHwnd, string_data, string_data.Capacity);
                System.Diagnostics.Debug.WriteLine(string_data.ToString());

                WindowSelectionFrame.MouseLeftButtonUp -= WindowSelectionFrame_MouseLeftButtonUpEvent;
                WindowSelectionFrame = null;
            }
            catch
            {
            }
        }
Exemple #3
0
 private void ButtonWindowSelectionLeftButtonUp_PreviewMouseDown(object sender, System.Windows.Input.MouseButtonEventArgs e)
 {
     try
     {
         WindowSelectionFrame = new FreeEcho.FEWindowSelectionFrame.WindowSelectionFrame
         {
             MouseLeftUpStop = true
         };
         WindowSelectionFrame.MouseLeftButtonUp += WindowSelectionFrame_MouseLeftButtonUpEvent;
         WindowSelectionFrame.StartWindowSelection();
     }
     catch
     {
     }
 }
Exemple #4
0
        private void SelectionTimer_Tick(object sender, System.EventArgs e)
        {
            try
            {
                SelectionTimer.Stop();
                WindowSelectionFrame.StopWindowSelection();

                System.Text.StringBuilder string_data = new System.Text.StringBuilder(GetWindowTextLength(WindowSelectionFrame.SelectedHwnd) + 1);
                GetWindowText(WindowSelectionFrame.SelectedHwnd, string_data, string_data.Capacity);
                System.Diagnostics.Debug.WriteLine(string_data.ToString());

                WindowSelectionFrame.MouseLeftButtonUp -= WindowSelectionFrame_MouseLeftButtonUpEvent;
                WindowSelectionFrame = null;
                System.Windows.MessageBox.Show("選択しました。");
            }
            catch
            {
            }
        }