Exemple #1
0
        public override object Clone()
        {
            RangeBox rngbox = new RangeBox();

            rngbox.Type       = _type.Clone();
            rngbox.Color      = _color.Clone();
            rngbox.EType      = _etype.Clone();
            rngbox.EColor     = _ecolor.Clone();
            rngbox.ESize      = _esize.Clone();
            rngbox.GroupingBy = _groupBy.Clone();
            rngbox.Visible    = this.Visible;
            return(rngbox);
        }
Exemple #2
0
        public override void SetDefault()
        {
            Variables         = null;
            GroupingVariables = null;
            Mean = new Mean()
            {
                Visible = false
            };
            CMean = new CMean()
            {
                Visible = false
            };
            IQRBox = new IQRBox()
            {
                Visible = true
            };
            RBox = new RangeBox()
            {
                Visible = false
            };
            Outlier = new Outlier()
            {
                Visible = true
            };
            Individual = new Individual()
            {
                Visible = false
            };
            Whisker = new Whisker()
            {
                Visible = true
            };
            YScale      = new ContScale(ScaleDirection.Y_Axis);
            XScale      = new CateScale(ScaleDirection.X_Axis);
            Panel       = new MPanel();
            MeanDatlab  = new Meanlab();
            IndivDatlab = new Indivlab();
            //MeanDatlab.GetCommand = () =>
            //{
            //    if (!MeanDatlab.Visible) return "";
            //    if (MeanDatlab.DatlabType == Component.Datlab.DisplayType.Column && MeanDatlab.LabelColumn == null) return "# 未指定給 Datlab 欄位\r\n";
            //    StringBuilder cmnd = new StringBuilder();
            //    switch (MeanDatlab.DatlabType)
            //    {
            //        case Component.Datlab.DisplayType.YValue:
            //            cmnd.AppendLine(" Mealab;");
            //            cmnd.AppendLine("  YValue;");
            //            break;
            //        case Component.Datlab.DisplayType.RowNumber:
            //            cmnd.AppendLine(" Mealab;");
            //            cmnd.AppendLine("  Rownum;");
            //            break;
            //        case Component.Datlab.DisplayType.Column:
            //            cmnd.AppendFormat(" Mealab {0};\r\n", MeanDatlab.LabelColumn);
            //            break;
            //    }
            //    if (MeanDatlab.FontColor > 0) cmnd.AppendFormat("  TColor {0};\r\n", MeanDatlab.FontColor);
            //    if (MeanDatlab.FontSize > 0) cmnd.AppendFormat("  PSize {0};\r\n", MeanDatlab.FontSize);
            //    if (MeanDatlab.Bold) cmnd.AppendLine("  Bold;");
            //    if (MeanDatlab.Italic) cmnd.AppendLine("  Italic;");
            //    if (MeanDatlab.Underline) cmnd.AppendLine("  Underline;");
            //    if (MeanDatlab.Angle < MtbTools.MISSINGVALUE) cmnd.AppendFormat("  Angle {0};\r\n", MeanDatlab.Angle);
            //    if (MeanDatlab.Offset != null) cmnd.AppendFormat("  Offset {0};\r\n", string.Join(" &\r\n", MeanDatlab.Offset));
            //    if (MeanDatlab.Placement != null) cmnd.AppendFormat("  Placement {0};\r\n", string.Join(" &\r\n", MeanDatlab.Placement));

            //    foreach (LabelPosition pos in MeanDatlab.PositionList)
            //    {
            //        cmnd.Append(pos.GetCommand());
            //    }
            //    cmnd.Append(Legend.GetCommand());
            //    return cmnd.ToString();
            //};
            GetCommand = DefaultCommand;
        }