0% found this document useful (0 votes)
33 views13 pages

Dash

This document contains code for a dashboard form in C# with methods for handling clicks on different dashboard sections to show/hide controls and update styling. On load, it initializes component sizes and positions based on original values.

Uploaded by

Sonam Pandey
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
33 views13 pages

Dash

This document contains code for a dashboard form in C# with methods for handling clicks on different dashboard sections to show/hide controls and update styling. On load, it initializes component sizes and positions based on original values.

Uploaded by

Sonam Pandey
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
You are on page 1/ 13

using System;

using System.Collections.Generic;
using System.ComponentModel;
using System.ComponentModel.DataAnnotations;
using System.Configuration;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Runtime.InteropServices;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
using System.Xml;
using VistaRoboticsCS2.DAL;
using VistaRoboticsCS2.Model;
using VistaRoboticsCS2.UserControls;

namespace VistaRoboticsCS2.Forms
{
public partial class Dashboard : Form
{
public string LoggedInUsername { get; set; }
public int LoggedInUserOrgId { get; set; }
public int LoggedInUserId { get; set; }

public string OrgName { get; set; }

private float fontScale = 1f;


private Rectangle originalFormRect = new Rectangle(0, 0, 1924, 1050);

private Rectangle originalpanel1 = new Rectangle(0, 0, 1924, 75);

private Rectangle originalpictureBox6 = new Rectangle(8, 8, 191,


60);//pictureBox6
private Rectangle originalpanel4 = new Rectangle(1690, 5, 212, 52);//panel4
private Rectangle originalpictureBox7 = new Rectangle(166, 8, 34, 35);
//pictureBox7
private Rectangle originallblCurrentName = new Rectangle(18, 12, 130,
28); //originallblCurrentName

private Rectangle originalpanelleft = new Rectangle(10, 83, 87, 960);

private Rectangle originalpanelDashboard = new Rectangle(4, 15, 79, 77);


private Rectangle originalPcDashboard = new Rectangle(16, 12, 46, 33);
private Rectangle originallblDashboard = new Rectangle(1, 47, 76, 19);

private Rectangle originalpanelPatient = new Rectangle(4, 99, 79, 77);


private Rectangle originalPcPatient = new Rectangle(16, 12, 46, 33);
private Rectangle originallblPatient = new Rectangle(10, 47, 52, 19);

private Rectangle originalpanelSetting = new Rectangle(4, 183, 79, 68);


private Rectangle originalpcSetting = new Rectangle(16, 12, 46, 28);
private Rectangle originallblSetting = new Rectangle(10, 43, 58, 19);

private Rectangle originalpanel_logout = new Rectangle(4, 830, 79, 68);


private Rectangle originallpictureBox1 = new Rectangle(16, 12, 46, 28);
private Rectangle originallbl_LogOut = new Rectangle(10, 43, 60, 19);
private Rectangle originalpanel2 = new Rectangle(100, 83, 1820,
960);//1797, 870

private float originalpanel1FontSize = 12;

private float originalpictureBox6FontSize = 12;


private float originalpanel4FontSize = 12;
private float originalpictureBox7FontSize = 12;
private float originallblCurrentNameFontSize = 12;

private float originalpanelLeftFontSize = 12;

private float originalpanelDashboardFontSize = 12;


private float originalpcDashboardFontSize = 12;
private float originallblDashboardFontSize = 7;

private float originalpanelPatientFontSize = 12;


private float originalpcPatientFontSize = 12;
private float originallblPatientFontSize = 8;

private float originalpanelSettingFontSize = 11;


private float originalpcSettingFontSize = 12;
private float originallblSettingFontSize = 7;

private float originalpanel_logoutFontSize = 11;


private float originalpictureBox1FontSize = 12;
private float originallbl_LogOutFontSize = 7;

private float originalpanel2FontSize = 12;

[DllImport("Gdi32.dll", EntryPoint = "CreateRoundRectRgn")]


private static extern IntPtr CreateRoundRectRgn
(
int nLeftRect, // x-coordinate of upper-left corner
int nTopRect, // y-coordinate of upper-left corner
int nRightRect, // x-coordinate of lower-right corner
int nBottomRect, // y-coordinate of lower-right corner
int nWidthEllipse, // width of ellipse
int nHeightEllipse // height of ellipse
);
public Dashboard()
{
InitializeComponent();
}
// Expose a method to control the visibility of MyUserControl
public void SetMyUserControlVisibility(bool isVisible)
{
patientListsControl1.Visible = isVisible;
}
private void ResizeChildrenControls()
{
resizeControl(panel1, originalpanel1, originalpanel1FontSize);
resizeControl(pictureBox6, originalpictureBox6,
originalpictureBox6FontSize);
resizeControl(panel4, originalpanel4, originalpanel4FontSize);
resizeControl(pictureBox7, originalpictureBox7,
originalpictureBox7FontSize);
resizeControl(lbl_current_patient, originallblCurrentName,
originallblCurrentNameFontSize);

resizeControl(panelIcon, originalpanelleft, originalpanelLeftFontSize);

resizeControl(panel7, originalpanelDashboard,
originalpanelDashboardFontSize);
resizeControl(pictureBox4, originalPcDashboard,
originalpcDashboardFontSize);
resizeControl(lbl_dashboard, originallblDashboard,
originallblDashboardFontSize);

resizeControl(panel9, originalpanelPatient,
originalpanelPatientFontSize);
resizeControl(pictureBox2, originalPcPatient,
originalpcPatientFontSize);
resizeControl(lbl_patient_list, originallblPatient,
originallblPatientFontSize);

resizeControl(panel8, originalpanelSetting,
originalpanelSettingFontSize);
resizeControl(pictureBox3, originalpcSetting,
originalpcSettingFontSize);
resizeControl(lbl_settings, originallblSetting,
originallblSettingFontSize);

resizeControl(panel_logout, originalpanel_logout,
originalpanel_logoutFontSize);
resizeControl(lbl_LogOut, originallpictureBox1,
originallbl_LogOutFontSize);
resizeControl(pictureBox1, originallbl_LogOut,
originalpictureBox1FontSize);

resizeControl(panel2, originalpanel2, originalpanel2FontSize);


}
private void resizeControl(Control c, Rectangle r, float originalFontSize)
{
if (this.WindowState == FormWindowState.Minimized)
{
}
else
{
float xRatio = (float)this.ClientRectangle.Width /
(float)originalFormRect.Width;
float yRatio = (float)this.ClientRectangle.Height /
(float)originalFormRect.Height;
float newX = r.Location.X * xRatio;
float newY = r.Location.Y * yRatio;
c.Location = new Point((int)newX, (int)newY);
c.Width = (int)(r.Width * xRatio);
c.Height = (int)(r.Height * yRatio);
float ratio = xRatio;
if (xRatio >= yRatio)
{
ratio = yRatio;
}
float newFontSize = originalFontSize * ratio * fontScale;
Font newFont = new Font(c.Font.FontFamily, newFontSize);
c.Font = newFont;
}
}

private void panel7_Click(object sender, EventArgs e)


{
patientDetailsControl1.Visible = false;
settingsControl1.Visible = false;
patientListsControl1.Visible = false;
dashboardControl1.RefreshPatientList();
dashboardControl1.Visible = true;
BtnClickColorChange(panel7, null);
lbl_patient_list.ForeColor = Color.Black;
this.pictureBox2.Image = ((System.Drawing.Image)
(Properties.Resources.patient));
lbl_dashboard.ForeColor = Color.White;
this.pictureBox4.Image = ((System.Drawing.Image)
(Properties.Resources.white_dashboard));
lbl_settings.ForeColor = Color.Black;
this.pictureBox3.Image = ((System.Drawing.Image)
(Properties.Resources.setting));

//history log table


HistoryLogModel historyLogModel = new HistoryLogModel();

historyLogModel.Id = this.LoggedInUserId;
historyLogModel.Action = "Dashboard icon Clicked";
historyLogModel.Description = "Dashboard icon Clicked to display
DashboardControl";
new AuthDal().HistoryLog(historyLogModel);

private void lbl_dashboard_Click(object sender, EventArgs e)


{
patientDetailsControl1.Visible = false;
patientListsControl1.Visible = false;
settingsControl1.Visible = false;
dashboardControl1.RefreshPatientList();
dashboardControl1.Visible = true;
BtnClickColorChange(panel7, null);
lbl_patient_list.ForeColor = Color.Black;
this.pictureBox2.Image = ((System.Drawing.Image)
(Properties.Resources.patient));
lbl_dashboard.ForeColor = Color.White;
this.pictureBox4.Image = ((System.Drawing.Image)
(Properties.Resources.white_dashboard));
lbl_settings.ForeColor = Color.Black;
this.pictureBox3.Image = ((System.Drawing.Image)
(Properties.Resources.setting));
////history log table
//HistoryLogModel historyLogModel = new HistoryLogModel();

//historyLogModel.Id = this.LoggedInUserId;
//historyLogModel.Action = "View Dashboard";
//historyLogModel.Description = LoggedInUsername +"View Dashboard";
//new AuthDal().HistoryLog(historyLogModel);
}
private void pictureBox4_Click(object sender, EventArgs e)
{
patientDetailsControl1.Visible = false;
patientListsControl1.Visible = false;
settingsControl1.Visible = false;
dashboardControl1.RefreshPatientList();
dashboardControl1.Visible = true;
BtnClickColorChange(panel7, null);
lbl_patient_list.ForeColor = Color.Black;
this.pictureBox2.Image = ((System.Drawing.Image)
(Properties.Resources.patient));
lbl_dashboard.ForeColor = Color.White;
this.pictureBox4.Image = ((System.Drawing.Image)
(Properties.Resources.white_dashboard));
lbl_settings.ForeColor = Color.Black;
this.pictureBox3.Image = ((System.Drawing.Image)
(Properties.Resources.setting));

dashboardControl1.Refresh();

////history log table


//HistoryLogModel historyLogModel = new HistoryLogModel();

//historyLogModel.Id = this.LoggedInUserId;
//historyLogModel.Action = "Dashboard icon Clicked";
//historyLogModel.Description = "Dashboard icon Clicked to display
DashboardControl";
//new AuthDal().HistoryLog(historyLogModel);
}

private void panel9_Click(object sender, EventArgs e)


{
patientDetailsControl1.Visible = false;
settingsControl1.Visible = false;
patientListsControl1.Visible = true;
dashboardControl1.Visible = false;
patientListsControl1.LoggedInUsername = this.LoggedInUsername;
patientListsControl1.LoggedInUserId = this.LoggedInUserId;
patientListsControl1.LoggedInUserOrgId = this.LoggedInUserOrgId;
BtnClickColorChange(panel9, null);
lbl_patient_list.ForeColor = Color.White;
this.pictureBox2.Image = ((System.Drawing.Image)
(Properties.Resources.white_patient));
lbl_dashboard.ForeColor = Color.Black;
this.pictureBox4.Image = ((System.Drawing.Image)
(Properties.Resources.dashboard));
lbl_settings.ForeColor = Color.Black;
this.pictureBox3.Image = ((System.Drawing.Image)
(Properties.Resources.setting));

dashboardControl1.RemoveControls();
//history log table
//HistoryLogModel historyLogModel = new HistoryLogModel();

//historyLogModel.Id = this.LoggedInUserId;
//historyLogModel.Action = "PatientList icon Clicked";
//historyLogModel.Description = "PatientList icon Clicked to display
PatientListControl";
//new AuthDal().HistoryLog(historyLogModel);
}

private void pictureBox2_Click(object sender, EventArgs e)


{
patientDetailsControl1.Visible = false;
settingsControl1.Visible = false;
patientListsControl1.Visible = true;
dashboardControl1.Visible = false;
patientListsControl1.LoggedInUsername = this.LoggedInUsername;
patientListsControl1.LoggedInUserId = this.LoggedInUserId;
patientListsControl1.LoggedInUserOrgId = this.LoggedInUserOrgId;
patientListsControl1.LoggedInOrgName = this.OrgName;
BtnClickColorChange(panel9, null);
lbl_patient_list.ForeColor = Color.White;
this.pictureBox2.Image = ((System.Drawing.Image)
(Properties.Resources.white_patient));
lbl_dashboard.ForeColor = Color.Black;
this.pictureBox4.Image = ((System.Drawing.Image)
(Properties.Resources.dashboard));
lbl_settings.ForeColor = Color.Black;
this.pictureBox3.Image = ((System.Drawing.Image)
(Properties.Resources.setting));

dashboardControl1.RemoveControls();
////history log table
//HistoryLogModel historyLogModel = new HistoryLogModel();

//historyLogModel.Id = this.LoggedInUserId;
//historyLogModel.Action = "PatientList icon Clicked";
//historyLogModel.Description = "PatientList icon Clicked to display
PatientListControl";
//new AuthDal().HistoryLog(historyLogModel);

private void lbl_patient_list_Click(object sender, EventArgs e)


{
patientDetailsControl1.Visible = false;
settingsControl1.Visible = false;
patientListsControl1.Visible = true;
dashboardControl1.Visible = false;
dashboardControl1.LoggedInUsername = this.LoggedInUsername;
dashboardControl1.LoggedInUserId = this.LoggedInUserId;
dashboardControl1.LoggedInUserOrgId = this.LoggedInUserOrgId;

BtnClickColorChange(panel9, null);
lbl_patient_list.ForeColor = Color.White;
lbl_patient_list.ForeColor = Color.White;
this.pictureBox2.Image = ((System.Drawing.Image)
(Properties.Resources.white_patient));
lbl_dashboard.ForeColor = Color.Black;
this.pictureBox4.Image = ((System.Drawing.Image)
(Properties.Resources.dashboard));
lbl_settings.ForeColor = Color.Black;
this.pictureBox3.Image = ((System.Drawing.Image)
(Properties.Resources.setting));

dashboardControl1.RemoveControls();
////history log table
//HistoryLogModel historyLogModel = new HistoryLogModel();

//historyLogModel.Id = this.LoggedInUserId;
//historyLogModel.Action = "PatientList icon Clicked";
//historyLogModel.Description = "PatientList icon Clicked to display
PatientListControl";
//new AuthDal().HistoryLog(historyLogModel);
}

private void panel_logout_Click(object sender, EventArgs e)


{
Login login = new Login();
this.Hide();
login.Show();
}

private void pictureBox1_Click(object sender, EventArgs e)


{
Login login = new Login();
this.Hide();
login.Show();
}

private void lbl_LogOut_Click(object sender, EventArgs e)


{
Login login = new Login();
this.Hide();
login.Show();
}

private void Dashboard_Load(object sender, EventArgs e)


{
this.panel2.Region =
System.Drawing.Region.FromHrgn(CreateRoundRectRgn(0, 0, this.panel2.Width,
this.panel2.Height, 20, 20));
this.panel9.Region =
System.Drawing.Region.FromHrgn(CreateRoundRectRgn(0, 0, this.panel9.Width,
this.panel9.Height, 20, 20));
this.panel7.Region =
System.Drawing.Region.FromHrgn(CreateRoundRectRgn(0, 0, this.panel7.Width,
this.panel7.Height, 20, 20));
this.panel8.Region =
System.Drawing.Region.FromHrgn(CreateRoundRectRgn(0, 0, this.panel8.Width,
this.panel8.Height, 20, 20));
this.panel_logout.Region =
System.Drawing.Region.FromHrgn(CreateRoundRectRgn(0, 0, this.panel_logout.Width,
this.panel_logout.Height, 20, 20));
this.panelIcon.Region =
System.Drawing.Region.FromHrgn(CreateRoundRectRgn(0, 0, this.panelIcon.Width,
this.panelIcon.Height, 20, 20));

lbl_current_patient.Text = this.LoggedInUsername;
//Dashboard mform = new Dashboard();
dashboardControl1.LoggedInUsername = this.LoggedInUsername;
dashboardControl1.LoggedInUserId = this.LoggedInUserId;
dashboardControl1.LoggedInUserOrgId = this.LoggedInUserOrgId;
}
private void pictureBox2_MouseEnter(object sender, EventArgs e)
{
this.Cursor = Cursors.Hand;
//panel9.BackColor = Color.FromArgb(0, 87, 184);
//lbl_patient_list.ForeColor = Color.White;
//this.pictureBox2.Image = ((System.Drawing.Image)
(Properties.Resources.white_patient));
}

private void pictureBox2_MouseLeave(object sender, EventArgs e)


{
this.Cursor = Cursors.Default;
// panel9.BackColor = Color.FromArgb(242, 242, 242);
//lbl_patient_list.ForeColor = Color.Black;
//this.pictureBox2.Image = ((System.Drawing.Image)
(Properties.Resources.patient));
}

private void lbl_patient_list_MouseEnter(object sender, EventArgs e)


{
this.Cursor = Cursors.Hand;
//panel9.BackColor = Color.FromArgb(0, 87, 184);
//lbl_patient_list.ForeColor = Color.White;
//this.pictureBox2.Image = ((System.Drawing.Image)
(Properties.Resources.white_patient));

private void lbl_patient_list_MouseLeave(object sender, EventArgs e)


{
this.Cursor = Cursors.Default;
//panel9.BackColor = Color.FromArgb(242, 242, 242);
//lbl_patient_list.ForeColor = Color.Black;
//this.pictureBox2.Image = ((System.Drawing.Image)
(Properties.Resources.patient));
}
private void panel9_MouseEnter(object sender, EventArgs e)
{
this.Cursor = Cursors.Hand;
// panel9.BackColor = Color.FromArgb(0, 87, 184);
//lbl_patient_list.ForeColor = Color.White;
//this.pictureBox2.Image = ((System.Drawing.Image)
(Properties.Resources.white_patient));

private void panel9_MouseLeave(object sender, EventArgs e)


{
this.Cursor = Cursors.Default;
// panel9.BackColor = Color.FromArgb(242, 242, 242);
//lbl_patient_list.ForeColor = Color.Black;
//this.pictureBox2.Image = ((System.Drawing.Image)
(Properties.Resources.patient));
}
private void pictureBox4_MouseEnter(object sender, EventArgs e)
{
this.Cursor = Cursors.Hand;
//panel7.BackColor = Color.FromArgb(0, 87, 184);
//lbl_dashboard.ForeColor = Color.White;
//this.pictureBox4.Image = ((System.Drawing.Image)
(Properties.Resources.white_dashboard));
}

