Ejemplo n.º 1
0
    public FormMain()
    {
      InitializeComponent();
      this.Text = AppInfo.GetApplicationName();

      // Create PictureBoxPreview from special component;
      this.PictureBoxPreview = new Cyotek.Windows.Forms.ImageBox();
      this.PictureBoxPreview.Dock = System.Windows.Forms.DockStyle.Fill;
      this.PictureBoxPreview.TabStop = false;
      this.PictureBoxPreview.BorderStyle = BorderStyle.None;
      this.PictureBoxPreview.InterpolationMode = System.Drawing.Drawing2D.InterpolationMode.HighQualityBicubic;
      this.PanelPreview.Controls.Add(this.PictureBoxPreview);

      fAppSettings = new AppSettings();

      fScanner = new Scanner();
      fPrinter = new Printer();
      fPdfExporter = new PdfExporter();
      fPdfImporter = new PdfImporter();
      fImageLoader = new ImageLoader();
      fImageSaver = new ImageSaver();

      fDocument = new Document();
      fDocument.OnPageAdded += fDocument_OnPageAdded;
      fDocument.OnPageRemoved += fDocument_OnPageRemoved;
      fDocument.OnPageUpdated += fDocument_OnPageUpdated;
      fDocument.OnPageMoved += fDocument_OnPageMoved;

      fClosing = false;
      fDeleting = false;

      MenuSettingsPrinterUsePreview.Checked = true;
    }
    public WindowMain()
    {
      InitializeComponent();

      fAppSettings = new AppSettings();
      fLastScanned = PageTypeEnum.Letter;

      fScanner = new Scanner();
      fPrinter = new Printer();
      fPdfExporter = new PdfExporter();
      fPdfImporter = new PdfImporter();
      fImageLoader = new ImageLoader();
      fImageSaver = new ImageSaver();

      fDocument = new Document();
      fDocument.OnPageAdded += fDocument_OnPageAdded;
      fDocument.OnPageRemoved += fDocument_OnPageRemoved;
      fDocument.OnPageUpdated += fDocument_OnPageUpdated;
      fDocument.OnPageMoved += fDocument_OnPageMoved;
       
      fInsertionMark = new InsertionMark();
      fDragStartItem = null;
      fScrollTimer = new System.Timers.Timer(150);
      fScrollTimer.Elapsed += fScrollTimer_Elapsed;
      fScrollTimer.AutoReset = false;

      this.KeyUp += WindowMain_KeyUp;

      fClosing = false;
      fDeleting = false;
    }
Ejemplo n.º 3
0
    public MainForm()
    {
      InitializeComponent();
      UtilDialogs.MainWindow = this.Handle;

      fAppSettings = new AppSettings();

      fScanner = new Scanner();
      fScanner.OnScanningComplete += fScanner_OnScanningComplete;

      fPdfExporter = new PdfExporter();
      fPdfImporter = new PdfImporter();

      fDocument = new Document();
      fDocument.OnPageAdded += fDocument_OnPageAdded;
      fDocument.OnPageRemoved += fDocument_OnPageRemoved;
      fDocument.OnPageUpdated += fDocument_OnPageUpdated;
      fDocument.OnPageMoved += fDocument_OnPageMoved;

      comboBoxResolution.Items.Add("200 dpi");
      comboBoxResolution.Items.Add("300 dpi");
      comboBoxResolution.SelectedIndex = 1;
    }