/// <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); }
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); } }
private void cmdStakeSta_Click(object sender, EventArgs e) { this.Hide(); fStaRange = Forms.Stake_Forms.sForms.fStaRange; Application.ShowModelessDialog(Application.MainWindow.Handle, fStaRange, false); }
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); }
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(); }
/// <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; }
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); } }
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); }
/*工单锁定设备管理*/ private void ToolSMI_Gdsd_Click(object sender, EventArgs e) { if (!IsLoadDataSource()) { return; } var woroe = new WorkOrderRangeOfEntity(); Application.ShowModelessDialog(woroe); }
/*受电馈线管理*/ private void ToolSMI_Sdkxgl_Click(object sender, EventArgs e) { if (!IsLoadDataSource()) { return; } var SDKXForm = new SDKXView(); Application.ShowModelessDialog(SDKXForm); }
/*支线管理*/ private void ToolSMI_Zxgl_Click(object sender, EventArgs e) { if (!IsLoadDataSource()) { return; } var rm = new RegionalManagement(); Application.ShowModelessDialog(rm); }
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); } }
private void ToolSMI_SHBSearch_Click(object sender, EventArgs e) { if (!IsLoadDataSource()) { return; } if (!PublicMethod.Instance.IsExecuteSystemCMD("")) { var tt = new YHHSearch(); Application.ShowModelessDialog(tt); } }
private void ToolSMI_Mxlj_Click(object sender, EventArgs e) { if (!IsLoadDataSource()) { return; } if (!PublicMethod.Instance.IsExecuteSystemCMD("")) { var MxToYxDlg = new ConnectMxToYx(); Application.ShowModelessDialog(MxToYxDlg); } }
private void TSMI_Topology_Click(object sender, EventArgs e) { if (!IsLoadDataSource()) { return; } if (!PublicMethod.Instance.IsExecuteSystemCMD("")) { var tt = new TraceManager(); Application.ShowModelessDialog(tt); } }
/*测量工具*/ private void MeasureItem_Click(object sender, EventArgs e) { if (!IsLoadDataSource()) { return; } if (!PublicMethod.Instance.IsExecuteSystemCMD("zmc1")) { var tt = new Measure(); Application.ShowModelessDialog(tt); } }
/*坐标定位*/ private void ToolSMI_ZB_Click(object sender, EventArgs e) { if (!IsLoadDataSource()) { return; } if (!PublicMethod.Instance.IsExecuteSystemCMD("")) { coordinateForm = new CoordinateForm(); Application.ShowModelessDialog(coordinateForm); } }
/// <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); } }
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(); }
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; } }
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); }
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); } }
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(); } } }
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)); } }
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); }
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(); } } }
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); } } }
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); }
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; //############################################################# }
private void cmdDone_Click(object sender, EventArgs e) { this.Hide(); Application.ShowModelessDialog(Application.MainWindow.Handle, Stake_Forms.sForms.fStake, false); }