예제 #1
0
        /// <summary>
        /// 户表管理
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        public static void mouse_SHBManager(object sender, EventArgs e)
        {
            var ee  = (selectEntityArgs)e;
            var shb = new SHBMap(ee);

            Application.ShowModelessDialog(shb);
        }
예제 #2
0
 public void PreViewSymbol(string imgPath, bool bl)
 {
     try
     {
         var name = Path.GetFileNameWithoutExtension(imgPath);
         imgPath = string.Format("{0}\\自定义模版图片\\{1}.jpg", DBEntityFinder.Instance.SymbolPicturePath, name);
         if (File.Exists(imgPath))
         {
             if (ps == null)
             {
                 if (bl)
                 {
                     ps = new PreviewSymbol(imgPath);
                     Application.ShowModelessDialog(ps);
                 }
             }
             else
             {
                 ps.pictureBox1.Load(imgPath);
             }
         }
     }
     catch (Exception ex)
     {
         PublicMethod.Instance.ShowMessage(ex.Message);
     }
 }
예제 #3
0
        private void cmdStakeSta_Click(object sender, EventArgs e)
        {
            this.Hide();

            fStaRange = Forms.Stake_Forms.sForms.fStaRange;
            Application.ShowModelessDialog(Application.MainWindow.Handle, fStaRange, false);
        }
예제 #4
0
        insertCurve(ObjectId idAlign)
        {
            Alignment align = (Alignment)idAlign.getEnt();
            AlignmentEntityCollection ents = align.Entities;
            PromptStatus ps;
            Point3d      pnt3dPick = UserInput.getPoint("Select Curve PI", out ps, osMode: 1);

            AlignmentEntity lineBefore = null;
            AlignmentEntity lineAfter  = null;

            for (int i = 0; i < ents.Count; i++)
            {
                AlignmentEntity ent = ents[i];
                if (ent.EntityType == AlignmentEntityType.Line)
                {
                    AlignmentLine line = (AlignmentLine)ent;
                    if (line.EndPoint.IsEqualTo(pnt3dPick.Convert2d(BaseObjs.xyPlane), new Tolerance(.01, .01)))
                    {
                        lineBefore = line;
                    }
                    if (line.StartPoint.IsEqualTo(pnt3dPick.Convert2d(BaseObjs.xyPlane), new Tolerance(.01, .01)))
                    {
                        lineAfter = line;
                    }
                }
            }

            AlignmentArc       arc         = ents.AddFreeCurve(lineBefore.EntityId, lineAfter.EntityId, 200.0, CurveParamType.Radius, false, CurveType.Compound);
            List <AlgnEntData> algnEntData = sortAlignEnts(align);

            fAlignEnts.updateForm(algnEntData);
            fAlignEnts.AlignHandle = align.Handle;
            Application.ShowModelessDialog(Application.MainWindow.Handle, fAlignEnts, false);
        }
예제 #5
0
 private void cmdDone_Click(object sender, EventArgs e)
 {
     fStake = Forms.Stake_Forms.sForms.fStake;
     fStake.optMISC.Checked = false;
     Application.ShowModelessDialog(Application.MainWindow.Handle, fStake, false);
     this.Hide();
 }
예제 #6
0
        /// <summary>
        /// 计量表管理
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        public static void mouse_JLBManager(object sender, EventArgs e)
        {
            var ee  = (selectEntityArgs)e;
            var jlb = new JLBMap(ee);

            Application.ShowModelessDialog(jlb);
            jlb.WindowState = FormWindowState.Normal;
            jlb.Visible     = true;
        }
예제 #7
0
 private void optBLDG_Click(object sender, EventArgs e)
 {
     if (optBLDG.Checked)
     {
         ClassObj = "BLDG";
         this.Hide();
         Application.ShowModelessDialog(Application.MainWindow.Handle, Stake_Forms.sForms.fGrid, false);
     }
 }
예제 #8
0
파일: frmStaRange.cs 프로젝트: 15831944/EM
        private void cmdDone_Click(object sender, EventArgs e)
        {
            double staBeg = double.Parse(tbxStaStart.Text);
            double staEnd = double.Parse(tbxStaEnd.Text);

            this.Hide();

            Stake_Calc.stakePoints(staBeg, staEnd);
            Application.ShowModelessDialog(Application.MainWindow.Handle, Forms.Stake_Forms.sForms.fStake, false);
        }
예제 #9
0
        /*工单锁定设备管理*/
        private void ToolSMI_Gdsd_Click(object sender, EventArgs e)
        {
            if (!IsLoadDataSource())
            {
                return;
            }
            var woroe = new WorkOrderRangeOfEntity();

            Application.ShowModelessDialog(woroe);
        }