private void pictureBox4_MouseLeave(object sender, EventArgs e)


{
this.Cursor = Cursors.Default;
//panel7.BackColor = Color.FromArgb(242, 242, 242);
//lbl_dashboard.ForeColor = Color.Black;
//this.pictureBox4.Image = ((System.Drawing.Image)
(Properties.Resources.dashboard));
}

private void lbl_dashboard_MouseEnter(object sender, EventArgs e)


{
this.Cursor = Cursors.Hand;
//panel7.BackColor = Color.FromArgb(0, 87, 184);
//lbl_dashboard.ForeColor = Color.White;
//this.pictureBox4.Image = ((System.Drawing.Image)
(Properties.Resources.white_dashboard));
}

private void lbl_dashboard_MouseLeave(object sender, EventArgs e)


{
this.Cursor = Cursors.Default;
//panel7.BackColor = Color.FromArgb(242, 242, 242);
//lbl_dashboard.ForeColor = Color.Black;
//this.pictureBox4.Image = ((System.Drawing.Image)
(Properties.Resources.dashboard));

private void panel7_MouseEnter(object sender, EventArgs e)


{
this.Cursor = Cursors.Hand;
//panel7.BackColor = Color.FromArgb(0, 87, 184);
//lbl_dashboard.ForeColor = Color.White;
//this.pictureBox4.Image = ((System.Drawing.Image)
(Properties.Resources.white_dashboard));
}

