Example #1
0
 private void UpdateUiFormArgs()
 {
     if (tmpargs.AzField != null)
     {
         presentationBox1.Text = tmpargs.AzField.Description.Name;
         IImageInfoFactory imgSvc = CoreSystem.GetService <IImageInfoFactory>(tmpargs.AzField);
         presentationBox1.Image = imgSvc.GetImageInfo(tmpargs.AzField).TypeImage;
     }
     else
     {
         presentationBox1.Text  = "";
         presentationBox1.Image = null;
     }
     if (tmpargs.HeiField != null)
     {
         presentationBox2.Text = tmpargs.HeiField.Description.Name;
         IImageInfoFactory imgSvc = CoreSystem.GetService <IImageInfoFactory>(tmpargs.HeiField);
         presentationBox2.Image = imgSvc.GetImageInfo(tmpargs.HeiField).TypeImage;
     }
     else
     {
         presentationBox2.Text  = "";
         presentationBox2.Image = null;
     }
     btnOK.Enabled = !(tmpargs.AzField == null || tmpargs.HeiField == null);
 }
 private void UpdateUIFormArgs()
 {
     boxWellLog.Text  = "";
     boxWellLog.Image = null;
     boxGrid.Text     = "";
     boxGrid.Image    = null;
     btnApply.Enabled = false;
     btnOK.Enabled    = false;
     btnShow.Enabled  = false;
     ka               = false;
     k                = false;
     boxProp.Text     = "";
     boxProp.Image    = null;
     lblNumCells.Text = "";
     if (tmpargs.NovozhentsevWellLog != null)
     {
         INameInfoFactory nameSvc = CoreSystem.GetService <INameInfoFactory>(tmpargs.NovozhentsevWellLog);
         boxWellLog.Text = string.Format("{0} ({1})", nameSvc.GetNameInfo(tmpargs.NovozhentsevWellLog).Name, tmpargs.NovozhentsevWellLog.Borehole.Description.Name);
         IImageInfoFactory imgSvc = CoreSystem.GetService <IImageInfoFactory>(tmpargs.NovozhentsevWellLog.Borehole);
         boxWellLog.Image = imgSvc.GetImageInfo(tmpargs.NovozhentsevWellLog).TypeImage;
     }
     if (tmpargs.NovozhentsevGrid != null)
     {
         INameInfoFactory nameSvc = CoreSystem.GetService <INameInfoFactory>(tmpargs.NovozhentsevGrid);
         boxGrid.Text = string.Format("{0} - {1}", nameSvc.GetNameInfo(tmpargs.NovozhentsevGrid).Name, Math.Round(tmpargs.NovozhentsevGrid.BoundingBox.Width * tmpargs.NovozhentsevGrid.BoundingBox.Length));
         IImageInfoFactory imgSvc = CoreSystem.GetService <IImageInfoFactory>(tmpargs.NovozhentsevGrid);
         boxGrid.Image = imgSvc.GetImageInfo(tmpargs.NovozhentsevGrid).TypeImage;
     }
     if (tmpargs.NovozhentsevWellLog != null && tmpargs.NovozhentsevGrid != null)
     {
         btnApply.Enabled = true;
         btnOK.Enabled    = true;
     }
     if (tmpargs.NovozhentsevResultProperty != null)
     {
         btnShow.Enabled = true;
         boxProp.Text    = tmpargs.NovozhentsevResultProperty.Description.Name;
         IImageInfoFactory imgSvc = CoreSystem.GetService <IImageInfoFactory>(tmpargs.NovozhentsevResultProperty);
         boxProp.Image = imgSvc.GetImageInfo(tmpargs.NovozhentsevResultProperty).TypeImage;
     }
     if (tmpargs.NovozhentsevNumCells != 0)
     {
         lblNumCells.Text      = tmpargs.NovozhentsevNumCells.ToString();
         lblNumCells.TextAlign = ContentAlignment.MiddleCenter;
     }
 }