public DeviceWindow(MainWindow parent)
 {
     mainWindow = parent;
     InitializeComponent();
     StartAuthProcess();
     timer.Elapsed += timer_Elapsed;
     timer.Start();
 }
 public BrowserWindow(MainWindow parent)
 {
     mainWindow = parent;
     isInOobMode = mainWindow.Model.IsOutOfBrowserMode;
     InitializeComponent();
     string redirectUri = "http://localhost";
     Uri signInUrl = new Uri(String.Format(@"https://accounts.google.com/o/oauth2/auth?client_id={0}&redirect_uri={1}&scope={2}&response_type=code",
         App.ClientId,
         redirectUri,
         scope));
     webBrowser.Navigate(signInUrl);
 }