tool used to draw line
Exemple #1
0
        const string selectFirst = "Please select a Vertex (or Crease) first!"; //error message

        /// <summary>
        /// constructor
        /// </summary>
        /// <param name="commandData">selected floor (or slab)</param>
        /// <param name="commandData">contains reference of Revit Application</param>
        public SlabShapeEditingForm(Floor floor, ExternalCommandData commandData)
        {
            InitializeComponent();
            m_commandData     = commandData;
            m_slabProfile     = new SlabProfile(floor, commandData);
            m_slabShapeEditor = floor.SlabShapeEditor;
            m_lineTool        = new LineTool();
            m_pointTool       = new LineTool();
            editorState       = EditorState.AddVertex;
            m_graphicsPaths   = new ArrayList();
            m_createdVertices = new ArrayList();
            m_createCreases   = new ArrayList();
            m_selectIndex     = -1;
            m_clickedIndex    = -1;
            m_toolPen         = new Pen(System.Drawing.Color.Blue, 2);
            m_selectPen       = new Pen(System.Drawing.Color.Red, 2);
            m_profilePen      = new Pen(System.Drawing.Color.Black, (float)(0.5));
        }
Exemple #2
0
        Pen m_toolPen; //pen use to draw new created vertex and crease

        #endregion Fields

        #region Constructors

        /// <summary>
        /// constructor
        /// </summary>
        /// <param name="commandData">selected floor (or slab)</param>
        /// <param name="commandData">contains reference of Revit Application</param>
        public SlabShapeEditingForm(Floor floor, ExternalCommandData commandData)
        {
            InitializeComponent();
            m_commandData = commandData;
            m_slabProfile = new SlabProfile(floor, commandData);
            m_slabShapeEditor = floor.SlabShapeEditor;
            m_lineTool = new LineTool();
            m_pointTool = new LineTool();
            editorState = EditorState.AddVertex;
            m_graphicsPaths = new ArrayList();
            m_createdVertices = new ArrayList();
            m_createCreases = new ArrayList();
            m_selectIndex = -1;
            m_clickedIndex = -1;
            m_toolPen = new Pen(System.Drawing.Color.Blue, 2);
            m_selectPen = new Pen(System.Drawing.Color.Red, 2);
            m_profilePen = new Pen(System.Drawing.Color.Black, (float)(0.5));
        }