Ejemplo n.º 1
0
        private void SetFamilyColors()
        {
            if (gridMain.SelectedIndices.Length != 1)
            {
                for (int i = 0; i < gridMain.Rows.Count; i++)
                {
                    gridMain.Rows[i].ColorText = Color.Black;
                }
                gridMain.Invalidate();
                return;
            }
            int guar = PIn.PInt(table.Rows[gridMain.SelectedIndices[0]]["Guarantor"].ToString());
            //((RecallItem)gridMain.Rows[gridMain.SelectedIndices[0]].Tag).Guarantor;
            int famCount = 0;

            for (int i = 0; i < gridMain.Rows.Count; i++)
            {
                if (PIn.PInt(table.Rows[i]["Guarantor"].ToString()) == guar)
                {
                    //((RecallItem)gridMain.Rows[i].Tag).Guarantor==guar) {
                    famCount++;
                    gridMain.Rows[i].ColorText = Color.Red;
                }
                else
                {
                    gridMain.Rows[i].ColorText = Color.Black;
                }
            }
            if (famCount == 1)           //only the highlighted patient is red at this point
            {
                gridMain.Rows[gridMain.SelectedIndices[0]].ColorText = Color.Black;
            }
            gridMain.Invalidate();
        }
Ejemplo n.º 2
0
		private void SetFamilyColors(){
			if(grid.SelectedIndices.Length!=1){
				for(int i=0;i<grid.Rows.Count;i++){
					grid.Rows[i].ColorText=Color.Black;
				}
				grid.Invalidate();
				return;
			}
			long guar=PIn.Long(Table.Rows[grid.SelectedIndices[0]]["Guarantor"].ToString());
			int famCount=0;
			for(int i=0;i<grid.Rows.Count;i++){
				if(PIn.Long(Table.Rows[i]["Guarantor"].ToString())==guar){
					famCount++;
					grid.Rows[i].ColorText=Color.Red;
				}
				else{
					grid.Rows[i].ColorText=Color.Black;
				}
			}
			if(famCount==1){//only the highlighted patient is red at this point
				grid.Rows[grid.SelectedIndices[0]].ColorText=Color.Black;
			}
			grid.Invalidate();
		}
Ejemplo n.º 3
0
 private void gridMain_CellClick(object sender, ODGridClickEventArgs e)
 {
     SelectedGroupNum = PIn.PInt(table.Rows[e.Row]["UserGroupNum"].ToString());
     for (int i = 0; i < table.Rows.Count; i++)
     {
         if (table.Rows[i]["UserGroupNum"].ToString() == SelectedGroupNum.ToString())
         {
             gridMain.Rows[i].ColorText = Color.Red;
         }
         else
         {
             gridMain.Rows[i].ColorText = Color.Black;
         }
     }
     gridMain.Invalidate();
     FillTreePerm();
 }
Ejemplo n.º 4
0
 private void gridMain_CellClick(object sender, ODGridClickEventArgs e)
 {
     SelectedGroupNum = ListUser[e.Row].UserGroupNum;
     for (int i = 0; i < ListUser.Count; i++)
     {
         if (ListUser[i].UserGroupNum == SelectedGroupNum)
         {
             gridMain.Rows[i].ColorText = Color.Red;
         }
         else
         {
             gridMain.Rows[i].ColorText = Color.Black;
         }
     }
     gridMain.Invalidate();
     FillTreePerm();
 }
Ejemplo n.º 5
0
 ///<Summary>Get all formats for the grid based on the current filters.</Summary>
 private void RefreshFormats()
 {
     this.Cursor = Cursors.WaitCursor;
     gridFormats.Rows.Clear();
     gridFormats.Invalidate();
     textSelected.Text = "";
     Application.DoEvents();
     if (this.radioDirectXChart.Checked)
     {
         xformats = ToothChartDirectX.GetStandardDeviceFormats();
     }
     else if (this.radioOpenGLChart.Checked)
     {
         OpenGLWinFormsControl contextFinder = new OpenGLWinFormsControl();
         //Get raw formats.
         Gdi.PIXELFORMATDESCRIPTOR[] rawformats = OpenGLWinFormsControl.GetPixelFormats(contextFinder.GetHDC());
         if (checkAllFormats.Checked)
         {
             formats = new OpenGLWinFormsControl.PixelFormatValue[rawformats.Length];
             for (int i = 0; i < rawformats.Length; i++)
             {
                 formats[i] = new OpenGLWinFormsControl.PixelFormatValue();
                 formats[i].formatNumber = i + 1;
                 formats[i].pfd          = rawformats[i];
             }
         }
         else
         {
             //Prioritize formats as requested by the user.
             formats = OpenGLWinFormsControl.PrioritizePixelFormats(rawformats, checkDoubleBuffering.Checked, checkHardwareAccel.Checked);
         }
         contextFinder.Dispose();
     }
     //Update the format grid to reflect possible changes in formats.
     FillGrid();
     this.Cursor = Cursors.Default;
 }
 private void textLName_KeyDown(object sender, KeyEventArgs e)
 {
     if (e.KeyCode == Keys.Up || e.KeyCode == Keys.Down)
     {
         gridMain_KeyDown(sender, e);
         gridMain.Invalidate();
         e.Handled = true;
     }
 }