Esempio n. 1
0
        void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target)
        {
            switch (connectionId)
            {
            case 1:
                this.transWindow = ((screencapture.Window2)(target));

            #line 9 "..\..\Window2.xaml"
                this.transWindow.MouseLeftButtonDown += new System.Windows.Input.MouseButtonEventHandler(this.transWindow_MouseLeftButtonDown);

            #line default
            #line hidden

            #line 10 "..\..\Window2.xaml"
                this.transWindow.MouseMove += new System.Windows.Input.MouseEventHandler(this.transWindow_MouseMove);

            #line default
            #line hidden

            #line 10 "..\..\Window2.xaml"
                this.transWindow.MouseUp += new System.Windows.Input.MouseButtonEventHandler(this.transWindow_MouseUp);

            #line default
            #line hidden

            #line 11 "..\..\Window2.xaml"
                this.transWindow.PreviewKeyDown += new System.Windows.Input.KeyEventHandler(this.transWindow_PreviewKeyDown);

            #line default
            #line hidden

            #line 11 "..\..\Window2.xaml"
                this.transWindow.Loaded += new System.Windows.RoutedEventHandler(this.transWindow_Loaded);

            #line default
            #line hidden
                return;

            case 2:
                this.can1 = ((System.Windows.Controls.Canvas)(target));
                return;
            }
            this._contentLoaded = true;
        }
Esempio n. 2
0
        //Capturar recuadro de pantalla
        private void rectboton_Click(object sender, RoutedEventArgs e)
        {
            try
            {
                // Ocultar la ventana de la aplicación para que no aparezca en la captura de pantalla
                Hide();

                //Crear y abrir ventana de seleccion de recuadro
                tW = new Window2(imagePreview, rectCapture);
                tW.ShowDialog();
            }
            catch (Exception objError)
            {
                MessageBox.Show(objError.ToString(), "Error");
            }
            finally
            {
                Show();
            }
        }