示例#1
0
        public void Next()
        {
            try
            {
                var model = _packageDetailsViewModel.GetPackageModel();
                _hasTm = false;
                var isEmpty = IsFolderEmpty(_packageDetailsViewModel.TextLocation);

                if (isEmpty)
                {
                    foreach (var pair in model.LanguagePairs)
                    {
                        if (pair.StarTranslationMemoryMetadatas.Count != 0)
                        {
                            _hasTm = true;
                        }
                    }                    //tm page is disabled
                    if (_packageDetails.FieldsAreCompleted() && DetailsSelected && _hasTm == false)
                    {
                        DetailsSelected = false;
                        TmSelected      = false;
                        FinishSelected  = true;
                        CanExecuteBack  = true;
                        CanExecuteNext  = false;
                        _finishViewModel.Refresh();
                        CanExecuteCreate = true;
                        IsEnabled        = false;
                        Color            = "Gray";
                    }                    //tm page
                    else if (_packageDetails.FieldsAreCompleted() && DetailsSelected && _hasTm)
                    {
                        DetailsSelected  = false;
                        TmSelected       = true;
                        FinishSelected   = false;
                        CanExecuteBack   = true;
                        CanExecuteNext   = true;
                        CanExecuteCreate = false;
                        IsEnabled        = true;
                        Color            = "#FF66290B";
                    }                    //finish page
                    else if (_packageDetails.FieldsAreCompleted() && TmSelected && _translationMemories.TmFieldIsCompleted())
                    {
                        DetailsSelected  = false;
                        CanExecuteNext   = false;
                        CanExecuteCreate = true;
                        CanExecuteBack   = true;
                        TmSelected       = false;
                        IsEnabled        = true;
                        FinishSelected   = true;
                        _finishViewModel.Refresh();
                        Color = "#FFB69476";
                    }
                }
            }
            catch (Exception ex)
            {
                Log.Logger.Error($"Next method: {ex.Message}\n {ex.StackTrace}");
            }
        }
 public void Next()
 {
     if (_packageDetails.FieldsAreCompleted() && DetailsSelected)
     {
         DetailsSelected = false;
         TmSelected      = false;
         FinishSelected  = true;
         CanExecuteBack  = true;
         CanExecuteNext  = false;
         _finishViewModel.Refresh();
         CanExecuteCreate = true;
     }
 }
示例#3
0
 public void Next()
 {
     //var x = SelectedItem;
     if (_packageDetails.FieldsAreCompleted() && DetailsSelected)
     {
         TmSelected      = true;
         DetailsSelected = false;
         CanExecuteBack  = true;
         CanExecuteNext  = true;
     }
     else if (TmSelected && !DetailsSelected)
     {
         CanExecuteBack   = true;
         CanExecuteNext   = false;
         FinishSelected   = true;
         TmSelected       = false;
         CanExecuteCreate = true;
     }
 }