Example #1
0
 private void LayerChangeEvent(bool checkState, OECPLayer layer)
 {
     AllLayerControlInvisible();
     if (layer.IsVisible)
     {
         _canvas.ChangeCurrentLayer(layer);
         if (layer.IsGrid)
         {
             _gridControl.Visible = true;
         }
         else if (layer.IsLine)
         {
             _lControl.Visible = true;
             if (_lineTool == null)
             {
                 _lineTool = new LineTool();
             }
             _canvas.SetCurrentDrawTool(_lineTool);
         }
         else
         {
             _vertexControl.Visible = true;
             if ((_vtxTool) == null)
             {
                 _vtxTool = new VertexTool();
             }
             _canvas.SetCurrentDrawTool(_vtxTool);
         }
     }
 }