示例#1
0
        protected override string DefaultCommand()
        {
            StringBuilder cmnd = new StringBuilder();

            if (LDisplay != null)
            {
                cmnd.AppendLine(string.Format("LDisplay {0};", string.Join(" ", LDisplay)));
            }
            if (HDisplay != null)
            {
                cmnd.AppendLine(string.Format("HDisplay {0};", string.Join(" ", HDisplay)));
            }
            if (Min < MtbTools.MISSINGVALUE)
            {
                cmnd.AppendLine(string.Format("Min {0};", Min));
            }
            if (Max < MtbTools.MISSINGVALUE)
            {
                cmnd.AppendLine(string.Format("Max {0};", Max));
            }

            cmnd.Append(Ticks.GetCommand());
            cmnd.Append(Refes.GetCommand());
            cmnd.Append(Label.GetCommand());
            if (cmnd.Length > 0) //如果有設定再加入
            {
                cmnd.Insert(0, string.Format("Scale {0};\r\n", (int)Direction));
            }
            cmnd.Append(SecScale.GetCommand());
            return(cmnd.ToString());
        }
示例#2
0
        protected override string DefaultCommand()
        {
            if (Variable == null)
            {
                return("");
            }


            StringBuilder cmnd = new StringBuilder();

            cmnd.AppendFormat("Scale {0};\r\n", (int)Direction);
            cmnd.AppendFormat(" Secs {0};\r\n", string.Join("&\r\n", Variable));

            if (_lDisplay != null)
            {
                cmnd.AppendLine(string.Format("LDisplay {0};", string.Join(" ", _lDisplay)));
            }
            if (_hDisplay != null)
            {
                cmnd.AppendLine(string.Format("HDisplay {0};", string.Join(" ", _hDisplay)));
            }
            if (Min < MtbTools.MISSINGVALUE)
            {
                cmnd.AppendLine(string.Format("Min {0};", Min));
            }
            if (Max < MtbTools.MISSINGVALUE)
            {
                cmnd.AppendLine(string.Format("Max {0};", Max));
            }
            cmnd.Append(Ticks.GetCommand());
            cmnd.Append(Refes.GetCommand());
            cmnd.Append(Label.GetCommand());
            return(cmnd.ToString());
        }