示例#1
0
        public async void SaveResume(Resume.Resume cv)
        {
            //throw new NotImplementedException("Async ?")
            //var file_saving = FileManagement.Save_File(cv);
            var temp = FindResume(cv.Name);

            if (temp == null)
            {
                var tempRes = new PreventSavingTemplateWithoutNameDialog();
                await tempRes.ShowAsync();

                if (tempRes.Result == SavingTemplateResult.Validate && tempRes.CV_name != "")
                {
                    cv.Name = tempRes.CV_name;
                    FileManagement.Save_File(cv);
                    SaveResumeInResumes(cv);
                }
            }
            else
            {
                FileManagement.Save_File(cv);
                SaveResumeInResumes(cv);
            }

            //await file_saving;
        }
示例#2
0
        public static bool ExportCV(Resume.Resume cv)
        {
            var page = new Resume_Preview()
            {
                Resume = cv
            };

            return(false);
        }
示例#3
0
        public void SaveResumeInResumes(Resume.Resume cv)
        {
            var temp = FindResume(cv.Name);

            if (temp != null)
            {
                Resumes.Remove(temp);
                Resumes.Insert(0, cv);
            }
            else
            {
                Resumes.Insert(0, cv);
            }
        }
示例#4
0
        public async void RemoveResume(Resume.Resume cv)
        {
            var temp = FindResume(cv.Name);

            if (temp != null) //si c'est un cv et pas un template
            {
                var storagelist = await FileManagement.GetResumeFoldersList();

                foreach (var stlist in storagelist)
                {
                    var files = await stlist.GetFilesAsync();

                    foreach (var file in files)
                    {
                        if (file.Name == cv.Name)
                        {
                            await file.DeleteAsync();
                        }
                    }
                }
                Resumes.Remove(cv);
            }
        }