public System.Windows.Forms.Form CreateNewValignDialog(IHeadsApplication app) { FormValignment formvalignment = null; //Only one polyline object is selected IHdEntity[] selections = app.ActiveDocument.GetUserSelection(Resources.ST_PROMPT_SELECT_POLYLINE); IHdPolyline3D polyline = null; if (selections.Length == 1) { IHdEntity entity = selections[0]; //DictionaryEntry de = selections[0]; if (entity.EntityName == "POLYLINE3D") { polyline = (IHdPolyline3D)entity; } } if (polyline != null) { formvalignment = new FormValignment(app, polyline); } else { MessageBox.Show(Resources.ST_PROMPT_SELECT_POLYLINE, HeadsUtils.Constants.ProductName); } return(formvalignment); }
public System.Windows.Forms.Form CreateOpenValignmentDialog(IHeadsApplication app, CValignInfo info) { FormValignment formvalignmethod = null; if (info != null || info.DataList.Count > 0) { formvalignmethod = new FormValignment(app, info); } else { MessageBox.Show("Error in Valign.fil file" , Resources.ST_ERROR_MSGBOX_CAPTION , System.Windows.Forms.MessageBoxButtons.OK , System.Windows.Forms.MessageBoxIcon.Error); } return(formvalignmethod); }