SearchMediaUserControl.cs

Description du code

SearchMediaUserControl.cs est un fichier du projet BrolExplorer.
Ce fichier est situé dans /var/www/bin/sniplets/bibliobrol/brolexplorer/.

Projet BrolExplorer :

Explorateur de media en CSharp.

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.explorer.model;
  9. using System.IO;
  10. using be.gaudry.events;
  11. using be.gaudry.view.controls;
  12. using be.gaudry.model.enums;
  13. using be.gaudry.model.drawing;
  14. using be.gaudry.model.config;
  15. using be.gaudry.model;
  16. using be.gaudry.model.drawing.colors;
  17. using be.gaudry.model.file;
  18. using System.Drawing.Printing;
  19. using be.gaudry.view.utils;
  20.  
  21. namespace be.gaudry.explorer.view.controls
  22. {
  23. public partial class SearchMediaUserControl : UserControl
  24. {
  25. #region constructor and declarations
  26. private MediaParser fileParser;
  27. /// <summary>
  28. /// used to get the "mouse over cell" for the context menu
  29. /// </summary>
  30. private DataGridViewCellEventArgs mouseLocation;
  31.  
  32. public SearchMediaUserControl()
  33. {
  34. fileParser = new MediaParser();
  35. InitializeComponent();
  36.  
  37. imageList1.Images.Add(IconExtractor.ExtractIcon(Path.Combine(
  38. Environment.GetFolderPath(Environment.SpecialFolder.System),
  39. "shell32.dll"
  40. ), 4).ToBitmap());
  41. imageList1.Images.Add(IconExtractor.ExtractIcon(Path.Combine(
  42. Environment.GetFolderPath(Environment.SpecialFolder.System),
  43. "shell32.dll"
  44. ), 126).ToBitmap());
  45.  
  46. startPathICB.pushAndSelect(
  47. Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments),
  48. 1);
  49. progressGB.Dock = DockStyle.Fill;
  50.  
  51. SourcesManager.addSource(new Source(
  52. "tri dgv",
  53. this.Name,
  54. "http://msdn2.microsoft.com/fr-fr/library/ms171608(VS.80).aspx",
  55. "Tri des datagridview"
  56. )
  57. );
  58.  
  59. SourcesManager.addSource(new Source(
  60. "images dgv",
  61. this.Name,
  62. "http://msdn2.microsoft.com/fr-fr/library/z1cc356h(vs.80).aspx",
  63. "Images et datagridview"
  64. )
  65. );
  66.  
  67. SourcesManager.addSource(new Source(
  68. "context menu dgv",
  69. this.Name,
  70. "http://msdn2.microsoft.com/fr-fr/library/system.windows.forms.datagridviewrow.contextmenustrip.aspx",
  71. "Menu contextuel et datagridview"
  72. )
  73. );
  74.  
  75. SourcesManager.addSource(new Source(
  76. "association fichier",
  77. this.Name,
  78. "http://faqcsharp.developpez.com/?page=syst#syst_procstartshell",
  79. "Ouvrir un fichier avec l'application par défaut"
  80. )
  81. );
  82. }
  83.  
  84.  
  85. #endregion
  86.  
  87. #region properties
  88. [
  89. Category("Action"),
  90. Browsable(true),
  91. Description("Event called on file selected")
  92. ]
  93. public event FileSelectedEventHandler FileSelected;
  94. [
  95. Category("Action"),
  96. Browsable(true),
  97. Description("Event called on directory selected")
  98. ]
  99. public event FileSelectedEventHandler DirectorySelected;
  100. #endregion
  101.  
  102. #region search
  103. private void onKeyUp(object sender, KeyEventArgs e)
  104. {
  105. if (e.KeyCode == Keys.Enter)
  106. {
  107. startSearch();
  108. }
  109. }
  110. private void searchBtn_Click(object sender, EventArgs e)
  111. {
  112. startSearch();
  113. }
  114.  
  115. private void startSearch()
  116. {
  117. if (startParseBtn.Text.Equals("Démarrer"))
  118. {
  119. String error = null;
  120.  
  121. startPathICB.pushAndSelect(0);
  122.  
  123. String startPath = startPathICB.SelectedInnerText;
  124.  
  125. if (Directory.Exists(startPath))
  126. {
  127. fileParser.Extensions.Clear();
  128. fileParser.FindDVD = findDVDChkB.Checked;
  129. /*if (findDVDChkB.Checked)
  130.   fileParser.addExtension("DVD");*/
  131. if (findAviChkB.Checked)
  132. fileParser.addExtension("AVI");
  133. if (findMpegChkB.Checked)
  134. {
  135. fileParser.addExtension("MPG");
  136. fileParser.addExtension("MPEG");
  137. }
  138.  
  139. if (findWmvChkB.Checked)
  140. fileParser.addExtension("WMV");
  141.  
  142. if (findMp3ChkB.Checked)
  143. fileParser.addExtension("MP3");
  144. if (findWavChkB.Checked)
  145. fileParser.addExtension("WAV");
  146.  
  147.  
  148. if (findJpegChkB.Checked)
  149. {
  150. fileParser.addExtension("JPG");
  151. fileParser.addExtension("JPEG");
  152. }
  153. if (findGifChkB.Checked)
  154. fileParser.addExtension("GIF");
  155. if (findPngChkB.Checked)
  156. fileParser.addExtension("PNG");
  157. if (findBmpChkB.Checked)
  158. fileParser.addExtension("BMP");
  159.  
  160. if (findPdfChkB.Checked)
  161. fileParser.addExtension("PDF");
  162. if (findDocChkB.Checked)
  163. fileParser.addExtension("DOC");
  164. if (findTxtChkB.Checked)
  165. fileParser.addExtension("TXT");
  166. if (findPpsChkB.Checked)
  167. {
  168. fileParser.addExtension("PPS");
  169. fileParser.addExtension("PPT");
  170. }
  171.  
  172. if (findOtherChkB.Checked && !String.Empty.Equals(findOtherTB.Text))
  173. {
  174. fileParser.addExtension(findOtherTB.Text);
  175. }
  176.  
  177. if (fileParser.Extensions.Count < 1 && !findDVDChkB.Checked && !findAllExtensionsChkB.Checked)
  178. {
  179. error = "\nAucun type de fichier n'est sélectionné.";
  180. }
  181. else
  182. {
  183. startParseBtn.Text = "Arrêter";
  184. startParseBtn.Image = global::be.gaudry.explorer.Properties.Resources.StopHS;
  185. if (mediaBrowserBgWorker.IsBusy)
  186. {
  187. error = "Impossible de lancer la recherche car une recherche est déjà en cours...";
  188. }
  189. else
  190. {
  191. fileParser.StartPath = startPath;
  192. fileParser.SearchText = fileNameTB.Text;
  193. long min = 0L;
  194. if (sizeCriterionChkB.Checked)
  195. {
  196. if (long.TryParse(sizeCriterionTB.Text, out min))
  197. {
  198. min = min * 1024 * 1024;
  199. }
  200. /* else
  201.   {
  202.   min = 0;
  203.   }
  204.  
  205.   }
  206.   else
  207.   {
  208.   min = 0;*/
  209. }
  210. fileParser.MinimumSize = min;
  211. fileParser.IncludeSubFolders = includeSubFoldersChkB.Checked;
  212. fileParser.IncludeHiddenFiles = includeHiddenFilesChkB.Checked;
  213. fileParser.PreCalcProgress = calcProgressChkB.Checked;
  214. /*if (calcProgressChkB.Checked)
  215.   {
  216.   calcProgressChkB.Enabled = false;
  217.   }*/
  218. fileParser.FindAllExtensions = findAllExtensionsChkB.Checked;
  219. displayProgressGB();
  220.  
  221. mediaBrowserBgWorker.RunWorkerAsync();
  222. }
  223. }
  224. }
  225. else
  226. {
  227. error = String.Format("\n{0} n'est pas un chemin valide.", startPath);
  228. startPathICB.Items.RemoveAt(0);
  229. }
  230. if (error != null)
  231. {
  232. MessageBox.Show(
  233. this,
  234. error,
  235. "Impossible de démarrer la recherche",
  236. MessageBoxButtons.OK,
  237. MessageBoxIcon.Stop
  238. );
  239. }
  240. }
  241. else
  242. {
  243. mediaBrowserBgWorker.CancelAsync();
  244. startParseBtn.Text = "Démarrer";
  245. startParseBtn.Image = global::be.gaudry.explorer.Properties.Resources.PlayHS;
  246. //browsePgB.ParameterValue = 0;
  247. }
  248. }
  249. #endregion
  250.  
  251. #region browse settings
  252. /// <summary>
  253. /// Invoke delegate on path modification
  254. /// Reinit the progress max value
  255. /// </summary>
  256. /// <param name="sender"></param>
  257. /// <param name="e"></param>
  258. private void onPathModified(object sender, EventArgs e)
  259. {
  260. if (DirectorySelected != null)
  261. {
  262. DirectorySelected(
  263. this,
  264. startPathICB.Text
  265. );
  266. }
  267. reinitProgressMaxValue(sender, e);
  268. }
  269. public void setPath(String path)
  270. {
  271. int img = 0;
  272. if (path.Equals(Environment.SpecialFolder.MyDocuments))
  273. {
  274. img = 1;
  275. }
  276. startPathICB.pushAndSelect(path, img);
  277. }
  278. private void browseStartPathBtn_Click(object sender, EventArgs e)
  279. {
  280. FolderBrowserDialog folderBrowserDialog = new FolderBrowserDialog();
  281.  
  282. //folderBrowserDialog.RootFolder = Environment.SpecialFolder.MyDocuments;
  283.  
  284.  
  285. if (DialogResult.OK == folderBrowserDialog.ShowDialog())
  286. {
  287. setPath(folderBrowserDialog.SelectedPath);
  288. }
  289. }
  290.  
  291. private void fileNameChkB_Click(object sender, EventArgs e)
  292. {
  293. fileNameTB.Text = "";
  294. fileNameTB.Enabled = fileNameChkB.Checked;
  295. }
  296.  
  297. private void findAllExtensionsChkB_Click(object sender, EventArgs e)
  298. {
  299. bool enable = !findAllExtensionsChkB.Checked;
  300. allFilmsChkB.Checked = enable;
  301. allMusicsChkB.Checked = enable;
  302. allImagesChkB.Checked = enable;
  303. enableExtensionVideo(enable);
  304. enableExtensionAudio(enable);
  305. enableExtensionImage(enable);
  306. foreach (Control c in fileTypeGB.Controls)
  307. {
  308. c.Enabled = enable;
  309. }
  310. findAllExtensionsChkB.Enabled = true;
  311. }
  312. private void enableExtensionVideo(bool enable)
  313. {
  314. findDVDChkB.Checked = enable;
  315. findAviChkB.Checked = enable;
  316. findMpegChkB.Checked = enable;
  317. findWmvChkB.Checked = enable;
  318. }
  319. private void enableExtensionImage(bool enable)
  320. {
  321. findJpegChkB.Checked = enable;
  322. findGifChkB.Checked = enable;
  323. findPngChkB.Checked = enable;
  324. findBmpChkB.Checked = enable;
  325. }
  326. private void enableExtensionAudio(bool enable)
  327. {
  328. findMp3ChkB.Checked = enable;
  329. findWavChkB.Checked = enable;
  330. }
  331. private void enableExtensionBooks(bool enable)
  332. {
  333. findPdfChkB.Checked = enable;
  334. findDocChkB.Checked = enable;
  335. findTxtChkB.Checked = enable;
  336. findPpsChkB.Checked = enable;
  337. }
  338. private void allFilmsChkB_Click(object sender, EventArgs e)
  339. {
  340. enableExtensionVideo(allFilmsChkB.Checked);
  341. }
  342. private void allImagesChkB_Click(object sender, EventArgs e)
  343. {
  344. enableExtensionImage(allImagesChkB.Checked);
  345. }
  346. private void allMusicsChkB_Click(object sender, EventArgs e)
  347. {
  348. enableExtensionAudio(allMusicsChkB.Checked);
  349. }
  350. private void allBooksChkB_Click(object sender, EventArgs e)
  351. {
  352. enableExtensionBooks(allBooksChkB.Checked);
  353. }
  354. private void findOtherChkB_Click(object sender, EventArgs e)
  355. {
  356. findOtherTB.Text = "";
  357. findOtherTB.Visible = findOtherChkB.Checked;
  358. }
  359.  
  360. private void sizeCriterionChkB_Click(object sender, EventArgs e)
  361. {
  362. sizeCriterionTB.Enabled = sizeCriterionChkB.Checked;
  363. }
  364.  
  365. private void cleanDtgBtn_Click(object sender, EventArgs e)
  366. {
  367. resultsDGV.Rows.Clear();
  368. cleanDtgBtn.Enabled = false;
  369. enableOutputBtn(false);
  370. cleanDtgBtn.Text = "Vider les résultats";
  371. }
  372.  
  373. private void enableOutputBtn(bool enabled)
  374. {
  375. printBtn.Enabled = enabled;
  376. saveBtn.Enabled = enabled;
  377. }
  378. #endregion
  379.  
  380. #region progress methods
  381. private void displayProgressGB()
  382. {
  383. browsePgB.Value = 0;
  384. browsePgB.Style = ProgressBarStyle.Marquee;
  385. curDirValLbl.Text = "";
  386. progressGB.Visible = true;
  387. }
  388. /// <summary>
  389. /// Reinit the progress max value
  390. /// (this value depends of the quantity of files into the directory to scan)
  391. /// </summary>
  392. /// <param name="sender"></param>
  393. /// <param name="e"></param>
  394. private void reinitProgressMaxValue(object sender, EventArgs e)
  395. {
  396. searchResultsLbl.Visible = false;
  397. calcProgressChkB.Enabled = true;
  398. }
  399.  
  400.  
  401.  
  402. /// <summary>
  403. /// Start asynchroneous search
  404. /// </summary>
  405. /// <remarks>
  406. /// In this method, do not modify any graphic component
  407. /// </remarks>
  408. /// <param name="sender"></param>
  409. /// <param name="e"></param>
  410. private void mediaBrowserBgWorker_DoWork(object sender, DoWorkEventArgs e)
  411. {
  412. BackgroundWorker bgw = sender as BackgroundWorker;
  413. // Call the model asynchroneous search
  414. //e.Result = fileParser.browse(bgw, e);
  415. e.Result = fileParser.parse(bgw, e);
  416. }
  417. /// <summary>
  418. /// Display results throws by the search
  419. /// </summary>
  420. /// <remarks>
  421. /// The graphic components may here react at the results
  422. /// </remarks>
  423. /// <param name="sender"></param>
  424. /// <param name="e"></param>
  425. private void mediaBrowserBgWorker_ProgressChanged(object sender, ProgressChangedEventArgs e)
  426. {
  427. switch(e.ProgressPercentage)
  428. {
  429. case (int)BGWORKER.currentInfo:
  430. {
  431. String s = e.UserState as String;
  432. if(s!=null)curDirValLbl.Text = s;
  433. break;
  434. }
  435. case (int)BGWORKER.progressBarStyle_Block:
  436. {
  437. browsePgB.Style = ProgressBarStyle.Blocks;
  438. break;
  439. }
  440. default:
  441. {
  442. if (e.ProgressPercentage > 0)
  443. {
  444. browsePgB.Value = e.ProgressPercentage;
  445. if (e.UserState != null)
  446. {
  447. Object[] results = e.UserState as object[];
  448. if (results != null)
  449. {
  450. if(!fileExistsInDGV(results[0] as string))
  451. resultsDGV.Rows.Add(results);
  452. }
  453. }
  454. }
  455. break;
  456. }
  457. }
  458. }
  459.  
  460. private void mediaBrowserBgWorker_RunWorkerCompleted(object sender, RunWorkerCompletedEventArgs e)
  461. {
  462. startParseBtn.Text = "Démarrer";
  463. browsePgB.Value = 0;
  464. cleanDtgBtn.Enabled = resultsDGV.RowCount > 0;
  465. enableOutputBtn( cleanDtgBtn.Enabled);
  466. cleanDtgBtn.Text = String.Format("Vider les {0} résultats", resultsDGV.RowCount);
  467. /*try
  468.   {
  469.   if (e.Result != null)
  470.   {
  471.   previousMaxResult = (float)e.Result;
  472.   }
  473.   }
  474.   catch (System.Reflection.TargetInvocationException) { }*/
  475. if (e.Error != null)
  476. {
  477. searchResultsLbl.Text = "Erreur : " + e.Error.Message;
  478. }
  479. else if (e.Cancelled)
  480. {
  481. searchResultsLbl.Text = "La recherche a été stoppée avant sa fin... Tous les résultats ne sont pas présents.";
  482. }
  483. else
  484. {
  485. searchResultsLbl.Text = String.Format("Taille du répertoire : {0}", Units.getLengthString((long)e.Result));
  486. // The model maintains the previous results if no significative changes occurs
  487. calcProgressChkB.Enabled = false;
  488. }
  489.  
  490. //searchResultsLbl.Text = String.Format("Taille du répertoire : {0}", Units.getLengthString((long)e.Result));
  491. searchResultsLbl.Visible = true;
  492. startParseBtn.Image = global::be.gaudry.explorer.Properties.Resources.PlayHS;
  493. progressGB.Visible = false;
  494. }
  495.  
  496. /// <summary>
  497. /// Check if a full filename exists in the DGV to avoid insert it again
  498. /// </summary>
  499. /// <param name="pathToCheck">(string) full filename to find in the DGV</param>
  500. /// <returns>(bool) true if exists, false otherwise</returns>
  501. private bool fileExistsInDGV(string pathToCheck)
  502. {
  503. if (pathToCheck == null)
  504. return false;
  505. foreach (DataGridViewRow row in resultsDGV.Rows)
  506. {
  507. if (row.Cells[0].Value.Equals(pathToCheck))
  508. {
  509. return true;
  510. }
  511. }
  512. return false;
  513. }
  514. #endregion
  515.  
  516. #region results format
  517. private void systemIconsChkB_Click(object sender, EventArgs e)
  518. {
  519. resultsDGV.Columns["mediaIcon"].Visible = systemIconsChkB.Checked;
  520. }
  521. private void resultsDGV_CellFormatting(object sender, DataGridViewCellFormattingEventArgs e)
  522. {
  523. if (e.RowIndex < 0)
  524. return;
  525. // Set the colors for file extensions in the mediaType column.
  526. if (resultsDGV.Columns[e.ColumnIndex].Name.Equals("mediaType"))
  527. {
  528. BrolColor.BrolInnerColor color;
  529.  
  530. String mediaTypeStr = (String)e.Value;
  531. switch (mediaTypeStr)
  532. {
  533. case "DVD": color = BrolColor.getBrolColor(1); break;
  534. case ".AVI": color = BrolColor.getBrolColor(2); break;
  535. case ".MPG": color = BrolColor.getBrolColor(3); break;
  536. case ".MPEG": color = BrolColor.getBrolColor(4); break;
  537. case ".WMV": color = BrolColor.getBrolColor(5); break;
  538.  
  539. case ".MP3": color = BrolColor.getBrolColor(6); break;
  540. case ".WAV": color = BrolColor.getBrolColor(7); break;
  541.  
  542. case ".JPEG": color = BrolColor.getBrolColor(8); break;
  543. case ".JPG": color = BrolColor.getBrolColor(9); break;
  544. case ".GIF": color = BrolColor.getBrolColor(10); break;
  545. case ".PNG": color = BrolColor.getBrolColor(11); break;
  546. case ".BMP": color = BrolColor.getBrolColor(12); break;
  547.  
  548. case ".PDF": color = BrolColor.getBrolColor(13); break;
  549. case ".DOC": color = BrolColor.getBrolColor(14); break;
  550. case ".TXT": color = BrolColor.getBrolColor(15); break;
  551. case ".PPS": color = BrolColor.getBrolColor(16); break;
  552. case ".PPT": color = BrolColor.getBrolColor(17); break;
  553. default: color = BrolColor.getBrolColor(0); break;
  554. }
  555. e.CellStyle.BackColor = color.BackColor;
  556. e.CellStyle.ForeColor = color.ForeColor;
  557. //e.CellStyle.SelectionBackColor = Color.Brown;
  558. }
  559. // Replace filename values with system icons.
  560. if (systemIconsChkB.Checked && resultsDGV.Columns[e.ColumnIndex].Name.Equals("mediaIcon"))
  561. {
  562. // Ensure that the value is a string.
  563. String stringValue = e.Value as string;
  564. if (stringValue == null) return;
  565.  
  566. // Set the cell ToolTip to the text value.
  567. DataGridViewCell iconCell = resultsDGV[e.ColumnIndex, e.RowIndex];
  568. iconCell.ToolTipText = stringValue;
  569.  
  570. e.Value = iconList1.getImage(stringValue);
  571. }
  572.  
  573. // Format file length
  574. if (resultsDGV.Columns[e.ColumnIndex].Name.Equals("mediaLength"))
  575. {
  576. // Ensure that the value is a string.
  577.  
  578. long fileLength = (long)e.Value;
  579. {
  580.  
  581. // Set the cell ToolTip to the text value.
  582. //DataGridViewCell cell = dataGridView1[e.ColumnIndex, e.RowIndex];
  583. //cell.ToolTipText = String.Format("Taille de {0} octets", fileLength);
  584. e.Value = Units.getLengthString(fileLength);
  585. }
  586. }
  587.  
  588. }
  589. #endregion
  590.  
  591. #region results actions
  592. /// <summary>
  593. /// Used to get row infos
  594. /// </summary>
  595. /// <param name="sender"></param>
  596. /// <param name="e"></param>
  597. private void resultsDGV_CellMouseEnter(object sender, DataGridViewCellEventArgs e)
  598. {
  599. mouseLocation = e;
  600. }
  601. /// <summary>
  602. /// Notify the selected file on right click
  603. /// </summary>
  604. /// <param name="sender"></param>
  605. /// <param name="e"></param>
  606. private void resultsDGV_CellMouseDown(object sender, DataGridViewCellMouseEventArgs e)
  607. {
  608. if (
  609. mouseLocation.RowIndex < 0 || mouseLocation.ColumnIndex < 0 ||
  610. e.Button != MouseButtons.Right || FileSelected == null
  611. )
  612. return;
  613. FileSelected(
  614. this,
  615. (String)resultsDGV.Rows[mouseLocation.RowIndex].Cells["mediaIcon"].Value
  616. );
  617. }
  618. /// <summary>
  619. /// Open file with system default application
  620. /// </summary>
  621. /// <param name="sender"></param>
  622. /// <param name="e"></param>
  623. private void resultsDGV_MouseDoubleClick(object sender, MouseEventArgs e)
  624. {
  625. if (mouseLocation.RowIndex >= 0 && mouseLocation.ColumnIndex >= 0)
  626. {
  627. FileHelper.open(
  628. (String)resultsDGV.Rows[mouseLocation.RowIndex].Cells["mediaIcon"].Value,
  629. "BrolExplorer"
  630. );
  631. }
  632. }
  633. /// <summary>
  634. /// Notify the selected file on double click or on arrow click
  635. /// </summary>
  636. /// <param name="sender"></param>
  637. /// <param name="e"></param>
  638. private void resultsDGV_CurrentCellChanged(object sender, EventArgs e)
  639. {
  640. if (resultsDGV.CurrentRow==null || resultsDGV.CurrentRow.Index < 0 || FileSelected == null)
  641. return;
  642. FileSelected(
  643. this,
  644. (String)resultsDGV.CurrentRow.Cells["mediaIcon"].Value
  645. );
  646. }
  647. #endregion
  648.  
  649. #region print and save methods
  650. protected internal void printBtn_Click(object sender, EventArgs e)
  651. {
  652. DgvFactory.print(resultsDGV, "Résultats de la recherche dans "+startPathICB.Text, this.ParentForm);
  653. }
  654.  
  655. protected internal void saveBtn_Click(object sender, EventArgs e)
  656. {
  657. DgvFactory.save(resultsDGV, "Résultats de la recherche dans " + startPathICB.Text, this.ParentForm);
  658. }
  659. #endregion
  660.  
  661. #region public methods
  662. public int getResultsCount()
  663. {
  664. return resultsDGV.RowCount;
  665. }
  666. #endregion
  667.  
  668.  
  669. /*private void startPathCB_DrawItem(object sender, DrawItemEventArgs e)
  670.   {
  671.   //SolidBrush solidBrush = new SolidBrush(startPathCB.ForeColor);
  672.   //e.Graphics.DrawImage(dirExpandedImg, e.Bounds.X, e.Bounds.Y);
  673.  
  674.   //StringFormat stringFormat = new StringFormat();
  675.   //stringFormat.Alignment = StringAlignment.Near;
  676.   //stringFormat.LineAlignment = StringAlignment.Center;
  677.  
  678.   Rectangle oRect = new Rectangle(
  679.   e.Bounds.X + dirExpandedImg.Width,
  680.   e.Bounds.Y,
  681.   e.Bounds.Width - dirExpandedImg.Width,
  682.   e.Bounds.Height);
  683.   e.Graphics.DrawString(startPathCB.Items[e.Index].ToString(), startPathCB.Font, solidBrush, oRect, stringFormat);
  684.   //solidBrush.Dispose();
  685.   }*/
  686. }
  687. }

