示例#1
0
        public static string PrintTool(Tool.Utensile tool)
        {
            var rslt = string.Empty;

            if (tool is FresaCandela)
            {
                var f = tool as FresaCandela;
                rslt  = PrintMill(f.Diametro, 0, f.Diametro * 2, 0);
                rslt += "\n";
                rslt += PrintColor(Colors.Yellow);
            }
            if (tool is FresaSpianare)
            {
                var f = tool as FresaSpianare;
                rslt  = PrintMill(f.Diametro, f.RaggioInserto, f.Altezza, 45);
                rslt += "\n";
                rslt += PrintColor(Colors.CadetBlue);
            }
            if (tool is Centrino)
            {
                var f = tool as Centrino;
                rslt  = PrintCenterDrill(f.Diametro, 118, f.Diametro * 3, f.Diametro * 3, 60, f.Diametro * 7);
                rslt += "\n";
                rslt += PrintColor(Colors.DarkCyan);
            }
            if (tool is Punta)
            {
                var f = tool as Punta;
                rslt  = PrintDrill(f.Diametro, 118, f.Diametro * 7);
                rslt += "\n";
                rslt += PrintColor(Colors.Green);
            }

            if (tool is Svasatore)
            {
                var f = tool as Svasatore;
                rslt  = PrintChamferTool(f.Diametro * 2, 45, f.Diametro * 2, f.Diametro);
                rslt += "\n";
                rslt += PrintColor(Colors.GreenYellow);
            }

            return(FormatRsltString(rslt));
        }
示例#2
0
 internal void SetUtensile(Tool.Utensile utensile)
 {
     Utensile = utensile;
 }