コード例 #1
0
ファイル: ProcessLine.cs プロジェクト: cxfwolfkings/EIM
        /// <summary>
        /// 显示工序关联草图界面
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void RefProcessToSketchToolStripMenuItem_Click(object sender, EventArgs e)
        {
            TreeNode selectedNode = tvProcessLine.GetNodeAt(p);

            if (selectedNode == null)
            {
                return;
            }


            string routingId     = GlobalCache.Instance.RoutingId;
            string operid        = selectedNode.Tag.ToString();
            string componectName = GlobalCache.Instance.ComponetName;

            if (SketchRefProcess.CurrentSketchRefProcess != null)
            {
                SketchRefProcess sketchRefProcess = SketchRefProcess.CurrentSketchRefProcess;
                sketchRefProcess.ShowDialog();
            }
            else
            {
                SketchRefProcess sketchRefProcess = new SketchRefProcess(routingId, operid, componectName, pDoc);
                sketchRefProcess.ShowDialog();
            }
        }
コード例 #2
0
        public void SketchToProcess()
        {
            string routingId     = GlobalCache.Instance.RoutingId;
            string componentName = GlobalCache.Instance.ComponetName;
            string operId        = GlobalCache.Instance.OperId;


            IModelDoc2 modDoc = (IModelDoc2)iSwApp.ActiveDoc;

            if (string.IsNullOrEmpty(componentName))
            {
                componentName = modDoc.GetPathName().Substring(
                    modDoc.GetPathName().LastIndexOf('\\') + 1);
            }
            if (string.IsNullOrEmpty(operId))
            {
                MessageBox.Show("还没有选择工序!");
                return;
            }


            SketchRefProcess sketchrefProcess = new SketchRefProcess(routingId, operId, componentName, modDoc);

            sketchrefProcess.ShowDialog();
        }
コード例 #3
0
 private void SketchRefProcess_FormClosing(object sender, FormClosingEventArgs e)
 {
     SketchRefProcess.CurrentSketchRefProcess = null;
 }