Exemplo n.º 1
0
        private void OpenSelectFileDialog(DemoType demoType, string fileFilter, Action <string> callback)
        {
            var selectedFileName = OpenFileDialogHelper.OpenFileDialogWindow(fileFilter);

            if (string.IsNullOrEmpty(selectedFileName))
            {
                return;
            }
            _presentationsRepository.AddPersentation(new PresentationInfo
            {
                FileFullPath = selectedFileName,
                CreateTime   = DateTime.Now,
                DemoType     = demoType
            });
            callback?.Invoke(selectedFileName);
        }
        private void OpenSelectFileDialog(string fileFilter, Action <string> callback)
        {
            if (IsUploadCompleted)
            {
                IsUploadCompleted = false;
                return;
            }
            if (_isUploading)
            {
                return;
            }
            var selectedFileName = OpenFileDialogHelper.OpenFileDialogWindow(fileFilter);

            if (string.IsNullOrEmpty(selectedFileName))
            {
                return;
            }
            _isUploading      = true;
            IsUploadCompleted = false;
            callback?.Invoke(selectedFileName);
        }