예제 #10
0
        /*受电馈线管理*/
        private void ToolSMI_Sdkxgl_Click(object sender, EventArgs e)
        {
            if (!IsLoadDataSource())
            {
                return;
            }
            var SDKXForm = new SDKXView();

            Application.ShowModelessDialog(SDKXForm);
        }
예제 #11
0
        /*支线管理*/
        private void ToolSMI_Zxgl_Click(object sender, EventArgs e)
        {
            if (!IsLoadDataSource())
            {
                return;
            }
            var rm = new RegionalManagement();

            Application.ShowModelessDialog(rm);
        }
예제 #12
0
 private void optMISC_Click(object sender, EventArgs e)
 {
     if (optMISC.Checked)
     {
         this.ClassObj = "MISC";
         Stake_Misc.set_fStakeProps("MISC");
         this.Hide();
         fMisc = Forms.Stake_Forms.sForms.fMisc;
         Application.ShowModelessDialog(Application.MainWindow.Handle, fMisc, false);
     }
 }
예제 #13
0
 private void ToolSMI_SHBSearch_Click(object sender, EventArgs e)
 {
     if (!IsLoadDataSource())
     {
         return;
     }
     if (!PublicMethod.Instance.IsExecuteSystemCMD(""))
     {
         var tt = new YHHSearch();
         Application.ShowModelessDialog(tt);
     }
 }
예제 #14
0
 private void ToolSMI_Mxlj_Click(object sender, EventArgs e)
 {
     if (!IsLoadDataSource())
     {
         return;
     }
     if (!PublicMethod.Instance.IsExecuteSystemCMD(""))
     {
         var MxToYxDlg = new ConnectMxToYx();
         Application.ShowModelessDialog(MxToYxDlg);
     }
 }
예제 #15
0
 private void TSMI_Topology_Click(object sender, EventArgs e)
 {
     if (!IsLoadDataSource())
     {
         return;
     }
     if (!PublicMethod.Instance.IsExecuteSystemCMD(""))
     {
         var tt = new TraceManager();
         Application.ShowModelessDialog(tt);
     }
 }
예제 #16
0
 /*测量工具*/
 private void MeasureItem_Click(object sender, EventArgs e)
 {
     if (!IsLoadDataSource())
     {
         return;
     }
     if (!PublicMethod.Instance.IsExecuteSystemCMD("zmc1"))
     {
         var tt = new Measure();
         Application.ShowModelessDialog(tt);
     }
 }
예제 #17
0
 /*坐标定位*/
 private void ToolSMI_ZB_Click(object sender, EventArgs e)
 {
     if (!IsLoadDataSource())
     {
         return;
     }
     if (!PublicMethod.Instance.IsExecuteSystemCMD(""))
     {
         coordinateForm = new CoordinateForm();
         Application.ShowModelessDialog(coordinateForm);
     }
 }
예제 #18
0
 /// <summary>
 /// 台架修改
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void ToolSMI_TJXG_Click(object sender, EventArgs e)
 {
     if (!IsLoadDataSource())
     {
         return;
     }
     if (!PublicMethod.Instance.IsExecuteSystemCMD(""))
     {
         var tjxg = new TJXG();
         Application.ShowModelessDialog(tjxg);
     }
 }
예제 #19
0
        public static void DisplaySplashScreenFor(int elapsedSeconds)
        {
            SplashScreen splashScreen = new SplashScreen();

            splashScreen.StartPosition   = FormStartPosition.CenterScreen;
            splashScreen.FormBorderStyle = FormBorderStyle.None;
            splashScreen.TopMost         = true;
            splashScreen.ShowInTaskbar   = false;
            splashScreen.errMsg.Visible  = false;
            splashScreen.UseWaitCursor   = false;
            Application.ShowModelessDialog(Application.MainWindow.Handle, splashScreen, false);
            Thread.Sleep(elapsedSeconds * 1000);
            splashScreen.Close();
        }
예제 #20
0
 private void 校验ToolStripMenuItem_Click(object sender, EventArgs e)
 {
     if (!IsLoadDataSource())
     {
         return;
     }
     if (!PublicMethod.Instance.IsExecuteSystemCMD(""))
     {
         if (orderVerify == null)
         {
             orderVerify = new WorkOrderVerify();
         }
         Application.ShowModelessDialog(orderVerify);
         orderVerify.WindowState = FormWindowState.Normal;
         orderVerify.Visible     = true;
     }
 }
