diff --git a/WindowsFormsApplication2/WindowsFormsApplication2/Appointment.Designer.cs b/WindowsFormsApplication2/WindowsFormsApplication2/Appointment.Designer.cs index 72350b3..cdad7ec 100644 --- a/WindowsFormsApplication2/WindowsFormsApplication2/Appointment.Designer.cs +++ b/WindowsFormsApplication2/WindowsFormsApplication2/Appointment.Designer.cs @@ -55,6 +55,7 @@ // // DatePick // + this.DatePick.Format = System.Windows.Forms.DateTimePickerFormat.Short; this.DatePick.Location = new System.Drawing.Point(220, 280); this.DatePick.MinimumSize = new System.Drawing.Size(0, 29); this.DatePick.Name = "DatePick"; @@ -143,7 +144,6 @@ this.groupBox1.Size = new System.Drawing.Size(388, 436); this.groupBox1.TabIndex = 8; this.groupBox1.TabStop = false; - // this.groupBox1.Enter += new System.EventHandler(this.groupBox1_Enter); // // metroTile2 // diff --git a/WindowsFormsApplication2/WindowsFormsApplication2/Appointment.cs b/WindowsFormsApplication2/WindowsFormsApplication2/Appointment.cs index 70a2b77..4a8cc9c 100644 --- a/WindowsFormsApplication2/WindowsFormsApplication2/Appointment.cs +++ b/WindowsFormsApplication2/WindowsFormsApplication2/Appointment.cs @@ -30,12 +30,27 @@ namespace WindowsFormsApplication2 this.patient = patient; InitializeComponent(); } - + protected override void WndProc(ref Message message) + { + const int WM_SYSCOMMAND = 0x0112; + const int SC_MOVE = 0xF010; + + switch (message.Msg) + { + case WM_SYSCOMMAND: + int command = message.WParam.ToInt32() & 0xfff0; + if (command == SC_MOVE) + return; + break; + } + + base.WndProc(ref message); + } private void Appointment_Load(object sender, EventArgs e) { this.doctorPhoneIcon.MouseEnter += new EventHandler(docNumInfo); DatePick.Format = DateTimePickerFormat.Custom; - DatePick.CustomFormat = "dd-mm-yyyy"; + //DatePick.CustomFormat = "dd-m-yyyy"; DatePick.ShowUpDown = true; SoundPlayer s = new SoundPlayer(@"..\..\Resources\AppointmentInfo.wav"); s.Play(); diff --git a/WindowsFormsApplication2/WindowsFormsApplication2/DocNumber.cs b/WindowsFormsApplication2/WindowsFormsApplication2/DocNumber.cs index d55d48f..583b669 100644 --- a/WindowsFormsApplication2/WindowsFormsApplication2/DocNumber.cs +++ b/WindowsFormsApplication2/WindowsFormsApplication2/DocNumber.cs @@ -20,7 +20,22 @@ namespace WindowsFormsApplication2 InitializeComponent(); } - + protected override void WndProc(ref Message message) + { + const int WM_SYSCOMMAND = 0x0112; + const int SC_MOVE = 0xF010; + + switch (message.Msg) + { + case WM_SYSCOMMAND: + int command = message.WParam.ToInt32() & 0xfff0; + if (command == SC_MOVE) + return; + break; + } + + base.WndProc(ref message); + } private void Login_Load(object sender, EventArgs e) { diff --git a/WindowsFormsApplication2/WindowsFormsApplication2/Homepage.cs b/WindowsFormsApplication2/WindowsFormsApplication2/Homepage.cs index 7feb233..51b1597 100644 --- a/WindowsFormsApplication2/WindowsFormsApplication2/Homepage.cs +++ b/WindowsFormsApplication2/WindowsFormsApplication2/Homepage.cs @@ -70,7 +70,22 @@ namespace WindowsFormsApplication2 // System.Threading.Thread.Sleep(6000); s.Show(); } + protected override void WndProc(ref Message message) + { + const int WM_SYSCOMMAND = 0x0112; + const int SC_MOVE = 0xF010; + switch (message.Msg) + { + case WM_SYSCOMMAND: + int command = message.WParam.ToInt32() & 0xfff0; + if (command == SC_MOVE) + return; + break; + } + + base.WndProc(ref message); + } private void Homepage_Load(object sender, EventArgs e) { this.Text = patient; diff --git a/WindowsFormsApplication2/WindowsFormsApplication2/Login.cs b/WindowsFormsApplication2/WindowsFormsApplication2/Login.cs index 7d87ab7..35aad7e 100644 --- a/WindowsFormsApplication2/WindowsFormsApplication2/Login.cs +++ b/WindowsFormsApplication2/WindowsFormsApplication2/Login.cs @@ -14,13 +14,29 @@ namespace WindowsFormsApplication2 public partial class Login : MetroFramework.Forms.MetroForm { + Form parent = null; public Login(Form parent) { InitializeComponent(); this.parent = parent; } - + protected override void WndProc(ref Message message) + { + const int WM_SYSCOMMAND = 0x0112; + const int SC_MOVE = 0xF010; + + switch (message.Msg) + { + case WM_SYSCOMMAND: + int command = message.WParam.ToInt32() & 0xfff0; + if (command == SC_MOVE) + return; + break; + } + + base.WndProc(ref message); + } private void Login_Load(object sender, EventArgs e) { this.Name = "Login Portal"; diff --git a/WindowsFormsApplication2/WindowsFormsApplication2/Map.cs b/WindowsFormsApplication2/WindowsFormsApplication2/Map.cs index 9c6d5e9..6964576 100644 --- a/WindowsFormsApplication2/WindowsFormsApplication2/Map.cs +++ b/WindowsFormsApplication2/WindowsFormsApplication2/Map.cs @@ -19,23 +19,48 @@ namespace WindowsFormsApplication2 { this.parent = parent; InitializeComponent(); + + } + private void Map_Shown(object sender, EventArgs e) + { + + SoundPlayer s = new SoundPlayer(@"..\..\Resources\map.wav"); + s.PlaySync(); + } + protected override void WndProc(ref Message message) + { + const int WM_SYSCOMMAND = 0x0112; + const int SC_MOVE = 0xF010; + switch (message.Msg) + { + case WM_SYSCOMMAND: + int command = message.WParam.ToInt32() & 0xfff0; + if (command == SC_MOVE) + return; + break; + } + + base.WndProc(ref message); + } private void Map_Load(object sender, EventArgs e) { - SoundPlayer s = new SoundPlayer(@"..\..\Resources\map.wav"); - s.Play(); + this.metroTile3.MouseEnter += new EventHandler(logoutMsg); this.metroTile4.MouseEnter += new EventHandler(backScrMsg); + this.metroTile1.MouseEnter += new EventHandler(Map_Shown); } private void logoutMsg(object sender, EventArgs e) { + this.metroTile3.Select(); SoundPlayer s = new SoundPlayer(@"..\..\Resources\logoutMsg.wav"); s.PlaySync(); } private void backScrMsg(object sender, EventArgs e) { + this.metroTile4.Select(); SoundPlayer s = new SoundPlayer(@"..\..\Resources\backScrMsg.wav"); s.PlaySync(); } diff --git a/WindowsFormsApplication2/WindowsFormsApplication2/Resources/diseaseNoDoc.wav b/WindowsFormsApplication2/WindowsFormsApplication2/Resources/diseaseNoDoc.wav new file mode 100644 index 0000000..0b15f48 Binary files /dev/null and b/WindowsFormsApplication2/WindowsFormsApplication2/Resources/diseaseNoDoc.wav differ diff --git a/WindowsFormsApplication2/WindowsFormsApplication2/Symptoms.cs b/WindowsFormsApplication2/WindowsFormsApplication2/Symptoms.cs index 805a93e..20d9522 100644 --- a/WindowsFormsApplication2/WindowsFormsApplication2/Symptoms.cs +++ b/WindowsFormsApplication2/WindowsFormsApplication2/Symptoms.cs @@ -16,6 +16,7 @@ namespace WindowsFormsApplication2 { List tileSelected = new List(); + Homepage Parent = null; Form MDIParent = null; bool bt1 = false, bt2 = false, bt3 = false, bt4 = false, bt5 = false, bt6 = false, bt7 = false, bt8 = false; @@ -27,7 +28,22 @@ namespace WindowsFormsApplication2 this.Parent = Parent; this.MDIParent = MDIParent; } + protected override void WndProc(ref Message message) + { + const int WM_SYSCOMMAND = 0x0112; + const int SC_MOVE = 0xF010; + switch (message.Msg) + { + case WM_SYSCOMMAND: + int command = message.WParam.ToInt32() & 0xfff0; + if (command == SC_MOVE) + return; + break; + } + + base.WndProc(ref message); + } private void Symptoms_Load(object sender, EventArgs e) { SoundPlayer s11 = new SoundPlayer(@"..\..\Resources\SympotmsInfo.wav"); @@ -44,22 +60,21 @@ namespace WindowsFormsApplication2 { if(tileSelected.Count!=0 ) { - if(tileSelected.Remove(8) == true && tileSelected.Count == 0) + + if (tileSelected.Count == 1 && tileSelected.Exists(x => x.Equals(8)) == true ) { SoundPlayer s = new SoundPlayer(@"..\..\Resources\docNotAvail.wav"); s.Play(); - tileSelected.Add(8); - + //tileSelected.Add(8); } - else + + else { this.Hide(); Map m = new Map(this); m.MdiParent = MDIParent; m.Show(); - tileSelected.Add(8); - - + //tileSelected.Add(8); } } diff --git a/WindowsFormsApplication2/WindowsFormsApplication2/bin/Debug/WindowsFormsApplication2.exe b/WindowsFormsApplication2/WindowsFormsApplication2/bin/Debug/WindowsFormsApplication2.exe index b6df367..f5a36e9 100644 Binary files a/WindowsFormsApplication2/WindowsFormsApplication2/bin/Debug/WindowsFormsApplication2.exe and b/WindowsFormsApplication2/WindowsFormsApplication2/bin/Debug/WindowsFormsApplication2.exe differ diff --git a/WindowsFormsApplication2/WindowsFormsApplication2/bin/Debug/WindowsFormsApplication2.pdb b/WindowsFormsApplication2/WindowsFormsApplication2/bin/Debug/WindowsFormsApplication2.pdb index a92bb2c..e123f2d 100644 Binary files a/WindowsFormsApplication2/WindowsFormsApplication2/bin/Debug/WindowsFormsApplication2.pdb and b/WindowsFormsApplication2/WindowsFormsApplication2/bin/Debug/WindowsFormsApplication2.pdb differ diff --git a/WindowsFormsApplication2/WindowsFormsApplication2/obj/Debug/AapKaDoctor.csproj.GenerateResource.Cache b/WindowsFormsApplication2/WindowsFormsApplication2/obj/Debug/AapKaDoctor.csproj.GenerateResource.Cache index 943c707..4ac0d12 100644 Binary files a/WindowsFormsApplication2/WindowsFormsApplication2/obj/Debug/AapKaDoctor.csproj.GenerateResource.Cache and b/WindowsFormsApplication2/WindowsFormsApplication2/obj/Debug/AapKaDoctor.csproj.GenerateResource.Cache differ diff --git a/WindowsFormsApplication2/WindowsFormsApplication2/obj/Debug/WindowsFormsApplication2.exe b/WindowsFormsApplication2/WindowsFormsApplication2/obj/Debug/WindowsFormsApplication2.exe index b6df367..f5a36e9 100644 Binary files a/WindowsFormsApplication2/WindowsFormsApplication2/obj/Debug/WindowsFormsApplication2.exe and b/WindowsFormsApplication2/WindowsFormsApplication2/obj/Debug/WindowsFormsApplication2.exe differ diff --git a/WindowsFormsApplication2/WindowsFormsApplication2/obj/Debug/WindowsFormsApplication2.pdb b/WindowsFormsApplication2/WindowsFormsApplication2/obj/Debug/WindowsFormsApplication2.pdb index a92bb2c..e123f2d 100644 Binary files a/WindowsFormsApplication2/WindowsFormsApplication2/obj/Debug/WindowsFormsApplication2.pdb and b/WindowsFormsApplication2/WindowsFormsApplication2/obj/Debug/WindowsFormsApplication2.pdb differ