Exemplo n.º 1
0
        public ImportFolder(FolderImporter importer)
        {
            if (importer == null)
            {
                throw new ArgumentNullException(nameof(importer));
            }

            Closing += OnClosing;
            Loaded  += OnLoaded;

            _importer            = importer;
            _importer.OnError   += OnMessage;
            _importer.OnMessage += OnMessage;
            InitializeComponent();
        }
Exemplo n.º 2
0
        private void TreeViewCopyTo_Click(object sender, RoutedEventArgs e)
        {
            if (_copyFolder == null)
            {
                return;
            }

            var folder = TV.GetSelectedTag <Folder>();

            if (folder == null)
            {
                return;
            }

            if (this.ShowConfirm("Are you sure you want to copy folder '" + _copyFolder.DisplayName + "' from server '" + _copyFolder.Server.DisplayName + "' to folder '" + folder.DisplayName + "' ?") == MessageBoxResult.No)
            {
                return;
            }

            var importer = new FolderImporter(_copyFolder, folder);
            var popup    = new ImportFolder(importer);

            popup.ShowDialog();
        }