private void panel7_MouseLeave(object sender, EventArgs e)


{
this.Cursor = Cursors.Default;
//panel7.BackColor = Color.FromArgb(242, 242, 242);
//lbl_dashboard.ForeColor = Color.Black;
//this.pictureBox4.Image = ((System.Drawing.Image)
(Properties.Resources.dashboard));

private void panel8_MouseEnter(object sender, EventArgs e)


{
this.Cursor = Cursors.Hand;
//panel8.BackColor = Color.FromArgb(0, 87, 184);
//lbl_settings.ForeColor = Color.White;
//this.pictureBox3.Image = ((System.Drawing.Image)
(Properties.Resources.white_setting));

private void panel8_MouseLeave(object sender, EventArgs e)


{
this.Cursor = Cursors.Default;
//panel8.BackColor = Color.FromArgb(242, 242, 242);
//lbl_settings.ForeColor = Color.Black;
//this.pictureBox3.Image = ((System.Drawing.Image)
(Properties.Resources.setting));

private void pictureBox3_MouseEnter(object sender, EventArgs e)


{
this.Cursor = Cursors.Hand;
//panel8.BackColor = Color.FromArgb(0, 87, 184);
//lbl_settings.ForeColor = Color.White;
//this.pictureBox3.Image = ((System.Drawing.Image)
(Properties.Resources.white_setting));

