Esempio n. 1
0
    public void HandleClickTool(ToolGroupType type, Tool tool)
    {
        switch (type)
        {
        case ToolGroupType.Geometry:
            GeometryOperation(tool);
            //Classify("正方体ABCD-A1B1C1D1");
            //Classify("三棱锥P-ABC");
            //Classify("三角形旋转体");
            break;

        case ToolGroupType.Condition:
            AddConditionOperation(tool);
            //Classify("旋转");
            break;

        case ToolGroupType.Auxiliary:
            AddAuxiliaryOperation(tool);
            //Classify("连接AD1");
            //Classify("面ABCD的面积");
            //Classify("作AB中点P");
            //Classify("连接A1BC1作平面");
            break;

        case ToolGroupType.Measure:
            AddMeasureOperation(tool);
            //Classify("过点B1作平面A1BC1的垂线交于点P");
            //Classify("角AD1D的角度");
            //Classify("过点P作平面A1B1C1D1的垂线交于点O");
            //Classify("连接AD1");
            break;
        }
    }
Esempio n. 2
0
    private void ButtonAtGroup(ToolButton button, int groupIndex, int buttonIndex)
    {
        Tool tool = toolGroups[groupIndex].Tools[buttonIndex];

        button.gameObject.name = tool.Name;
        button.SetIcon(tool.Icon);

        ToolGroupType type = toolGroups[groupIndex].Type;

        button.OnClick = () =>
        {
            if (OnClickTool != null)
            {
                OnClickTool(type, tool);
            }
        };

        button.OnEnter = () =>
        {
            float buttonPosX = buttonGroups[groupIndex].GetPosX() + button.GetPosX();
            SetTip(tool.Description, buttonPosX);
            toolTip.SetActive(true);
        };

        button.OnExit = () =>
        {
            toolTip.SetActive(false);
        };
    }
Esempio n. 3
0
    public void HandleClickTool(ToolGroupType type, Tool tool)
    {
        switch (type)
        {
        case ToolGroupType.Geometry:
            GeometryOperation(tool);
            break;

        case ToolGroupType.Condition:
            AddConditionOperation(tool);
            break;

        case ToolGroupType.Auxiliary:
            AddAuxiliaryOperation(tool);
            break;

        case ToolGroupType.Measure:
            AddMeasureOperation(tool);
            break;
        }
    }
Esempio n. 4
0
 public Record(ToolGroupType type, Tool tool)
 {
     this.type = type;
     this.tool = tool;
     form      = null;
 }