Пример #1
0
        private void MenuPan(int sX, int sY, int pX, int pY)
        {
            panel3 = new Panel();
            Btnclass bt1 = new Btnclass(this, "Home", "홈", 80, 70, 0, 0, btn1_Click);
            Btnclass bt2 = new Btnclass(this, "bookmark", "즐겨찾기", 80, 70, 80, 0, btn2_Click);

            Btnclass bt3 = new Btnclass(this, "feedback", "피드백", 80, 70, 800, 0, btn3_Click);
            Btnclass bt4 = new Btnclass(this, "option", "설정", 80, 70, 880, 0, btn4_Click);

            panel3.Location  = new Point(pX, pY);
            panel3.Size      = new Size(sX, sY);
            panel3.BackColor = Color.White;
            //panel3.BackgroundImageLayout = ImageLayout.Stretch;
            //panel3.BackgroundImage = (Bitmap)WindowsFormsHiWeather.Properties.Resources.background;
            //panel3.BackgroundImage = (Bitmap)WindowsFormsHiWeather.Properties.Resources.background1;
            Controls.Add(panel3);

            panel3.Controls.Add(dc.btn1(bt1));
            panel3.Controls.Add(dc.btn1(bt2));
            panel3.Controls.Add(dc.btn1(bt3));
            panel3.Controls.Add(dc.btn1(bt4));
        }
Пример #2
0
        private void Form_main_Load(object sender, EventArgs e)
        {
            this.IsMdiContainer = true;
            this.Size           = new Size(1000, 600);
            //this.BackColor = Color.AliceBlue;
            //==================================================
            //금천구 날씨추가
            days[0]  = new Days(15, "부분적으로 맑음", 15, 5);
            days[1]  = new Days(16, "부분적으로 맑음", 13, -3);
            days[2]  = new Days(17, "부분적으로 맑음", 10, -2);
            days[3]  = new Days(18, "부분적으로 맑음", 12, 3);
            days[4]  = new Days(19, "맑음", 13, -1);
            days[5]  = new Days(20, "대체로 흐림", 10, 1);
            days[6]  = new Days(21, "부분적으로 맑음", 10, -1);
            hours[0] = new Conditions(0, "대체로 흐림", 14, 0, 49, 2, "북서");
            hours[1] = new Conditions(3, "대체로 흐림", 14, 0, 53, 2, "북");
            hours[2] = new Conditions(6, "부분적으로 맑음", 14, 0, 47, 2, "북서");
            hours[3] = new Conditions(9, "부분적으로 맑음", 14, 0, 46, 2, "북서");
            hours[4] = new Conditions(12, "부분적으로 맑음", 14, 0, 43, 2, "북서");
            hours[5] = new Conditions(15, "부분적으로 맑음", 14, 0, 40, 2, "북");
            hours[6] = new Conditions(18, "대체로 흐림", 14, 0, 40, 2, "북동");
            hours[7] = new Conditions(21, "대체로 흐림", 14, 0, 42, 2, "북동");

            weatherlist.Add(new Weather("금천구", "서울특별시", days, hours));
            //==================================================

            //==================================================
            //관악구 날씨추가
            days[0]  = new Days(15, "부분적으로 맑음", 15, 5);
            days[1]  = new Days(16, "부분적으로 맑음", 13, -3);
            days[2]  = new Days(17, "부분적으로 맑음", 10, -2);
            days[3]  = new Days(18, "부분적으로 맑음", 12, 3);
            days[4]  = new Days(19, "맑음", 13, -1);
            days[5]  = new Days(20, "대체로 흐림", 10, 1);
            days[6]  = new Days(21, "부분적으로 맑음", 10, -1);
            hours[0] = new Conditions(0, "대체로 흐림", 5, 0, 49, 2, "북서");
            hours[1] = new Conditions(3, "대체로 흐림", 7, 0, 53, 2, "북");
            hours[2] = new Conditions(6, "부분적으로 맑음", 8, 0, 47, 2, "북서");
            hours[3] = new Conditions(9, "부분적으로 맑음", 11, 0, 46, 2, "북서");
            hours[4] = new Conditions(12, "부분적으로 맑음", 14, 0, 43, 2, "북서");
            hours[5] = new Conditions(15, "부분적으로 맑음", 12, 0, 40, 2, "북");
            hours[6] = new Conditions(18, "대체로 흐림", 11, 0, 40, 2, "북동");
            hours[7] = new Conditions(21, "대체로 흐림", 8, 0, 42, 2, "북동");

            weatherlist.Add(new Weather("관악구", "서울특별시", days, hours));
            //==================================================

            panel           = new Panel();
            panel.Size      = new Size(1000, 600);
            panel.Location  = new Point(0, 100);
            panel.BackColor = Color.AliceBlue;
            Controls.Add(panel);

            Drawclass d = new Drawclass();

            Button button = d.btn1(new Btnclass(this, "btn1", "일기예보", 200, 100, 0, 0, btn_click));

            this.Controls.Add(button);
            this.Controls.Add(d.btn1(new Btnclass(this, "btn2", "즐겨찾기", 200, 100, 200, 0, btn_click)));
            this.Controls.Add(d.btn1(new Btnclass(this, "btn_feedback", "피드백", 60, 40, 800, 20, btn2_click)));
            this.Controls.Add(d.btn1(new Btnclass(this, "btn_setting", "설정", 60, 40, 900, 20, btn2_click)));
        }