Process Modules Project

Process Modules Project source code and complete project in "Process Modules and ProcessName Collecter" e-learning section.
Coded by: Wesam Naffaa

Puzzle Game project

Full Puzzle Game source code and complete project in "Puzzle Game project" e-learning section.
NOTE: You must read "Puzzle Game - Resources" to understand how to apply the sources & codes to your side.
Coded by: Wesam Naffaa

Accounting Manager project

Full Accounting manager source code and complete project in "Universal Accounting Manager project" e-learning section.
NOTE: You must read "Universal Accounting Manager - Resources" to understand how to apply the sources & codes to your side.
Coded by: Wesam Naffaa

File encryption project

Full File encryption center source code and complete project in "File encryption center project" e-learning section.
NOTE: You must read "File encryption center - Resources" to understand how to apply the sources & codes to your side.
Coded by: Wesam Naffaa

Universal Accounting Manager - ListProducts.vb

ListProducts.vb
  1. Public Class ListProducts
  2.     Dim ProgramName As String = My.Application.Info.AssemblyName
  3.     Dim DataPath As String = System.Environment.CurrentDirectory & "\UAM"
  4.     Dim ProductPath As String = DataPath & "\Products" '
  5.     Dim ServicesPath As String = DataPath & "\Services"
  6.     Dim CatPath As String = DataPath & "\Categories"
  7.     Dim StoresPath As String = DataPath & "\Stores"
  8.     Dim RequestsPath As String = DataPath & "\Requests"
  9.     Private Shared ListProductsInstance As ListProducts
  10.     Public Shared Function GetInstance() As ListProducts
  11.         If (ListProductsInstance Is Nothing) Then
  12.             ListProductsInstance = New ListProducts
  13.         End If
  14.         Return ListProductsInstance
  15.     End Function
  16.     Private Sub ListProducts_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
  17.         LV.Columns.Add("إسم المنتج \ السلعة")
  18.         LV.Columns.Add("تصنيف المنتج")
  19.         LV.Columns.Add("سعر المبيع")
  20.         LV.Columns.Add("الكمية المتوفرة")
  21.         LV.Columns.Add("الكمية المباعة")
  22.         LV.Columns.Add("الكمية المطلوبة من زبائنك")
  23.         LV.Columns.Add("الواجب شراؤه")
  24.         LoadProductsList()
  25.         Refresher.Enabled = True
  26.     End Sub
  27.     Public Sub LoadProductsList()
  28.         On Error Resume Next
  29.         LV.Items.Clear()
  30.         Dim Addad As Integer = 0
  31.         Dim StoreNum As Integer = My.Computer.FileSystem.GetDirectories(StoresPath).Count - 1
  32.         For Addad = 0 To My.Computer.FileSystem.GetDirectories(ProductPath).Count - 1
  33.             Dim ProductName As String = ""
  34.             ProductName = My.Computer.FileSystem.GetDirectoryInfo(My.Computer.FileSystem.GetDirectories(ProductPath).Item(Addad)).Name
  35.             If ProductName.Contains(SearchTXT.Text) = False Then GoTo SkipThis
  36.             LV.Items.Add(ProductName, 0)
  37.             Dim ProductCat As String = ""
  38.             ProductCat = My.Computer.FileSystem.ReadAllText(ProductPath & "\" & ProductName & "\cat.dat", System.Text.Encoding.GetEncoding(0))
  39.             LV.Items.Item(LV.Items.Count - 1).SubItems.Add(ProductCat)
  40.             Dim ProductPurch As Double = 0
  41.             ProductPurch = Val(My.Computer.FileSystem.ReadAllText(ProductPath & "\" & ProductName & "\purch.dat", System.Text.Encoding.GetEncoding(0)))
  42.             LV.Items.Item(LV.Items.Count - 1).SubItems.Add(ProductPurch)
  43.             Dim ProductMount As Double = 0
  44.             ProductMount = Val(My.Computer.FileSystem.ReadAllText(ProductPath & "\" & ProductName & "\mount.dat", System.Text.Encoding.GetEncoding(0)))
  45.             If Val(My.Computer.FileSystem.ReadAllText(ProductPath & "\" & ProductName & "\stores.dat", System.Text.Encoding.GetEncoding(0))) = 0 Then
  46.                 If My.Computer.FileSystem.FileExists(ProductPath & "\" & ProductName & "\mount0.dat") = True Then
  47.                     ProductMount += Val(My.Computer.FileSystem.ReadAllText(ProductPath & "\" & ProductName & "\mount0.dat", System.Text.Encoding.GetEncoding(0)))
  48.                 End If
  49.             Else
  50.                 Dim SubAddad As Integer = 0
  51.                 For SubAddad = 0 To Val(My.Computer.FileSystem.ReadAllText(ProductPath & "\" & ProductName & "\stores.dat", System.Text.Encoding.GetEncoding(0)))
  52.                     ProductMount += Val(My.Computer.FileSystem.ReadAllText(ProductPath & "\" & ProductName & "\mount" & SubAddad & ".dat", System.Text.Encoding.GetEncoding(0)))
  53.                 Next
  54.             End If
  55.             'ProductMount = Val(My.Computer.FileSystem.ReadAllText(ProductPath & "\" & ProductName & "\mount.dat", System.Text.Encoding.GetEncoding(0)))
  56.             LV.Items.Item(LV.Items.Count - 1).SubItems.Add(ProductMount)
  57.             Dim ProductSold As Double = 0
  58.             ProductSold = Val(My.Computer.FileSystem.ReadAllText(ProductPath & "\" & ProductName & "\sold.dat", System.Text.Encoding.GetEncoding(0)))
  59.             LV.Items.Item(LV.Items.Count - 1).SubItems.Add(ProductSold)
  60.             Dim ProductReq As Double = 0
  61.             If My.Computer.FileSystem.DirectoryExists(RequestsPath & "\" & ProductName) = True Then
  62.                 ProductReq = Val(My.Computer.FileSystem.ReadAllText(RequestsPath & "\" & ProductName & "\amount.dat", System.Text.Encoding.GetEncoding(0)))
  63.             End If
  64.             LV.Items.Item(LV.Items.Count - 1).SubItems.Add(ProductReq)
  65.             Dim ProductMostBuy As Double = 0
  66.             ProductMostBuy = -ProductMount + (ProductReq)
  67.             If ProductMostBuy <= 0 Then ProductMostBuy = 0 Else LV.Items.Item(LV.Items.Count - 1).BackColor = Color.Tan : LV.Items.Item(LV.Items.Count - 1).ForeColor = Color.DarkOliveGreen
  68.             LV.Items.Item(LV.Items.Count - 1).SubItems.Add(ProductMostBuy)
  69.             '-----------------------------------------------------------
  70. SkipThis:
  71.         Next
  72.         LV.AutoResizeColumns(ColumnHeaderAutoResizeStyle.HeaderSize)
  73.     End Sub
  74.     Private Sub LV_MouseDoubleClick(ByVal sender As Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles LV.MouseDoubleClick
  75.         LoadProduct()
  76.     End Sub
  77.     Private Sub ProductShowBTN_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ProductShowBTN.Click
  78.         LoadProduct()
  79.     End Sub
  80.     Public Sub LoadProduct()
  81.         If LV.SelectedItems.Count > 0 Then
  82.             NewProduct.GetInstance.LoadProduct(LV.FocusedItem.Text)
  83.             StartUp.MainPanel.Controls.Clear()
  84.             StartUp.MainPanel.Controls.Add(NewProduct.GetInstance())
  85.             StartUp.AddNewTab(NewProduct.GetInstance.Tag, NewProduct.GetInstance.Name)
  86.         End If
  87.     End Sub
  88.     Private Sub ProductCancleBTN_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ProductCancleBTN.Click
  89.       StartUp.CloseTabs()
  90.     End Sub
  91.     Dim LoadCount As Integer = 0
  92.     Private Sub Refresher_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Refresher.Tick
  93.         'If My.Computer.FileSystem.GetDirectories(ProductPath).Count <> LoadCount Then
  94.         'LoadProductsList()
  95.         'LoadCount = My.Computer.FileSystem.GetDirectories(ProductPath).Count
  96.         'End If
  97.         LoadProductsList()
  98.     End Sub
  99.     Private Sub SearchTXT_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles SearchTXT.TextChanged
  100.         LoadProductsList()
  101.     End Sub
  102. End Class

Valuable E-Book

Hello,
Baby first step is a friendly flashcards offering a growing collection of creative and educational ideas to help the toddler to learn the alphabet, so I put images that would be attractive to babies.

Support independent publishing: Buy this e-book on Lulu.