public SetupPage1(InitialSetup Parent) { this.parent = Parent; selectedServices = new ObservableCollection<StorageServices>(); this.DataContext = selectedServices; InitializeComponent(); }
public SetupPage3(InitialSetup parent, ObservableCollection<string> Directories, ObservableCollection<StorageInformation> Services) { this.parent = parent; InitializeComponent(); directories = Directories.ToList<string>(); List<StorageInformation> info = Services.ToList<StorageInformation>(); App.initialize = Task.Factory.StartNew(() => new FileStructure(directories, info)); foreach (StorageInformation service in Services) { App.TotalAvailable += service.storageTotal; App.TotalUsed += service.storageTotal - service.storageLeft; } App.initialize.Wait(); }
public SetupPage2(InitialSetup parent, ObservableCollection<StorageInformation> services) { this.parent = parent; Directories = new ObservableCollection<string>(); InitializeComponent(); Services = services; available = 0; total = 0; foreach (StorageInformation si in services) { available += si.storageLeft; total += si.storageTotal; } System.Windows.Application.Current.Properties["TotalAvailable"] = available; System.Windows.Application.Current.Properties["TotalUsed"] = total-available; DataContext = this; }