Exemplo n.º 1
0
 //Infos sur le livre
 private void BT_Info_Click(object sender, EventArgs e)
 {
     WB_Infos.DocumentText = "<html><body style=\"background: LightGray\" style = \"font-family:arial\"><b>Titre :</b> " + EPubReader.titre + "<br><br><b>Auteur :</b> " + EPubReader.auteur + "<br><br><b>Publié :</b> " + EPubReader.date + "<br><br><b>Langue :</b> " + EPubReader.langage + "<br><br><b>Genre :</b> " + EPubReader.genre + "<br><br><br><br>" + EPubReader.descri;
     if (WB_Infos.Visible == false)
     {
         WB_Infos.BringToFront();
         BT_Info.BackColor = Color.LightGray;
         WB_Infos.Show();
         BT_PgLeft.Hide();
         BT_PgNext.Hide();
         BT_Annotation.Enabled = false;
         BT_FontUp.Enabled     = false;
         BT_FontDown.Enabled   = false;
         BT_PgNext.Enabled     = false;
         BT_PgLeft.Enabled     = false;
     }
     else
     {
         BT_Info.BackColor = Color.White;
         WB_Infos.Hide();
         BT_PgLeft.Show();
         BT_PgNext.Show();
         BT_Annotation.Enabled = true;
         BT_FontUp.Enabled     = true;
         BT_FontDown.Enabled   = true;
         BT_PgNext.Enabled     = true;
         BT_PgLeft.Enabled     = true;
     }
 }
Exemplo n.º 2
0
 private void WB_Pages_PreviewKeyDown(object sender, PreviewKeyDownEventArgs e)
 {
     if (e.KeyCode == Keys.Escape)
     {
         WindowState           = FormWindowState.Normal;
         WB_Pages.Location     = new Point(74, 65);
         WB_Pages.Height       = 684;
         WB_Pages.Width        = 559;
         WB_Pages.DocumentText = "<html><div style='font-size:" + textSize + "px;width:" + (WB_Pages.Width - 55) + "px; margin-left:15px; margin-right:auto;'>" + displayText + "</div></html>";
         TopMost = false;
         if (WB_Infos.Visible == true)
         {
             WB_Infos.Visible  = false;
             BT_Info.BackColor = Color.White;
             BT_PgLeft.Show();
             BT_PgNext.Show();
             BT_Annotation.Enabled = true;
             BT_FontUp.Enabled     = true;
             BT_FontDown.Enabled   = true;
             BT_PgNext.Enabled     = true;
             BT_PgLeft.Enabled     = true;
         }
         if_fullscreen = 0;
     }
     if (e.Control && (e.KeyCode == Keys.NumPad8))
     {
         if (if_fullscreen == 1)
         {
             width = (Screen.PrimaryScreen.Bounds.Width - 30);
             BT_FontUp_Click(null, null);
         }
         if (if_fullscreen == 0)
         {
             width = (WB_Pages.Width - 55);
             BT_FontUp_Click(null, null);
         }
     }
     if (e.Control && (e.KeyCode == Keys.NumPad2))
     {
         if (if_fullscreen == 1)
         {
             width = (Screen.PrimaryScreen.Bounds.Width - 30);
             BT_FontDown_Click(null, null);
         }
         if (if_fullscreen == 0)
         {
             width = (WB_Pages.Width - 55);
             BT_FontDown_Click(null, null);
         }
     }
 }