ExportControl.cs

Description du code

ExportControl.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.Collections.Generic;
  3. using System.ComponentModel;
  4. using System.Drawing;
  5. using System.Data;
  6. using System.Text;
  7. using System.Windows.Forms;
  8. using be.gaudry.bibliobrol.model;
  9. using System.Threading;
  10. using be.gaudry.bibliobrol.view.dialogs;
  11. using be.gaudry.observer;
  12. using be.gaudry.bibliobrol.config;
  13.  
  14. namespace be.gaudry.bibliobrol.view.utils
  15. {
  16. internal delegate void ChangeTextDelegateHandler(Control control, String text);
  17. internal delegate void AppendTextDelegateHandler(RichTextBox rtb, String text);
  18. internal delegate void SetProgressBarDelegateHandler(ProgressBar pgb, int value);
  19. internal delegate void IncreaseProgressBarDelegateHandler(ProgressBar pgb, int value);
  20. internal delegate void ThreadHasFinishDelegateHandler();
  21.  
  22. public partial class ExportControl : UserControl, IObserver
  23. {
  24. #region Constructors and declarations
  25. /// <summary>
  26. /// MediaBrols ids or Brols ids to export
  27. /// </summary>
  28. private List<int> ids;
  29. private ChangeTextDelegateHandler ChangeTextDelegate;
  30. private AppendTextDelegateHandler AppendTextDelegate;
  31. private SetProgressBarDelegateHandler SetProgressBarDelegate;
  32. private IncreaseProgressBarDelegateHandler IncreaseProgressBarDelegate;
  33. private ThreadHasFinishDelegateHandler ThreadHasFinishedDelegate;
  34. private Thread exportationThread;
  35. /// <summary>
  36. /// Form containing this user control.
  37. /// We use it to add delegate on close form event, and to get selected ids to export
  38. /// </summary>
  39. private MediabrolForm f;
  40. /// <summary>
  41. /// Used to set button text
  42. /// </summary>
  43. private String showDetails, hideDetails;
  44. /// <summary>
  45. /// Used to store data needed by update method
  46. /// </summary>
  47. private IAsyncResult ia, ia2;
  48. /// <summary>
  49. /// Used to read fileName from another thread
  50. /// </summary>
  51. String exportFileName;
  52. /// <summary>
  53. /// Constructor
  54. /// </summary>
  55. public ExportControl()
  56. {
  57. ids = new List<int>();
  58. InitializeComponent();
  59. initControls();
  60. initProgressBar();
  61. }
  62. #endregion
  63.  
  64. #region initializations
  65. private void initControls()
  66. {
  67. exportViewRTB.Text = String.Empty;
  68. exportExtCB.SelectedIndex = 0;
  69. fillExportName();
  70. progressGB.Visible = false;
  71. exportViewRTB.Visible = false;
  72. showDetails = "Afficher les détails";
  73. hideDetails = "Masquer les détails";
  74. }
  75. private void initProgressBar()
  76. {
  77. this.ChangeTextDelegate = new ChangeTextDelegateHandler(changeText);
  78. this.AppendTextDelegate = new AppendTextDelegateHandler(appendText);
  79. this.SetProgressBarDelegate = new SetProgressBarDelegateHandler(setProgressBar);
  80. this.IncreaseProgressBarDelegate = new IncreaseProgressBarDelegateHandler(increaseProgressBar);
  81. this.ThreadHasFinishedDelegate = new ThreadHasFinishDelegateHandler(threadHasFinish);
  82.  
  83. this.threadPriorityCB.SelectedIndex = 2;
  84. this.threadPriorityCB.SelectedIndexChanged += new EventHandler(threadPriorityCB_SelectedIndexChanged);
  85. }
  86. #endregion
  87.  
  88. #region public methods
  89. /// <summary>
  90. /// Set the form from which we need to read datagridview values
  91. /// Add event to abort threads which may be still alive on BIblioItemForm closing
  92. /// </summary>
  93. /// <param name="f">BIblioItemForm</param>
  94. public void setBIblioItemForm(MediabrolForm f)
  95. {
  96. this.f = f;
  97. f.FormClosing += new FormClosingEventHandler(exportClosing);
  98. }
  99. #endregion
  100.  
  101. #region manage file name
  102. /// <summary>
  103. /// Used to init fields values.
  104. /// fill path textbox with application directory path
  105. /// fill filename with preformated name (with date)
  106. /// </summary>
  107. private void fillExportName()
  108. {
  109. dirPathTB.Text = Config.ExportDir;
  110. StringBuilder str = new StringBuilder("bibliobrol");
  111. DateTime dt = DateTime.Now;
  112. str.Append(dt.Year);
  113. if (dt.Month < 10) str.Append("0");
  114. str.Append(dt.Month);
  115. if (dt.Day < 10) str.Append("0");
  116. str.Append(dt.Day);
  117. fileNameTB.Text = str.ToString();
  118. }
  119. /// <summary>
  120. /// Set full name with directory path, filename, and extension
  121. /// </summary>
  122. /// <returns></returns>
  123. private void setExportName()
  124. {
  125. StringBuilder str = new StringBuilder(dirPathTB.Text);
  126. str.Append(System.IO.Path.DirectorySeparatorChar);
  127. str.Append(fileNameTB.Text);
  128. str.Append(".");
  129. switch (exportExtCB.SelectedIndex)
  130. {
  131. case 0: str.Append("bed"); break;
  132. case 3: str.Append("xls"); break;
  133. default: str.Append(((String)exportExtCB.SelectedItem).ToLower()); break;
  134. }
  135. exportFileName = str.ToString();
  136. }
  137. /// <summary>
  138. /// Allow to browse to get directory path and fill textbox with it
  139. /// </summary>
  140. /// <param name="sender"></param>
  141. /// <param name="e"></param>
  142. private void browseDirBtn_Click(object sender, EventArgs e)
  143. {
  144. FolderBrowserDialog fbDia = new FolderBrowserDialog();
  145. fbDia.Description = "Dossier des fichiers à exporter ou importer";
  146. //fbDia.RootFolder = Application.StartupPath;
  147. fbDia.ShowNewFolderButton = true;
  148. fbDia.SelectedPath = Config.ExportDir; //Application.StartupPath;
  149. if (fbDia.ShowDialog(this) == DialogResult.OK)
  150. {
  151. dirPathTB.Text = fbDia.SelectedPath;
  152. }
  153. else
  154. {
  155. dirPathTB.Text = "";
  156. }
  157. }
  158. private bool testFileName(String fileName)
  159. {
  160. if (!System.IO.Directory.Exists(dirPathTB.Text))
  161. {
  162. StaticObservable.notify(new Notification(Notification.VERBOSE.opsResult, "Exportation", String.Format("Le chemin {0} n'est pas valide.", fileName), this));
  163. return false;
  164. }
  165. return true;
  166. }
  167. #endregion
  168.  
  169. #region export / import
  170. /// <summary>
  171. /// Abort thread which is doing the exportation
  172. /// </summary>
  173. /// <param name="sender"></param>
  174. /// <param name="e"></param>
  175. private void cancelExportBtn_Click(object sender, EventArgs e)
  176. {
  177. Invoke(ThreadHasFinishedDelegate);
  178. exportClosing(null,null);
  179. appendText(exportViewRTB, "Opération annulée");
  180. }
  181. /// <summary>
  182. /// Export data with selected parameters
  183. /// </summary>
  184. /// <param name="sender"></param>
  185. /// <param name="e"></param>
  186. private void exportBtn_Click(object sender, EventArgs e)
  187. {
  188. setExportName();
  189. if (!testFileName(exportFileName)) return;
  190. /*foreach (DataRow row in f.dataTable.Rows)
  191.   {
  192.   ids.Add((int)row["mbId"]);
  193.   }*/
  194. ids = (expMediabrolChkB.Checked)?f.MediabrolIds:f.BrolIds;
  195. //int nbExp = f.dataTable.Rows.Count;
  196. int nbExp = f.MediabrolIds.Count;
  197. if (nbExp < 1)
  198. {
  199. StaticObservable.notify(new Notification(Notification.VERBOSE.opsResult, "Exportation", "Aucun élément à exporter", this));
  200. return;
  201. }
  202. DialogResult r = MessageBox.Show(
  203. this,
  204. "Exporter les " + nbExp + " éléments sélectionnés vers \n" + exportFileName,
  205. "Exportation",
  206. MessageBoxButtons.OKCancel,
  207. MessageBoxIcon.Question,
  208. MessageBoxDefaultButton.Button1);
  209. if (r == DialogResult.OK)
  210. {
  211. switch(exportExtCB.SelectedIndex)
  212. {
  213. #region binary export
  214. case 0:
  215. showProgression();
  216. switch (testPerformsCB.SelectedIndex)
  217. {
  218. case 1 :
  219. //notifications and single thread
  220. ModelAdapter.addImportExporterObserver(this);
  221. ModelAdapter.exportBinaryMediaBrol(ids.ToArray(), exportFileName, expMediabrolChkB.Checked, expAllBrolChkB.Checked, anonymousChkB.Enabled && anonymousChkB.Checked);
  222. ModelAdapter.removeImportExporterObserver(this);
  223. break;
  224. case 2:
  225. //no notifications and separated thread
  226. this.exportationThread = new Thread(new ThreadStart(this.executeTest));
  227. this.exportationThread.Name = "ExportThread";
  228. this.exportationThread.Priority = ThreadPriority.Normal;
  229. this.exportationThread.Start();
  230. break;
  231. case 3:
  232. //no notifications and single thread
  233. ModelAdapter.addImportExporterObserver(this);
  234. ModelAdapter.exportBinaryMediaBrolTest(ids.ToArray(), exportFileName, expMediabrolChkB.Checked, expAllBrolChkB.Checked, anonymousChkB.Enabled && anonymousChkB.Checked);
  235. ModelAdapter.removeImportExporterObserver(this);
  236. break;
  237. default:
  238. //notifications and separated thread
  239. this.exportationThread = new Thread(new ThreadStart(this.executeExport));
  240. this.exportationThread.Name = "ExportThread";
  241. this.exportationThread.Priority = ThreadPriority.Normal;
  242. this.exportationThread.Start();
  243. break;
  244. }
  245. break;
  246. #endregion //binary export
  247.  
  248. #region xml export
  249. case 1 :
  250. ModelAdapter.addImportExporterObserver(this);
  251. ModelAdapter.exportXMLMediaBrol(ids.ToArray(), exportFileName);
  252. ModelAdapter.removeImportExporterObserver(this);
  253. break;
  254. #endregion
  255.  
  256. #region csv export
  257. case 2:
  258. ModelAdapter.addImportExporterObserver(this);
  259. ModelAdapter.exportExcelMediaBrol(ids.ToArray(), exportFileName,1);
  260. ModelAdapter.removeImportExporterObserver(this);
  261. break;
  262. #endregion
  263.  
  264. #region MS Excel export
  265. case 3:
  266. ModelAdapter.addImportExporterObserver(this);
  267. ModelAdapter.exportExcelMediaBrol(ids.ToArray(), exportFileName,2);
  268. ModelAdapter.removeImportExporterObserver(this);
  269. break;
  270. #endregion
  271.  
  272. #region default
  273. default :
  274. break;
  275. #endregion
  276.  
  277. }
  278. }
  279. }
  280. /// <summary>
  281. /// Set stepControls to show the progression
  282. /// </summary>
  283. private void showProgression()
  284. {
  285. progressGB.Visible = true;
  286. exportViewRTB.Text = String.Empty;
  287. exportViewRTB.Visible = false;
  288. cancelExportBtn.Visible = true;
  289. exportBtn.Visible = false;
  290. }
  291.  
  292. /// <summary>
  293. /// Used to call export method, with parameters, in a thread throught a delegate.
  294. /// Call the same method as executeExport(), but without notifications (to test performances)
  295. /// </summary>
  296. public void executeTest()
  297. {
  298. ModelAdapter.addImportExporterObserver(this);
  299. ModelAdapter.exportBinaryMediaBrolTest(ids.ToArray(), exportFileName, expMediabrolChkB.Checked, expAllBrolChkB.Checked, anonymousChkB.Enabled && anonymousChkB.Checked);
  300. }
  301. /// <summary>
  302. /// Used to call export method, with parameters, in a thread throught a delegate
  303. /// </summary>
  304. public void executeExport()
  305. {
  306. ModelAdapter.addImportExporterObserver(this);
  307. ModelAdapter.exportBinaryMediaBrol(ids.ToArray(), exportFileName, expMediabrolChkB.Checked, expAllBrolChkB.Checked, anonymousChkB.Enabled && anonymousChkB.Checked);
  308. }
  309. /// <summary>
  310. /// Used to call export method, with parameters, in a thread throught a delegate
  311. /// </summary>
  312. public void executeImport()
  313. {
  314. ModelAdapter.addImportExporterObserver(this);
  315. ModelAdapter.importBinaryMediaBrol(exportFileName);
  316. }
  317. /// <summary>
  318. /// Fill a RichTextBox with exported file content
  319. /// </summary>
  320. /// <param name="sender"></param>
  321. /// <param name="e"></param>
  322. private void fetchDataBtn_Click(object sender, EventArgs e)
  323. {
  324. setExportName();
  325. if (!testFileName(exportFileName)) return;
  326. exportViewRTB.Visible = true;
  327. exportViewRTB.Text = string.Empty;
  328. exportViewRTB.Visible = true;
  329. System.IO.StreamReader sr = null;
  330. try
  331. {
  332. sr = new System.IO.StreamReader(exportFileName);//, Encoding.Default
  333. string data = sr.ReadLine();
  334. while (data != null)
  335. {
  336. exportViewRTB.AppendText(data + "\r\n");
  337. data = sr.ReadLine();
  338. }
  339. }
  340. catch (System.IO.IOException ioe)
  341. {
  342. StaticObservable.notify(new Notification(Notification.VERBOSE.lowError, "Exportation", "Erreur de lecture du fichier exporté", ioe, this));
  343. exportViewRTB.Visible = false;
  344. }
  345. finally
  346. {
  347. if (sr != null)sr.Close();
  348. }
  349. }
  350. /// <summary>
  351. /// Fetch titles into and send ops result as notification
  352. /// </summary>
  353. /// <param name="sender"></param>
  354. /// <param name="e"></param>
  355. private void importBtn_Click(object sender, EventArgs e)
  356. {
  357. setExportName();
  358. if (!testFileName(exportFileName)) return;
  359. if (((String)exportExtCB.SelectedItem).Equals("Binaire"))
  360. {
  361. /*ModelAdapter.addImportExporterObserver(this);
  362.   ModelAdapter.importBinaryMediaBrol(exportFileName);
  363.   ModelAdapter.removeImportExporterObserver(this);*/
  364.  
  365. showProgression();
  366. this.exportationThread = new Thread(new ThreadStart(this.executeImport));
  367. this.exportationThread.Name = "ExportThread";
  368. this.exportationThread.Priority = ThreadPriority.Normal;
  369. this.exportationThread.Start();
  370. }
  371. else
  372. {
  373. StaticObservable.notify(new Notification(Notification.VERBOSE.opsResult, "Exportation", "Fonctionnalité en cours d'élaboration pour " + (String)exportExtCB.SelectedItem, this));
  374. }
  375. }
  376. #endregion
  377.  
  378. #region progress bars
  379.  
  380. /// <summary>
  381. /// Abort exportationThread if needed
  382. /// </summary>
  383. private void exportClosing(object sender, FormClosingEventArgs e)
  384. {
  385. // If the thread is still alive
  386. if (this.exportationThread != null && this.exportationThread.IsAlive)
  387. {
  388. this.exportationThread.Abort();
  389. this.exportationThread = null;
  390. }
  391. }
  392.  
  393. /// <summary>
  394. /// Increase progress bar
  395. /// </summary>
  396. /// <param name="pgb">increaseProgressBar to increase</param>
  397. /// <param name="value">(int) Value of increase</param>
  398. private void increaseProgressBar(ProgressBar pgb, int value)
  399. {
  400. pgb.Increment(value);
  401. }
  402.  
  403. /// <summary>
  404. /// Set max value of progress bar
  405. /// </summary>
  406. /// <param name="pgb">increaseProgressBar to set max value</param>
  407. /// <param name="value">(int) max value</param>
  408. private void setProgressBar(ProgressBar pgb, int value)
  409. {
  410. pgb.Maximum = value;
  411. pgb.Value = 0;
  412. }
  413.  
  414. /// <summary>
  415. /// Called when the thread has finish
  416. /// </summary>
  417. private void threadHasFinish()
  418. {
  419. ModelAdapter.removeImportExporterObserver(this);
  420. progressGB.Visible = false;
  421. exportViewRTB.Visible = true;
  422. cancelExportBtn.Visible = false;
  423. exportBtn.Visible = true;
  424. }
  425.  
  426. /// <summary>
  427. /// Modify text of a Control
  428. /// </summary>
  429. /// <param name="control">Control which we need to modify text</param>
  430. /// <param name="text">(String) text to modify</param>
  431. private void changeText(Control control, String text)
  432. {
  433. control.Text = text;
  434. }
  435.  
  436. /// <summary>
  437. /// Append text for a RichTextBox
  438. /// </summary>
  439. /// <param name="rtb">RichTextBox which we need to append text</param>
  440. /// <param name="text">(String) text to modify</param>
  441. private void appendText(RichTextBox rtb, String text)
  442. {
  443. rtb.AppendText("\n");
  444. rtb.AppendText(text);
  445. rtb.ScrollToCaret();
  446. }
  447.  
  448. /// <summary>
  449. /// Modify Thread priority
  450. /// </summary>
  451. private void threadPriorityCB_SelectedIndexChanged(object sender, EventArgs e)
  452. {
  453. if (this.exportationThread != null)
  454. {
  455. switch (this.threadPriorityCB.SelectedIndex)
  456. {
  457. case 0:
  458. this.exportationThread.Priority = ThreadPriority.Highest;
  459. break;
  460. case 1:
  461. this.exportationThread.Priority = ThreadPriority.AboveNormal;
  462. break;
  463. case 2:
  464. this.exportationThread.Priority = ThreadPriority.Normal;
  465. break;
  466. case 3:
  467. this.exportationThread.Priority = ThreadPriority.BelowNormal;
  468. break;
  469. case 4:
  470. this.exportationThread.Priority = ThreadPriority.Lowest;
  471. break;
  472. default:
  473. this.exportationThread.Priority = ThreadPriority.Normal;
  474. break;
  475. }
  476. }
  477. }
  478. #endregion
  479.  
  480. #region IObserver Members
  481. /// <summary>
  482. /// Call needed functions to use progress bars and display infos
  483. /// </summary>
  484. /// <param name="n">(Notification) Notified infos</param>
  485. public void update(Notification n)
  486. {
  487. int bCount, bCount2;
  488. switch(n.Level)
  489. {
  490. case Notification.VERBOSE.internalNotification :
  491. try
  492. {
  493. switch (n.Title)
  494. {
  495. case "count":
  496. Int32.TryParse(n.Msg, out bCount);
  497. // set main progress bax max value
  498. this.Invoke(SetProgressBarDelegate, this.pgbTotal, bCount);
  499. break;
  500. case "brolStart":
  501. if (showHideDetailsBtn.Text.Equals(hideDetails))
  502. {
  503. // modify current asynchronous (non bloquant) mediabrol loading
  504. ia = this.BeginInvoke(ChangeTextDelegate, this.lblCurrentFile, n.Msg);
  505. }
  506. break;
  507. case "brolEnd":
  508. // asynchronous increase of main progress bar
  509. ia2 = this.BeginInvoke(IncreaseProgressBarDelegate, this.pgbTotal, 1);
  510. if (showHideDetailsBtn.Text.Equals(hideDetails))
  511. {
  512. this.EndInvoke(ia);
  513. }
  514. this.EndInvoke(ia2);
  515. break;
  516. case "pb2":
  517. //increase details progress bar
  518. if (showHideDetailsBtn.Text.Equals(hideDetails))
  519. {
  520. this.Invoke(IncreaseProgressBarDelegate, this.pgbCurrent, 1);
  521. }
  522. break;
  523. case "Info":
  524. this.Invoke(ChangeTextDelegate, this.lblCurrentFile, n.Msg);
  525. break;
  526. case "End":
  527. this.Invoke(ThreadHasFinishedDelegate);
  528. this.Invoke(AppendTextDelegate, this.exportViewRTB, n.Msg);
  529. break;
  530. case "count2":
  531. if (showHideDetailsBtn.Text.Equals(hideDetails))
  532. {
  533. Int32.TryParse(n.Msg, out bCount2);
  534. this.Invoke(SetProgressBarDelegate, this.pgbCurrent, bCount2);
  535. }
  536. break;
  537. default:
  538. //modify general info label
  539. this.Invoke(AppendTextDelegate, this.exportViewRTB, n.Msg);
  540. break;
  541. }
  542. }
  543. catch (ThreadAbortException)
  544. {
  545. //this.Invoke(ThreadHasFinishedDelegate);
  546. }
  547. break;
  548. /* No need if we add console as importExporter observer
  549.   case Notification.VERBOSE.criticalError:
  550.   System.Console.WriteLine(n.Title + " : " + n.Msg);
  551.   StaticObservable.notify(n);
  552.   break;
  553.   case Notification.VERBOSE.opsResult:
  554.   System.Console.WriteLine(n.Title + " : " + n.Msg);
  555.   StaticObservable.notify(n);
  556.   break;
  557.   */
  558. }
  559. }
  560.  
  561. #endregion
  562.  
  563. #region private methods
  564. /// <summary>
  565. /// If we don't export mediabrols, anonymous has no sense with only brols.
  566. /// </summary>
  567. /// <param name="sender"></param>
  568. /// <param name="e"></param>
  569. private void expMediabrolChkB_CheckedChanged(object sender, EventArgs e)
  570. {
  571. if (expMediabrolChkB.Checked)
  572. {
  573. anonymousChkB.Enabled = true;
  574. }
  575. else
  576. {
  577. anonymousChkB.Enabled = false;
  578. }
  579. }
  580. /// <summary>
  581. /// Show or hide progress details panel
  582. /// </summary>
  583. /// <param name="sender"></param>
  584. /// <param name="e"></param>
  585. private void showHideDetailsBtn_Click(object sender, EventArgs e)
  586. {
  587. showHideDetailsBtn.Text = (!progressDetailsPanel.Visible) ? hideDetails : showDetails;
  588. progressDetailsPanel.Visible = !progressDetailsPanel.Visible;
  589. }
  590. #endregion
  591.  
  592. #region help
  593. /// <summary>
  594. /// Display MessageBox with info about export mediabrol option
  595. /// </summary>
  596. /// <param name="sender"></param>
  597. /// <param name="e"></param>
  598. private void expMediabrolInfoBtn_Click(object sender, EventArgs e)
  599. {
  600. StringBuilder str = new StringBuilder("Exporter les exemplaires...\n\n");
  601. str.AppendLine("Si cette case est cochée, les exemplaires des ouvrages sont exportés (sans les emprunts).");
  602. str.AppendLine("Sinon, seuls les informations relatives aux ouvrages sont sélectionnés.");
  603. MessageBox.Show(
  604. str.ToString(),
  605. "Info bibliobrol",
  606. MessageBoxButtons.OK,
  607. MessageBoxIcon.Information,
  608. MessageBoxDefaultButton.Button1);
  609. }
  610. /// <summary>
  611. /// Display MessageBox with info about export all brols option
  612. /// </summary>
  613. /// <param name="sender"></param>
  614. /// <param name="e"></param>
  615. private void expAllBrolInfoBtn_Click(object sender, EventArgs e)
  616. {
  617. StringBuilder str = new StringBuilder("Exporter tous les ouvrages...\n\n");
  618. str.AppendLine("Si cette case est cochée, tous les ouvrages existants seront exportés.");
  619. str.AppendLine("Sinon, seuls les ouvrages dont les exemplaires sont sélectionnés seront exportés.");
  620. MessageBox.Show(
  621. str.ToString(),
  622. "Info bibliobrol",
  623. MessageBoxButtons.OK,
  624. MessageBoxIcon.Information,
  625. MessageBoxDefaultButton.Button1);
  626. }
  627. /// <summary>
  628. /// Display MessageBox with info about anonymous option
  629. /// </summary>
  630. /// <param name="sender"></param>
  631. /// <param name="e"></param>
  632. private void anonymousInfoBtn_Click(object sender, EventArgs e)
  633. {
  634. StringBuilder str = new StringBuilder("Anonyme...\n\n");
  635. str.AppendLine("Si cette case est cochée, le nom du propriétaire ne sera pas exporté pour les exemplaires.");
  636. MessageBox.Show(
  637. str.ToString(),
  638. "Info bibliobrol",
  639. MessageBoxButtons.OK,
  640. MessageBoxIcon.Information,
  641. MessageBoxDefaultButton.Button1);
  642. }
  643. #endregion
  644.  
  645. private void testImgsBtn_Click(object sender, EventArgs e)
  646. {
  647. ImportedImagesForm iif = new ImportedImagesForm();
  648. iif.ShowDialog(this);
  649. }
  650. }
  651.  
  652.  
  653. }