Structure et Fichiers du projet

Afficher/masquer...


Répertoires contenus dans /var/www/bin/sniplets/bibliobrol/brolexplorer/view/controls/ 
IcôneNomTailleModification
Pas de sous-répertoires.
IcôneNomTailleModification
| _ Répertoire parent0 octets1719731549 30/06/2024 09:12:29
Fichiers contenus dans /var/www/bin/sniplets/bibliobrol/brolexplorer/view/controls/ 
IcôneNomTailleModificationAction
IcôneNomTailleModificationAction
Afficher le fichier .resx|.resxThumbUserControl.resx5.68 Ko31/10/2018 18:32:50-refusé-
Afficher le fichier .cs|.csSearchMediaUserControl.Designer.cs52.01 Ko31/10/2018 18:32:50-refusé-
Afficher le fichier .cs|.csImagesBrowserUserControl.cs9.69 Ko31/10/2018 18:32:50-refusé-
Afficher le fichier .cs|.csExplorerUserControl.cs38.67 Ko31/10/2018 18:32:50-refusé-
Afficher le fichier .cs|.csExplorerUserControl.Designer.cs44.73 Ko31/10/2018 18:32:50-refusé-
Afficher le fichier .resx|.resxExplorerUserControl.resx15.83 Ko31/10/2018 18:32:50-refusé-
Afficher le fichier .resx|.resxImagesBrowserUserControl.resx6.06 Ko31/10/2018 18:32:50-refusé-
Afficher le fichier .cs|.csImagesBrowserUserControl.Designer.cs10.53 Ko31/10/2018 18:32:50-refusé-
Afficher le fichier .cs|.csThumbUserControl.Designer.cs3.29 Ko31/10/2018 18:32:50-refusé-
Afficher le fichier .resx|.resxSearchMediaUserControl.resx7.72 Ko31/10/2018 18:32:50-refusé-
Afficher le fichier .cs|.csSearchMediaUserControl.cs25.76 Ko31/10/2018 18:32:50-refusé-
Afficher le fichier .cs|.csThumbUserControl.cs4.7 Ko31/10/2018 18:32:50-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 30/10/2009, dernière modification le 26/10/2018
Source du document imprimé : https://www.gaudry.be/cs-brolexplorer-source-rf-view/controls/SearchMediaUserControl.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.