protected override void SubmitAndDisplay()
        {
            if (SubmitBox.Trim() == string.Empty)
            {
                MessageBox.Show("Please enter the access code from the browser window.", "Error", MessageBoxButton.OK, MessageBoxImage.Exclamation);
                return;
            }
            //Gaining access to Google Drive service
            ServicesModel.GetGDriveAccess(SubmitBox);
            //Clearing Submit Box text
            SubmitBox = string.Empty;
            //Fetching document list on worker thread
            Thread thread = new Thread(() => LoadData());

            thread.Start();
            //Setting flags to disable submit and enable refresh.
            _canSubmit  = false;
            _canRefresh = true;
        }
Beispiel #2
0
        protected override void SubmitAndDisplay()
        {
            if (SubmitBox.Trim() == string.Empty)
            {
                MessageBox.Show("Please enter the access code from the browser window.", "Error", MessageBoxButton.OK, MessageBoxImage.Exclamation);
                return;
            }
            //Gaining Access to Google Contacts service.
            ServicesModel.GetGContactsAccess(SubmitBox);
            //Clearing the submit box
            SubmitBox = string.Empty;
            //Loading Contacts data on worker thread
            Thread thread = new Thread(() => LoadData());

            thread.Start();
            //Disabling sumbit and enabling refresh.
            _canSubmit  = false;
            _canRefresh = true;
        }