private void cbxSources_SelectedIndexChanged(object sender, EventArgs e)
 {
     if (((ComboBox)sender).SelectedIndex >= 0 && ((ComboBox)sender).SelectedIndex < m_TwainManager.SourceCount)
     {
         m_TwainManager.SelectSourceByIndex(cbxSources.SelectedIndex);
         m_TwainManager.OpenSource();
         m_TwainManager.ResetImageLayout();
         Margin tempMargin = m_TwainManager.GetImageLayout();
         fDefaultFrameLeft   = tempMargin.Left;
         fDefaultFrameTop    = tempMargin.Top;
         fDefaultFrameRight  = tempMargin.Right;
         fDefaultFrameBottom = tempMargin.Bottom;
         fDefaultFrameLeft   = (float)((int)(fDefaultFrameLeft * 10)) / 10;
         fDefaultFrameTop    = (float)((int)(fDefaultFrameTop * 10)) / 10;
         fDefaultFrameRight  = (float)((int)(fDefaultFrameRight * 10)) / 10;
         fDefaultFrameBottom = (float)((int)(fDefaultFrameBottom * 10)) / 10;
         edtFrameLeft.Text   = fDefaultFrameLeft.ToString();
         edtFrameTop.Text    = fDefaultFrameTop.ToString();
         edtFrameRight.Text  = fDefaultFrameRight.ToString();
         edtFrameBottom.Text = fDefaultFrameBottom.ToString();
         lblFrameLeft.Text   = string.Format("(0 ~ " + fDefaultFrameRight.ToString() + ")");
         lblFrameTop.Text    = string.Format("(0 ~ " + fDefaultFrameBottom.ToString() + ")");
         lblFrameRight.Text  = string.Format("(0 ~ " + fDefaultFrameRight.ToString() + ")");
         lblFrameBottom.Text = string.Format("(0 ~ " + fDefaultFrameBottom.ToString() + ")");
     }
 }
 public void OnPostAllTransfers()
 {
     this.BeginInvoke(m_RefreshInfo, (int)m_TwainManager.ImageXResolution,
                      (int)m_TwainManager.ImageYResolution,
                      (int)m_TwainManager.ImageWidth,
                      (int)m_TwainManager.ImageLength,
                      m_TwainManager.ImageBitsPerPixel.ToString(),
                      m_TwainManager.ImagePixelType.ToString(),
                      m_TwainManager.GetImageLayout().Left.ToString(),
                      m_TwainManager.GetImageLayout().Top.ToString(),
                      m_TwainManager.GetImageLayout().Right.ToString(),
                      m_TwainManager.GetImageLayout().Bottom.ToString(),
                      m_TwainManager.ImageLayoutDocumentNumber.ToString(),
                      m_TwainManager.ImageLayoutPageNumber.ToString(),
                      m_TwainManager.ImageLayoutFrameNumber.ToString()
                      );
     Console.WriteLine("OnPostAllTransfer");
 }