public void LoadUI()
        {
            main_window = new UI_Window(this);
            {
                propietari_text = new UI_Text(new Point(20, 15), 200, 30, "Propietari:");
                propietari_text.SetFont("Courier New", 8.5f);
                main_window.AddElement(propietari_text);

                finca_text = new UI_Text(new Point(400, 15), 200, 30, "Finca:");
                finca_text.SetFont("Courier New", 8.5f);
                main_window.AddElement(finca_text);

                propietari_nom_text = new UI_Text(new Point(120, 15), 200, 30, "TOMAS DEOSDAT OMEDES");
                propietari_nom_text.SetFont("Courier New", 8.5f);
                main_window.AddElement(propietari_nom_text);

                finca_nom_text = new UI_Text(new Point(456, 15), 200, 30, "FINCA1");
                finca_nom_text.SetFont("Courier New", 8.5f);
                main_window.AddElement(finca_nom_text);

                treballs_text = new UI_Text(new Point(20, 50), 80, 100, "Treball:");
                treballs_text.SetFont("Courier New", 8.5f);
                main_window.AddElement(treballs_text);

                treballs_combobox = new UI_ComboBox(new Point(25, 70), 180, 40);
                treballs_combobox.SetFont("Courier New", 8.5f);
                main_window.AddElement(treballs_combobox);

                data_text = new UI_Text(new Point(240, 50), 30, 100, "Data:");
                data_text.SetFont("Courier New", 8.5f);
                main_window.AddElement(data_text);

                data_dataselect = new UI_DateSelect(new Point(242, 70), 200, 100);
                data_dataselect.SetFont("Courier New", 8.5f);
                main_window.AddElement(data_dataselect);

                descripcio_text = new UI_Text(new Point(20, 110), 100, 80, "Descripció:");
                descripcio_text.SetFont("Courier New", 8.5f);
                main_window.AddElement(descripcio_text);

                descripcio_text_input = new UI_TextInput(new Point(22, 130), 421, 70);
                descripcio_text_input.SetFont("Courier New", 8.5f);
                main_window.AddElement(descripcio_text_input);

                eficacia_text = new UI_Text(new Point(460, 110), 100, 40, "Eficacia:");
                eficacia_text.SetFont("Courier New", 8.5f);
                main_window.AddElement(eficacia_text);

                eficacia_combobox = new UI_ComboBox(new Point(460, 130), 150, 30);
                eficacia_combobox.SetFont("Courier New", 8.5f);
                main_window.AddElement(eficacia_combobox);

                adob_text = new UI_Text(new Point(660, 110), 100, 40, "Adob:");
                adob_text.SetFont("Courier New", 8.5f);
                main_window.AddElement(adob_text);

                adob_combobox = new UI_ComboBox(new Point(660, 130), 150, 30);
                adob_combobox.SetFont("Courier New", 8.5f);
                main_window.AddElement(adob_combobox);

                personal_text = new UI_Text(new Point(460, 160), 160, 40, "Personal:");
                personal_text.SetFont("Courier New", 8.5f);
                main_window.AddElement(personal_text);

                personal_combobox = new UI_ComboBox(new Point(460, 180), 150, 30);
                personal_combobox.SetFont("Courier New", 8.5f);
                main_window.AddElement(personal_combobox);

                maquinaria_text = new UI_Text(new Point(660, 160), 160, 40, "Maquinaria:");
                maquinaria_text.SetFont("Courier New", 8.5f);
                main_window.AddElement(maquinaria_text);

                maquinaria_combobox = new UI_ComboBox(new Point(660, 180), 150, 30);
                maquinaria_combobox.SetFont("Courier New", 8.5f);
                main_window.AddElement(maquinaria_combobox);

                unitats_text = new UI_Text(new Point(20, 212), 100, 80, "Unitats:");
                unitats_text.SetFont("Courier New", 8.5f);
                main_window.AddElement(unitats_text);

                unitats_mesura_combobox = new UI_ComboBox(new Point(140, 230), 50, 30);
                unitats_mesura_combobox.SetFont("Courier New", 8.5f);
                main_window.AddElement(unitats_mesura_combobox);

                estat_panel = new UI_Panel(new Point(255, 230), 380, 30);
                estat_panel.SetFont("Courier New", 8.5f);
                main_window.AddElement(estat_panel);

                pendent_check = new UI_RadioButton(new Point(0, 0), "Pendent");
                pendent_check.SetFont("Courier New", 8.5f);
                estat_panel.AddElement(pendent_check);
                proces_check = new UI_RadioButton(new Point(120, 0), "Procés");
                proces_check.SetFont("Courier New", 8.5f);
                estat_panel.AddElement(proces_check);
                acabat_check = new UI_RadioButton(new Point(240, 0), "Acabat");
                acabat_check.SetFont("Courier New", 8.5f);
                estat_panel.AddElement(acabat_check);

                fertirrigacio_checkbox = new UI_CheckBox(new Point(640, 225), 130, 30, "Fertirrigacio");
                fertirrigacio_checkbox.SetFont("Courier New", 8.5f);
                main_window.AddElement(fertirrigacio_checkbox);

                unitats_text_input = new UI_MaskedTextInput(new Point(22, 230), 100, 70);
                unitats_text_input.SetFont("Courier New", 8.5f);
                main_window.AddElement(unitats_text_input);

                remove_treball_button = new UI_Button(new Point(160, 475), 130, 25, "Elimina parte");
                remove_treball_button.AddImage(principal.imageList1, 3);
                remove_treball_button.SetFont("Courier New", 8.5f);
                remove_treball_button.GetElement().Click += new System.EventHandler(this.EliminaLineaParte);
                main_window.AddElement(remove_treball_button);

                modifica_treball_button = new UI_Button(new Point(21, 475), 130, 25, "Modifica parte");
                modifica_treball_button.AddImage(principal.imageList1, 8);
                modifica_treball_button.SetFont("Courier New", 8.5f);
                modifica_treball_button.GetElement().Click += new System.EventHandler(this.ModificaParteSeleccionat);
                main_window.AddElement(modifica_treball_button);

                grid = new UI_Grid(new Point(22, 260), 870, 200);
                grid.AddColumn("Treball", 70, true); grid.AddColumn("Descripció", 300); grid.AddColumn("Unitats", 200); grid.AddColumn("tblLinea", 0, true, false);
                grid.AddColumn("Unitat Metrica", 130, true); grid.AddColumn("Estat", 200, true); grid.AddColumn("Parcela viti", 100, true); grid.AddColumn("Ha", 60, true);
                grid.AddColumn("Fertirrigació", 100, true); grid.AddColumn("Eficacia tractament", 70, true);
                grid.AddColumn("Aplicador", 100, true); grid.AddColumn("Maquinaria", 100, true); grid.AddColumn("Adob", 100, true);
                grid.GetElement().Click += new System.EventHandler(this.LineaParteClick);
                grid.SetFont("Courier New", 8.5f);
                main_window.AddElement(grid);

                accepta_button = new UI_Button(new Point(773, 475), 120, 25, "Desa i surt");
                accepta_button.AddImage(principal.imageList1, 2);
                accepta_button.SetFont("Courier New", 8.5f);
                accepta_button.SetColor(Color.Cornsilk);
                accepta_button.GetElement().Click += new System.EventHandler(this.Accepta);
                main_window.AddElement(accepta_button);
            }
        }
