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 - Charts.vb

Charts.vb
  1. Imports System.Windows.Forms.DataVisualization.Charting
  2. Public Class Charts
  3.     Dim ProgramName As String = My.Application.Info.AssemblyName
  4.     Dim DataPath As String = System.Environment.CurrentDirectory & "\UAM"
  5.     Dim ProductPath As String = DataPath & "\Products" '
  6.     Dim ServicesPath As String = DataPath & "\Services"
  7.     Dim CatPath As String = DataPath & "\Categories"
  8.     Dim StoresPath As String = DataPath & "\Stores"
  9.     Dim CustomersPath As String = DataPath & "\Customers"
  10.     Dim CompanyPath As String = DataPath & "\Company"
  11.     Dim MovmentPath As String = DataPath & "\Movment"
  12.     Dim RequestsPath As String = DataPath & "\Requests"
  13.     Dim VendorsPath As String = DataPath & "\Vendors"
  14.     Dim BoxPath As String = DataPath & "\Box"
  15.     Dim YearSTR As String = Date.Now.Year
  16.     Dim MonthSTR As String = Date.Now.Month
  17.     Dim DaySTR As String = Date.Now.Day
  18.     Private Shared ChartsInstance As Charts
  19.     Public Shared Function GetInstance() As Charts
  20.         If (ChartsInstance Is Nothing) Then
  21.             ChartsInstance = New Charts
  22.         End If
  23.         Return ChartsInstance
  24.     End Function
  25.     Private Sub Charts_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
  26.         LoadCalender()
  27.         Refresher.Enabled = True
  28.     End Sub
  29.     Public Sub LoadCalenderYear()
  30.         YearTXT.Items.Clear()
  31.         Dim Addad As Integer = 0
  32.         For Addad = 0 To My.Computer.FileSystem.GetDirectories(MovmentPath).Count - 1
  33.             YearTXT.Items.Add(My.Computer.FileSystem.GetDirectoryInfo(My.Computer.FileSystem.GetDirectories(MovmentPath).Item(Addad)).Name)
  34.         Next
  35.         YearTXT.Text = YearSTR
  36.     End Sub
  37.     Public Sub LoadCalenderMonth()
  38.         MonthTXT.Items.Clear()
  39.         Dim MonthAdaad As Integer = 0
  40.         For MonthAdaad = 0 To My.Computer.FileSystem.GetDirectories(MovmentPath & "\" & YearTXT.Text).Count - 1
  41.             MonthTXT.Items.Add(My.Computer.FileSystem.GetDirectoryInfo(My.Computer.FileSystem.GetDirectories(MovmentPath & "\" & YearTXT.Text).Item(MonthAdaad)).Name)
  42.         Next
  43.         If MonthSTR.Length <= 1 Then MonthSTR = "0" & MonthSTR
  44.         MonthTXT.SelectedIndex = MonthTXT.Items.Count - 1
  45.     End Sub
  46.     Public Sub LoadCalender()
  47.         LoadCalenderYear()
  48.         LoadCalenderMonth()
  49.     End Sub
  50.     Public Sub LoadCharts()
  51.         On Error Resume Next
  52.         Dim MonthDir As String = MovmentPath & "\" & YearTXT.Text & "\" & MonthTXT.Text '& "\" & DayTXT.Text
  53.         Dim MoneyVAL As Double = 0
  54.         Dim CapVAL As Double = 0
  55.         Dim TaxVAL As Double = 0
  56.         Dim SerVAL As Double = 0
  57.         Dim InterVAL As Double = 0
  58.         Dim Addad As Integer = 0
  59.         MyChart.ChartAreas.Item(0).AxisX.LabelStyle.Interval = 1
  60.         'MyChart.ChartAreas.Item(0).AxisX.Title = "اليوم"
  61.         'MyChart.ChartAreas.Item(0).AxisY.LabelStyle.Interval = 1
  62.         'MyChart.ChartAreas.Item(0).AxisY.Title = "القيمة"
  63.         MyChart.Series.Clear()
  64.         MyChart.ResetAutoValues()
  65.         MyChart.Titles.Clear()
  66.         MyChart.Titles.Add("الرسم البياني لحركة شهر " & MonthTXT.Text)
  67.         Dim MoneySeries As New Series
  68.         Dim CapSeries As New Series
  69.         Dim TaxSeries As New Series
  70.         Dim SerSeries As New Series
  71.         Dim InterSeries As New Series
  72.         MoneySeries.Name = "مجموع أموال الصندوق"
  73.         CapSeries.Name = "رأسمال الصندوق"
  74.         TaxSeries.Name = "قيمة الضرائب"
  75.         SerSeries.Name = "الخدمات"
  76.         InterSeries.Name = "الأرباح"
  77.         For Addad = 0 To My.Computer.FileSystem.GetDirectories(MonthDir).Count - 1
  78.             Dim WDir As String = ""
  79.             Dim DayVAL As String = ""
  80.             WDir = My.Computer.FileSystem.GetDirectories(MonthDir).Item(Addad)
  81.             DayVAL = Val(My.Computer.FileSystem.GetDirectoryInfo(WDir).Name)
  82.             MoneyVAL = Val(My.Computer.FileSystem.ReadAllText(WDir & "\money.dat", System.Text.Encoding.GetEncoding(0)))
  83.             CapVAL = Val(My.Computer.FileSystem.ReadAllText(WDir & "\capital.dat", System.Text.Encoding.GetEncoding(0)))
  84.             TaxVAL = Val(My.Computer.FileSystem.ReadAllText(WDir & "\tax.dat", System.Text.Encoding.GetEncoding(0)))
  85.             SerVAL = Val(My.Computer.FileSystem.ReadAllText(WDir & "\service.dat", System.Text.Encoding.GetEncoding(0)))
  86.             InterVAL = Val(My.Computer.FileSystem.ReadAllText(WDir & "\inter.dat", System.Text.Encoding.GetEncoding(0)))
  87.             MoneySeries.Points.AddXY(DayVAL, MoneyVAL)
  88.             CapSeries.Points.AddXY(DayVAL, CapVAL)
  89.             TaxSeries.Points.AddXY(DayVAL, TaxVAL)
  90.             SerSeries.Points.AddXY(DayVAL, SerVAL)
  91.             InterSeries.Points.AddXY(DayVAL, InterVAL)
  92.             MoneySeries.ToolTip = "بتاريخ #VALX/" & MonthTXT.Text & "/" & YearTXT.Text & " بلغت قيمة المال : #VAL"
  93.             CapSeries.ToolTip = "بتاريخ #VALX/" & MonthTXT.Text & "/" & YearTXT.Text & " بلغت قيمة رأس المال : #VAL"
  94.             TaxSeries.ToolTip = "بتاريخ #VALX/" & MonthTXT.Text & "/" & YearTXT.Text & " بلغت قيمة الضرائب : #VAL"
  95.             SerSeries.ToolTip = "بتاريخ #VALX/" & MonthTXT.Text & "/" & YearTXT.Text & " بلغت قيمة الخدمات : #VAL"
  96.             InterSeries.ToolTip = "بتاريخ #VALX/" & MonthTXT.Text & "/" & YearTXT.Text & " بلغت قيمة الأرباح : #VAL"
  97.         Next
  98.         MyChart.Series.Add(MoneySeries)
  99.         MyChart.Series.Add(CapSeries)
  100.         MyChart.Series.Add(TaxSeries)
  101.         MyChart.Series.Add(SerSeries)
  102.         MyChart.Series.Add(InterSeries)
  103.     End Sub
  104.     Private Sub YearTXT_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles YearTXT.SelectedIndexChanged
  105.         LoadCalenderMonth()
  106.     End Sub
  107.     Private Sub MonthTXT_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MonthTXT.SelectedIndexChanged
  108.         LoadCharts()
  109.         ChartsViewer()
  110.     End Sub
  111.     Private Sub ViewCharts_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ViewCharts.SelectedIndexChanged
  112.         ChartsViewer()
  113.     End Sub
  114.     Public Sub ChartsViewer()
  115.         On Error Resume Next
  116.         ' MyChart.Hide()
  117.         Dim Addad As Integer = 0
  118.         For Addad = 0 To MyChart.Series.Count - 1
  119.             If ViewCharts.SelectedIndex = 0 Then MyChart.Series.Item(Addad).ChartType = SeriesChartType.Area
  120.             If ViewCharts.SelectedIndex = 1 Then MyChart.Series.Item(Addad).ChartType = SeriesChartType.Bar
  121.             If ViewCharts.SelectedIndex = 2 Then MyChart.Series.Item(Addad).ChartType = SeriesChartType.BoxPlot
  122.             If ViewCharts.SelectedIndex = 3 Then MyChart.Series.Item(Addad).ChartType = SeriesChartType.Bubble
  123.             If ViewCharts.SelectedIndex = 4 Then MyChart.Series.Item(Addad).ChartType = SeriesChartType.Candlestick
  124.             If ViewCharts.SelectedIndex = 5 Then MyChart.Series.Item(Addad).ChartType = SeriesChartType.Column
  125.             If ViewCharts.SelectedIndex = 6 Then MyChart.Series.Item(Addad).ChartType = SeriesChartType.Doughnut
  126.             If ViewCharts.SelectedIndex = 7 Then MyChart.Series.Item(Addad).ChartType = SeriesChartType.ErrorBar
  127.             If ViewCharts.SelectedIndex = 8 Then MyChart.Series.Item(Addad).ChartType = SeriesChartType.FastLine
  128.             If ViewCharts.SelectedIndex = 9 Then MyChart.Series.Item(Addad).ChartType = SeriesChartType.FastPoint
  129.             If ViewCharts.SelectedIndex = 10 Then MyChart.Series.Item(Addad).ChartType = SeriesChartType.Funnel
  130.             'If ViewCharts.SelectedIndex = 11 Then MyChart.Series.Item(Addad).ChartType = SeriesChartType.Kagi
  131.             If ViewCharts.SelectedIndex = 11 Then MyChart.Series.Item(Addad).ChartType = SeriesChartType.Line
  132.             If ViewCharts.SelectedIndex = 12 Then MyChart.Series.Item(Addad).ChartType = SeriesChartType.Pie
  133.             If ViewCharts.SelectedIndex = 13 Then MyChart.Series.Item(Addad).ChartType = SeriesChartType.Point
  134.             'If ViewCharts.SelectedIndex = 15 Then MyChart.Series.Item(Addad).ChartType = SeriesChartType.PointAndFigure
  135.             If ViewCharts.SelectedIndex = 14 Then MyChart.Series.Item(Addad).ChartType = SeriesChartType.Polar
  136.             If ViewCharts.SelectedIndex = 15 Then MyChart.Series.Item(Addad).ChartType = SeriesChartType.Pyramid
  137.             If ViewCharts.SelectedIndex = 16 Then MyChart.Series.Item(Addad).ChartType = SeriesChartType.Radar
  138.             If ViewCharts.SelectedIndex = 17 Then MyChart.Series.Item(Addad).ChartType = SeriesChartType.Range
  139.             If ViewCharts.SelectedIndex = 18 Then MyChart.Series.Item(Addad).ChartType = SeriesChartType.RangeBar
  140.             If ViewCharts.SelectedIndex = 19 Then MyChart.Series.Item(Addad).ChartType = SeriesChartType.RangeColumn
  141.             'If ViewCharts.SelectedIndex = 22 Then MyChart.Series.Item(Addad).ChartType = SeriesChartType.Renko
  142.             If ViewCharts.SelectedIndex = 20 Then MyChart.Series.Item(Addad).ChartType = SeriesChartType.Spline
  143.             If ViewCharts.SelectedIndex = 21 Then MyChart.Series.Item(Addad).ChartType = SeriesChartType.SplineArea
  144.             If ViewCharts.SelectedIndex = 22 Then MyChart.Series.Item(Addad).ChartType = SeriesChartType.SplineRange
  145.             If ViewCharts.SelectedIndex = 23 Then MyChart.Series.Item(Addad).ChartType = SeriesChartType.StackedArea
  146.             If ViewCharts.SelectedIndex = 24 Then MyChart.Series.Item(Addad).ChartType = SeriesChartType.StackedArea100
  147.             If ViewCharts.SelectedIndex = 25 Then MyChart.Series.Item(Addad).ChartType = SeriesChartType.StackedBar
  148.             If ViewCharts.SelectedIndex = 26 Then MyChart.Series.Item(Addad).ChartType = SeriesChartType.StackedBar100
  149.             If ViewCharts.SelectedIndex = 27 Then MyChart.Series.Item(Addad).ChartType = SeriesChartType.StackedColumn
  150.             If ViewCharts.SelectedIndex = 28 Then MyChart.Series.Item(Addad).ChartType = SeriesChartType.StackedColumn100
  151.             If ViewCharts.SelectedIndex = 29 Then MyChart.Series.Item(Addad).ChartType = SeriesChartType.StepLine
  152.             If ViewCharts.SelectedIndex = 30 Then MyChart.Series.Item(Addad).ChartType = SeriesChartType.Stock
  153.             If ViewCharts.SelectedIndex = 31 Then MyChart.Series.Item(Addad).ChartType = SeriesChartType.ThreeLineBreak
  154.         Next
  155.         'MyChart.Show()
  156.     End Sub
  157.     Private Sub Refresher_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Refresher.Tick
  158.         If ThreeDCHK.Checked = True Then
  159.             MyChart.ChartAreas.Item(0).Area3DStyle.Enable3D = True
  160.         Else
  161.             MyChart.ChartAreas.Item(0).Area3DStyle.Enable3D = False
  162.         End If
  163.         If ViewCharts.DroppedDown = True Then
  164.             ChartsViewer()
  165.         Else
  166.             Refresher.Interval = 5000
  167.             LoadCharts()
  168.             ChartsViewer()
  169.         End If
  170.     End Sub
  171.     Private Sub CancelBTN_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles CancelBTN.Click
  172.         StartUp.CloseTabs()
  173.     End Sub
  174.     Private Sub ViewCharts_DropDown(ByVal sender As Object, ByVal e As System.EventArgs) Handles ViewCharts.DropDown
  175.         Refresher.Interval = 100
  176.     End Sub
  177.     Private Sub ThreeDCHK_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ThreeDCHK.CheckedChanged
  178.         If ThreeDCHK.Checked = True Then
  179.             MyChart.ChartAreas.Item(0).Area3DStyle.Enable3D = True
  180.         Else
  181.             MyChart.ChartAreas.Item(0).Area3DStyle.Enable3D = False
  182.         End If
  183.     End Sub
  184.     Private Sub MyChart_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles MyChart.Click
  185.         '"بتاريخ #VALX/" & MonthTXT.Text & "/" & YearTXT.Text & " بلغت قيمة المال : #VAL"
  186.         If DateLBL.Text <> "" Then
  187.             StartUp.OpenNewTab(ListSell.GetInstance)
  188.             ListSell.GetInstance.YearTXT.Text = YearTXT.Text
  189.             ListSell.GetInstance.MonthTXT.Text = MonthTXT.Text
  190.             ListSell.GetInstance.DayTXT.Text = DateLBL.Text
  191.         End If
  192.     End Sub
  193.     Private Sub MyChart_GetToolTipText(ByVal sender As Object, ByVal e As System.Windows.Forms.DataVisualization.Charting.ToolTipEventArgs) Handles MyChart.GetToolTipText
  194.         On Error Resume Next
  195.         DateLBL.Text = e.Text.Chars(7) & e.Text.Chars(8)
  196.         TipLBL.Text = e.Text
  197.         If TipLBL.Text.Contains("بتاريخ") = False Then DateLBL.Text = ""
  198.         If DateLBL.Text.Contains("/") = True Then
  199.             DateLBL.Text = DateLBL.Text.Replace("/", "")
  200.             DateLBL.Text = "0" & DateLBL.Text
  201.         End If
  202.     End Sub
  203. 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.