gridFilesWorkingSet.AutoGeneratingColumn += new EventHandler<DataGridAutoGeneratingColumnEventArgs>(WPFHelpers.DataGridRightAlignAutoGeneratedNumericColumns); //nugget: this the most generic way recordindex could figure this so far...see helper comments
gridIncrementalHistory.AutoGeneratingColumn += new EventHandler<DataGridAutoGeneratingColumnEventArgs>(WPFHelpers.DataGridRightAlignAutoGeneratedNumericColumns);
//bool isAdmin = new WindowsPrincipal(WindowsIdentity.GetCurrent()).IsInRole(WindowsBuiltInRole.Administrator) ? true : false;
//if (isAdmin) {MessageBox.Show("you are an administrator");} else{ MessageBox.Show("You are not an administrator");}
LoadBackProfilesList();
}
private void LoadBackProfilesList()
{
//load initial backup profile names drop down list so that a previously selected entry stored in Property.Settings has something to Bind to when the Window first comes up
using (Proc BackupProfiles_s = new Proc("BackupProfiles_s"))
cbxBackupProfiles.ItemsSource = BackupProfiles_s.Tables[0].DefaultView; //this fires cbxBackupProfiles_SelectionChanged which is assigned in XAML
cbxMediaSize.ItemsSource = BackupProfiles_s.dataSet.Tables[1].DefaultView; //I belive this order is what allowed the cbxBackupProfiles Selected row to properly drive the selected cbxMediaSize.MediaSizeID
using (RegistryKey cdburning = Registry.CurrentUser.OpenSubKey(@"Software\Microsoft\Windows\CurrentVersion\Explorer\CD Burning\StagingInfo"))
{
try
{
return(from volumekey in cdburning.GetSubKeyNames() select cdburning.OpenSubKey(volumekey).GetValue("StagingPath").ToString()).Distinct().ToArray<string>(); //ToArray is necessary to immediately execute rather than returning a delayed execution so that we can immediate close and dispose of the RegistryKey
using (WaitCursorWrapper w = new WaitCursorWrapper())
//using (DataView files = new DataView(WorkingFilesTable))
{
if (gridIncrementalHistory.Items.Count == 0)
{
MessageBox.Show("Press [New Incremental Backup] button -OR-\r\nRight mouse the Incremental Backup History grid\r\nto establish the container for these new files",
"No Incremental Backup Container has been established", MessageBoxButton.OK, MessageBoxImage.Information);
public class FileTreeBackgroundBrushConverter : WPFValueConverters.MarkupExtensionConverter, IMultiValueConverter
{
public FileTreeBackgroundBrushConverter() { } //to avoid an annoying warning from XAML designer: "No constructor for type 'xyz' has 0 parameters." Somehow the inherited one doesn'SelectedFoldersTable do the trick!?! I guess it's a reflection bug.
public object Convert(object[] values, Type targetType, object parameter, System.Globalization.CultureInfo culture)
{
if (WPFHelpers.DesignMode) return (DependencyProperty.UnsetValue);
//values[0] = IsSelected
//values[1] = IsExcluded
//hard coded as much as possible to make sure there's no unecessary cycles lost in this critical section... this routine fires *for every sub tree node* *whenever a checkbox changes* (recordindex.e. A LOT)