예제 #2
0
        void LoadUI()
        {
            main_window = new UI_Window(this);
            {
                grid = new UI_Grid(new Point(15, 15), 470, 405);
                grid.AddColumn("Data", 150, true); grid.AddColumn("IC", 70, true); grid.AddColumn("PH", 70, true);
                grid.AddColumn("Grau alc", 70, true); grid.AddColumn("Densitat produccio", 70, true); grid.AddColumn("Id", 50, true);
                grid.GetElement().Click += new System.EventHandler(this.AnaliticaClick);
                grid.SetFont("Courier New", 8.5f);
                main_window.AddElement(grid);

                data_text = new UI_Text(new Point(500, 20), 30, 120, "Data:");
                data_text.SetFont("Courier New", 8.5f);
                main_window.AddElement(data_text);

                data_dataselect = new UI_DateSelect(new Point(503, 40), 200, 100);
                data_dataselect.SetFont("Courier New", 8.5f);
                main_window.AddElement(data_dataselect);

                intensitat_colorant_text = new UI_Text(new Point(500, 80), 200, 30, "Intensitat colorant:");
                intensitat_colorant_text.SetFont("Courier New", 8.5f);
                main_window.AddElement(intensitat_colorant_text);

                intensitat_colorant_text_input = new UI_MaskedTextInput(new Point(503, 100), 200, 30);
                intensitat_colorant_text_input.SetFont("Courier New", 8.5f);
                main_window.AddElement(intensitat_colorant_text_input);

                ph_text = new UI_Text(new Point(740, 80), 255, 30, "pH:");
                ph_text.SetFont("Courier New", 8.5f);
                main_window.AddElement(ph_text);

                ph_text_input = new UI_MaskedTextInput(new Point(743, 100), 100, 30);
                ph_text_input.SetFont("Courier New", 8.5f);
                main_window.AddElement(ph_text_input);

                grau_text = new UI_Text(new Point(500, 140), 255, 30, "Grau alc:");
                grau_text.SetFont("Courier New", 8.5f);
                main_window.AddElement(grau_text);

                grau_text_input = new UI_MaskedTextInput(new Point(503, 160), 100, 30);
                grau_text_input.SetFont("Courier New", 8.5f);
                main_window.AddElement(grau_text_input);

                densitat_text = new UI_Text(new Point(740, 140), 255, 30, "Densitat prod:");
                densitat_text.SetFont("Courier New", 8.5f);
                main_window.AddElement(densitat_text);

                densitat_text_input = new UI_MaskedTextInput(new Point(743, 160), 100, 30);
                densitat_text_input.SetFont("Courier New", 8.5f);
                main_window.AddElement(densitat_text_input);

                estat_sanitari_text = new UI_Text(new Point(500, 200), 255, 30, "Estat sanitari:");
                estat_sanitari_text.SetFont("Courier New", 8.5f);
                main_window.AddElement(estat_sanitari_text);

                estat_sanitari_text_input = new UI_MaskedTextInput(new Point(503, 220), 450, 30);
                estat_sanitari_text_input.SetFont("Courier New", 8.5f);
                main_window.AddElement(estat_sanitari_text_input);

                observacions_text = new UI_Text(new Point(500, 260), 255, 30, "Observacions:");
                observacions_text.SetFont("Courier New", 8.5f);
                main_window.AddElement(observacions_text);

                observacions_text_input = new UI_TextInput(new Point(503, 290), 450, 130);
                observacions_text_input.SetFont("Courier New", 8.5f);
                main_window.AddElement(observacions_text_input);

                elimina_button = new UI_Button(new Point(353, 431), 160, 25, "Elimina analítica");
                elimina_button.GetElement().Click += new System.EventHandler(this.Elimina);
                elimina_button.AddImage(principal.imageList1, 3);
                elimina_button.SetFont("Courier New", 8.5f);
                main_window.AddElement(elimina_button);

                actualitza_button = new UI_Button(new Point(163, 431), 180, 25, "Actualitza analítica");
                actualitza_button.GetElement().Click += new System.EventHandler(this.Actualitza);
                actualitza_button.AddImage(principal.imageList1, 8);
                actualitza_button.SetFont("Courier New", 8.5f);
                main_window.AddElement(actualitza_button);

                crea_button = new UI_Button(new Point(14, 431), 140, 25, "Crea analítica");
                crea_button.GetElement().Click += new System.EventHandler(this.Crea);
                crea_button.AddImage(principal.imageList1, 6);
                crea_button.SetFont("Courier New", 8.5f);
                main_window.AddElement(crea_button);

                accepta_button = new UI_Button(new Point(840, 431), 120, 25, "Desa i surt");
                accepta_button.GetElement().Click += new System.EventHandler(this.Accepta);
                accepta_button.AddImage(principal.imageList1, 2);
                accepta_button.SetFont("Courier New", 8.5f);
                accepta_button.SetColor(Color.Cornsilk);
                main_window.AddElement(accepta_button);
            }
        }
