Exemple #1
0
        void CmdImport_StartImport(object sender, System.Windows.RoutedEventArgs e)
        {
            //Validate informations
            if (SourcePath.Length == 0 ||
                SelectedTarget == null || SelectedTarget.ConnectionID == 0)
            {
                StatusText = _LangDictionary["TabImportInformationMissing"].ToString();
                return;
            }

            if (IsModeMRemote)
            {
                _MRemoteWorker = new ImportWorker.MRemoteWorker();
                _MRemoteWorker.UpdateTriggered += Worker_UpdateTriggered;
                _MRemoteWorker.StartImport(SourcePath, SelectedTarget.ConnectionID);
            }
            else if (IsModeFolder)
            {
                _FolderWorker = new ImportWorker.FolderWorker();
                _FolderWorker.UpdateTriggered += Worker_UpdateTriggered;
                _FolderWorker.StartImport(SourcePath, SelectedTarget.ConnectionID);
            }
            else if (IsModeCsv)
            {
            }
        }
Exemple #2
0
        public void Dispose()
        {
            _LangDictionary.Clear();

            _MRemoteWorker = null;
            _FolderWorker  = null;
            _CsvWorker     = null;


            CmdImport.StartImport   -= CmdImport_StartImport;
            CmdTabLoaded.TabLoaded  -= CmdTabLoaded_TabLoaded;
            CmdBrowse.StartBrowsing -= CmdBrowse_StartBrowsing;

            CmdBrowse    = null;
            CmdCancel    = null;
            CmdImport    = null;
            CmdTabLoaded = null;

            FolderList.Clear();
        }