Esempio n. 1
0
 /// <summary>
 ///  创建加工名字
 /// </summary>
 public void CreateOperationNameModel(ElectrodeTemplate type)
 {
     try
     {
         CompterToolName tool = cam.GetTool();
         template = ElectrodeTemplateFactory.CreateOperation(type, tool);
     }
     catch (Exception ex)
     {
         throw ex;
     }
     template.CreateProgramName();
 }
        public static AbstractElectrodeTemplate CreateOperation(ElectrodeTemplate type, CompterToolName tool)
        {
            AbstractElectrodeTemplate ao = null;

            switch (type)
            {
            case ElectrodeTemplate.SimplenessVerticalEleTemplate:
                ao = new SimplenessVerticalEleTemplate(tool);
                break;

            case ElectrodeTemplate.PlanarAndSufaceEleTemplate:
                ao = new PlanarAndSufaceEleTemplate(tool);
                break;

            case ElectrodeTemplate.PlanarAndZleveAndSufaceEleTemplate:
                ao = new PlanarAndZleveAndSufaceEleTemplate(tool);
                break;

            case ElectrodeTemplate.PlanarAndZleveEleTemplate:
                ao = new PlanarAndZleveEleTemplate(tool);
                break;

            case ElectrodeTemplate.User:
                ao = new UserEleTemplate(tool);
                break;

            case ElectrodeTemplate.ZleveAndSufaceEleTemplate:
                ao = new ZleveAndSufaceEleTemplate(tool);
                break;

            case ElectrodeTemplate.ZleveEleTemplate:
                ao = new ZleveEleTemplate(tool);
                break;

            case ElectrodeTemplate.PlanarAndZleveAndSufaceAndFlowCutEleTemplate:
                ao = new PlanarAndZleveAndSufaceAndFlowCutEleTemplate(tool);
                break;

            case ElectrodeTemplate.ZleveAndSufaceAndFlowCutEleTemplate:
                ao = new ZleveAndSufaceAndFlowCutEleTemplate(tool);
                break;

            default:
                break;
            }
            return(ao);
        }
 public OperationTreeListViewInfo(AbstractElectrodeTemplate template)
 {
     this.template = template;
 }