예제 #3
0
        public void LoadUI()
        {
            main_window = new UI_Window(this);
            {
                treballs_text = new UI_Text(new Point(20, 10), 30, 100, "Treball:");
                treballs_text.SetFont("Courier New", 8.5f);
                main_window.AddElement(treballs_text);

                treballs_combobox = new UI_ComboBox(new Point(25, 30), 180, 40);
                treballs_combobox.SetFont("Courier New", 8.5f);
                main_window.AddElement(treballs_combobox);

                data_text = new UI_Text(new Point(240, 10), 30, 100, "Data:");
                data_text.SetFont("Courier New", 8.5f);
                main_window.AddElement(data_text);

                data_dataselect = new UI_DateSelect(new Point(242, 30), 200, 100);
                data_dataselect.SetFont("Courier New", 8.5f);
                main_window.AddElement(data_dataselect);

                estat_panel = new UI_Panel(new Point(25, 60), 380, 40);
                main_window.AddElement(estat_panel);

                pendent_check = new UI_RadioButton(new Point(0, 0), "Pendent");
                pendent_check.SetFont("Courier New", 8.5f);
                estat_panel.AddElement(pendent_check);
                proces_check = new UI_RadioButton(new Point(120, 0), "Procés");
                proces_check.SetFont("Courier New", 8.5f);
                estat_panel.AddElement(proces_check);
                acabat_check = new UI_RadioButton(new Point(240, 0), "Acabat");
                acabat_check.SetFont("Courier New", 8.5f);
                estat_panel.AddElement(acabat_check);


                descripcio_text = new UI_Text(new Point(20, 100), 100, 30, "Descripció:");
                descripcio_text.SetFont("Courier New", 8.5f);
                main_window.AddElement(descripcio_text);

                descripcio_text_input = new UI_TextInput(new Point(22, 120), 421, 70);
                descripcio_text_input.SetFont("Courier New", 8.5f);
                main_window.AddElement(descripcio_text_input);

                add_treball_button = new UI_Button(new Point(463, 120), 30, 30, "+");
                add_treball_button.SetFont("Courier New", 8.5f);
                add_treball_button.GetElement().Click += new System.EventHandler(this.AfegeigParte);
                main_window.AddElement(add_treball_button);

                remove_treball_button = new UI_Button(new Point(463, 160), 30, 30, "-");
                remove_treball_button.SetFont("Courier New", 8.5f);
                remove_treball_button.GetElement().Click += new System.EventHandler(this.EliminaParte);
                main_window.AddElement(remove_treball_button);

                grid = new UI_Grid(new Point(22, 210), 970, 350);

                List <object> unitats    = new List <object>();
                List <object> maquinaria = new List <object>();
                List <object> aplicadors = new List <object>();
                List <object> adobs      = new List <object>();

                for (int i = 0; i < propietaris_manager.GetUnitatsMetriques().Count; i++)
                {
                    unitats.Add(propietaris_manager.GetUnitatsMetriques()[i]);
                }

                for (int i = 0; i < propietaris_manager.GetMaquinaria().Count; i++)
                {
                    maquinaria.Add(propietaris_manager.GetMaquinaria()[i]);
                }

                for (int i = 0; i < propietaris_manager.GetPersonal().Count; i++)
                {
                    aplicadors.Add(propietaris_manager.GetPersonal()[i]);
                }

                for (int i = 0; i < propietaris_manager.GetAdobs().Count; i++)
                {
                    adobs.Add(propietaris_manager.GetAdobs()[i]);
                }

                grid.AddColumn("Treball", 50, true); grid.AddColumn("Descripció", 500); grid.AddColumn("Unitats", 130, false); grid.AddColumn("tblLinea", 0, true, false);
                grid.AddComboBoxColumn("Unitat Metrica", 130, unitats); grid.AddColumn("Parcela viti", 100, true); grid.AddColumn("Ha", 60, true);
                grid.AddCheckBoxColumn("Fertirrigació", 100, false); grid.AddComboBoxColumn("Eficacia tractament", 150, false, "0", "1", "2", "3");
                grid.AddComboBoxColumn("Aplicador", 100, aplicadors); grid.AddComboBoxColumn("Maquinaria", 100, maquinaria);
                grid.AddComboBoxColumn("Adob", 100, adobs);
                grid.SetFont("Courier New", 8.5f);
                main_window.AddElement(grid);

                accepta_button = new UI_Button(new Point(20, 575), 150, 25, "Desa i surt");
                accepta_button.GetElement().Click += new System.EventHandler(this.Accepta);
                accepta_button.AddImage(principal.imageList1, 2);
                accepta_button.SetFont("Courier New", 8.5f);
                accepta_button.SetColor(Color.Cornsilk);
                main_window.AddElement(accepta_button);
            }
        }