public void GetItems() { // Call to File Manager to get saved sources var sources = SourcesManager.GetSources(); lock (_lock) { this.ClearItems(); foreach (var source in sources) { this.Add(source); } } }
private void Copy_Click(object sender, RoutedEventArgs e) { try { var sources = SourcesManager.GetSources(); var archiveDir = Directory.Text; //var builder = new ContainerBuilder(); //builder.RegisterType<FileManager>().As<IFileManager>(); //builder.RegisterType<SettingsManager>().As<ISettingsManager>(); //var container = builder.Build(); //using (var scope = container.BeginLifetimeScope()) //{ var fm = App.DIScope.Resolve <IFileManager>(); fm.InvokeBackup(); //} } catch (Exception ex) { Debug.WriteLine(ex.Message); Message.Text = ex.Message; } }