Structure et Fichiers du projet

Afficher/masquer...


Répertoires contenus dans /var/www/bin/sniplets/bibliobrol/src/view/utils/ 
IcôneNomTailleModification
Pas de sous-répertoires.
IcôneNomTailleModification
| _ Répertoire parent0 octets1719394740 26/06/2024 11:39:00
Fichiers contenus dans /var/www/bin/sniplets/bibliobrol/src/view/utils/ 
IcôneNomTailleModificationAction
IcôneNomTailleModificationAction
Afficher le fichier .cs|.csExportControl.cs27.1 Ko31/10/2018 18:33:03-refusé-
Afficher le fichier .cs|.csMultiWebInfoControl.cs2.13 Ko31/10/2018 18:33:03-refusé-
Afficher le fichier .cs|.csImagesImporter.Designer.cs3.64 Ko31/10/2018 18:33:03-refusé-
Afficher le fichier .cs|.csImg.cs3.45 Ko31/10/2018 18:33:03-refusé-
Afficher le fichier .resx|.resxMediabrolInfoControl.resx5.68 Ko31/10/2018 18:33:03-refusé-
Afficher le fichier .resx|.resxExportControl.resx5.68 Ko31/10/2018 18:33:03-refusé-
Afficher le fichier .cs|.csConsole.Designer.cs4.25 Ko31/10/2018 18:33:03-refusé-
Afficher le fichier .resx|.resxConsole.resx6.06 Ko31/10/2018 18:33:03-refusé-
Afficher le fichier .cs|.csMediabrolInfoControl.Designer.cs12.57 Ko31/10/2018 18:33:03-refusé-
Afficher le fichier .cs|.csMultiWebInfoControl.Designer.cs1.46 Ko31/10/2018 18:33:03-refusé-
Afficher le fichier .cs|.csImagesImporter.cs1.89 Ko31/10/2018 18:33:03-refusé-
Afficher le fichier .cs|.csExportControl.Designer.cs42.38 Ko31/10/2018 18:33:03-refusé-
Afficher le fichier .resx|.resxMultiWebInfoControl.resx5.68 Ko31/10/2018 18:33:04-refusé-
Afficher le fichier .cs|.csMediabrolInfoControl.cs1.9 Ko31/10/2018 18:33:03-refusé-
Afficher le fichier .resx|.resxImagesImporter.resx5.68 Ko31/10/2018 18:33:03-refusé-
Afficher le fichier .cs|.csConsole.cs16.89 Ko31/10/2018 18:33:03-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.

Document créé le 16/10/2009, dernière modification le 26/10/2018
Source du document imprimé : https://www.gaudry.be/cs-bibliobrol-source-rf-view/utils/ExportControl.cs.html

L'infobrol est un site personnel dont le contenu n'engage que moi. Le texte est mis à disposition sous licence CreativeCommons(BY-NC-SA). Plus d'info sur les conditions d'utilisation et sur l'auteur.