Contains three main files: Form1.cs, class1.cs, and class2.cs
Methods:
Checks if the file exists for a filepath and loads the content
from the file to the arralist
Switches between different panels: homePanel, insertPanel reportpPanel
in response to atheir respective button click
Receives input from the form, validates input and creates an object of
visitor.
Responds to the button click for creating and inserting new visitor to
csv file and a list.
Fills the datagrid view from the provided visitor
creates an obnject of visitors entry and inserts it to the csv file and
an a list
Checks whether the visitorid is empty or doesnot exist when creating
visitors entry;
Responds to button click for uploading file from csv
responds to button click and add new entry to visitors entry list and
csv
Refreshes the entry table after updating its data such as adding exit
time
updates the changes in csv file after data such as adding exit time is
added
trigers an event to update the exit time of the visitor
clear the input field value after creating its object
breaks visitors list array to two array on each iteration of recurssion
until each list contains only one visitors object.
compares the visitors id value and sorts by inserting the value with
lowest value in the list first
Generates a random id for the visitor and inserts visitors to the list
Retrives value from the csv file if it exists in a given filepath
Uses binary search algorithm to retrive visitort from the list
using visitorid
inserts a title for the datagrid view from the csv file
performs serialization to write object into csv file
breaks list into two list using recurssion until each list
contains only one value
conpares conent in first and second list through visitors entry
time and merges them in an accending order
loads csv if the file exists on the given filepath
uses binary search algorithm to retrive the visitors entry based
on the visitors entry time
initialize the arraylist from the file if it exits in the given
filepath
ues serialization to write objects to the csv file
Visitor:
VisitorEntry: