예제 #1
0
        private void Form3_Load(object sender, EventArgs e)
        {
            FormBorderStyle = FormBorderStyle.None;        // 폼 상단 표시줄 제거

            this.BackColor = Color.FromArgb(163, 127, 74); // 폼 백컬러

            //판넬
            Panel panel1;

            panel1           = new Panel();
            panel1.BackColor = Color.FromArgb(237, 227, 183);
            panel1.Size      = new Size(1170, 700);
            panel1.Location  = new Point(50, 50);
            panel1.Region    = Region.FromHrgn(COMMON_Create_Ctl.CreateRoundRectRgn(2, 2, panel1.Width, panel1.Height, 15, 15));

            // 객체 선언 및 생성
            chart1 = new Chart();


            ChartArea chartArea1 = new ChartArea();
            Legend    legend1    = new Legend();
            Series    series1    = new Series();


            // 기본 설정
            chartArea1.Name      = "ChartArea1";
            legend1.Name         = "Legend1";
            series1.ChartArea    = "ChartArea1";
            series1.ChartType    = SeriesChartType.Line;
            series1.Legend       = "Legend1";
            series1.Name         = "Series1";
            chartArea1.BackColor = Color.FromArgb(237, 227, 183); // 배경색상
            legend1.BackColor    = Color.FromArgb(237, 227, 183); // 배경색상

            // 차트 기본 설정
            chart1.Name     = "chart1";
            chart1.Size     = new Size(310, 310);
            chart1.Location = new Point(500, 0);
            chart1.Text     = "chart1";
            chart1.ChartAreas.Add(chartArea1);
            chart1.Legends.Add(legend1);
            chart1.Series.Add(series1);
            chart1.BackColor = Color.FromArgb(237, 227, 183);
            _valueList1      = new List <int>();

            // 컨트롤 등록
            panel1.Controls.Add(chart1);
            this.Controls.Add(panel1);
            start();
        }
예제 #2
0
        private void Form4_Load(object sender, EventArgs e)
        {
            FormBorderStyle = FormBorderStyle.None;        // 폼 상단 표시줄 제거

            this.BackColor = Color.FromArgb(163, 127, 74); // 폼 백컬러

            //판넬
            Panel panel1;
            Panel panel2;

            panel1           = new Panel();
            panel1.BackColor = Color.FromArgb(237, 227, 183);
            panel1.Size      = new Size(580, 700);
            panel1.Location  = new Point(50, 50);
            panel1.Region    = Region.FromHrgn(COMMON_Create_Ctl.CreateRoundRectRgn(2, 2, panel1.Width, panel1.Height, 15, 15));

            panel2           = new Panel();
            panel2.BackColor = Color.FromArgb(237, 227, 183);
            panel2.Size      = new Size(580, 700);
            panel2.Location  = new Point(660, 50);
            panel2.Region    = Region.FromHrgn(COMMON_Create_Ctl.CreateRoundRectRgn(2, 2, panel1.Width, panel1.Height, 15, 15));

            this.Controls.Add(panel1);
            this.Controls.Add(panel2);
            ListView listView1 = new ListView();

            listView1.Size      = new Size(530, 500);
            listView1.Location  = new Point(25, 100);
            listView1.Region    = Region.FromHrgn(COMMON_Create_Ctl.CreateRoundRectRgn(2, 2, listView1.Width, listView1.Height, 15, 15));
            listView1.BackColor = Color.FromArgb(224, 224, 224);

            ListView listView2 = new ListView();

            listView2.Size      = new Size(530, 500);
            listView2.Location  = new Point(25, 100);
            listView2.Region    = Region.FromHrgn(COMMON_Create_Ctl.CreateRoundRectRgn(2, 2, listView2.Width, listView2.Height, 15, 15));
            listView2.BackColor = Color.FromArgb(224, 224, 224);

            panel1.Controls.Add(listView1);
            panel2.Controls.Add(listView2);
        }
예제 #3
0
        private void Form2_Load(object sender, EventArgs e)
        {
            FormBorderStyle = FormBorderStyle.None;// 폼 상단 표시줄 제거

            comm           = new COMMON_Create_Ctl();
            this.BackColor = Color.FromArgb(163, 127, 74);// 폼 백컬러

            //판넬
            Panel panel1;

            panel1           = new Panel();
            panel1.BackColor = Color.FromArgb(237, 227, 183);
            panel1.Size      = new Size(820, 700);
            panel1.Location  = new Point(400, 50);
            panel1.Region    = Region.FromHrgn(COMMON_Create_Ctl.CreateRoundRectRgn(2, 2, panel1.Width, panel1.Height, 15, 15));

            LBclass   lb1     = new LBclass(this, "label1", "label_name~", 24, 100, 100, 10, 10);
            ArrayList lbarray = new ArrayList();

            lbarray.Add(new LBclass(this, "원두", "원두 :", 15, 100, 40, 50, 170));
            lbarray.Add(new LBclass(this, "용량", "용량(단위KG) :", 15, 250, 40, 50, 210 + 20));
            lbarray.Add(new LBclass(this, "이물질", "이물질 제거 :", 15, 250, 40, 50, 250 + 40));
            lbarray.Add(new LBclass(this, "온도", "로스팅 온도 :", 15, 250, 40, 50, 290 + 60));
            lbarray.Add(new LBclass(this, "시간", "로스팅 시간 :", 15, 250, 40, 50, 330 + 80));
            lbarray.Add(new LBclass(this, "쿨링", "실온쿨링 시간 :", 15, 250, 40, 50, 370 + 100));
            lbarray.Add(new LBclass(this, "결점두", "결점두 확인 :", 15, 250, 40, 50, 410 + 120));
            lbarray.Add(new LBclass(this, "숙성", "숙성 기간 :", 15, 250, 40, 50, 450 + 140));
            for (int i = 0; i < lbarray.Count; i++)
            {
                Label lb = comm.lb((LBclass)lbarray[i]);

                lb.Font = new Font("견명조", 25F, FontStyle.Bold, GraphicsUnit.Point, ((byte)(129)));


                panel1.Controls.Add(lb);
            }
            //ArrayList btn_Txt = new ArrayList();

            //btn_Txt.Add(new BTNclass(this, "로스팅", "로스팅", 100, 100, 10, 10, btn_Click));
            //for(int i = 0; i< btn_Txt.Count; i++)
            //{
            //    Button btTxt = comm.btn((BTNclass)btn_Txt[i]);
            //    if (btTxt.Name == "로스팅")
            //    {
            //        btTxt.
            //    }
            //    panel1.Controls.Add(btTxt);
            //}

            TextBox textBox1 = new TextBox();

            textBox1.Size      = new Size(160, 50);
            textBox1.Location  = new Point(700, 100);
            textBox1.Multiline = true;
            textBox1.Region    = Region.FromHrgn(COMMON_Create_Ctl.CreateRoundRectRgn(2, 2, textBox1.Width, textBox1.Height, 15, 15));
            textBox1.Font      = new Font(Font.Name, 25, FontStyle.Bold);
            textBox1.ReadOnly  = true;
            textBox1.BackColor = Color.FromArgb(224, 224, 224);

            string time = String.Format("{0}h {1}m", "7", "10");

            textBox1.Text = string.Format("{0}", time);

            panel1.Controls.Add(textBox1);
            // 콤보박스==========================================================
            ArrayList Muchine_list = new ArrayList();

            Muchine_list.Add("머신1");
            Muchine_list.Add("머신2");
            Muchine_list.Add("머신3");

            ComboBox combo1 = new ComboBox();

            combo1.Size                  = new Size(300, 300);
            combo1.Location              = new Point(50, 80);
            combo1.Name                  = "콤보1";
            combo1.SelectedIndexChanged += Combo1_SelectedIndexChanged;
            Controls.Add(combo1);
            combo1.Font          = new Font(combo1.Font.Name, 27, FontStyle.Regular);
            combo1.DropDownStyle = ComboBoxStyle.DropDownList;
            for (int i = 0; i < Muchine_list.Count; i++)
            {
                combo1.Items.Add(Muchine_list[i]);
            }
            //상태표시 텍스트 박스================================================
            TextBox textBox = new TextBox();

            textBox.Size      = new Size(300, 400);
            textBox.Location  = new Point(50, 350);
            textBox.Multiline = true;
            textBox.Region    = Region.FromHrgn(COMMON_Create_Ctl.CreateRoundRectRgn(2, 2, textBox.Width, textBox.Height, 15, 15));
            textBox.Font      = new Font(Font.Name, 18, FontStyle.Regular);
            textBox.ReadOnly  = true;
            textBox.BackColor = Color.FromArgb(237, 227, 183);

            ArrayList machine_text = new ArrayList();

            machine_text.Add("결점두 확인요망 ");
            machine_text.Add("로스팅 완료 ");
            machine_text.Add("쿨링 완료 ");

            textBox.Text = string.Format(" -{0}", Muchine_list[1].ToString() + " " + machine_text[1].ToString());

            Controls.Add(textBox);
            //그래프 바 ===========================================================
            grap1 = new Panel();
            grap2 = new Panel();

            grap1.Height    = 50;
            grap1.Width     = 620;
            grap1.BackColor = Color.Silver;
            grap1.Location  = new Point(50, 100);


            grap2.Height    = 50;
            grap2.Width     = 10;
            grap2.BackColor = Color.Silver;
            grap2.Location  = new Point(50, 100);


            panel1.Controls.Add(grap2);
            panel1.Controls.Add(grap1);

            timer          = new Timer();
            timer.Interval = 9600;
            timer.Tick    += Timer_Tick;
            timer.Start();
            //버튼 =================================================================
            ArrayList btnArray = new ArrayList();

            btnArray.Add(new BTNclass(this, "설정", "설 정", 100, 60, 680, 530, btn1_Click));
            btnArray.Add(new BTNclass(this, "결점두 확인", "결점두 확인", 150, 60, 630, 600, btn2_Click));

            for (int i = 0; i < btnArray.Count; i++)
            {
                Button btn = comm.btn((BTNclass)btnArray[i]);

                if (btn.Name == "설정")
                {
                    btn.Font      = new Font("견명조", 20F, FontStyle.Bold, GraphicsUnit.Point, ((byte)(129))); // FontStyle.Regular
                    btn.FlatStyle = FlatStyle.Flat;
                    btn.ForeColor = Color.White;
                    btn.BackColor = Color.FromArgb(80, 200, 223);
                    btn.Region    = Region.FromHrgn(COMMON_Create_Ctl.CreateRoundRectRgn(2, 2, btn.Width, btn.Height, 15, 15));
                    btn.BackColor = Color.FromArgb(52, 152, 219);  // rgb(218,234,244)
                }
                else if (btn.Name == "결점두 확인")
                {
                    btn.Font      = new Font("견명조", 20F, FontStyle.Bold, GraphicsUnit.Point, ((byte)(129))); // FontStyle.Regular
                    btn.FlatStyle = FlatStyle.Flat;
                    btn.ForeColor = Color.White;
                    btn.BackColor = Color.FromArgb(80, 200, 223);
                    btn.Region    = Region.FromHrgn(COMMON_Create_Ctl.CreateRoundRectRgn(2, 2, btn.Width, btn.Height, 15, 15));
                    btn.BackColor = Color.FromArgb(52, 152, 219);  // rgb(218,234,244)
                }
                panel1.Controls.Add(btn);
            }
            this.Controls.Add(panel1);
        }
예제 #4
0
        private void Form1_Load(object sender, EventArgs e)
        {
            FormBorderStyle = FormBorderStyle.None;// 폼 상단 표시줄 제거

            this.BackColor = Color.FromArgb(163, 127, 74);
            //판넬
            panel1           = new Panel();
            panel1.BackColor = Color.FromArgb(237, 227, 183);
            panel1.Size      = new Size(1170, 700);
            panel1.Location  = new Point(50, 50);
            panel1.Region    = Region.FromHrgn(COMMON_Create_Ctl.CreateRoundRectRgn(2, 2, panel1.Width, panel1.Height, 15, 15));
            // 객체 선언 및 생성
            Chart chart1 = new Chart();
            Chart chart2 = new Chart();
            Chart chart3 = new Chart();
            Chart chart4 = new Chart();

            ChartArea chartArea1 = new ChartArea();
            Legend    legend1    = new Legend();
            Series    series1    = new Series();

            ChartArea chartArea2 = new ChartArea();
            Legend    legend2    = new Legend();
            Series    series2    = new Series();

            ChartArea chartArea3 = new ChartArea();
            Legend    legend3    = new Legend();
            Series    series3    = new Series();

            ChartArea chartArea4 = new ChartArea();
            Legend    legend4    = new Legend();
            Series    series4    = new Series();


            // 기본 설정
            chartArea1.Name      = "ChartArea1";
            legend1.Name         = "Legend1";
            series1.ChartArea    = "ChartArea1";
            series1.ChartType    = SeriesChartType.Doughnut;
            series1.Legend       = "Legend1";
            series1.Name         = "Series1";
            chartArea1.BackColor = Color.FromArgb(237, 227, 183); // 배경색상
            legend1.BackColor    = Color.FromArgb(237, 227, 183); // 배경색상

            chartArea2.Name      = "ChartArea2";
            legend2.Name         = "Legend2";
            series2.ChartArea    = "ChartArea2";
            series2.ChartType    = SeriesChartType.Doughnut;
            series2.Legend       = "Legend2";
            series2.Name         = "Series2";
            chartArea2.BackColor = Color.FromArgb(237, 227, 183); // 배경색상
            legend2.BackColor    = Color.FromArgb(237, 227, 183); // 배경색상

            chartArea3.Name      = "ChartArea3";
            legend3.Name         = "Legend3";
            series3.ChartArea    = "ChartArea3";
            series3.ChartType    = SeriesChartType.Doughnut;
            series3.Legend       = "Legend3";
            series3.Name         = "Series3";
            chartArea3.BackColor = Color.FromArgb(237, 227, 183); // 배경색상
            legend3.BackColor    = Color.FromArgb(237, 227, 183); // 배경색상

            chartArea4.Name      = "ChartArea4";
            legend4.Name         = "Legend4";
            series4.ChartArea    = "ChartArea4";
            series4.ChartType    = SeriesChartType.Doughnut;
            series4.Legend       = "Legend4";
            series4.Name         = "Series4";
            chartArea4.BackColor = Color.FromArgb(237, 227, 183); // 배경색상
            legend4.BackColor    = Color.FromArgb(237, 227, 183); // 배경색상
            // 차트 기본 설정
            chart1.Name     = "chart1";
            chart1.Size     = new Size(310, 310);
            chart1.Location = new Point(30, 0);
            chart1.Text     = "chart1";
            chart1.ChartAreas.Add(chartArea1);
            chart1.Legends.Add(legend1);
            chart1.Series.Add(series1);
            chart1.BackColor = Color.FromArgb(237, 227, 183);

            chart2.Name     = "chart2";
            chart2.Size     = new Size(310, 310);
            chart2.Location = new Point(400, 0);
            chart2.Text     = "chart2";
            chart2.ChartAreas.Add(chartArea2);
            chart2.Legends.Add(legend2);
            chart2.Series.Add(series2);
            chart2.BackColor = Color.FromArgb(237, 227, 183);

            chart3.Name     = "chart3";
            chart3.Size     = new Size(310, 310);
            chart3.Location = new Point(400 + 400, 0);
            chart3.Text     = "chart3";
            chart3.ChartAreas.Add(chartArea3);
            chart3.Legends.Add(legend3);
            chart3.Series.Add(series3);
            chart3.BackColor = Color.FromArgb(237, 227, 183);

            chart4.Name     = "chart4";
            chart4.Size     = new Size(310, 310);
            chart4.Location = new Point(30, 340);
            chart4.Text     = "chart4";
            chart4.ChartAreas.Add(chartArea4);
            chart4.Legends.Add(legend4);
            chart4.Series.Add(series4);
            chart4.BackColor = Color.FromArgb(237, 227, 183);

            // 데이터 부분

            ArrayList arry = Select_Webapi("Form1_Chart_all_Select");

            chart1.Series["Series1"].IsValueShownAsLabel = true;
            foreach (Hashtable ht in arry) // 이름 , 그램 차트그래프 데이터 삽입
            {
                chart1.Series["Series1"].Points.AddXY(ht["Bean_Name"].ToString(), ht["Gram"].ToString());
            }

            ArrayList arry1 = Select_Webapi("Form1_Chart_Roasting_select");

            chart2.Series["Series2"].IsValueShownAsLabel = true;
            foreach (Hashtable ht in arry1) // 이름 , 그램 차트그래프 데이터 삽입
            {
                chart2.Series["Series2"].Points.AddXY(ht["Bean_Name"].ToString(), ht["SUM(Roasting_Gram)"].ToString());
            }


            ArrayList arry2 = Select_Webapi("Form1_Chart_Product_select");

            chart3.Series["Series3"].IsValueShownAsLabel = true;
            foreach (Hashtable ht in arry2) // 이름 , 그램 차트그래프 데이터 삽입
            {
                chart3.Series["Series3"].Points.AddXY(ht["Bean_Name"].ToString(), ht["SUM(Product_Gram)"].ToString());
            }

            ArrayList arry3 = Select_Webapi("Form1_Chart_Bean_select");

            chart4.Series["Series4"].IsValueShownAsLabel = true;
            foreach (Hashtable ht in arry3) // 이름 , 그램 차트그래프 데이터 삽입
            {
                chart4.Series["Series4"].Points.AddXY(ht["Bean_Name"].ToString(), ht["Bean"].ToString());
            }



            // 컨트롤 등록
            panel1.Controls.Add(chart1);
            panel1.Controls.Add(chart2);
            panel1.Controls.Add(chart3);
            panel1.Controls.Add(chart4);
            this.Controls.Add(panel1);
            comm = new COMMON_Create_Ctl();
            //라벨
            LBclass   lb1     = new LBclass(this, "label1", "label_name~", 24, 100, 100, 10, 10);
            ArrayList lbarray = new ArrayList();

            lbarray.Add(new LBclass(this, "전체 원두", "전체 원두", 20, 200, 40, 60, 310));
            lbarray.Add(new LBclass(this, "로스팅", "로스팅", 20, 200, 40, 440, 310));
            lbarray.Add(new LBclass(this, "상품화", "상품화", 20, 200, 40, 860, 310));
            lbarray.Add(new LBclass(this, "생 두", "생 두", 20, 200, 40, 90, 650));
            for (int i = 0; i < lbarray.Count; i++)
            {
                Label lb = comm.lb((LBclass)lbarray[i]);

                lb.Font = new Font("견명조", 20F, FontStyle.Bold, GraphicsUnit.Point, ((byte)(129)));


                panel1.Controls.Add(lb);
            }
        }