コード例 #1
0
ファイル: Book.cs プロジェクト: witwall/isbnextractor
        public Book LoadData()
        {
            Book b = new Book(path,name);
            b.Naslov = naslov;
            b.Podnaslov = podnaslov;
            b.Isbn = isbn;
            b.Jezik = jezik;
            b.Izdavac = izdavac;
            b.Abstrakt = abstrakt;
            b.Stranica = stranica;
            b.Izdanje = izdanje;
            b.Autori = autori;
            b.Tags = tags;
            b.Slika = slika;
            b.ImageIndex = ImageIndex;

            return b;
        }
コード例 #2
0
ファイル: Main.cs プロジェクト: witwall/isbnextractor
        private void SaveBookChanges_Click(object sender, EventArgs e)
        {
            Book currbook = selectedBook;

            if (currbook == null) currbook = new Book("","");

            currbook.Isbn = propISBN.Text;
            currbook.Jezik = propLanguage.Text;
            currbook.Stranica = propPages.Text;
            currbook.Izdavac = propPublisher.Text;
            currbook.Izdanje = propRelease.Text;
            currbook.Naslov = propTitle.Text;
            currbook.Podnaslov = propTitle2.Text;
            currbook.Abstrakt = propAbstract.Text;
            currbook.Slika = slika.Image;

            currbook.Autori.Clear();
            foreach (string author in propAuthors.Text.Split(','))
            {
                if (!currbook.Autori.Contains(author))
                    currbook.Autori.Add(author);
            }

            for (int i = 0; i < zarn.CheckedItems.Count; i++)
                currbook.Tags.Add(zarn.CheckedItems[i].ToString());
            currbook.ImageIndex = 3;
            if (sender!=null)
                MessageBox.Show("Information updated");
        }
コード例 #3
0
ファイル: Book.cs プロジェクト: witwall/isbnextractor
 public SimpleBook(Book b)
 {
     path = b.Path;
     name = b.Name;
     isbn = b.Isbn;
     naslov = b.Naslov;
     podnaslov = b.Podnaslov;
     jezik = b.Jezik;
     izdavac = b.Izdavac;
     abstrakt = b.Abstrakt;
     stranica = b.Stranica;
     izdanje = b.Izdanje;
     autori = b.Autori;
     tags = b.Tags;
     slika = b.Slika;
     ImageIndex = b.ImageIndex;
 }
コード例 #4
0
ファイル: Main.cs プロジェクト: witwall/isbnextractor
        private void booklist_ItemActivate(object sender, EventArgs e)
        {
            Book currbook = (Book)((ListView)sender).SelectedItems[0];
            selectedBook = currbook;

            rightPanel.SelectTab("Book");

            propISBN.Text = currbook.Isbn;
            propLanguage.Text = currbook.Jezik;
            propPages.Text = currbook.Stranica;
            propPublisher.Text = currbook.Izdavac;
            propRelease.Text = currbook.Izdanje;
            propTitle.Text = currbook.Naslov;
            propTitle2.Text = currbook.Podnaslov;
            propAbstract.Text = currbook.Abstrakt;
            slika.Image = currbook.Slika;
            propAuthors.Text = "";
            foreach (string author in currbook.Autori)
                    propAuthors.Text += ((propAuthors.TextLength == 0) ? "" : ",") + author;

            foreach (string tag in currbook.Tags)
            {
                zarn.SetItemCheckState(zarn.Items.IndexOf(tag), CheckState.Checked);
                TagList.SetItemCheckState(zarn.Items.IndexOf(tag), CheckState.Checked);
            }

            if (currbook.Naslov == "")
            {
                propTitle.Text = currbook.Name.Replace('.',' ').Replace("pdf","").Replace(':',' ').Replace("-"," ").Replace('_',' ').Trim();
            }
        }