コード例 #1
0
 private void RemovePublicationFromResume()
 {
     if (SelectedInPublication == null)
     {
         return;
     }
     try
     {
         OutPublications.Add(SelectedInPublication);
         InPublications.Remove(SelectedInPublication);
     }
     catch (Exception e)
     {
         ls.Log(e, "Exception");
     }
 }
コード例 #2
0
 private void MovePublicationDownInResume()
 {
     if (SelectedInPublication == null)
     {
         return;
     }
     try
     {
         int currentIndex = InPublications.IndexOf(SelectedInPublication);
         InPublications.Move(currentIndex, currentIndex + 1);
         NotifyPropertyChanged();
     }
     catch (Exception e)
     {
         ls.Log(e, "Exception");
     }
 }
コード例 #3
0
        private void AddPublicationToResume()
        {
            try
            {
                if (SelectedOutPublication == null)
                {
                    return;
                }

                InPublications.Add(SelectedOutPublication);
                OutPublications.Remove(SelectedOutPublication);
            }
            catch (Exception e)
            {
                ls.Log(e, "Exception");
            }
        }
コード例 #4
0
        // SKETCHY, HACKY DOCUMENT SEARCH METHODS ABOVE



        private void SetUpRelayCommands()
        {
            AddExpertiseCommand    = new RelayCommand(T => AddExpertiseToResume(), T => SelectedOutExpertise != null);
            RemoveExpertiseCommand = new RelayCommand(T => RemoveExpertiseFromResume(), T => SelectedInExpertise != null);
            MoveExpertiseUpCommand = new RelayCommand(
                T => MoveExpertiseUpInResume(),
                T => SelectedInExpertise != null && InExpertises.IndexOf(SelectedInExpertise) > 0);
            MoveExpertiseDownCommand = new RelayCommand(
                T => MoveExpertiseDownInResume(),
                T => SelectedInExpertise != null && InExpertises.IndexOf(SelectedInExpertise) < InExpertises.Count - 1);
            AddExperienceCommand    = new RelayCommand(T => AddExperienceItemToResume(), T => SelectedOutExperience != null);
            RemoveExperienceCommand = new RelayCommand(T => RemoveExperienceItemFromResume(), T => SelectedInExperience != null);
            MoveExperienceUpCommand = new RelayCommand(
                T => MoveExperienceItemUpInResume(),
                T => SelectedInExperience != null &&
                SelectedJob.SelectedDetails.IndexOf(SelectedInExperience) > 0);
            MoveExperienceDownCommand = new RelayCommand(
                T => MoveExperienceItemDownInResume(),
                T => SelectedInExperience != null &&
                SelectedJob.SelectedDetails.IndexOf(SelectedInExperience) < SelectedJob.SelectedDetails.Count - 1);
            AddEducationCommand    = new RelayCommand(T => AddEducationToResume(), T => SelectedOutEducation != null);
            RemoveEducationCommand = new RelayCommand(T => RemoveEducationFromResume(), T => SelectedInEducation != null);
            MoveEducationUpCommand = new RelayCommand(
                T => MoveEducationUpInResume(),
                T => SelectedInEducation != null && InEducations.IndexOf(SelectedInEducation) > 0);
            MoveEducationDownCommand = new RelayCommand(
                T => MoveEducationDownInResume(),
                T => SelectedInEducation != null && InEducations.IndexOf(SelectedInEducation) < InEducations.Count - 1);
            AddPublicationCommand    = new RelayCommand(T => AddPublicationToResume(), T => SelectedOutPublication != null);
            RemovePublicationCommand = new RelayCommand(T => RemovePublicationFromResume(), T => SelectedInPublication != null);
            MovePublicationUpCommand = new RelayCommand(
                T => MovePublicationUpInResume(),
                T => SelectedInPublication != null && InPublications.IndexOf(SelectedInPublication) > 0);
            MovePublicationDownCommand = new RelayCommand(
                T => MovePublicationDownInResume(),
                T => SelectedInPublication != null && InPublications.IndexOf(SelectedInPublication) < InPublications.Count - 1);



            SearchCmd = new RelayCommand(
                T => SearchDocumentPreview((string)T),
                T => true);
        }
コード例 #5
0
        public void RefreshPublicationsList()
        {
            var oldInList  = new List <IPublicationEntity>(InPublications);
            var oldOutList = new List <IPublicationEntity>(OutPublications);
            var newList    = pubRepos.GetAll();

            OutPublications.Clear();
            InPublications.Clear();
            foreach (var item in newList)
            {
                if (oldInList.Any(T => T.ID == item.ID))
                {
                    InPublications.Add(item);
                }
                else
                {
                    OutPublications.Add(item);
                }
            }
        }