From cb92185f5f76679b2ed4e22918e18c215b62a6d2 Mon Sep 17 00:00:00 2001 From: Daniel Iliev <47360939+nCodesDotEU@users.noreply.github.com> Date: Tue, 18 Jan 2022 18:09:21 +0100 Subject: [PATCH] Add UI child forms documentation --- .vs/CoronaTracker/v17/.suo | Bin 245760 -> 245760 bytes CoronaTracker/SubForms/CountriesSubForm.cs | 42 ++++++++++++++++++- CoronaTracker/SubForms/DashboardSubForm.cs | 10 +++++ CoronaTracker/SubForms/HomeSubForm.cs | 19 +++++++++ CoronaTracker/SubForms/PatientSubForm.cs | 15 +++++++ CoronaTracker/SubForms/SettingsSubForm.cs | 17 ++++++++ CoronaTracker/SubForms/VaccineTypeSubForm.cs | 16 +++++++ 7 files changed, 118 insertions(+), 1 deletion(-) diff --git a/.vs/CoronaTracker/v17/.suo b/.vs/CoronaTracker/v17/.suo index f59a7002994c7514451d3d6e87e93e660128be0f..802c94189961eb70510bd88240f0de1ce1602ec1 100644 GIT binary patch delta 1020 zcmaKqZAep57{~9qZ(f(7tIe5d+vGZzL`}=Rl;GQ(X69y$3MG3Xp%+M^MG%Qs11(#c zJHj9}77wSWwOhSS_1qD_Xi0FDwyNmFH2Yx)y`9IIO=lS1zB`H;s zQg7JIG^MUIiYkYc1D0d47*QFZ>QVhhnj38{80uEe(h6b^gNUuH$z_5h6VLB~FTHL=6_5MqI%Z;DFPI-A)^xclrd{qKI3h74fDKap(}y)roOnz?=N{Lmg4OxjT@|C<|3dd}w0QwD^8D+BGq&JQi-_j}}c#|*p-1E5S{C6^uNPZ-e zAM=!&a;v~(s)8+n-|2LkyBR2Z8QLL8eODv1gGRq#FcGmdRfvlJD553635r1l;K4SO z@x2G<3!n+y2fyGuj{OP^impO_I*XGGP636Ui_IZkH;q#xI1GA08{qzP*!KYkxR>>D ze*ktj;8M*9@t(`4y<4o*hzP!W%148O-PjuX6HHl zEfnnJ5w~wDnHO`({L&WKwE$*%gJi2~?d6izPWFhti!T2WByQBiFX5A{*OZ6zdQA;n z)Bepg@wPcl+|DhENZq0z*U(2v$&8`fR2!*2HwDbq6!x{}u^__zJmqn;f>wO(YY~6Y zdI`?U*?{x}#)Oe_S_G|2&`OHOb~7O!6AkgePv*2E=mWX7e0PyER?eCzbfU-z#wM9w zqY9)t-1OFg#*QE@I6buD2wJb9@H)u!4?8Cf)uXV)g2Fr$t{#bd%8atwB}qFZ=#8pi zs0W`hD(!TWN7yPoK-sjBYPQG)xe@p~^7l0gV#`bmR_XKam^hlfUao`j!ep!t$Tlr5 z=yz3-)CN_&n2j6Zh7qPc6kf?J$r8!E%$^vxuB{(U|Q_^bc>(d?Ozw$|1}_3_fgr>ExP SA@9_%cZvbwwRg(=-tq@6`91ys diff --git a/CoronaTracker/SubForms/CountriesSubForm.cs b/CoronaTracker/SubForms/CountriesSubForm.cs index d6cafcb..0b97016 100644 --- a/CoronaTracker/SubForms/CountriesSubForm.cs +++ b/CoronaTracker/SubForms/CountriesSubForm.cs @@ -15,6 +15,16 @@ namespace CoronaTracker.SubForms { + + /// + /// + /// Countries Sub Form + /// + /// GUI child of UI + /// Shows UI for get actual data from targeting country + /// + /// + public partial class CountriesSubForm : Form { @@ -35,6 +45,9 @@ public CountriesSubForm() LogClass.Log($"Sub sub form successfully initialized"); } + /// + /// Function to load default countries buttons + /// private void LoadCountriesDefault() { foreach(RegionInfo info in CultureInfo.GetCultures(CultureTypes.SpecificCultures).Select(x => new RegionInfo(x.LCID))) @@ -95,6 +108,12 @@ private void textBox1_Enter(object sender, EventArgs e) LogClass.Log($"textBox1 enter event handler end"); } + /// + /// Function to return Button with it defaults + /// + /// + /// Default Button + /// private Button CopyDefault() { Button button = new Button(); @@ -110,6 +129,10 @@ private Button CopyDefault() return button; } + /// + /// Function to refresh list of countries by specific parameters + /// + /// variable for parametres public void LoadList(string regex = "") { LogClass.Log("Loading countries list" + (regex.Equals("") ? "" : " with parameters '" + regex + "'")); @@ -129,11 +152,23 @@ public void LoadList(string regex = "") LogClass.Log("Successfully loaded"); } + /// + /// Function to handle form load event + /// Load list with no parameters + /// + /// variable for sender + /// variable for event arguments private void CountriesSubForm_Load(object sender, EventArgs e) { LoadList(); } + /// + /// Function to handle country click event + /// Load country data in UI + /// + /// variable for sender + /// variable for event arguments private void onClick(object sender, EventArgs e) { if (!ProgramVariables.CovidCache.ContainsKey(((Button)sender).Text)) @@ -156,7 +191,12 @@ private void onClick(object sender, EventArgs e) } } - + /// + /// Function to handle parameters text box text change event + /// Refresh countries list with specific parameters + /// + /// variable for sender + /// variable for event arguments private void textBox1_TextChanged(object sender, EventArgs e) { if (!textBox1.Text.Equals("")) diff --git a/CoronaTracker/SubForms/DashboardSubForm.cs b/CoronaTracker/SubForms/DashboardSubForm.cs index 3a732d3..683a4a1 100644 --- a/CoronaTracker/SubForms/DashboardSubForm.cs +++ b/CoronaTracker/SubForms/DashboardSubForm.cs @@ -15,6 +15,16 @@ namespace CoronaTracker.SubForms { + + /// + /// + /// Dashboard Sub Form + /// + /// GUI child of UI + /// Shows UI with application important data + /// + /// + public partial class DashboardSubForm : Form { diff --git a/CoronaTracker/SubForms/HomeSubForm.cs b/CoronaTracker/SubForms/HomeSubForm.cs index ebebce9..700ae1f 100644 --- a/CoronaTracker/SubForms/HomeSubForm.cs +++ b/CoronaTracker/SubForms/HomeSubForm.cs @@ -9,6 +9,16 @@ namespace CoronaTracker.SubForms { + + /// + /// + /// Home Sub Form + /// + /// GUI child of UI + /// Shows UI for basic application data + /// + /// + public partial class HomeSubForm : Form { @@ -31,6 +41,9 @@ public HomeSubForm() public delegate void timerDelDelegate(); public timerDelDelegate timerDel; + /// + /// Delegate function to load current time into UI + /// void timerDelMethod() { label13.Text = $"{DateTime.Now.ToString("dd/MM/yyyy")}\n{DateTime.Now.ToString("HH:mm:ss")}";} /// @@ -135,6 +148,12 @@ private void label11_Click(object sender, EventArgs e) System.Diagnostics.Process.Start("https://www.mockaroo.com"); } + /// + /// Function to handle form closing event + /// Stop time timer + /// + /// variable for sender + /// variable for event arguments private void HomeSubForm_FormClosing(object sender, FormClosingEventArgs e) { timer.ChangeStatus(false); diff --git a/CoronaTracker/SubForms/PatientSubForm.cs b/CoronaTracker/SubForms/PatientSubForm.cs index b8db57d..d247e48 100644 --- a/CoronaTracker/SubForms/PatientSubForm.cs +++ b/CoronaTracker/SubForms/PatientSubForm.cs @@ -13,6 +13,15 @@ namespace CoronaTracker.SubForms { + /// + /// + /// Patient Sub Form + /// + /// GUI child of UI + /// Shows UI for manipulate with patient's data + /// + /// + public partial class PatientSubForm : Form { @@ -101,6 +110,12 @@ private void button1_Click(object sender, EventArgs e) LogClass.Log($"button1 click event handler end"); } + /// + /// Function to handle form load event + /// Open default child form - List Sub Sub Form + /// + /// variable for sender + /// variable for event arguments private void PatientSubForm_Load(object sender, EventArgs e) { OpenChildForm(new ListSubSubForm(), button1); diff --git a/CoronaTracker/SubForms/SettingsSubForm.cs b/CoronaTracker/SubForms/SettingsSubForm.cs index 3e17b9a..135ad5f 100644 --- a/CoronaTracker/SubForms/SettingsSubForm.cs +++ b/CoronaTracker/SubForms/SettingsSubForm.cs @@ -14,6 +14,16 @@ namespace CoronaTracker.SubForms { + + /// + /// + /// Settings Sub Form + /// + /// GUI child of UI + /// Shows UI for user's settings or to edit other user's poses + /// + /// + public partial class SettingsSubForm : Form { @@ -197,6 +207,13 @@ private void button5_Click(object sender, EventArgs e) LogClass.Log($"button5 click event handler end"); } + /// + /// Function to handle form load event + /// Shows logged in user's data + /// Enable / Disable editing others users poses by logged in + /// + /// variable for sender + /// variable for event arguments private void SettingsSubForm_Load(object sender, EventArgs e) { EmployeeInstance employee = DatabaseMethods.GetEmployeeByID(ProgramVariables.ID); diff --git a/CoronaTracker/SubForms/VaccineTypeSubForm.cs b/CoronaTracker/SubForms/VaccineTypeSubForm.cs index cd0859d..b297fdc 100644 --- a/CoronaTracker/SubForms/VaccineTypeSubForm.cs +++ b/CoronaTracker/SubForms/VaccineTypeSubForm.cs @@ -13,6 +13,16 @@ namespace CoronaTracker.SubForms { + + /// + /// + /// Vaccine Type Sub Form + /// + /// GUI child of UI + /// Shows UI for manipulate with vaccine types + /// + /// + public partial class VaccineTypeSubForm : Form { @@ -244,6 +254,12 @@ private void textBox1_TextChanged(object sender, EventArgs e) LogClass.Log($"textBox1 text changed event handler start"); } + /// + /// Function to handle form load event + /// Load vaccines buttons + /// + /// variable for sender + /// variable for event arguments private void VaccineTypeSubForm_Load(object sender, EventArgs e) { vaccineTypes = DatabaseMethods.GetVaccineTypes();