No cache version.

Caching disabled. Default setting for this page:enabled (code LNG204)
If the display is too slow, you can disable the user mode to view the cached version.

OldMainForm.cs

Description du code

OldMainForm.cs est un fichier du projet BiblioBrol.
Ce fichier est situé dans /var/www/bin/sniplets/bibliobrol/src/.

Projet BiblioBrol :

Gestion de media en CSharp.

Pour plus d'infos, vous pouvez consulter la brève analyse.

Code source ou contenu du fichier

  1. using System;
  2. using System.Drawing;
  3. using System.Windows.Forms;
  4. using be.gaudry.bibliobrol.config;
  5. using be.gaudry.bibliobrol.view.dialogs;
  6. using be.gaudry.bibliobrol.view.wizards;
  7. using be.gaudry.explorer.view;
  8. using be.gaudry.model.exceptions;
  9. using be.gaudry.observer;
  10. using be.gaudry.view;
  11. using be.gaudry.view.dialogs;
  12. using be.gaudry.view.style;
  13. using be.gaudry.model.config;
  14.  
  15. namespace be.gaudry.bibliobrol.view
  16. {
  17. public partial class OldMainForm : Form, IMDIParent
  18. {
  19. #region Constructor and declarations
  20. private MDIChildForm
  21. borrowsForm, brolForm,
  22. actorForm, mediabrolForm,
  23. statsForm, brolExplorerForm,
  24. photobrolForm, tasksForm,
  25. awsForm, userForm, wsForm,
  26. startWizardForm, commentForm, infobrolForm;
  27. private ConsoleForm consoleForm = null;
  28. private ToolStripRenderer
  29. defaultRenderer,
  30. controlRenderer,
  31. blueRenderer,
  32. systemRenderer;
  33. private AboutBibliobrolDialog aboutBox;
  34.  
  35. String hideCons,dispCons;
  36.  
  37. public OldMainForm()
  38. {
  39. Splasher.Status = "Initialisation des styles";
  40. initRenderers();
  41. Splasher.Status = "Initialisation des composants";
  42. InitializeComponent();
  43. this.SuspendLayout();
  44. Splasher.Status = "Initialisation de la console";
  45. initConsoleForm();
  46. StaticObservable.hideErrors();
  47. Splasher.Status = "Initialisation de la config";
  48. testApplicationConfig();
  49. aboutBox = new AboutBibliobrolDialog();
  50. this.ResumeLayout(false);
  51. this.PerformLayout();
  52. StaticObservable.showErrors();
  53. }
  54. #endregion
  55.  
  56. #region Initialisations
  57. private void initRenderers()
  58. {
  59. defaultRenderer = new ToolStripProfessionalRenderer();
  60. controlRenderer = new ToolStripProfessionalRenderer(new ControlStyleColors());
  61. blueRenderer = new ToolStripProfessionalRenderer(new OrangeStyleColors());
  62. systemRenderer = new ToolStripSystemRenderer();
  63. }
  64. private void initConsoleForm()
  65. {
  66. hideCons = "Cacher la console";
  67. dispCons = "Afficher la console";
  68. consoleForm = new ConsoleForm();
  69. toolStripStatusLabel.Text = String.Format("Bibliobrol utilisé par {0}, dans la session de {1}", Config.Owner, Environment.UserName);
  70. consoleForm.ClientSize = new System.Drawing.Size(this.Size.Width, 100);
  71. consoleForm.StartPosition = FormStartPosition.Manual;
  72. consoleForm.Location = new Point(this.Location.X, this.Location.Y + this.Size.Height);
  73. if (Config.ShowConsoleForm)
  74. {
  75. consoleForm.Show(this);
  76. hideConsoleTSMenuItem.Text = hideCons;
  77. }
  78. else
  79. {
  80. hideConsoleTSMenuItem.Text = dispCons;
  81. }
  82. //consoleForm.MdiParent = this;
  83. consoleOpacity50TSMenuItem.Tag = 0.5;
  84. consoleOpacity70TSMenuItem.Tag = 0.7;
  85. consoleOpacity90TSMenuItem.Tag = 0.9;
  86. consoleOpacity95TSMenuItem.Tag = 0.95;
  87. consoleOpacity100TSMenuItem.Tag = 1.0;
  88. }
  89.  
  90.  
  91. private void initChildForm(Form childForm)
  92. {
  93. childForm.MdiParent = this;
  94. childForm.WindowState = FormWindowState.Maximized;
  95. }
  96. #endregion
  97.  
  98. #region MDIchilds menus
  99.  
  100.  
  101. private void showOnLineHelpFormAction(object sender, EventArgs e)
  102. {
  103. if (infobrolForm == null)
  104. {
  105. StaticObservable.hideErrors();
  106. Splasher.show("Chargement de la page infobrol");
  107. infobrolForm = new InfobrolForm();
  108. infobrolForm.FormClosing += delegate { infobrolForm = null; };
  109. initChildForm(infobrolForm);
  110. infobrolForm.Show();
  111. StaticObservable.showErrors();
  112. Splasher.close();
  113. }
  114. else
  115. infobrolForm.Activate();
  116. }
  117. private void showBrolFormAction(object sender, EventArgs e)
  118. {
  119. if (brolForm == null)
  120. {
  121. StaticObservable.hideErrors();
  122. Splasher.show("Chargement des ouvrages");
  123. brolForm = new BrolForm();
  124. brolForm.FormClosing += delegate { brolForm = null; };
  125. initChildForm(brolForm);
  126. brolForm.Show();
  127. StaticObservable.showErrors();
  128. Splasher.close();
  129. }
  130. else
  131. brolForm.Activate();
  132. //manageMediaTSMenuItem.Enabled = false;
  133. }
  134.  
  135. private void borrowsTSMenuItem_Click(object sender, EventArgs e)
  136. {
  137. if (borrowsForm == null)
  138. {
  139. StaticObservable.hideErrors();
  140. Splasher.show("Chargement des emprunts");
  141. borrowsForm = new BorrowsForm();
  142. borrowsForm.FormClosing += delegate { borrowsForm = null; };
  143. initChildForm(borrowsForm);
  144. borrowsForm.Show();
  145. StaticObservable.showErrors();
  146. Splasher.close();
  147. }
  148. else
  149. borrowsForm.Activate();
  150. }
  151.  
  152. private void showActorFormAction(object sender, EventArgs e)
  153. {
  154. if (actorForm == null)
  155. {
  156. StaticObservable.hideErrors();
  157. Splasher.show("Chargement des personnes");
  158. actorForm = new ActorForm();
  159. actorForm.FormClosing += delegate { actorForm = null; };
  160. initChildForm(actorForm);
  161. actorForm.Show();
  162. StaticObservable.showErrors();
  163. Splasher.close();
  164. }
  165. else
  166. actorForm.Activate();
  167. }
  168.  
  169. private void showUserFormAction(object sender, EventArgs e)
  170. {
  171. if (userForm == null)
  172. {
  173. StaticObservable.hideErrors();
  174. Splasher.show("Chargement de l'éditeur avancé de personnes");
  175. userForm = new UserForm();
  176. userForm.FormClosing += delegate { userForm = null; };
  177. initChildForm(userForm);
  178. //((UserForm)userForm).setUser(new User());
  179. userForm.Show();
  180. StaticObservable.showErrors();
  181. Splasher.close();
  182. }
  183. else
  184. {
  185. //((UserForm)userForm).setUser(new User());
  186. userForm.Activate();
  187. }
  188. }
  189.  
  190. private void showMediabrolFormAction(object sender, EventArgs e)
  191. {
  192. if (mediabrolForm == null)
  193. {
  194. StaticObservable.hideErrors();
  195. Splasher.show("Chargement des exemplaires");
  196. mediabrolForm = new MediabrolForm();
  197. mediabrolForm.FormClosing += delegate { mediabrolForm = null; };
  198. initChildForm(mediabrolForm);
  199. mediabrolForm.Show();
  200. StaticObservable.showErrors();
  201. Splasher.close();
  202. }
  203. else
  204. mediabrolForm.Activate();
  205. }
  206.  
  207. private void showAwsFormAction(object sender, EventArgs e)
  208. {
  209. if (awsForm == null)
  210. {
  211. StaticObservable.hideErrors();
  212. Splasher.show("Chargement du service de recherche");
  213. awsForm = new AWSForm();
  214. awsForm.FormClosing += delegate { awsForm = null; };
  215. initChildForm(awsForm);
  216. awsForm.Show();
  217. StaticObservable.showErrors();
  218. Splasher.close();
  219. }
  220. else
  221. awsForm.Activate();
  222. }
  223.  
  224. private void showTasksFormAction(object sender, EventArgs e)
  225. {
  226. if (tasksForm == null)
  227. {
  228. StaticObservable.hideErrors();
  229. Splasher.show("Chargement des tâches");
  230. tasksForm = new TasksForm();
  231. tasksForm.FormClosing += delegate { tasksForm = null; };
  232. initChildForm(tasksForm);
  233. tasksForm.Show();
  234. StaticObservable.showErrors();
  235. Splasher.close();
  236. }
  237. else
  238. tasksForm.Activate();
  239. }
  240.  
  241. #region explorer form
  242.  
  243. private void showBrolExplorerFormAction(object sender, EventArgs e)
  244. {
  245. showBrolExplorerForm(true);
  246. }
  247.  
  248. private void showBrolExplorerSearchFormAction(object sender, EventArgs e)
  249. {
  250. showBrolExplorerForm(false);
  251. }
  252.  
  253. private void showBrolExplorerForm(bool search)
  254. {
  255. if (PluginsManager.BrolExplorerPlugAvailable)
  256. {
  257. if (brolExplorerForm == null)
  258. {
  259. StaticObservable.hideErrors();
  260. Splasher.show("Chargement de l'explorateur");
  261. brolExplorerForm = new ExplorerForm(ExplorerForm.DISPLAY.mediaBrowser);
  262. brolExplorerForm.FormClosing += delegate { brolExplorerForm = null; };
  263. initChildForm(brolExplorerForm);
  264.  
  265. ((ExplorerForm)brolExplorerForm).setMenuStripDock(DockStyle.None);
  266.  
  267. if(search)((ExplorerForm)brolExplorerForm).openMediaBrowser();
  268. else ((ExplorerForm)brolExplorerForm).openExplorer();
  269. brolExplorerForm.Show();
  270. StaticObservable.showErrors();
  271. Splasher.close();
  272. }
  273. else
  274. {
  275. if (search) ((ExplorerForm)brolExplorerForm).openMediaBrowser();
  276. else ((ExplorerForm)brolExplorerForm).openExplorer();
  277. brolExplorerForm.Activate();
  278. }
  279. }
  280. else
  281. {
  282. MessageBox.Show(
  283. this,
  284. "Le plugin BrolExplorer n'est pas installé. Vous pouvez le télécharger sur l'infobrol.",
  285. "Plugin non installé",
  286. MessageBoxButtons.OK,
  287. MessageBoxIcon.Exclamation
  288. );
  289. }
  290. }
  291. #endregion
  292.  
  293. private void showPhotobrolFormAction(object sender, EventArgs e)
  294. {
  295. if (PluginsManager.PhotoBrolPlugAvailable)
  296. {
  297. if (photobrolForm == null)
  298. {
  299. StaticObservable.hideErrors();
  300. Splasher.show("Chargement de PhotoBrol");
  301. photobrolForm = new be.gaudry.photobrol.view.PhotoBrolMainForm();
  302. photobrolForm.FormClosing += delegate { photobrolForm = null; };
  303. initChildForm(photobrolForm);
  304. ((be.gaudry.photobrol.view.PhotoBrolMainForm)photobrolForm).setMenuStripDock(DockStyle.None);
  305. photobrolForm.Show();
  306. StaticObservable.showErrors();
  307. Splasher.close();
  308. }
  309. else
  310. photobrolForm.Activate();
  311. }
  312. else
  313. {
  314. MessageBox.Show(
  315. this,
  316. "Le plugin PhotoBrol n'est pas installé. Vous pouvez le télécharger sur l'infobrol.",
  317. "Plugin non installé",
  318. MessageBoxButtons.OK,
  319. MessageBoxIcon.Exclamation
  320. );
  321. }
  322. }
  323.  
  324. private void wsTSMenuItem_Click(object sender, EventArgs e)
  325. {
  326. if (wsForm == null)
  327. {
  328. StaticObservable.hideErrors();
  329. Splasher.show("Chargement du service Web");
  330. wsForm = new WebServiceForm();
  331. wsForm.FormClosing += delegate { wsForm = null; };
  332. initChildForm(wsForm);
  333. wsForm.Show();
  334. StaticObservable.showErrors();
  335. Splasher.close();
  336. }
  337. else
  338. wsForm.Activate();
  339. }
  340.  
  341. private void showStatsFormAction(object sender, EventArgs e)
  342. {
  343. if (statsForm == null)
  344. {
  345. StaticObservable.hideErrors();
  346. Splasher.show("Chargement des données pour les statistiques");
  347. statsForm = new StatsForm();
  348. statsForm.FormClosing += delegate { statsForm = null; };
  349. initChildForm(statsForm);
  350. statsForm.Show();
  351. StaticObservable.showErrors();
  352. Splasher.close();
  353. }
  354. else
  355. statsForm.Activate();
  356. }
  357.  
  358.  
  359. private void showWelcomeWizardAction(object sender, EventArgs e)
  360. {
  361. if (startWizardForm == null)
  362. {
  363. StaticObservable.hideErrors();
  364. Splasher.show("Chargement des données pour l'assistant de démarrage");
  365. startWizardForm = new WelcomeWizardForm();
  366. startWizardForm.FormClosing += delegate { startWizardForm = null; };
  367. initChildForm(startWizardForm);
  368. startWizardForm.Show();
  369. StaticObservable.showErrors();
  370. Splasher.close();
  371. }
  372. else
  373. startWizardForm.Activate();
  374. }
  375.  
  376. private void bugsTSMenuItem_Click(object sender, EventArgs e)
  377. {
  378. if (commentForm == null)
  379. {
  380. commentForm = new CommentForm();
  381. commentForm.FormClosing += delegate { commentForm = null; };
  382. initChildForm(commentForm);
  383. commentForm.Show();
  384. }
  385. else
  386. commentForm.Activate();
  387. }
  388. #endregion
  389.  
  390. #region Windows layout menu
  391. private void dispWinCTSMenuItem_Click(object sender, EventArgs e)
  392. {
  393. LayoutMdi(MdiLayout.Cascade);
  394. }
  395.  
  396. private void dispWinHTSMenuItem_Click(object sender, EventArgs e)
  397. {
  398. LayoutMdi(MdiLayout.TileHorizontal);
  399. }
  400.  
  401. private void dispWinVTSMenuItem_Click(object sender, EventArgs e)
  402. {
  403. LayoutMdi(MdiLayout.TileVertical);
  404. }
  405.  
  406. private void dispWinAIconsTSMenuItem_Click(object sender, EventArgs e)
  407. {
  408. LayoutMdi(MdiLayout.ArrangeIcons);
  409. }
  410. #endregion
  411.  
  412. #region test application validity
  413. /// <summary>
  414. /// Try forms initializations.
  415. /// If no persistance available, a message is displayed, and the wizard is set as the first page.
  416. /// </summary>
  417. public void testApplicationConfig()
  418. {
  419. if (!System.IO.Directory.Exists(Config.DataDirectory))
  420. {
  421. /*StringBuilder str = new StringBuilder("Impossible de trouver le répertoire de données de l'application (");
  422.   str.Append(RefactoredConfig.DataDirectory);
  423.   str.Append(").\n\nIl est possible de modifier la RefactoredConfiguration dans l'écran de RefactoredConfiguration qui va s'afficher, ou dans le menu \"Outils/Options\"");
  424.   StaticObservable.notify(new Notification(Notification.VERBOSE.opsResult, "RefactoredConfiguration Bibliobrol", str.ToString(), this));
  425.   */enableApplication(false);
  426. }
  427. else
  428. {
  429. try
  430. {
  431. model.ModelAdapter.isAvailablePersistance();
  432. enableApplication(true);
  433. }
  434. catch (PersistanceNotFoundException)
  435. {
  436. /*StringBuilder str = new StringBuilder(e.Message);
  437.   str.AppendLine("\n\nIl est possible de modifier la RefactoredConfiguration dans le menu \"Outils/Options\", puis sélectionner \"Persistance\"...");
  438.   str.AppendLine("\nAucune fonctionnalité de l'application ne sera disponible tant que le système de persistance ne sera défini.");
  439.   str.AppendLine("Des messages d'erreur peuvent se présenter avant de RefactoredConfigurer le système de persistance, ignorez les.");
  440.   StaticObservable.notify(new Notification(Notification.VERBOSE.opsResult, "RefactoredConfiguration Bibliobrol", str.ToString(), this));
  441.   */enableApplication(false);
  442. }
  443. }
  444. }
  445. /// <summary>
  446. /// Allow to use application buttons if data dir path and persistant are found
  447. /// </summary>
  448. /// <param name="enable"></param>
  449. private void enableApplication(bool enable)
  450. {
  451. borrowsTSMenuItem.Visible = enable;
  452. brolsFormTSMenuItem.Visible = enable;
  453. personsFormMenuItem.Visible = enable;
  454. mediabrolsFormTSMenuItem.Visible = enable;
  455. statsTSMenuItem.Visible = enable;
  456. if (!enable)
  457. {
  458. WelcomeWizardForm wwf = new WelcomeWizardForm();
  459. wwf.MdiParent = this;
  460. wwf.WindowState = FormWindowState.Maximized;
  461. wwf.Show();
  462. }
  463. }
  464. #endregion
  465.  
  466. private void optionsTSMenuItem_Click(object sender, EventArgs e)
  467. {
  468. OptionsForm optionForm = new OptionsForm();
  469. optionForm.Owner = this;
  470. optionForm.Show();
  471. }
  472.  
  473. #region Console
  474. private void consoleTSMenuItem_Paint(object sender, PaintEventArgs e)
  475. {
  476. bool disp = Config.ShowConsoleForm;
  477. consoleOpacityTSMenuItem.Enabled = disp;
  478. //clearConsoleTSMenuItem.Enabled = disp;
  479. clearConsoleTSMenuItem.Enabled = (consoleForm.ConsoleCount > 0);
  480. setConsoleButtonsState();
  481. }
  482.  
  483. /// <summary>
  484. /// Set buttons images, toolstrip text, and enabled or not
  485. /// </summary>
  486. private void setConsoleButtonsState()
  487. {
  488. if (Config.ShowConsoleForm)
  489. {
  490. hideConsoleTSMenuItem.Text = hideCons;
  491. hideConsoleTSMenuItem.Image = global::be.gaudry.bibliobrol.Properties.Resources.brolConsoleHide;
  492. dispConsTSB.ToolTipText = hideCons;
  493. dispConsTSB.Image = global::be.gaudry.bibliobrol.Properties.Resources.brolConsoleHide;
  494. }
  495. else
  496. {
  497. hideConsoleTSMenuItem.Text = dispCons;
  498. hideConsoleTSMenuItem.Image = global::be.gaudry.bibliobrol.Properties.Resources.brolConsole;
  499. dispConsTSB.ToolTipText = dispCons;
  500. dispConsTSB.Image = global::be.gaudry.bibliobrol.Properties.Resources.brolConsole;
  501. }
  502. cleanConsoleTSB.Enabled = clearConsoleTSMenuItem.Enabled;
  503. }
  504.  
  505. private void clearConsoleTSMenuItem_Click(object sender, EventArgs e)
  506. {
  507. consoleForm.consoleClear();
  508. }
  509.  
  510. private void hideConsoleTSMenuItem_Click(object sender, EventArgs e)
  511. {
  512. Config.ShowConsoleForm = !Config.ShowConsoleForm;
  513. setConsoleButtonsState();
  514. }
  515. #region Console Opacity
  516. private void consoleOpacityValTSMenuItem_Click(object sender, EventArgs e)
  517. {
  518. consoleForm.Opacity = (double)((ToolStripItem)sender).Tag;
  519. }
  520.  
  521. private void consoleOpacityTSMenuItem_Paint(object sender, PaintEventArgs e)
  522. {
  523. foreach (ToolStripItem item in consoleOpacityTSMenuItem.DropDownItems)
  524. {
  525. item.Enabled = (!item.Tag.Equals(consoleForm.Opacity));
  526. }
  527. }
  528.  
  529. //Console Opacity
  530. #endregion
  531.  
  532. //Console
  533. #endregion
  534.  
  535. #region main form events
  536. /// <summary>
  537. /// Set previous windows state if it is possible
  538. /// </summary>
  539. /// <param name="sender"></param>
  540. /// <param name="e"></param>
  541. private void MainForm_Load(object sender, EventArgs e)
  542. {
  543. Splasher.Status = "Lecture des paramètres de la fenêtre";
  544. /*try
  545.   {
  546.   WindowState = (FormWindowState)Enum.Parse(
  547.   typeof(FormWindowState),
  548.   System.RefactoredConfiguration.RefactoredConfigurationManager.AppSettings["mainFormState"]
  549.   );
  550.   }
  551.   catch (Exception) { WindowState = FormWindowState.Normal; }*/
  552. this.Size = Properties.Settings.Default.mainFormSize;
  553. this.Location = Properties.Settings.Default.mainFormLocation;
  554. this.WindowState = Properties.Settings.Default.mainFormState;
  555.  
  556. ToolStripManager.Renderer = systemRenderer;
  557. setConsoleButtonsState();
  558. resetStatusStrip();
  559. Splasher.close();
  560. }
  561.  
  562. /// <summary>
  563. /// Save windows state on close
  564. /// </summary>
  565. /// <param name="sender"></param>
  566. /// <param name="e"></param>
  567. private void MainForm_FormClosing(object sender, FormClosingEventArgs e)
  568. {
  569. //RefactoredConfig.saveAppSetting("mainFormState", Enum.GetName(typeof(FormWindowState), WindowState));
  570. Properties.Settings.Default.mainFormState = this.WindowState;
  571. if (this.WindowState == FormWindowState.Normal)
  572. {
  573. Properties.Settings.Default.mainFormSize = this.Size;
  574. Properties.Settings.Default.mainFormLocation = this.Location;
  575. }
  576. else
  577. {
  578. Properties.Settings.Default.mainFormSize = this.RestoreBounds.Size;
  579. Properties.Settings.Default.mainFormLocation = this.RestoreBounds.Location;
  580. }
  581. Properties.Settings.Default.Save();
  582. }
  583. #endregion
  584.  
  585. private void exitTSMenuItem_Click(object sender, EventArgs e)
  586. {
  587. this.Close();
  588. }
  589.  
  590. #region ToolStrip
  591. private void statsTSB_Click(object sender, EventArgs e)
  592. {
  593. showStatsFormAction(sender, e);
  594. }
  595.  
  596. private void dispConsTSB_Click(object sender, EventArgs e)
  597. {
  598. hideConsoleTSMenuItem_Click(sender, e);
  599. }
  600.  
  601. private void cleanConsoleTSB_Click(object sender, EventArgs e)
  602. {
  603. clearConsoleTSMenuItem_Click(sender, e);
  604. }
  605. #endregion
  606.  
  607. #region styles
  608. private void styleSystemTsMi_Click(object sender, EventArgs e)
  609. {
  610. ToolStripManager.Renderer = systemRenderer;
  611. }
  612. private void defaultStyleTsMi_Click(object sender, EventArgs e)
  613. {
  614. ToolStripManager.Renderer = defaultRenderer;
  615. }
  616.  
  617. private void controlStyleTsMi_Click(object sender, EventArgs e)
  618. {
  619. ToolStripManager.Renderer = controlRenderer;
  620. }
  621.  
  622. private void blueStyleTsMi_Click(object sender, EventArgs e)
  623. {
  624. ToolStripManager.Renderer = blueRenderer;
  625. }
  626. #endregion
  627.  
  628. private void aboutTsMi_Click(object sender, EventArgs e)
  629. {
  630. aboutBox.ShowDialog(this);
  631. }
  632.  
  633. #region IMDIParent Membres
  634.  
  635. public bool joinToolStrip(ToolStrip ts)
  636. {
  637. this.topTSP.Join(ts, 0);
  638. return true;
  639. }/*
  640.   /// <summary>
  641.   /// Merge the MDIChild MenuStrip with the MDIParent MenuStrip
  642.   /// </summary>
  643.   /// <param name="ms"></param>
  644.   /// <returns></returns>
  645.   public bool merge(MenuStrip ms, ToolStrip ts)
  646.   {
  647.   //this.topTSP.Join(ts, 0);
  648.   ToolStripManager.Merge(ts, mainTS);
  649.   bool merged = ToolStripManager.Merge(ms, mainMenuStrip);
  650.   //ms.Dock = DockStyle.None;
  651.   return merged;
  652.   }
  653.   /// <summary>
  654.   /// Revertb Merge the MDIChild MenuStrip from the MDIParent MenuStrip
  655.   /// </summary>
  656.   /// <param name="ms"></param>
  657.   /// <returns></returns>
  658.   public bool revertMerge(MenuStrip ms, ToolStrip ts)
  659.   {
  660.   ToolStripManager.RevertMerge(ts, mainTS);
  661.   bool merged = ToolStripManager.RevertMerge(ms, mainMenuStrip);
  662.   //ms.Dock = DockStyle.Top;
  663.   return merged;
  664.   }*/
  665. public void setStatusMessage(string copyright, string version, string message)
  666. {
  667. toolStripStatusLabel.Image = null;
  668. copyrightTsLbl.Text = copyright;
  669. versionTsLbl.Text = version;
  670. toolStripStatusLabel.Text = message;
  671. }
  672.  
  673. public void setStatusMessage(string message)
  674. {
  675. toolStripStatusLabel.Image = null;
  676. toolStripStatusLabel.Text = message;
  677. }
  678.  
  679. public void setStatusMessage(Image image, string message, string tooltip)
  680. {
  681. toolStripStatusLabel.Image = image;
  682. toolStripStatusLabel.Text = message;
  683. toolStripStatusLabel.ToolTipText = tooltip;
  684. }
  685. public void resetStatusStrip()
  686. {
  687. setStatusMessage(
  688. "Copyright © 2006 BrolDev",
  689. Application.ProductName + " " + Application.ProductVersion,
  690. String.Format("Bibliobrol utilisé par {0}, dans la session de {1}", Config.Owner, Environment.UserName)
  691. );
  692. }
  693. public void startProgress()
  694. {
  695. toolStripProgressBar.Style = ProgressBarStyle.Marquee;
  696. toolStripProgressBar.Visible = true;
  697. }
  698.  
  699. public void stopProgress()
  700. {
  701. toolStripProgressBar.Visible = false;
  702. toolStripProgressBar.Style = ProgressBarStyle.Blocks;
  703. }
  704. #endregion
  705.  
  706. private void onShowUpdateForm_Click(object sender, EventArgs e)
  707. {
  708. new VersionForm().Show();
  709. }
  710.  
  711. private void sourcesTsMi_Click(object sender, EventArgs e)
  712. {
  713. MDIChildForm sourcesForm = new SourcesForm();
  714. sourcesForm.MdiParent = this;
  715. sourcesForm.WindowState = FormWindowState.Maximized;
  716. sourcesForm.Show();
  717. }
  718.  
  719. private void openEditSeriesForm_Click(object sender, EventArgs e)
  720. {
  721.  
  722. EditSeriesForm form = new EditSeriesForm();
  723. form.MdiParent = this;
  724. form.WindowState = FormWindowState.Maximized;
  725. form.Show();
  726. }
  727.  
  728. private void openNewApplicationTsMi_Click(object sender, EventArgs e)
  729. {
  730. MainForm form = new MainForm();
  731. form.WindowState = this.WindowState;
  732. form.Location = this.Location;
  733. form.Width = this.Width;
  734. form.Height = this.Height;
  735. form.Show();
  736. this.Close();
  737. }
  738. }
  739. }