private void pictureBox3_MouseLeave(object sender, EventArgs e)


{
this.Cursor = Cursors.Default;
//panel8.BackColor = Color.FromArgb(242, 242, 242);
//lbl_settings.ForeColor = Color.Black;
//this.pictureBox3.Image = ((System.Drawing.Image)
(Properties.Resources.setting));

private void lbl_settings_MouseEnter(object sender, EventArgs e)


{
this.Cursor = Cursors.Hand;
//panel8.BackColor = Color.FromArgb(0, 87, 184);
//lbl_settings.ForeColor = Color.White;
//this.pictureBox3.Image = ((System.Drawing.Image)
(Properties.Resources.white_setting));

private void lbl_settings_MouseLeave(object sender, EventArgs e)


{
this.Cursor = Cursors.Default;
//panel8.BackColor = Color.FromArgb(242, 242, 242);
//lbl_settings.ForeColor = Color.Black;
//this.pictureBox3.Image = ((System.Drawing.Image)
(Properties.Resources.setting));

}
private void panel_logout_MouseEnter(object sender, EventArgs e)
{
this.Cursor = Cursors.Hand;
panel_logout.BackColor = Color.FromArgb(0, 87, 184);
lbl_LogOut.ForeColor = Color.White;
this.pictureBox1.Image = ((System.Drawing.Image)
(Properties.Resources.img_logout));
}

