private void AfterClosed(SkyDriveFolderAndFileBrowser browser)
 {
     this.ChangeFileNameButton.IsEnabled = false;
     if (browser.DialogResult == MessageBoxResult.OK)
     {
         this.skyDriveViewModel.IsBackupToAFolder = browser.IsSelectAFolderAsResult;
         this.skyDriveViewModel.FileForSyncing = browser.SelectedItem;
         if (browser.IsSelectAFolderAsResult && (this.skyDriveViewModel.HandlerAction == HandlerAction.Backup))
         {
             if (this.skyDriveViewModel.CreateFileIfNoExistsWhenBackupData)
             {
                 ObjectFromSkyDrive.CanFolderBeEnableSelectAsResult = true;
                 this.StartButton.IsEnabled = true;
                 this.ChangeFileNameButton.IsEnabled = true;
                 string fileName = this.FileName;
                 this.FileNameTextBoxBtn.Content = browser.SelectedItem.Name + "/" + fileName;
                 this.skyDriveViewModel.FileForSyncing.ParentId = browser.SelectedItem.Id;
                 this.skyDriveViewModel.FileForSyncing.Name = fileName;
                 this.skyDriveViewModel.FileNameRenamed = fileName;
             }
             else
             {
                 ObjectFromSkyDrive.CanFolderBeEnableSelectAsResult = false;
                 this.StartButton.IsEnabled = this.StartButton.IsEnabled;
             }
         }
         else
         {
             this.StartButton.IsEnabled = true;
             this.skyDriveViewModel.FileNameRenamed = browser.SelectedItem.Name + DefaultFileExtension;
             this.FileNameTextBoxBtn.Content = this.SetFileNameButtonContent(browser.ParentItem, this.skyDriveViewModel.FileNameRenamed);
         }
     }
 }
 private void FileNameTextBoxBtn_Click(object sender, RoutedEventArgs e)
 {
     System.EventHandler handler = null;
     if (this.skfb == null)
     {
         this.skfb = new SkyDriveFolderAndFileBrowser(this.liveConnectClient);
         this.skfb.FileFliters = SkyDriveDataSyncingPageViewModel.BackupAndRestoreDataSyncingMode ? files : new string[] { DefaultFileExtension };
         this.skfb.ReportingSyncingStatus += new System.EventHandler<ReportStatusHandlerEventArgs>(this.skfb_ReportingSyncingStatus);
         this.skfb.ObjectBrowseringChanged += new System.EventHandler<ObjectBrowseringChangedHandlerEventArgs>(this.skfb_ObjectBrowseringChanged);
         this.skfb.ObjectBrowseringChanging += new System.EventHandler<ObjectBrowseringChangedHandlerEventArgs>(this.skfb_ObjectBrowseringChanging);
         if (handler == null)
         {
             handler = delegate(object so, System.EventArgs se)
             {
                 this.AfterClosed(this.skfb);
             };
         }
         this.skfb.Closed += handler;
         this.SetChooseFileTipsLine();
         this.skfb.Show();
     }
     else
     {
         this.SetChooseFileTipsLine();
         this.skfb.Show();
     }
 }