Advertisement
GlobalAccessSoftware

Custom Data-Types for Search & Replace.

Oct 3rd, 2019
540
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 2.67 KB | None | 0 0
  1.  
  2. #region Top Part
  3. //\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\
  4. // MCL.SearchTypes from SmesaSearch1.cs
  5. //\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\
  6. // v5.3.4.28 22-July SmesaSearch.cs rockin'
  7. // v5.3.4.29 25-Jul-2019 Spelling things out
  8. // Class{in-Class{in-Class}}; Custom Types:
  9. //\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\
  10. // Design Revision 6, Tightened Data Model!
  11. // v5.4.5.32 05-Aug-2019 WorkList3 & Marker.
  12. // v5.4.5.35 27-Aug Settling Down some now.
  13. // v5.4.6.37 14-Sep-2019 Generic ILists
  14. // instead of ObjectModel.Collections. ;-)
  15. // v5.4.7.39 25-Sep-2019 Search Settling in!
  16. // v5.4.7.40 01-Oct-2019 Heavy Hacking S&R.
  17. //\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\
  18.  
  19. using System;
  20. using System.Collections.ObjectModel;
  21.  
  22. #endregion Pop Tart
  23.  
  24.  
  25. namespace MyCustomLibrary
  26. {
  27. #region Custom Data Types desRev6
  28.  
  29.     // 4 sub-Classes here: P3D, WorkList2,
  30.     // Files, Lines. + Hits is inside Lines.
  31.     //\\//\\//\\//\\//\\//\\//\\//\\//\\//\\
  32.     // File Number in the WorkList.File[i]
  33.     // Line Number in current  FileName[F]
  34.     // WhereFound, The Position in Line[L]
  35.     //\\//\\//\\//\\//\\//\\//\\//\\//\\//\\
  36.  
  37.     [Serializable]
  38.     public class P3D // aka Tracker
  39.     {
  40.       // File / Tab Number in FileNames[x];
  41.       public int File  { get; set; }
  42.  
  43.       // Line Number (in File)
  44.       public int Line  { get; set; }
  45.  
  46.       // Start Position (in Line)
  47.       public int Star { get; set; }
  48.     }
  49.     //^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v
  50.  
  51.  
  52.     // WorkList (4/4) Custom Composite Type
  53.     [Serializable]
  54.     public class WorkList2
  55.     {
  56.       public Collection<Files>
  57.         File { get; private set; }
  58.  
  59.       // Class Constructor
  60.       public WorkList2(Collection<Files>
  61.         file) { File = file; }
  62.      
  63.       public bool CaseCheck  { get; set; }
  64.       public bool WordCheck  { get; set; }
  65.  
  66.       public string FindThis { get; set; }
  67.       public string Change2  { get; set; }
  68.     } //^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v
  69.  
  70.     [Serializable] //  (3/4)
  71.     public class Files // w/ Matches
  72.     {
  73.      public Collection<Lines> Line
  74.      { get; private set; }
  75.  
  76.       // Class Constructor
  77.       public Files(Collection<Lines> line)
  78.       { Line = line; }
  79.      
  80.       public string Name { get; set; }
  81.     }//^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v
  82.  
  83.     [Serializable]
  84.     public class Lines // This File: (2/4)
  85.     {
  86.       public Collection<int> Star
  87.       { get; private set; }
  88.  
  89.       public Lines(Collection<int> hit)
  90.       { Star = hit; }// x(s) per Line (1/4)
  91.  
  92.       public int LineNumber { get; set; }
  93.     } // y-coordinate ^
  94. #endregion Custom Data Types desRev6
  95.     //^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v
  96.  
  97.  
  98. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement