Ejemplo n.º 1
0
        public override string ToString()
        {
            var signals = Signals;
            var message = "自动控制记录详细信息\r\n\r\n";

            message += string.Format("运行结果:自动控制{0}\r\n\r\n", Interupted ? "被中断" : "完成");
            message += string.Format("本记录包含{0}条焊接指令。\r\n\r\n", signals.Count);

            var formatString = "{0} {1} \r\n";

            message += string.Format(formatString, "  记录名:", Name);
            message += string.Format(formatString, "任务书号:", TaskName);
            message += string.Format(formatString, "  操作人:", OperatorName);
            var timeString = CreatedAt.ToLongDateString() + CreatedAt.ToLongTimeString();

            message += string.Format(formatString, "焊接时间:", timeString);
            message += string.Format(formatString, "焊接项目:", WeldingItem);
            message += string.Format(formatString, "缸套规格:", GangtaoType);
            message += string.Format(formatString, "焊接电流:", WeldingCurrent + "A");
            message += string.Format(formatString, "室内温度:", RoomTemperature + "℃");
            message += string.Format(formatString, "氩气流量:", ArFlow + "L/min");
            message += "\r\n";
            message += string.Format("焊接模板:\r\n{0}", Template.ShortDescription());
            message += "\r\n\r\n";

            for (int n = 0; n < signals.Count; n++)
            {
                var signal = signals[n];
                message += string.Format("{0}. {1}, 开始于 {2:N3} 秒后\r\n", n + 1, signal.ToString(), signal.Delta / 1000.0);
            }

            return(message);
        }
Ejemplo n.º 2
0
        public string ShortDescription()
        {
            var timeString = CreatedAt.ToLongDateString() + CreatedAt.ToLongTimeString();
            var name       = (Name == "") ? "(未命名)" : Name;
            var item       = (WeldingItem == "") ? "未知项目" : WeldingItem;
            var type       = (GangtaoType == "") ? "?" : GangtaoType;
            var task       = (TaskName == "") ? "无" : TaskName;

            return(string.Format("{0}: {1}({2}), 任务书号:{3}, 记录于:{4}", name, item, type, task, timeString));
        }
Ejemplo n.º 3
0
 public override string ToString()
 {
     return("SayHello created at " + CreatedAt.ToLongTimeString());
 }