Ejemplo n.º 1
0
        protected override void Execute()
        {
            _messageBoxService = new MessageBoxService();
            Utils.EnsureApplicationResources();

            var returnService = new ReturnPackageService();
            var returnPackage = returnService.GetReturnPackage();

            if (!string.IsNullOrEmpty(returnPackage?.Item2))
            {
                _messageBoxService.ShowWarningMessage(returnPackage.Item2, "Warning");
            }
            else if (returnPackage?.Item1?.FileBasedProject != null && returnPackage?.Item1?.TargetFiles.Count > 0)
            {
                var xliffFiles = returnPackage?.Item1?.TargetFiles?.Any(file => file.Name.EndsWith(".sdlxliff"));
                if (xliffFiles.Value)
                {
                    var window = new ReturnPackageMainWindow(returnPackage?.Item1);
                    window.ShowDialog();
                }
                else
                {
                    _messageBoxService.ShowWarningMessage("The target file(s) has already been returned. In order to repeat the process, you need to revert to .sdlxliff(s) from the Files view.", "Warning");
                }
            }
        }
Ejemplo n.º 2
0
        protected override void Execute()
        {
            EnsureApplicationResources();
            var returnService = new ReturnPackageService();
            var returnPackage = returnService.GetReturnPackage();

            if (returnPackage.Item2 != string.Empty)
            {
                System.Windows.Forms.MessageBox.Show(returnPackage.Item2, @"Warning",
                                                     MessageBoxButtons.OK, MessageBoxIcon.Warning);
            }
            else
            {
                ReturnPackageMainWindow window = new ReturnPackageMainWindow(returnPackage.Item1);
                window.ShowDialog();
            }
        }
        protected override void Execute()
        {
            _messageBoxService = new MessageBoxService();
            Utils.EnsureApplicationResources();

            var returnService = new ReturnPackageService();
            var returnPackage = returnService.GetReturnPackage();

            if (!string.IsNullOrEmpty(returnPackage?.Item2))
            {
                _messageBoxService.ShowWarningMessage(returnPackage.Item2, "Warning");
            }
            else
            {
                var window = new ReturnPackageMainWindow(returnPackage?.Item1);
                window.ShowDialog();
            }
        }