public void SetColors(ProfileControl pc, int ProfileButtonColor) { switch (ProfileButtonColor) { case 0: // Teal pc.DrugName.ForeColor = Color.Lime; pc.Strength.ForeColor = Color.White; pc.Freq.ForeColor = Color.White; pc.Billnum.ForeColor = Color.White; pc.Brand.ForeColor = Color.White; pc.SetBackColor(Color.Teal); pc.Strength.BackColor = Color.Black; break; case 1: // Green pc.DrugName.ForeColor = Color.Lime; pc.Strength.ForeColor = Color.White; pc.Freq.ForeColor = Color.White; pc.Billnum.ForeColor = Color.White; pc.Brand.ForeColor = Color.Yellow; pc.Strength.BackColor = Color.Black; pc.SetBackColor(Color.Green); break; case 2: // White pc.DrugName.ForeColor = Color.Black; pc.Strength.ForeColor = Color.White; pc.Freq.ForeColor = Color.Black; pc.Billnum.ForeColor = Color.Black; pc.Brand.ForeColor = Color.Black; pc.SetBackColor(Color.White); pc.Strength.BackColor = Color.Black; break; case 3: // Silver pc.DrugName.ForeColor = Color.Black; pc.Strength.ForeColor = Color.White; pc.Freq.ForeColor = Color.Black; pc.Billnum.ForeColor = Color.Black; pc.Brand.ForeColor = Color.Black; pc.SetBackColor(Color.Silver); pc.Strength.BackColor = Color.Black; break; default: break; } //pc.Strength.BackColor = Color.Black; _picDrugInfo.BackColor = Color.Transparent; }
public void SetVisibleLabels(ProfileControl pc, int ProfileViewMode) { switch (ProfileViewMode) { case 0: pc.Freq.Visible = false; pc.Strength.Visible = false; pc.Billnum.Visible = false; pc.Brand.Visible = false; break; case 1: pc.Freq.Visible = false; pc.Strength.Visible = false; pc.Billnum.Visible = false; pc.Brand.Visible = true; break; case 2: pc.Freq.Visible = true; pc.Strength.Visible = false; pc.Billnum.Visible = false; pc.Brand.Visible = true; break; case 3: pc.Freq.Visible = true; pc.Strength.Visible = true; pc.Billnum.Visible = false; pc.Brand.Visible = true; break; case 4: pc.Freq.Visible = true; pc.Strength.Visible = true; pc.Billnum.Visible = true; pc.Brand.Visible = true; break; case 5: pc.Freq.Visible = true; pc.Strength.Visible = true; pc.Billnum.Visible = false; pc.Brand.Visible = false; break; default: break; } }