예제 #1
0
 private void currency1_CheckedChanged(object sender, EventArgs e)
 {
     Text1.Text = "US Dollars";
     Text2.Text = "Ind Rupees";
     Box1.Clear();
     Box2.Clear();
 }
예제 #2
0
    // Start is called before the first frame update
    void Start()
    {
        circleObjList = new List <GameObject>();
        boxList       = new List <Transform>();
        boxColorList  = new List <SpriteRenderer>();
        boxTextList   = new List <Text>();

        boxList.Add(Box.GetComponent <Transform>());
        boxList.Add(Box1.GetComponent <Transform>());
        boxList.Add(Box2.GetComponent <Transform>());
        boxList.Add(Box3.GetComponent <Transform>());

        boxColorList.Add(Box.GetComponent <SpriteRenderer>());
        boxColorList.Add(Box1.GetComponent <SpriteRenderer>());
        boxColorList.Add(Box2.GetComponent <SpriteRenderer>());
        boxColorList.Add(Box3.GetComponent <SpriteRenderer>());

        boxTextList.Add(Box.transform.GetChild(0).gameObject.GetComponent <Text>());
        boxTextList.Add(Box1.transform.GetChild(0).gameObject.GetComponent <Text>());
        boxTextList.Add(Box2.transform.GetChild(0).gameObject.GetComponent <Text>());
        boxTextList.Add(Box3.transform.GetChild(0).gameObject.GetComponent <Text>());

        // 円オブジェクトの作成カウント初期化
        for (int i = 0; i < boxTextList.Count; i++)
        {
            boxTextList[i].text = Random.Range(1, 5 + 1).ToString();
        }
    }
예제 #3
0
 private void length_CheckedChanged_1(object sender, EventArgs e)
 {
     Text1.Text = "Meters";
     Text2.Text = "Inches";
     Box1.Clear();
     Box2.Clear();
 }
        private void Box1_SelectedIndexChanged(object sender, EventArgs e)
        {
            clearStuff();
            DataTable dt     = dm.getDataSet().Tables[0];
            string    column = Box1.GetItemText(Box1.SelectedItem);

            if (column == DataManager.BILATERAL || column == DataManager.NT || column == DataManager.VIGENTE)
            {
                foreach (DataRow row in dt.Rows)
                {
                    if (row[column] != DBNull.Value)
                    {
                        if (!Box2.Items.Contains((string)row[column]))
                        {
                            Box2.Items.Add(row[column]);
                        }
                    }
                }
                Box2.Visible = true;
            }
            else if (column == DataManager.LA || column == DataManager.EO ||
                     column == DataManager.SC || column == DataManager.TRATADO)
            {
                text1.Visible        = true;
                buttonString.Visible = true;
            }
            else
            {
                lowerBound.Visible   = true;
                upperBound.Visible   = true;
                buttonNumber.Visible = true;
            }
        }
예제 #5
0
 private void weight_CheckedChanged_1(object sender, EventArgs e)
 {
     Text1.Text = "Kilograms";
     Text2.Text = "Pounds";
     Box1.Clear();
     Box2.Clear();
 }
예제 #6
0
 private void temprature1_CheckedChanged(object sender, EventArgs e)
 {
     Text1.Text = "Celcius";
     Text2.Text = "Farenhite";
     Box1.Clear();
     Box2.Clear();
 }
예제 #7
0
 public void Draw(Box1 box1)
 {
     if (IsAlive)
     {
         box1.Draw(Game.Pixel, Bounds, Color.Green);
     }
 }
예제 #8
0
        public void CanCreateBox()
        {
            var box = new Box1(30);

            Assert.NotNull(box);
            Assert.Equal(30, box.Length(0));
        }
예제 #9
0
        protected override void LoadContent()
        {
            box1 = new Box1(GraphicsDevice);

            Font = Content.Load <SpriteFont>("Font");

            Pixel = new Texture2D(box1.GraphicsDevice, 1, 1);
            Pixel.SetData(new[] { Color.White });
        }
예제 #10
0
    public void M2()
    {
        var e  = Source <Elem>(2);
        var b1 = new Box1(null, e);
        var b2 = new Box2(b1);

        Sink(b2.box1.elem1); // no flow
        Sink(b2.box1.elem2); // $ hasValueFlow=2
    }
