Пример #1
0
        /// <summary>
        /// Конструктор
        /// </summary>
        public Cartogram(Graphics g, PictureBox mypic, Pen pen)
        {
            this._zona = new List <oneTVS>();



            this._listtechAxis    = new OneTechAxis[4];
            this._listtechAxis[0] = new OneTechAxis("I");
            this._listtechAxis[1] = new OneTechAxis("II");
            this._listtechAxis[2] = new OneTechAxis("III");
            this._listtechAxis[3] = new OneTechAxis("IV");


            this.FA      = new int();
            this.Fstep   = new int();
            this.Fcenter = new int();
            this.myPen   = pen;

            this.MyGoalPen = new Pen(Color.Red);
            //this.MyGoalPen.Color = Color.DarkRed;
            this.MyGoalPen.Width = 6;



            // this.MyGoalPen.DashStyle = DashStyle.Dot;
            this.g   = g;
            this.pic = mypic;

            this.ScreanAngle = 0;


            this.fuelBath    = new FuelBath(this.ScreanAngle, this.pic.Width);
            this.driTable    = new DriTable();
            this.ionChambers = new IonChambers();


            ////Эта кисть будет потом все решать при загрузке
            //           linGrBrush = new LinearGradientBrush(
            //new Point(0, 0),
            //new Point(this.pic.Width - 100, this.pic.Height),
            //Color.Gold,   // Opaque red
            //Color.Brown);  // Opaque blue
            linGrBrush = new LinearGradientBrush(
                new Point(0, 0),
                new Point(this.pic.Width - 100, this.pic.Height),
                Color.LightBlue, // Opaque red
                Color.Blue);     // Opaque blue



            ////в этом массиве лежат номера граничных ТВС, чтобы от их координат рисовать координатную сетку
            faza[0] = new List <int> {
                0, 6, 15, 25, 36, 48, 61, 75, 88, 102, 115, 127, 138, 148, 157
            };
            faza[1] = new List <int> {
                74, 60, 47, 35, 24, 14, 13, 5, 4, 3, 2, 1, 0, 7, 6, 15, 25, 36, 48, 61, 23, 12, 11, 10, 9, 8, 16
            };
            faza[2] = new List <int> {
                162, 156, 147, 137, 126, 114, 101, 87, 74, 60, 47, 35, 24, 14, 5
            };
            faza[3] = new List <int> {
                101, 114, 126, 137, 147, 156, 146, 155, 162, 154, 161, 153, 160, 152, 159, 151, 158, 150, 157, 149, 139, 148, 138, 127, 115, 102, 88
            };



            for (int i = 0; i < 163; i++)
            {
                this._zona.Add(new oneTVS());

                _zona[i].Cord  = MyConst.setka[i];
                _zona[i].Color = Color.White;

                _zona[i].TVSnumber = i;
                _zona[i].IsLoaded  = false;
            }
            StreamReader sr = new StreamReader("fuel_load_sequence.dat");
            string       line;

            line = sr.ReadLine();
            int k = 0;

            while (line != null)
            {
                _zona[k].LoadNumber = int.Parse(line);
                line = sr.ReadLine();
                k++;
            }
            sr.Close();
        }
Пример #2
0
        /// <summary>
        /// Конструктор
        /// </summary>
        public Cartogram(Graphics g, PictureBox mypic, Pen pen)
        {
            // this._zona = new oneTVS[MyConst.setka.Length];
            this._zona = new List <oneTVS>();

            this._listtechAxis = new OneTechAxis[4];

            this._listtechAxis[0] = new OneTechAxis("I");
            this._listtechAxis[1] = new OneTechAxis("II");
            this._listtechAxis[2] = new OneTechAxis("III");
            this._listtechAxis[3] = new OneTechAxis("IV");

            //for (int i = 0; i < 163; i++)
            //{
            // this._zona.Add(new oneTVS());
            //}

            this.FA      = new int();
            this.Fstep   = new int();
            this.Fcenter = new int();
            this.myPen   = pen;

            this.MyGoalPen = new Pen(Color.Red);
            //this.MyGoalPen.Color = Color.DarkRed;
            this.MyGoalPen.Width = 6;
            // this.MyGoalPen.DashStyle = DashStyle.Dot;
            this.g   = g;
            this.pic = mypic;

            this.ScreanAngle = 0;


            this.fuelBath = new FuelBath(this.ScreanAngle, this.pic.Width);
            this.driTable = new DriTable();



            faza[0] = new List <int> {
                0, 6, 15, 25, 36, 48, 61, 75, 88, 102, 115, 127, 138, 148, 157
            };
            faza[1] = new List <int> {
                74, 60, 47, 35, 24, 14, 13, 5, 4, 3, 2, 1, 0, 7, 6, 15, 25, 36, 48, 61, 23, 12, 11, 10, 9, 8, 16
            };
            faza[2] = new List <int> {
                162, 156, 147, 137, 126, 114, 101, 87, 74, 60, 47, 35, 24, 14, 5
            };
            faza[3] = new List <int> {
                101, 114, 126, 137, 147, 156, 146, 155, 162, 154, 161, 153, 160, 152, 159, 151, 158, 150, 157, 149, 139, 148, 138, 127, 115, 102, 88
            };

            linGrBrush = new LinearGradientBrush(
                new Point(0, 0),
                new Point(this.pic.Width - 100, this.pic.Height),
                Color.Gold,   // Opaque red
                Color.Brown); // Opaque blue


            for (int i = 0; i < 163; i++)
            {
                this._zona.Add(new oneTVS());

                _zona[i].Cord  = MyConst.setka[i];
                _zona[i].Color = Brushes.White;

                _zona[i].TVSnumber = i;
                _zona[i].IsLoaded  = false;
            }
            StreamReader sr = new StreamReader("fuel_load_sequence.dat");
            string       line;

            line = sr.ReadLine();
            int k = 0;

            while (line != null)
            {
                _zona[k].LoadNumber = int.Parse(line);
                line = sr.ReadLine();
                k++;
            }
            sr.Close();
        }