Ejemplo n.º 1
0
        /// <summary>
        /// 根据定义信息自动生成拓扑图
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void barButtonItem31_ItemClick(object sender, ItemClickEventArgs e)
        {
            try
            {
                //barStaticItem1.Caption = "自动生成拓扑图";
                if (!GraphOpt.IsGraphicEdit)
                {
                    //DevExpress.XtraEditors.XtraMessageBox.Show("当前图形正在预览,请先停止预览!");
                    // barStaticItem1.Caption = "当前图形正在预览,请先停止预览!";
                    return;
                }

                //只有拓扑图才支持此命令
                if (GraphOpt.getGraphicNowType() == 1)
                {
                    GraphOpt.AutoDragTopologyTrans(mx);
                }
                else
                {
                    //DevExpress.XtraEditors.XtraMessageBox.Show("此操作只支持拓扑图!");
                    // barStaticItem1.Caption = "此操作只支持拓扑图!";
                }
            }
            catch (Exception ex)
            {
                LogHelper.Error("barButtonItem31_ItemClick" + ex.Message + ex.StackTrace);
            }
        }