예제 #1
0
        public System.Windows.Forms.Form CreateNewHalignHIPMethodDialog(IHeadsApplication app)
        {
            FormHipMethod formhipmethod = null;

            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)
            {
                formhipmethod = new FormHipMethod(app, polyline);
            }
            else
            {
                MessageBox.Show(Resources.ST_PROMPT_SELECT_POLYLINE, HeadsUtils.Constants.ProductName);
            }
            return(formhipmethod);
        }
예제 #2
0
        public System.Windows.Forms.Form CreateOpenHIPMethodDialog(IHeadsApplication app, CHIPInfo info)
        {
            FormHipMethod    formhipmethod = null;
            List <CHHipData> listHhip      = CHalignHipUtil.GenerateHIPData(info);

            if (listHhip != null || listHhip.Count > 0)
            {
                formhipmethod = new FormHipMethod(app, info);
            }
            else
            {
                MessageBox.Show("Error in Halign.fil file"
                                , Resources.ST_ERROR_MSGBOX_CAPTION
                                , System.Windows.Forms.MessageBoxButtons.OK
                                , System.Windows.Forms.MessageBoxIcon.Error);
            }
            return(formhipmethod);
        }