예제 #21
0
        editAlign(ObjectId idAlign)
        {
            Point3d pnt3dPick = Pub.pnt3dO;

            if (idAlign == ObjectId.Null)
            {
                Entity ent = Select.selectEntity(typeof(Alignment), "Select Alignment: ", "Selected object was not an alignment. Try again: ", out pnt3dPick);
                idAlign = ent.ObjectId;
            }

            Alignment align = (Alignment)idAlign.getEnt();

            List <AlgnEntData> algnData = sortAlignEnts(align);

            fAlignEnts.updateForm(algnData);
            fAlignEnts.AlignHandle = align.Handle;
            Application.ShowModelessDialog(Application.MainWindow.Handle, fAlignEnts, false);
        }
예제 #22
0
 private void ToolSMI_FIDQuery_Click(object sender, EventArgs e)
 {
     if (!IsLoadDataSource())
     {
         return;
     }
     if (!PublicMethod.Instance.IsExecuteSystemCMD(""))
     {
         if (query == null)
         {
             query = new Query();
         }
         else
         {
             query.Close();
             query = new Query();
         }
         query.setpanel(0);
         Application.ShowModelessDialog(query);
     }
 }
예제 #23
0
 private void ToolSMI_Coordinate_Click(object sender, EventArgs e)
 {
     if (!IsLoadDataSource())
     {
         return;
     }
     if (!PublicMethod.Instance.IsExecuteSystemCMD(""))
     {
         if (coordinateFix == null)
         {
             coordinateFix = new CoordinateFix {
                 WindowState = FormWindowState.Normal
             };
             Application.ShowModelessDialog(coordinateFix);
         }
         else
         {
             coordinateFix.WindowState = FormWindowState.Normal;
             coordinateFix.Activate();
         }
     }
 }
예제 #24
0
        public void DwgStdSystem()
        {
            string _Path = Properties.Settings.Default.StdSysPath;

            /*
             * string Code = GetMd5Hash(MD5.Create(), EncryString);
             * if (Properties.Settings.Default.verifycode != Code)
             * {
             *  AcadApp.DocumentManager.MdiActiveDocument.Editor.WriteMessage("未注册软件,请注册后使用");
             *  return;
             * }
             */
            if (Directory.Exists(_Path))
            {
                LibaryDialog Diag = new LibaryDialog(_Path, "中建深装-标准节点图库", LibType.SysLib);
                AcadApp.ShowModelessDialog(Diag);
            }
            else
            {
                AcadApp.ShowAlertDialog(string.Format("路径:{0}不存在,请先设置正确的图库加载路径", _Path));
            }
        }
예제 #25
0
        private void cmdSelectGrid_Click(System.Object eventSender, System.EventArgs eventArgs)
        {
            BaseObjs.acadActivate();
            bool   escape;
            string xRefPath = "";
            Entity obj      = xRef.getEntity("Select feature to stake:", out escape, out xRefPath);

            ObjectId idGuideline = ObjectId.Null;

            if (obj.GetType().Name != "Line")
            {
                Application.ShowAlertDialog("Grid Lines need to be simple Acad Lines, not Polylines, etc. - exiting...");
                return;
            }
            else
            {
                idGuideline = Stake_GetGuidelines.getGuidelines(obj);

                string strLayerName = idGuideline.getLayer();

                int intPos = strLayerName.IndexOf("|");
                strLayerName = strLayerName.Substring(intPos + 1);

                if (!Stake_Main.testClass("BLDG", strLayerName))
                {
                    return;
                }

                Stake_Forms.sForms.fStake.NameStakeObject = strLayerName;
            }

            Stake_GetNestedObjects.copyGRID((Stake_Forms.sForms.fStake.XRefDbModelSpace));//XrefDbModelSpace is source of grid selected

            idGuideline.delete();

            Stake_Forms.sForms.fStake.Hide();
            Application.ShowModelessDialog(Application.MainWindow.Handle, Stake_Forms.sForms.fGrid, false);
        }
예제 #26
0
 private void itemFixed_Click(object sender, EventArgs e)
 {
     if (!IsLoadDataSource())
     {
         return;
     }
     if (!PublicMethod.Instance.IsExecuteSystemCMD(""))
     {
         if (fp == null)
         {
             fp = new FixedPosition {
                 WindowState = FormWindowState.Normal, Visible = true
             };
             Application.ShowModelessDialog(fp);
         }
         else
         {
             fp.Visible     = true;
             fp.WindowState = FormWindowState.Normal;
             fp.Activate();
         }
     }
 }
예제 #27
0
        public static void mouse_KGGManager(object sender, EventArgs e)
        {
            var args = (selectEntityArgs)e;
            var com  = DBManager.Instance.GetEntity <Common_n>(args.g3eObject.G3E_FID);

            //if (args.g3eObject.G3E_FNO == 149)
            //{
            //    var gnzw = DBManager.Instance.GetEntity<Gg_pd_gnwzmc_n>(args.g3eObject.G3E_FID);
            //    if (gnzw.GNWZ_FL.Contains("美式"))
            //    {
            //        PublicMethod.Instance.AlertDialog("美式箱变无开关柜");
            //        return;
            //    }
            //}
            if (com != null)
            {
                if (!SwitchCabinetManage.IsLoadSwitchWnd)
                {
                    var scm = new SwitchCabinetManage(com.G3E_ID, com.G3E_FID);
                    Application.ShowModelessDialog(scm);
                }
            }
        }
