Ejemplo n.º 1
0
        private void CaptureScreen(int row)
        {
            DataGridViewRow currentRow = capturesDataGridView.Rows[row];

            CaptureForm captureForm = new CaptureForm(
                capturesDataGridView.Rows[row].Cells["Url"].Value.ToString(),
                (int)currentRow.Cells["BrowserWidth"].Value,
                (int)currentRow.Cells["BrowserHeight"].Value,
                (int)currentRow.Cells["ImageWidth"].Value,
                (int)currentRow.Cells["ImageHeight"].Value);

            if (captureForm.ShowDialog(this) == DialogResult.OK &&
                captureForm.CancelProcess == false)
            {
                SaveToDB((long)currentRow.Cells["UrlId"].Value,
                         currentRow.Cells["Url"].Value.ToString(),
                         (int)currentRow.Cells["BrowserWidth"].Value,
                         (int)currentRow.Cells["BrowserHeight"].Value,
                         (int)currentRow.Cells["ImageWidth"].Value,
                         (int)currentRow.Cells["ImageHeight"].Value);

                RefreshGrid(currentRow.Index);

                if (Properties.Settings.Default.displayPreviewWindow)
                {
                    PreviewForm previewForm = new PreviewForm(captureForm.Screenshot, captureForm.DocumentTitle);

                    if (Properties.Settings.Default.maximizePreviewWindow == true)
                    {
                        previewForm.WindowState = FormWindowState.Maximized;
                    }

                    previewForm.ShowDialog(this);
                }

                if (Properties.Settings.Default.autoSave && Properties.Settings.Default.defaultFolder != "")
                {
                    MessageBox.Show(Properties.Settings.Default.defaultFolder + @"\" + captureForm.DocumentTitle);
                }
            }
        }
Ejemplo n.º 2
0
        private void CaptureScreen(int row)
        {
            DataGridViewRow currentRow = capturesDataGridView.Rows[row];

            CaptureForm captureForm = new CaptureForm(
                capturesDataGridView.Rows[row].Cells["Url"].Value.ToString(),
                (int)currentRow.Cells["BrowserWidth"].Value,
                (int)currentRow.Cells["BrowserHeight"].Value,
                (int)currentRow.Cells["ImageWidth"].Value,
                (int)currentRow.Cells["ImageHeight"].Value);

            if (captureForm.ShowDialog(this) == DialogResult.OK
                && captureForm.CancelProcess == false)
            {
                SaveToDB((long)currentRow.Cells["UrlId"].Value,
                    currentRow.Cells["Url"].Value.ToString(),
                    (int)currentRow.Cells["BrowserWidth"].Value,
                    (int)currentRow.Cells["BrowserHeight"].Value,
                    (int)currentRow.Cells["ImageWidth"].Value,
                    (int)currentRow.Cells["ImageHeight"].Value);

                RefreshGrid(currentRow.Index);

                if (Properties.Settings.Default.displayPreviewWindow)
                {
                    PreviewForm previewForm = new PreviewForm(captureForm.Screenshot, captureForm.DocumentTitle);

                    if (Properties.Settings.Default.maximizePreviewWindow == true)
                        previewForm.WindowState = FormWindowState.Maximized;

                    previewForm.ShowDialog(this);
                }

                if (Properties.Settings.Default.autoSave && Properties.Settings.Default.defaultFolder != "")
                {
                    MessageBox.Show(Properties.Settings.Default.defaultFolder + @"\" + captureForm.DocumentTitle);
                }
            }
        }