示例#1
0
        private PenCommAgent(PenCommV1Callbacks callbackForV1, PenCommV2Callbacks callbackForV2)
        {
            mCallbackV1 = callbackForV1;
            mCallbackV2 = callbackForV2;

            mBtAdapter = new BluetoothAdapter();
        }
示例#2
0
        /// <summary>
        /// Static method that can creates and return a new PenCommAgent object.
        /// In order to listen message from a pen, you have to implement and register PenSignal callback interface.
        /// </summary>
        /// <param name="callback">an object implementing the PenSignal interface</param>
        /// <returns>a PenCommAgent object</returns>
        public static PenCommAgent GetInstance(PenCommV1Callbacks callbackForV1, PenCommV2Callbacks callbackForV2)
        {
            if (mInstance == null)
            {
                mInstance = new PenCommAgent(callbackForV1, callbackForV2);
            }

            return(mInstance);
        }
        public PenCommV1(PenCommV1Callbacks callback, IProtocolParser parser = null, IMetadataManager metadataManager = null) : base(parser == null ? parser = new ProtocolParserV1() : parser, metadataManager)
        {
            Callback              = callback;
            Parser.PacketCreated += Parser_PacketCreated;

            dotFilterForPage = new FilterForPaper(SendDotReceiveEvent);

            // 오프라인 데이터 처리
            if (mOfflineworker == null)
            {
                mOfflineworker = new OfflineWorker(this);
                mOfflineworker.Startup(null);
            }
        }
 /* Use a constructor to inject the services needed
  * */
 public AppController(IMailService mailService, IHostingEnvironment environment, PenCommV1Callbacks penConnector, DocumentClient client)
 {
     _client       = client;
     _penConnector = penConnector as PenConnector.PenConnector;
     _penConnector.ClearImage();
     _hostingEnvironment = environment;
     _mailService        = mailService;
     //_penConnector = new PenConnector.PenConnector(_hostingEnvironment);
 }