예제 #1
0
        public string ParseBibTeXUnpublished(CBibTeX bib, DateTime DateAdded, DateTime DateModified)
        {
            string BibTeX = "";

            BibTeX += "@Unpublished{" + bib.BibKey + ",\r\n";
            BibTeX += "    author = {" + bib.Author + "},\r\n";
            BibTeX += "    title = {" + bib.Title + "},\r\n";
            BibTeX += "    note = {" + bib.Note + "},\r\n";
            if (bib.Month != "" && bib.Month != null)
            {
                BibTeX += "    month = {" + bib.Month + "},\r\n";
            }
            if (bib.Year != "" && bib.Year != null)
            {
                BibTeX += "    year = {" + bib.Year + "},\r\n";
            }
            if (bib.Key != "" && bib.Key != null)
            {
                BibTeX += "    key = {" + bib.Key + "},\r\n";
            }
            BibTeX += "    Date-Added = {" + DateAdded + "},\r\n";
            BibTeX += "    Date-Modified = {" + DateModified + "},\r\n";
            BibTeX += "}";
            return(BibTeX);
        }
예제 #2
0
        private void ParseBibTeXText(CBibTeX bib)
        {
            switch (bib.BibEntry)
            {
            case EBibEntry.Article:
                txtBibRef.Text = ParseBib.ParseBibTeXArticle(bib, literature.DateAdded, literature.DateModified);
                break;

            case EBibEntry.Book:
                break;

            case EBibEntry.Booklet:
                break;

            case EBibEntry.Conference:
                txtBibRef.Text = ParseBib.ParseBibTeXConference(bib, literature.DateAdded, literature.DateModified);
                break;

            case EBibEntry.Inbook:
                break;

            case EBibEntry.Incollection:
                break;

            case EBibEntry.Manual:
                break;

            case EBibEntry.Mastersthesis:
                txtBibRef.Text = ParseBib.ParseBibTeXMastersthesis(bib, literature.DateAdded, literature.DateModified);
                break;

            case EBibEntry.Misc:
                break;

            case EBibEntry.Phdthesis:
                txtBibRef.Text = ParseBib.ParseBibTeXPhdthesis(bib, literature.DateAdded, literature.DateModified);
                break;

            case EBibEntry.Proceedings:
                break;

            case EBibEntry.Techreport:
                break;

            case EBibEntry.Unpublished:
                txtBibRef.Text = ParseBib.ParseBibTeXUnpublished(bib, literature.DateAdded, literature.DateModified);
                break;

            default:
                break;
            }
            literatureBib           = bib;
            literature.DateModified = DateTime.Today;
        }
예제 #3
0
 public frmInfoLiterature(string LiteratureTitle)
 {
     literature               = G.glb.lstLiterature.Find(o => o.Title == LiteratureTitle);
     lstLiteratureTag         = G.glb.lstLiteratureTag.FindAll(o => o.Title == LiteratureTitle).ToList();
     lstLiteratureAuthor      = G.glb.lstLiteratureAuthor.FindAll(o => o.Title == LiteratureTitle).ToList();
     lstLiteratureAuthor      = lstLiteratureAuthor.OrderBy(o => o.Rank).ToList();
     InOneSentence            = literature.InOneSentence;
     lstLiteratureInstitution = G.glb.lstLiteratureInstitution.FindAll(o => o.Title == LiteratureTitle).ToList();
     lstLiteratureInCiting    = G.glb.lstLiteratureCiting.FindAll(o => o.Title == LiteratureTitle).ToList();
     lstLiteratureOutsource   = G.glb.lstLiteratureOutSource.FindAll(o => o.Title == LiteratureTitle).ToList();
     lstNote             = G.glb.lstNote.FindAll(o => o.LiteratureTitle == LiteratureTitle).ToList();
     lstSurveyLiterature = G.glb.lstSurveyLiterature.FindAll(o => o.LiteratureTitle == LiteratureTitle).ToList();
     literatureBib       = literature.BibTeX;
     InitializeComponent();
     LoadLiterature();
     modifiedFlag = false;
 }
예제 #4
0
        public string ParseBibTeXConference(CBibTeX bib, DateTime DateAdded, DateTime DateModified)
        {
            string BibTeX = "";

            BibTeX += "@Conference{" + bib.BibKey + ",\r\n";
            BibTeX += "    author = {" + bib.Author + "},\r\n";
            BibTeX += "    title = {" + bib.Title + "},\r\n";
            BibTeX += "    booktitle = {" + bib.Booktitle + "},\r\n";
            BibTeX += "    year = {" + bib.Year + "},\r\n";
            if (bib.Editor != "" && bib.Editor != null)
            {
                BibTeX += "    editor = {" + bib.Editor + "},\r\n";
            }
            if (bib.Pages != "" && bib.Pages != null)
            {
                BibTeX += "    pages = {" + bib.Pages + "},\r\n";
            }
            if (bib.Organization != "" && bib.Organization != null)
            {
                BibTeX += "    organization = {" + bib.Organization + "},\r\n";
            }
            if (bib.Publisher != "" && bib.Publisher != null)
            {
                BibTeX += "    publisher = {" + bib.Publisher + "},\r\n";
            }
            if (bib.Address != "" && bib.Address != null)
            {
                BibTeX += "    address = {" + bib.Address + "},\r\n";
            }
            if (bib.Month != "" && bib.Month != null)
            {
                BibTeX += "    month = {" + bib.Month + "},\r\n";
            }
            if (bib.Note != "" && bib.Note != null)
            {
                BibTeX += "    note = {" + bib.Note + "},\r\n";
            }
            if (bib.Key != "" && bib.Key != null)
            {
                BibTeX += "    key = {" + bib.Key + "},\r\n";
            }
            BibTeX += "    Date-Added = {" + DateAdded + "},\r\n";
            BibTeX += "    Date-Modified = {" + DateModified + "},\r\n";
            BibTeX += "}";
            return(BibTeX);
        }
예제 #5
0
        public string ParseBibTeXArticle(CBibTeX bib, DateTime DateAdded, DateTime DateModified)
        {
            string BibTeX = "";

            BibTeX += "@Article{" + bib.BibKey + ",\r\n";
            BibTeX += "    author = {" + bib.Author + "},\r\n";
            BibTeX += "    title = {" + bib.Title + "},\r\n";
            BibTeX += "    journal = {" + bib.Journal + "},\r\n";
            BibTeX += "    year = {" + bib.Year + "},\r\n";
            if (bib.Volume != "" && bib.Volume != null)
            {
                BibTeX += "    volume = {" + bib.Volume + "},\r\n";
            }
            if (bib.Number != "" && bib.Number != null)
            {
                BibTeX += "    number = {" + bib.Number + "},\r\n";
            }
            if (bib.Pages != "" && bib.Pages != null)
            {
                BibTeX += "    pages = {" + bib.Pages + "},\r\n";
            }
            if (bib.Month != "" && bib.Month != null)
            {
                BibTeX += "    month = {" + bib.Month + "},\r\n";
            }
            if (bib.Note != "" && bib.Note != null)
            {
                BibTeX += "    note = {" + bib.Note + "},\r\n";
            }
            if (bib.Key != "" && bib.Key != null)
            {
                BibTeX += "    key = {" + bib.Key + "},\r\n";
            }
            BibTeX += "    Date-Added = {" + DateAdded + "},\r\n";
            BibTeX += "    Date-Modified = {" + DateModified + "},\r\n";
            BibTeX += "}";
            return(BibTeX);
        }