private void LoadEdit()
{
System.Uri resourceLocater = new System.Uri("/DataSpaceSync;component/EditWPF.xaml", System.UriKind.Relative);
UserControl editWPF = Application.LoadComponent(resourceLocater) as UserControl;
tab = editWPF.FindName("tab") as TabControl;
// GUI workaround to remove ignore folder {{
//tabItemSelection = editWPF.FindName("tabItemSelection") as TabItem;
// GUI workaround to remove ignore folder }}
tabItemCredentials = editWPF.FindName("tabItemCredentials") as TabItem;
tabItemCredentials.Header = Properties_Resources.Credentials;
addressLabel = editWPF.FindName("addressLabel") as TextBlock;
addressBox = editWPF.FindName("addressBox") as TextBox;
userLabel = editWPF.FindName("userLabel") as TextBlock;
userBox = editWPF.FindName("userBox") as TextBox;
passwordLabel = editWPF.FindName("passwordLabel") as TextBlock;
passwordBox = editWPF.FindName("passwordBox") as PasswordBox;
passwordProgress = editWPF.FindName("passwordProgress") as CircularProgressBar;
passwordHelp = editWPF.FindName("passwordHelp") as TextBlock;
finishButton = editWPF.FindName("finishButton") as Button;
cancelButton = editWPF.FindName("cancelButton") as Button;
// GUI workaround to remove ignore folder {{
//tabItemSelection.Content = treeView;
// GUI workaround to remove ignore folder }}
addressBox.Text = Credentials.Address.ToString();
userBox.Text = Credentials.UserName;
passwordBox.Password = Credentials.Password.ToString();
passwordHelp.Text = string.Empty;
ContentCanvas.Children.Add(editWPF);
passwordBox.LostFocus += delegate { backgroundWorker.RunWorkerAsync(); };
passwordBox.PasswordChanged += delegate { passwordChanged = true; };
passwordChanged = true;
backgroundWorker.RunWorkerAsync();
}
}