private void panel_logout_MouseLeave(object sender, EventArgs e)


{
this.Cursor = Cursors.Default;
panel_logout.BackColor = Color.LightGray;
lbl_LogOut.ForeColor = Color.Black;
this.pictureBox1.Image = ((System.Drawing.Image)
(Properties.Resources.logout));
}

private void pictureBox1_MouseEnter(object sender, EventArgs e)


{
this.Cursor = Cursors.Hand;
panel_logout.BackColor = Color.FromArgb(0, 87, 184);
lbl_LogOut.ForeColor = Color.White;
this.pictureBox1.Image = ((System.Drawing.Image)
(Properties.Resources.img_logout));
}

private void pictureBox1_MouseLeave(object sender, EventArgs e)


{
this.Cursor = Cursors.Default;
panel_logout.BackColor = Color.LightGray;
lbl_LogOut.ForeColor = Color.Black;
this.pictureBox1.Image = ((System.Drawing.Image)
(Properties.Resources.logout));
}

private void lbl_LogOut_MouseEnter(object sender, EventArgs e)


{
this.Cursor = Cursors.Hand;
panel_logout.BackColor = Color.FromArgb(0, 87, 184);
lbl_LogOut.ForeColor = Color.White;
this.pictureBox1.Image = ((System.Drawing.Image)
(Properties.Resources.img_logout));
}

