Пример #1
0
        public void setNfCS(Nf nf, Point3d position, string cs, int index, string[] hhmj, string[] zmmj, string[] qtmj)
        {
            Editor editor = Application.DocumentManager.MdiActiveDocument.Editor;

            for (int i = 0; i < 5; i++)
            {
                string text = "";
                for (int j = 0; j < 2; j++)
                {
                    double  num        = position.X + (double)j * 5.36;
                    double  num2       = position.Y - (double)(i + 2) * 2.4;
                    double  num3       = position.X + (double)(j + 1) * 5.36;
                    double  num4       = position.Y - (double)(i + 3) * 2.4;
                    Point3d pt         = new Point3d(num, num2, 0.0);
                    Point3d pt2        = new Point3d(num3, num4, 0.0);
                    string  windowText = this.getWindowText(pt, pt2);
                    if (windowText.Trim().Equals(""))
                    {
                        break;
                    }
                    if (j == 0)
                    {
                        text = cs + ":" + windowText;
                    }
                    else
                    {
                        text = text + ":" + windowText;
                    }
                    if (text.Contains("混合") && text.Length > 5 && !windowText.Equals(""))
                    {
                        if (hhmj[index] != null)
                        {
                            editor.WriteMessage(string.Concat(new string[]
                            {
                                "编码是:",
                                nf.getZdnum(),
                                ",",
                                cs,
                                " 层结构有问题"
                            }));
                        }
                        hhmj[index] = text;
                    }
                    else if (text.Contains("砖木") && text.Length > 5 && !windowText.Equals(""))
                    {
                        if (zmmj[index] != null)
                        {
                            editor.WriteMessage(string.Concat(new string[]
                            {
                                "编码是:",
                                nf.getZdnum(),
                                ",",
                                cs,
                                " 层结构有问题"
                            }));
                        }
                        zmmj[index] = text;
                    }
                    else if (text.Contains("其他") && text.Length > 5 && !windowText.Equals(""))
                    {
                        if (qtmj[index] != null)
                        {
                            editor.WriteMessage(string.Concat(new string[]
                            {
                                "编码是:",
                                nf.getZdnum(),
                                ",",
                                cs,
                                " 层结构有问题"
                            }));
                        }
                        qtmj[index] = text;
                    }
                    else if (!text.Contains(":混合") && !text.Contains(":砖木") && !text.Contains(":其他") && !windowText.Equals(""))
                    {
                        editor.WriteMessage(string.Concat(new string[]
                        {
                            "姓名是:",
                            nf.getCbfmc(),
                            "结构:",
                            text,
                            ",有问题"
                        }));
                    }
                }
            }
            nf.setHhMj(hhmj);
            nf.setZmMj(zmmj);
            nf.setQtMj(qtmj);
        }
Пример #2
0
        public void setSubTotal(Nf nf, Point3d position, string[] sub)
        {
            Editor editor = Application.DocumentManager.MdiActiveDocument.Editor;

            for (int i = 0; i < 5; i++)
            {
                string text = "";
                for (int j = 0; j < 2; j++)
                {
                    double  num        = position.X + (double)j * 5.36;
                    double  num2       = position.Y - (double)(i + 2) * 2.4;
                    double  num3       = position.X + (double)(j + 1) * 5.36;
                    double  num4       = position.Y - (double)(i + 3) * 2.4;
                    Point3d pt         = new Point3d(num, num2, 0.0);
                    Point3d pt2        = new Point3d(num3, num4, 0.0);
                    string  windowText = this.getWindowText(pt, pt2);
                    if (windowText.Trim().Equals(""))
                    {
                        break;
                    }
                    if (j == 0)
                    {
                        text = text + "小计" + windowText + ":";
                    }
                    else
                    {
                        text = text + "" + windowText;
                    }
                    if (text.Contains("混合") && text.Length > 3 && !windowText.Equals(""))
                    {
                        if (sub[0] != null)
                        {
                        }
                        sub[0] = text;
                    }
                    else if (text.Contains("砖木") && text.Length > 3 && !windowText.Equals(""))
                    {
                        if (sub[1] != null)
                        {
                        }
                        sub[1] = text;
                    }
                    else if (text.Contains("其他") && text.Length > 3 && !windowText.Equals(""))
                    {
                        if (sub[2] != null)
                        {
                        }
                        sub[2] = text;
                    }
                    else if (!text.Contains("小计混合:") && !text.Contains("小计砖木:") && !text.Contains("小计其他:") && !windowText.Equals(""))
                    {
                        editor.WriteMessage(string.Concat(new string[]
                        {
                            "姓名是:",
                            nf.getCbfmc(),
                            "结构:",
                            text,
                            ",有问题"
                        }));
                    }
                }
            }
            nf.setSubTotal(sub);
        }