Exemple #1
0
        public FormTwain
        (
            string a_szWriteFolder,
            string a_szImagesFolder,
            string a_szIpc,
            int a_iPid,
            TWAINCSToolkit.RunInUiThreadDelegate a_runinuithreaddelegate
        )
        {
            TwainLocalOnTwainParameters twainlocalontwainparameters;

            // Init stuff (though we'll never show this form)...
            InitializeComponent();

            // Our parameters...
            twainlocalontwainparameters = new TwainLocalOnTwainParameters
                                          (
                a_szWriteFolder,
                a_szImagesFolder,
                a_szIpc,
                a_iPid,
                a_runinuithreaddelegate,
                this,
                this.Handle
                                          );

            // The pain continues, we need to run the next bit in a thread
            // so that we don't block our window...
            m_threadTwainLocalOnTwain = new Thread(new ParameterizedThreadStart(TwainLocalOnTwainThread));
            m_threadTwainLocalOnTwain.Start(twainlocalontwainparameters);
        }
Exemple #2
0
 public TwainLocalOnTwainParameters
 (
     string a_szWriteFolder,
     string a_szIpc,
     int a_iPid,
     TWAINCSToolkit.RunInUiThreadDelegate a_runinuithreaddelegate,
     object a_objectRunInUiThread,
     IntPtr a_intptrHwnd
 )
 {
     m_szWriteFolder         = a_szWriteFolder;
     m_szIpc                 = a_szIpc;
     m_iPid                  = a_iPid;
     m_runinuithreaddelegate = a_runinuithreaddelegate;
     m_objectRunInUiThread   = a_objectRunInUiThread;
     m_intptrHwnd            = a_intptrHwnd;
 }