void LoadUI()
        {
            main_window = new UI_Window(this);
            {
                grid = new UI_Grid(new Point(15, 15), 470, 405);
                grid.AddColumn("Tipus", 150, true); grid.AddColumn("Data compra", 150, true);
                grid.AddColumn("ROMA", 120, true); grid.AddColumn("Darrera inspecció", 120, true); grid.AddColumn("id", 120, true, false);
                grid.GetElement().Click += new System.EventHandler(this.MaquinaClick);
                grid.SetFont("Courier New", 8.5f);
                main_window.AddElement(grid);


                elimina_button = new UI_Button(new Point(14, 431), 140, 25, "Elimina màquina");
                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), 160, 25, "Actualitza màquina");
                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(333, 431), 130, 25, "Crea màquina");
                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(845, 431), 110, 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);

                propietari_text = new UI_Text(new Point(500, 15), 150, 30, "Propietari");
                propietari_text.SetFont("Courier New", 8.5f);
                main_window.AddElement(propietari_text);

                propietari_combo = new UI_ComboBox(new Point(500, 45), 200, 40);
                propietari_combo.SetFont("Courier New", 8.5f);
                main_window.AddElement(propietari_combo);

                tipus_text = new UI_Text(new Point(500, 85), 150, 30, "Tipus màquinaria");
                tipus_text.SetFont("Courier New", 8.5f);
                main_window.AddElement(tipus_text);

                tipus_text_input = new UI_MaskedTextInput(new Point(500, 110), 200, 50);
                tipus_text_input.SetFont("Courier New", 8.5f);
                main_window.AddElement(tipus_text_input);

                data_text = new UI_Text(new Point(750, 85), 150, 30, "Data Compra");
                data_text.SetFont("Courier New", 8.5f);
                main_window.AddElement(data_text);

                data_data = new UI_DateSelect(new Point(750, 110), 200, 50);
                data_data.SetFont("Courier New", 8.5f);
                main_window.AddElement(data_data);


                roma_text = new UI_Text(new Point(500, 155), 150, 30, "Número ROMA");
                roma_text.SetFont("Courier New", 8.5f);
                main_window.AddElement(roma_text);

                roma_text_input = new UI_MaskedTextInput(new Point(500, 180), 200, 50);
                roma_text_input.SetFont("Courier New", 8.5f);
                main_window.AddElement(roma_text_input);

                inspeccio_text = new UI_Text(new Point(750, 155), 150, 30, "Darrera inspecció");
                inspeccio_text.SetFont("Courier New", 8.5f);
                main_window.AddElement(inspeccio_text);

                inspeccio_data = new UI_DateSelect(new Point(750, 180), 200, 50);
                inspeccio_data.SetFont("Courier New", 8.5f);
                main_window.AddElement(inspeccio_data);

                tipus_panel = new UI_Panel(new Point(500, 220), 400, 100);
                tipus_panel.SetFont("Courier New", 8.5f);
                main_window.AddElement(tipus_panel);

                propia_radiobutton = new UI_RadioButton(new Point(0, 0), "Propia");
                propia_radiobutton.SetFont("Courier New", 8.5f);
                tipus_panel.AddElement(propia_radiobutton);

                llogada_radiobutton = new UI_RadioButton(new Point(130, 0), "Llogada");
                llogada_radiobutton.SetFont("Courier New", 8.5f);
                tipus_panel.AddElement(llogada_radiobutton);
            }
        }
Example #2
0
        void LoadUI()
        {
            main_window = new UI_Window(this);
            {
                grid = new UI_Grid(new Point(15, 15), 470, 405);
                grid.AddColumn("Nom", 150, true); grid.AddColumn("NIF", 150, true); grid.AddColumn("Núm aplicador", 70, true);
                grid.AddColumn("Qualificació", 120, true); grid.AddColumn("id", 120, true, false);
                grid.GetElement().Click += new System.EventHandler(this.PersonalClick);
                grid.SetFont("Courier New", 8.5f);
                main_window.AddElement(grid);


                elimina_button = new UI_Button(new Point(337, 431), 140, 25, "Elimina persona");
                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(153, 431), 175, 25, "Actualitza persona");
                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), 130, 25, "Crea persona");
                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(845, 431), 110, 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);

                propietari_text = new UI_Text(new Point(500, 15), 150, 30, "Propietari");
                propietari_text.SetFont("Courier New", 8.5f);
                main_window.AddElement(propietari_text);

                propietari_combo = new UI_ComboBox(new Point(500, 45), 200, 40);
                propietari_combo.SetFont("Courier New", 8.5f);
                main_window.AddElement(propietari_combo);

                nom_text = new UI_Text(new Point(500, 85), 150, 30, "Nom");
                nom_text.SetFont("Courier New", 8.5f);
                main_window.AddElement(nom_text);

                nom_text_input = new UI_MaskedTextInput(new Point(500, 110), 200, 50);
                nom_text_input.SetFont("Courier New", 8.5f);
                main_window.AddElement(nom_text_input);

                nif_text = new UI_Text(new Point(750, 85), 150, 30, "NIF");
                nif_text.SetFont("Courier New", 8.5f);
                main_window.AddElement(nif_text);

                nif_text_input = new UI_MaskedTextInput(new Point(750, 110), 200, 50);
                nif_text_input.SetFont("Courier New", 8.5f);
                main_window.AddElement(nif_text_input);


                num_carnet_text = new UI_Text(new Point(500, 155), 150, 30, "Num aplicador");
                num_carnet_text.SetFont("Courier New", 8.5f);
                main_window.AddElement(num_carnet_text);

                num_carnet_text_input = new UI_MaskedTextInput(new Point(500, 180), 200, 50);
                num_carnet_text_input.SetFont("Courier New", 8.5f);
                main_window.AddElement(num_carnet_text_input);

                qualificacio_text = new UI_Text(new Point(750, 155), 150, 30, "Nivell qualificació");
                qualificacio_text.SetFont("Courier New", 8.5f);
                main_window.AddElement(qualificacio_text);

                qualificacio_text_input = new UI_MaskedTextInput(new Point(750, 180), 200, 50);
                qualificacio_text_input.SetFont("Courier New", 8.5f);
                main_window.AddElement(qualificacio_text_input);

                tipus_panel = new UI_Panel(new Point(500, 210), 400, 100);
                main_window.AddElement(tipus_panel);

                propi_radiobutton = new UI_RadioButton(new Point(0, 0), "Propi");
                propi_radiobutton.SetFont("Courier New", 8.5f);
                tipus_panel.AddElement(propi_radiobutton);

                contractat_radiobutton = new UI_RadioButton(new Point(130, 0), "Contractat");
                contractat_radiobutton.SetFont("Courier New", 8.5f);
                tipus_panel.AddElement(contractat_radiobutton);

                serveis_radiobutton = new UI_RadioButton(new Point(260, 0), "Serveis");
                serveis_radiobutton.SetFont("Courier New", 8.5f);
                tipus_panel.AddElement(serveis_radiobutton);
            }
        }