예제 #11
0
    public void M2()
    {
        var e  = new Elem();
        var b1 = new Box1(null, e);
        var b2 = new Box2(b1);

        Sink(b2.box1.elem1); // FP due to flow in M1 above
        Sink(b2.box1.elem2); // flow
    }
예제 #12
0
    public void M1()
    {
        var e  = new Elem();
        var b1 = new Box1(e, null);
        var b2 = new Box2(b1);

        Sink(b2.box1.elem1); // flow
        Sink(b2.box1.elem2); // FP due to flow in M2 below
    }
예제 #13
0
    public void M2()
    {
        var e  = new Elem();
        var b1 = new Box1(null, e);
        var b2 = new Box2(b1);

        Sink(b2.box1.elem1); // no flow
        Sink(b2.box1.elem2); // flow
    }
예제 #14
0
    public void M1()
    {
        var e  = Source <Elem>(1);
        var b1 = new Box1(e, null);
        var b2 = new Box2(b1);

        Sink(b2.box1.elem1); // $ hasValueFlow=1
        Sink(b2.box1.elem2); // no flow
    }
예제 #15
0
 protected override void OnAppearing()
 {
     base.OnAppearing();
     Task.WhenAll(
         Box1.FadeTo(1, 500, Easing.SinIn),
         Box2.FadeTo(1, 500, Easing.SinIn),
         Box3.FadeTo(1, 500, Easing.SinIn),
         Box4.FadeTo(1, 500, Easing.SinIn),
         Box5.FadeTo(1, 500, Easing.SinIn),
         Box6.FadeTo(1, 500, Easing.SinIn),
         Box7.FadeTo(1, 500, Easing.SinIn),
         Box8.FadeTo(1, 500, Easing.SinIn),
         Box9.FadeTo(1, 500, Easing.SinIn));
 }
예제 #16
0
        public void CanPutWidgetInBox()
        {
            var box         = new Box1(10);
            var orientation = new int[] { 5 };
            var widget      = new Widget(orientation);
            var position    = new int[] { 0 };

            Assert.NotNull(box);
            Assert.Equal(10, box.Length(0));
            Assert.NotNull(widget);
            Assert.Equal(5, widget.Orientation[0]);

            var result = box.PlaceInBox(widget, position);

            Assert.True(result);

            Assert.Equal("*****     ", box.LayerToString());
        }
    static void Main(string[] args)
    {
        // box 1 specification
        Box1.length  = 6.0;
        Box1.breadth = 7.0;
        Box1.height  = 5.0;

        // box 2 specification
        Box2.length  = 11.0;
        Box2.breadth = 16.0;
        Box2.height  = 12.0;

        Console.WriteLine("Volume of Box1 : {0}", Box1.Volume(Box1.length, Box1.breadth, Box1.height));
        Console.WriteLine("Volume of Box1 : {0}", Box2.Volume(Box2.length, Box2.breadth, Box2.height));


        Console.ReadKey();
    }
예제 #18
0
 private void Reset()
 {
     Box1.Load("Res/box1.png");
     Box2.Load("Res/box1.png");
     Box3.Load("Res/box1.png");
     Box4.Load("Res/box1.png");
     Box5.Load("Res/box1.png");
     Box6.Load("Res/box1.png");
     Box7.Load("Res/box1.png");
     Box8.Load("Res/box1.png");
     Box9.Load("Res/box1.png");
     Box10.Load("Res/box1.png");
     Box11.Load("Res/box1.png");
     Box12.Load("Res/box1.png");
     Box13.Load("Res/box1.png");
     Box14.Load("Res/box1.png");
     Box15.Load("Res/box1.png");
     Box16.Load("Res/box1.png");
     Box1.Enabled   = false;
     Box2.Enabled   = false;
     Box3.Enabled   = false;
     Box4.Enabled   = false;
     Box5.Enabled   = false;
     Box6.Enabled   = false;
     Box7.Enabled   = false;
     Box8.Enabled   = false;
     Box9.Enabled   = false;
     Box10.Enabled  = false;
     Box11.Enabled  = false;
     Box12.Enabled  = false;
     Box13.Enabled  = false;
     Box14.Enabled  = false;
     Box15.Enabled  = false;
     Box16.Enabled  = false;
     timer1.Enabled = false;
     for (int i = 0; i < 4; i++)
     {
         for (int j = 0; j < 4; j++)
         {
             tab[i, j] = 1;
         }
     }
 }