Structure et Fichiers du projet

Afficher/masquer...


Répertoires contenus dans /var/www/bin/sniplets/bibliobrol/src/view/ 
IcôneNomTailleModification
IcôneNomTailleModification
| _ Répertoire parent0 octets1714629398 02/05/2024 07:56:38
| _wizards0 octets1541007184 31/10/2018 18:33:04
| _utils0 octets1541007184 31/10/2018 18:33:04
| _controls0 octets1541007178 31/10/2018 18:32:58
| _dialogs0 octets1541007183 31/10/2018 18:33:03
Fichiers contenus dans /var/www/bin/sniplets/bibliobrol/src/view/ 
IcôneNomTailleModificationAction
IcôneNomTailleModificationAction
Afficher le fichier .resx|.resxMediabrolForm.resx32.55 Ko31/10/2018 18:32:27-refusé-
Afficher le fichier .resx|.resxAWSForm.resx188.27 Ko31/10/2018 18:32:25-refusé-
Afficher le fichier .resx|.resxMainForm.resx6.07 Ko31/10/2018 18:32:27-refusé-
Afficher le fichier .resx|.resxConsoleForm.resx256.48 Ko31/10/2018 18:32:27-refusé-
Afficher le fichier .cs|.csAWSForm.Designer.cs23.45 Ko31/10/2018 18:32:25-refusé-
Afficher le fichier .cs|.csActorForm.cs9.09 Ko31/10/2018 18:32:25-refusé-
Afficher le fichier .cs|.csBiblioBrolAboutBox.Designer.cs11.22 Ko31/10/2018 18:32:25-refusé-
Afficher le fichier .cs|.csAWSForm.cs7.68 Ko31/10/2018 18:32:25-refusé-
Afficher le fichier .cs|.csBorrowsForm.cs1.66 Ko31/10/2018 18:32:25-refusé-
Afficher le fichier .cs|.csCopy of MainForm.Designer.cs16.91 Ko31/10/2018 18:32:27-refusé-
Afficher le fichier .cs|.csConsoleForm.Designer.cs2.71 Ko31/10/2018 18:32:26-refusé-
Afficher le fichier .cs|.csWebServiceForm.cs6.34 Ko31/10/2018 18:32:29-refusé-
Afficher le fichier .resx|.resxOldMainForm.resx58.06 Ko31/10/2018 18:32:28-refusé-
Afficher le fichier .cs|.csCopy of MainForm.cs30.81 Ko31/10/2018 18:32:26-refusé-
Afficher le fichier .resx|.resxActorForm.resx44.98 Ko31/10/2018 18:32:25-refusé-
Afficher le fichier .resx|.resxBorrowsForm.resx73.4 Ko31/10/2018 18:32:26-refusé-
Afficher le fichier .cs|.csMainForm.cs37.45 Ko31/10/2018 18:32:27-refusé-
Afficher le fichier .resx|.resxWebServiceForm.resx9.71 Ko31/10/2018 18:32:29-refusé-
Afficher le fichier .cs|.csMainForm.Designer.cs7.16 Ko31/10/2018 18:32:27-refusé-
Afficher le fichier .cs|.csBorrowsForm.Designer.cs10.51 Ko31/10/2018 18:32:25-refusé-
Afficher le fichier .cs|.csTasksForm.cs389 octets31/10/2018 18:32:28-refusé-
Afficher le fichier .resx|.resxBiblioBrolAboutBox.resx5.68 Ko31/10/2018 18:32:25-refusé-
Afficher le fichier .cs|.csBrolForm.cs25.87 Ko31/10/2018 18:32:26-refusé-
Afficher le fichier .cs|.csWebServiceForm.Designer.cs13.12 Ko31/10/2018 18:32:29-refusé-
Afficher le fichier .cs|.csMediabrolForm.Designer.cs142.05 Ko31/10/2018 18:32:27-refusé-
Afficher le fichier .cs|.csConsoleForm.cs2.79 Ko31/10/2018 18:32:26-refusé-
Afficher le fichier .cs|.csBrolForm.designer.cs41.73 Ko31/10/2018 18:32:26-refusé-
Afficher le fichier .cs|.csMediabrolForm.cs31.94 Ko31/10/2018 18:32:27-refusé-
Afficher le fichier .cs|.csStatsForm.Designer.cs11.59 Ko31/10/2018 18:32:28-refusé-
Afficher le fichier .cs|.csActorForm.Designer.cs28.26 Ko31/10/2018 18:32:25-refusé-
Afficher le fichier .cs|.csOldMainForm.Designer.cs83.98 Ko31/10/2018 18:32:28-refusé-
Afficher le fichier .cs|.csStatsForm.cs5 Ko31/10/2018 18:32:28-refusé-
Afficher le fichier .cs|.csBiblioBrolAboutBox.cs5.51 Ko31/10/2018 18:32:25-refusé-
Afficher le fichier .cs|.csOldMainForm.cs27.08 Ko31/10/2018 18:32:27-refusé-
Afficher le fichier .resx|.resxTasksForm.resx187.31 Ko31/10/2018 18:32:29-refusé-
Afficher le fichier .cs|.csTasksForm.Designer.cs2.26 Ko31/10/2018 18:32:28-refusé-
Afficher le fichier .resx|.resxBrolForm.resx45.52 Ko31/10/2018 18:32:26-refusé-
Afficher le fichier .resx|.resxCopy of MainForm.resx7.53 Ko31/10/2018 18:32:27-refusé-
Afficher le fichier .resx|.resxStatsForm.resx187.5 Ko31/10/2018 18:32:28-refusé-