private void lbl_LogOut_MouseLeave(object sender, EventArgs e)


{
this.Cursor = Cursors.Default;
panel_logout.BackColor = Color.LightGray;
lbl_LogOut.ForeColor = Color.Black;
this.pictureBox1.Image = ((System.Drawing.Image)
(Properties.Resources.logout));
}
private DataType GetDataToPass()
{
// Retrieve and return the data you want to pass to the second
UserControl
DataType data = new DataType();
// Populate data from controls or other sources
return data;
}
private void Dashboard_Resize(object sender, EventArgs e)
{
ResizeChildrenControls();
}
private void BtnClickColorChange(object sender, EventArgs e)
{
foreach (Control c in panelIcon.Controls)
{
c.BackColor = Color.FromArgb(242, 242, 242);
c.ForeColor = Color.Black;
}
Control control = (Control)sender;
control.BackColor = Color.FromArgb(0, 87, 184);
control.ForeColor = Color.White;
}

private void pictureBox3_Click(object sender, EventArgs e)


{
BtnClickColorChange(panel8, null);

patientDetailsControl1.Visible = false;
patientListsControl1.Visible = false;
dashboardControl1.Visible = false;
settingsControl1.LoggedInUsername = this.LoggedInUsername;
settingsControl1.LoggedInUserId = this.LoggedInUserId;
settingsControl1.LoggedInUserOrgId = this.LoggedInUserOrgId;
settingsControl1.LoggedInOrgName = this.OrgName;
settingsControl1.Visible = true;
lbl_patient_list.ForeColor = Color.Black;
this.pictureBox2.Image = ((System.Drawing.Image)
(Properties.Resources.patient));
lbl_dashboard.ForeColor = Color.Black;
this.pictureBox4.Image = ((System.Drawing.Image)
(Properties.Resources.dashboard));
lbl_settings.ForeColor = Color.White;
this.pictureBox3.Image = ((System.Drawing.Image)
(Properties.Resources.white_setting));

dashboardControl1.RemoveControls();
}