예제 #28
0
        public void LoadAddinManager() // This method can have any name
        {
            form_AddinManager frm = form_AddinManager.GetUniqueForm();

            if (_addinManagerFirstLoaded)
            {
                // 将上次插件卸载时保存的程序集数据加载进来

                var nodesInfo = AssemblyInfoDllManager.GetInfosFromSettings();
                frm.RefreshTreeView(nodesInfo);

                //
                _addinManagerFirstLoaded = false;
            }
            else
            {
            }
            // 先清空以前已经选择的对象集合
            SetImpliedSelection();

            frm.WindowState = FormWindowState.Normal; // 取消其最小化
            Application.ShowModelessDialog(null, frm);
            //Application.ShowModalDialog(frm);
        }
예제 #29
0
파일: Stake_Main2.cs 프로젝트: 15831944/EM
        processAlign(string nameLayer, ObjectId idPolyGuideline)
        {
            BlockTableRecord ms       = null;
            List <POI>       varPOI   = new List <POI>();
            ObjectId         idTable  = ObjectId.Null;
            ObjectId         idAlign  = ObjectId.Null;
            string           nameXRef = "";
            ResultBuffer     rb;

            TypedValue[] tvs;

            switch (fStake.ClassObj)
            {
            case "BLDG":

                Stake_GetNestedObjects.copyGRID((fStake.XRefDbModelSpace));     //XrefDbModelSpace is source of grid selected
                idPolyGuideline.delete();
                fStake.Hide();
                Application.ShowModelessDialog(Application.MainWindow.Handle, fGrid, false);

                break;

            case "CURB":
                rb = xRef.getXRefsContainingTargetDwgName("GCAL");
                if (rb == null)
                {
                    Autodesk.AutoCAD.ApplicationServices.Application.ShowAlertDialog("GCAL drawing not attached");
                    return;
                }

                tvs      = rb.AsArray();
                nameXRef = tvs[0].Value.ToString();
                ms       = xRef.getXRefBlockTableRecordMS(nameXRef);

                processCurb(nameLayer, idPolyGuideline, ms, nameXRef, ref varPOI, out idAlign);

                idTable = Stake_Table.makeTable(idAlign, varPOI);
                Stake_Table.addTableData(idTable, varPOI);

                break;

            case "FL":
                rb = xRef.getXRefsContainingTargetDwgName("GCAL");
                if (rb == null)
                {
                    Autodesk.AutoCAD.ApplicationServices.Application.ShowAlertDialog("GCAL drawing not attached");
                    return;
                }

                tvs      = rb.AsArray();
                nameXRef = tvs[0].Value.ToString();
                ms       = xRef.getXRefBlockTableRecordMS(nameXRef);

                processFlowline(nameLayer, idPolyGuideline, ms, nameXRef, ref varPOI, out idAlign);

                //        fStake.POI = varPOI

                idTable = Stake_Table.makeTable(idAlign, varPOI);
                Stake_Table.addTableData(idTable, varPOI);

                break;

            case "SEWER":
                rb = xRef.getXRefsContainingTargetDwgName("UTIL");
                if (rb == null)
                {
                    Autodesk.AutoCAD.ApplicationServices.Application.ShowAlertDialog("UTIL drawing not attached");
                    return;
                }

                tvs      = rb.AsArray();
                nameXRef = tvs[0].Value.ToString();
                ms       = xRef.getXRefBlockTableRecordMS(nameXRef);

                processSewer(nameLayer, idPolyGuideline, ms, nameXRef, ref varPOI, out idAlign);

                //    Call makeProfileINVERT(objAlign, varPOI)

                //        fStake.POI = varPOI

                idTable = Stake_Table.makeTable(idAlign, varPOI);
                Stake_Table.addTableData(idTable, varPOI);

                break;

            case "WTR":

                processWater(nameLayer, idPolyGuideline, ms, ref varPOI, out idAlign);

                idTable = Stake_Table.makeTable(idAlign, varPOI);
                Stake_Table.addTableData(idTable, varPOI);

                break;
            }

            fStake.POI_CALC = varPOI;
            //#############################################################
        }
예제 #30
0
 private void cmdDone_Click(object sender, EventArgs e)
 {
     this.Hide();
     Application.ShowModelessDialog(Application.MainWindow.Handle, Stake_Forms.sForms.fStake, false);
 }