Utilisation de l'explorateur de code

  • Navigation :
    • Un clic sur une icône de répertoire ouvre ce répertoire pour en afficher les fichiers.
    • Lorsque le répertoire en cours ne contient pas de sous-répertoires il est possible de remonter vers le répertoire parent.
    • La structure de répertoires en treetable (tableau en forme d'arborescence) n'est plus possibledans cette version.
    • Un clic sur une icône de fichier ouvre ce fichier pour en afficher le code avec la coloration syntaxique adaptée en fonction du langage principal utilisé dans le fichier.
  • Affichage :
    • Il est possible de trier les répertoires ou les fichiers selon certains critères (nom, taille, date).
  • Actions :
    • Les actions possible sur les fichiers dépendent de vos droits d'utilisateur sur le site. Veuillez activer le mode utilisateur pour activer les actions.

English translation

You have asked to visit this site in English. For now, only the interface is translated, but not all the content yet.

If you want to help me in translations, your contribution is welcome. All you need to do is register on the site, and send me a message asking me to add you to the group of translators, which will give you the opportunity to translate the pages you want. A link at the bottom of each translated page indicates that you are the translator, and has a link to your profile.

Thank you in advance.

Document created the 16/10/2009, last modified the 26/10/2018
Source of the printed document:https://www.gaudry.be/en/cs-bibliobrol-source-rf-view/OldMainForm.cs.html

The infobrol is a personal site whose content is my sole responsibility. The text is available under CreativeCommons license (BY-NC-SA). More info on the terms of use and the author.