private void lbl_settings_Click(object sender, EventArgs e)


{
BtnClickColorChange(panel8, null);

patientDetailsControl1.Visible = false;
patientListsControl1.Visible = false;
dashboardControl1.Visible = false;
settingsControl1.LoggedInUsername = this.LoggedInUsername;
settingsControl1.LoggedInUserId = this.LoggedInUserId;
settingsControl1.LoggedInUserOrgId = this.LoggedInUserOrgId;
settingsControl1.LoggedInOrgName = this.OrgName;
settingsControl1.Visible = true;
lbl_patient_list.ForeColor = Color.Black;
this.pictureBox2.Image = ((System.Drawing.Image)
(Properties.Resources.patient));
lbl_dashboard.ForeColor = Color.Black;
this.pictureBox4.Image = ((System.Drawing.Image)
(Properties.Resources.dashboard));
lbl_settings.ForeColor = Color.White;
this.pictureBox3.Image = ((System.Drawing.Image)
(Properties.Resources.white_setting));

dashboardControl1.RemoveControls();
}

private void panel8_Click(object sender, EventArgs e)


{
BtnClickColorChange(panel8, null);

patientDetailsControl1.Visible = false;
patientListsControl1.Visible = false;
dashboardControl1.Visible = false;
settingsControl1.LoggedInUsername = this.LoggedInUsername;
settingsControl1.LoggedInUserId = this.LoggedInUserId;
settingsControl1.LoggedInUserOrgId = this.LoggedInUserOrgId;
settingsControl1.LoggedInOrgName = this.OrgName;
settingsControl1.Visible = true;
lbl_patient_list.ForeColor = Color.Black;
this.pictureBox2.Image = ((System.Drawing.Image)
(Properties.Resources.patient));
lbl_dashboard.ForeColor = Color.Black;
this.pictureBox4.Image = ((System.Drawing.Image)
(Properties.Resources.dashboard));
lbl_settings.ForeColor = Color.White;
this.pictureBox3.Image = ((System.Drawing.Image)
(Properties.Resources.white_setting));

dashboardControl1.RemoveControls();
}

private void Dashboard_Activated(object sender, EventArgs e)


{
patientListsControl1.RefreshPatientList();
}
}
}

You might also like