예제 #1
0
        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);
                }
            }
        }
예제 #2
0
        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;
            }
        }