WPF ModelUIElement3D index

Site Index
GID : Wpf-UIE-Chart-1310-4210







private void w_ModelUIElement3D_PreviewMouseMove(object sender, MouseEventArgs e)
{
//ModelUIElement3D w_ModelUIElement3D = (ModelUIElement3D)e.Source;
ModelUIElement3D w_ModelUIElement3D = sender as ModelUIElement3D;

int idx = idx_ModelUIElement3D[w_ModelUIElement3D];
System.Windows.Point w_point2 = e.GetPosition(w_ModelUIElement3D);

double w_idx2 = idx / 2;
int w_idx_g5 = (int)Math.Floor(w_idx2);
this.g5code.Text = z_G5Code[w_idx_g5];
this.g5name.Text = z_G5Name[w_idx_g5];
try
{
this.textBlock_GrCode1.Text = z_G5Code[w_idx_g5].Substring(0, 2);
this.textBlock_GrCode2.Text = z_G5Code[w_idx_g5].Substring(2, 2);
this.textBlock_GrCode3.Text = z_G5Code[w_idx_g5].Substring(4, 2);
this.textBlock_GrCode4.Text = z_G5Code[w_idx_g5].Substring(6, 2);
this.textBlock_GrCode5.Text = z_G5Code[w_idx_g5].Substring(8, 2);
}
catch { }

int w_idx_g3 = 0;
int w_idx_g4 = 0;
try
{
w_idx_g3 = Convert.ToInt16(z_G5Code[w_idx_g5].Substring(4, 2));
w_idx_g4 = Convert.ToInt16(z_G5Code[w_idx_g5].Substring(6, 2));
}
catch
{
w_idx_g3 = 0;
w_idx_g4 = 0;
}
g3code.Text = z_G3_Code[w_idx_g3] + ":" + z_G3_Name[w_idx_g3];
g4code.Text = z_G4_Code[w_idx_g3, w_idx_g4] + ":" + z_G4_Name[w_idx_g3, w_idx_g4];

txb_index.Text = "index:" + string.Format("{0:0000}", idx);
DoEvents();
}




AX