예제 #1
0
        public frmForm(string num, string pass, string nick)
        {
            this.phoneNum  = num;
            this.phonePass = pass;
            this.phoneNick = nick;

            InitializeComponent();
            this.userList                            = new Dictionary <string, User>();
            this.isRunning                           = true;
            this.bgWorker                            = new BackgroundWorker();
            this.bgWorker.DoWork                    += ProcessMessages;
            this.bgWorker.ProgressChanged           += NewMessageArrived;
            this.bgWorker.WorkerSupportsCancellation = true;
            this.bgWorker.WorkerReportsProgress      = true;
            this.messageHandler                      = new WhatsMessageHandler();
        }
예제 #2
0
        public frmForm(string num, string pass, string nick)
        {
            this.phoneNum = num;
            this.phonePass = pass;
            this.phoneNick = nick;

            InitializeComponent();
            this.userList = new Dictionary<string, User>();
            this.isRunning = true;
            this.bgWorker = new BackgroundWorker();
            this.bgWorker.DoWork += ProcessMessages;
            this.bgWorker.ProgressChanged += NewMessageArrived;
            this.bgWorker.WorkerSupportsCancellation = true;
            this.bgWorker.WorkerReportsProgress = true;
            this.messageHandler = new WhatsMessageHandler();
        }