예제 #19
0
        /// <summary>
        /// draw function for the grid
        /// </summary>
        /// <param name="box1"></param>
        public void Draw(Box1 box1)
        {
            foreach (Box box in boxes)
            {
                box.Draw(box1);
            }

            // Draw vertical gridlines.
            for (int i = 0; i < Size.X; i++)
            {
                box1.Draw(Game1.Pixel, new Rectangle(i * Game1.BoxSize - 1, 0, 1, Size.Y * Game1.BoxSize), Color.DarkGray);
            }

            // Draw horizontal gridlines.
            for (int j = 0; j < Size.Y; j++)
            {
                box1.Draw(Game1.Pixel, new Rectangle(0, j * Game1.BoxSize - 1, Size.X * Game1.BoxSize, 1), Color.DarkGray);
            }
        }
예제 #20
0
        private void Rand()
        {
            Random        _r      = new Random();
            HashSet <int> IdenCol = new HashSet <int>();

            while (IdenCol.Count < 4)
            {
                IdenCol.Add(_r.Next(1, 5));
            }
            int[] IdenColArray = IdenCol.ToArray();
            for (int i = 0; i < 4; i++)
            {
                int x = IdenColArray[i];
                int y = _r.Next(2, 4);
                switch (i)
                {
                case 0:
                    if (x == 1)
                    {
                        Box1.Load("Res/box" + y.ToString() + ".png"); Box1.Enabled = false; tab[0, 0] = y;
                    }
                    else if (x == 2)
                    {
                        Box2.Load("Res/box" + y.ToString() + ".png"); Box2.Enabled = false; tab[0, 1] = y;
                    }
                    else if (x == 3)
                    {
                        Box3.Load("Res/box" + y.ToString() + ".png"); Box3.Enabled = false; tab[0, 2] = y;
                    }
                    else if (x == 4)
                    {
                        Box4.Load("Res/box" + y.ToString() + ".png"); Box4.Enabled = false; tab[0, 3] = y;
                    }
                    break;

                case 1:
                    if (x == 1)
                    {
                        Box5.Load("Res/box" + y.ToString() + ".png"); Box5.Enabled = false; tab[1, 0] = y;
                    }
                    else if (x == 2)
                    {
                        Box6.Load("Res/box" + y.ToString() + ".png"); Box6.Enabled = false; tab[1, 1] = y;
                    }
                    else if (x == 3)
                    {
                        Box7.Load("Res/box" + y.ToString() + ".png"); Box7.Enabled = false; tab[1, 2] = y;
                    }
                    else if (x == 4)
                    {
                        Box8.Load("Res/box" + y.ToString() + ".png"); Box8.Enabled = false; tab[1, 3] = y;
                    }
                    break;

                case 2:
                    if (x == 1)
                    {
                        Box9.Load("Res/box" + y.ToString() + ".png"); Box9.Enabled = false; tab[2, 0] = y;
                    }
                    else if (x == 2)
                    {
                        Box10.Load("Res/box" + y.ToString() + ".png"); Box10.Enabled = false; tab[2, 1] = y;
                    }
                    else if (x == 3)
                    {
                        Box11.Load("Res/box" + y.ToString() + ".png"); Box11.Enabled = false; tab[2, 2] = y;
                    }
                    else if (x == 4)
                    {
                        Box12.Load("Res/box" + y.ToString() + ".png"); Box12.Enabled = false; tab[2, 3] = y;
                    }
                    break;

                case 3:
                    if (x == 1)
                    {
                        Box13.Load("Res/box" + y.ToString() + ".png"); Box13.Enabled = false; tab[3, 0] = y;
                    }
                    else if (x == 2)
                    {
                        Box14.Load("Res/box" + y.ToString() + ".png"); Box14.Enabled = false; tab[3, 1] = y;
                    }
                    else if (x == 3)
                    {
                        Box15.Load("Res/box" + y.ToString() + ".png"); Box15.Enabled = false; tab[3, 2] = y;
                    }
                    else if (x == 4)
                    {
                        Box16.Load("Res/box" + y.ToString() + ".png"); Box16.Enabled = false; tab[3, 3] = y;
                    }
                    break;
                }
            }
        }
예제 #21
0
 public Box2(Box1 b)
 {
     Box1 = b;
 }
예제 #22
0
 public Box2(Box1 b1)
 {
     this.box1 = b1;
 }
예제 #23
0
 public void SetBox1(Box1 b)
 {
     Box1 = b;
 }