Пример #1
0
        public void Draw(SpriteBatch spritebatch)
        {
            WireMaskHotbar.Draw(spritebatch);
            LayerSelectHotbar.Draw(spritebatch);
            GeneralInfoBox.Draw(spritebatch);
            Toolbar.Draw(spritebatch);
            QuickHotbar.Draw(spritebatch);
            UI_Window.All_Draw(spritebatch);
            info.Draw(spritebatch);
            GridInfo.Draw(spritebatch);
            EditComp.Draw(spritebatch);
            EditProjectLib.Draw(spritebatch);
            EditLib.Draw(spritebatch);


            for (int i = 0; i < toolbar_menus.Length; ++i)
            {
                toolbar_menus[i].Draw(spritebatch);
            }

            notificationHandler.Draw(spritebatch);

            Hover_InfoBox.Draw(spritebatch);

            dragcomp.Draw(spritebatch);
        }
Пример #2
0
        public void Update()
        {
            UI_AlreadyActivated = false;
            UI_Active_State     = 0;
            if (ZaWarudo != null)
            {
                ZaWarudo.UpdateMain();
            }

            Hover_InfoBox.UpdateMain();

            notificationHandler.UpdateMain();

            for (int i = 0; i < toolbar_menus.Length; ++i)
            {
                toolbar_menus[i].UpdateMain();
            }
            EditLib.UpdateMain();
            EditProjectLib.UpdateMain();
            EditComp.UpdateMain();
            UI_Window.All_Update();
            GridInfo.UpdateMain();
            info.UpdateMain();
            QuickHotbar.UpdateMain();
            Toolbar.UpdateMain();
            GeneralInfoBox.UpdateMain();
            LayerSelectHotbar.UpdateMain();
            WireMaskHotbar.UpdateMain();
        }
Пример #3
0
        public void EditCompWindow(object sender)
        {
            UI_Component comp = sender as UI_Component;

            UI_Handler.editcompwindow.GetsUpdated = UI_Handler.editcompwindow.GetsDrawn = true;
            UI_Window.All_Highlight(UI_Handler.editcompwindow);
            string[] names    = comp.ID_Name.Split('|');
            CompData compdata = CompLibrary.LibraryWindow_LoadedLibraries.Find(x => x.name == names[0]).Components.Find(x => x.name == names[1]);

            UI_Handler.editcompwindow.SetRootComp(compdata);
        }
        public void LoadUI()
        {
            main_window = new UI_Window(this);
            {
                propietari_text = new UI_Text(new System.Drawing.Point(10, 10), 100, 30, "Selecciona propietari:");
                main_window.AddElement(propietari_text);

                propietaris_combobox = new UI_ComboBox(new System.Drawing.Point(12, 35), 200, 50);
                main_window.AddElement(propietaris_combobox);

                accepta_button = new UI_Button(new System.Drawing.Point(10, 70), 60, 30, "Accepta");
                accepta_button.GetElement().Click += new System.EventHandler(this.Accepta);
                main_window.AddElement(accepta_button);
            }
        }
Пример #5
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("Num registre", 150, true); grid.AddColumn("Fórmula", 180, true);
                grid.AddColumn("id", 120, true, false);
                grid.GetElement().Click += new System.EventHandler(this.AdobClick);
                grid.SetFont("Courier New", 8.5f);
                main_window.AddElement(grid);

                elimina_button = new UI_Button(new Point(293, 431), 120, 25, "Elimina adob");
                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(143, 431), 140, 25, "Actualitza adob");
                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), 120, 25, "Crea adob");
                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);

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

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

                num_registre_text = new UI_Text(new Point(750, 15), 150, 30, "Num registre");
                num_registre_text.SetFont("Courier New", 8.5f);
                main_window.AddElement(num_registre_text);

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

                formula_text = new UI_Text(new Point(500, 85), 150, 30, "Fórmula");
                formula_text.SetFont("Courier New", 8.5f);
                main_window.AddElement(formula_text);

                formula_text_input = new UI_MaskedTextInput(new Point(500, 110), 450, 50);
                formula_text_input.SetFont("Courier New", 8.5f);
                main_window.AddElement(formula_text_input);
            }
        }
Пример #6
0
        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);
            }
        }
Пример #7
0
        public void Initialize(SpriteBatch spriteBatch)
        {
            App.GraphicsChanged += Window_Graphics_Changed;
            Button_tex           = Content.Load <Texture2D>("UI\\Project Spritemap");
            SpriteFont toolbarfont   = Content.Load <SpriteFont>("UI\\TB_font");
            SpriteFont componentfont = Content.Load <SpriteFont>("UI\\component_font");
            SpriteFont dropdownfont  = Content.Load <SpriteFont>("UI\\TB_Dropdown_font");
            SpriteFont catfont       = Content.Load <SpriteFont>("UI\\cat_font");

            // CONFIGS
            gen_conf                        = new Generic_Conf(font_color: Color.White, behav: 2, BGColor: BackgroundColor, HoverColor: HoverColor, ActiveColor: ActivColor, ActiveHoverColor: ActivHoverColor, tex_color: Color.White, font: componentfont);
            cat_conf                        = new Generic_Conf(gen_conf);
            cat_conf.font                   = catfont;
            toolbarbuttonconf               = new Generic_Conf(gen_conf);
            toolbarbuttonconf.font          = toolbarfont;
            toolbarbuttonconf.behav         = 1;
            toolbarddconf1                  = new Generic_Conf(gen_conf);
            toolbarddconf1.font             = dropdownfont;
            toolbarddconf1.behav            = 1;
            toolbarddconf2                  = new Generic_Conf(toolbarddconf1);
            toolbarddconf2.behav            = 2;
            componentconf                   = new Generic_Conf(gen_conf);
            componentconf.font              = componentfont;
            behave1conf                     = new Generic_Conf(gen_conf);
            behave1conf.behav               = 1;
            behave2conf                     = new Generic_Conf(gen_conf);
            behave2conf.behav               = 2;
            genbutconf                      = new Generic_Conf(gen_conf);
            genbutconf.BorderColor          = BorderColor;
            genbutconf.font                 = toolbarfont;
            gridpaintbuttonconf             = new Generic_Conf(behave1conf);
            gridpaintbuttonconf.BorderColor = BorderColor;

            //Toolbar
            Toolbar = new UI_MultiElement <UI_Element>(new Pos(0, 0));
            string[] TB_Names = new string[] { "File", "Config", "View", "Tools", "Help" };
            for (int i = 0; i < TB_Names.Length; ++i)
            {
                Toolbar.Add_UI_Elements(new UI_StringButton(new Pos(buttonwidth * i, 0), new Point(buttonwidth, buttonheight), TB_Names[i], false, toolbarbuttonconf));
            }

            // Initializing Menus for Toolbar
            ButtonMenu_File = new UI_Box <UI_Element>(new Pos(0, 25));
            string[] FileButton_Names = new string[] { "Save", "Save As", "Open" };
            for (int i = 0; i < FileButton_Names.Length; ++i)
            {
                ButtonMenu_File.Add_UI_Elements(new UI_Button_Menu(new Pos(0, i * 25), new Point(buttonwidth, buttonheight), FileButton_Names[i], toolbarddconf2));
            }

            ButtonMenu_Config = new UI_Box <UI_Element>(Toolbar.ui_elements[1].pos + new Pos(0, 25));
            string[] ConfigButton_Names = new string[] { "Tiny Grid", "Small Grid", "Medium Grid", "Big Grid", "Large Grid" };
            for (int i = 0; i < ConfigButton_Names.Length; ++i)
            {
                ButtonMenu_Config.Add_UI_Elements(new UI_Button_Menu(new Pos(0, i * 25), new Point(buttonwidth, buttonheight), ConfigButton_Names[i], toolbarddconf2));
            }

            ButtonMenu_View = new UI_Box <UI_Element>(Toolbar.ui_elements[2].pos + new Pos(0, 25));
            string[] ViewButton_Names = new string[] { "Component Box", "Icon Hotbar", "Layer Hotbar", "Console Window" };
            for (int i = 0; i < ViewButton_Names.Length; ++i)
            {
                ButtonMenu_View.Add_UI_Elements(new UI_Button_Menu(new Pos(0, i * 25), new Point(buttonwidth, buttonheight), ViewButton_Names[i], toolbarddconf1));
            }
            ButtonMenu_Tools = new UI_Box <UI_Element>(Toolbar.ui_elements[3].pos + new Pos(0, 25));
            string[] ToolsButton_Names = new string[] { "Libary Editor", "Project Libararies" };
            for (int i = 0; i < ToolsButton_Names.Length; ++i)
            {
                ButtonMenu_Tools.Add_UI_Elements(new UI_Button_Menu(new Pos(0, i * 25), new Point(buttonwidth, buttonheight), ToolsButton_Names[i], toolbarddconf1));
            }

            ButtonMenu_Help = new UI_Box <UI_Element>(Toolbar.ui_elements[4].pos + new Pos(0, 25));
            string[] HelpButton_Names = new string[] { "Developer Email: [email protected]", "Developer Email: [email protected]", "User Guide in Application Folder" };
            for (int i = 0; i < HelpButton_Names.Length; ++i)
            {
                ButtonMenu_Help.Add_UI_Elements(new UI_Button_Menu(new Pos(0, i * 25), new Point(buttonwidth, buttonheight), HelpButton_Names[i], toolbarddconf2));
            }

            //QuickHotbar
            QuickHotbar = new UI_QuickHBElement <UI_Element>(new Pos(0, Toolbar.size.Y));
            QuickHotbar.Add_UI_Element(new UI_TexButton(Pos.Zero, new Point(sqarebuttonwidth, sqarebuttonwidth), new Point(sqarebuttonwidth * 0, 0), Button_tex, behave1conf));
            QuickHotbar.ui_elements[0].Description = "Play";
            QuickHotbar.Add_UI_Element(new UI_TexButton(Pos.Zero, new Point(sqarebuttonwidth, sqarebuttonwidth), new Point(sqarebuttonwidth * 1 + 1, 0), Button_tex, behave2conf));
            QuickHotbar.ui_elements[1].Description = "Reset Simulation";
            QuickHotbar.Add_UI_Element(new UI_TexButton(Pos.Zero, new Point(sqarebuttonwidth, sqarebuttonwidth), new Point(sqarebuttonwidth * 2 + 2, 0), Button_tex, behave2conf));
            QuickHotbar.ui_elements[2].Description = "Save Circuit";
            QuickHotbar.Add_UI_Element(new UI_TexButton(Pos.Zero, new Point(sqarebuttonwidth, sqarebuttonwidth), new Point(sqarebuttonwidth * 3 + 3, 0), Button_tex, behave2conf));
            QuickHotbar.ui_elements[3].Description = "Load Circuit";
            QuickHotbar.Add_UI_Element(new UI_TexButton(Pos.Zero, new Point(sqarebuttonwidth, sqarebuttonwidth), new Point(sqarebuttonwidth * 4 + 4, 0), Button_tex, behave1conf));
            QuickHotbar.ui_elements[4].Description = "Interaction Mode";
            QuickHotbar.Add_UI_Element(new UI_TexButton(Pos.Zero, new Point(sqarebuttonwidth, sqarebuttonwidth), new Point(sqarebuttonwidth * 5 + 5, 0), Button_tex, behave1conf));
            QuickHotbar.ui_elements[5].Description = "Wire Mode";
            ((UI_TexButton)QuickHotbar.ui_elements[5]).IsActivated = true;

            //Componentbox
            ComponentBox = new UI_ComponentBox(new Pos(0, 100), new Point(buttonwidth * 3, 750), "Component Box", new Point(180, 180), componentconf, true);



            //Hover Info Box
            info = new UI_InfoBox(new Pos(500, 500), new Point(300, 300));
            info.values.Add_UI_Elements(new UI_String(new Pos(0, 0), new Point(0, 0), componentconf));

            //Hover GridInfo Box
            GridInfo = new UI_InfoBox(new Pos(500, 500), new Point(300, 300));
            GridInfo.values.Add_UI_Elements(new UI_String(new Pos(0, 0), new Point(0, 0), componentconf));

            //GeneralInfo Box (Bottom Left)
            GeneralInfoBox = new UI_Box <UI_Element>(new Pos(-1, App.Screenheight - 24 + 1), new Point(App.Screenwidth + 2, 24));
            GeneralInfoBox.Add_UI_Elements(new UI_String(new Pos(10, 2), Point.Zero, componentconf));
            GeneralInfoBox.Add_UI_Elements(new UI_StringButton(new Pos(150, 0), new Point(24, 24), "+", true, behave2conf));
            GeneralInfoBox.Add_UI_Elements(new UI_StringButton(new Pos(0, 0, ORIGIN.TR, ORIGIN.DEFAULT, GeneralInfoBox.ui_elements[1]), new Point(24, 24), "-", true, behave2conf));
            GeneralInfoBox.Add_UI_Elements(new UI_String(new Pos(0, 2, ORIGIN.TR, ORIGIN.DEFAULT, GeneralInfoBox.ui_elements[2]), Point.Zero, componentconf));
            GeneralInfoBox.Add_UI_Elements(new UI_String(new Pos(400, 2), Point.Zero, componentconf));

            layer_colors = Config.WIRE_COLORS;

            //Layer Select Hotbar
            LayerSelectHotbar = new UI_QuickHBElement <UI_Element>(new Pos(0, 0, ORIGIN.DEFAULT, ORIGIN.BL, GeneralInfoBox));

            for (int i = 0; i < 7; i++)
            {
                Generic_Conf curconf = new Generic_Conf(behave1conf);
                curconf.tex_color = layer_colors[i];
                LayerSelectHotbar.Add_UI_Element(new UI_TexButton(Pos.Zero, new Point(buttonwidth, buttonheight), new Point(0, sqarebuttonwidth * 4 + 3), Button_tex, curconf));
            }
            (LayerSelectHotbar.ui_elements[0] as UI_TexButton).IsActivated = true;

            //WireMaskHotbar
            WireMaskHotbar = new UI_QuickHBElement <UI_TexButton>(new Pos(100, 0, ORIGIN.TR, ORIGIN.DEFAULT, LayerSelectHotbar));



            for (int i = 0; i < 7; i++)
            {
                Generic_Conf curconf = new Generic_Conf(behave1conf);
                curconf.tex_color = layer_colors[i];
                WireMaskHotbar.Add_UI_Element(new UI_TexButton(new Pos(0, 0), new Point(sqarebuttonwidth), new Point(sqarebuttonwidth * (i + 7) + i + 7, 0), Button_tex, curconf));
            }
            WireMaskHotbar.Add_UI_Element(new UI_TexButton(new Pos(0, 0), new Point(sqarebuttonwidth), new Point(sqarebuttonwidth * (7 + 7) + 7 + 7, 0), Button_tex, behave1conf));
            WireMaskHotbar.Add_UI_Element(new UI_TexButton(new Pos(0, 0), new Point(sqarebuttonwidth), new Point(sqarebuttonwidth * (7 + 1 + 7) + 7 + 1 + 7, 0), Button_tex, behave1conf));

            //EditLib options
            EditLib = new UI_Box <UI_StringButton>(new Pos(0, 0), new Point((int)(App.Screenwidth * 0.08), (int)(buttonheight * 3)));
            UI_StringButton RenameLib = new UI_StringButton(new Pos(0, 0), new Point((int)(App.Screenwidth * 0.08), buttonheight), "Rename", true, componentconf);
            UI_StringButton NewComp   = new UI_StringButton(new Pos(0, 0, ORIGIN.BL, ORIGIN.DEFAULT, RenameLib), new Point((int)(App.Screenwidth * 0.08), buttonheight), "New Component", true, componentconf);
            UI_StringButton Dellib    = new UI_StringButton(new Pos(0, 0, ORIGIN.BL, ORIGIN.DEFAULT, NewComp), new Point((int)(App.Screenwidth * 0.08), buttonheight), "Remove Library", true, componentconf);

            EditLib.Add_UI_Elements(RenameLib, NewComp, Dellib);
            EditLib.GetsUpdated = EditLib.GetsDrawn = false;

            //EditComp options
            EditComp = new UI_Box <UI_StringButton>(new Pos(0, 0), new Point((int)(App.Screenwidth * 0.08), (int)(buttonheight * 2)));
            UI_StringButton RenameComp = new UI_StringButton(new Pos(0, 0), new Point((int)(App.Screenwidth * 0.08), buttonheight), "Rename", true, componentconf);
            UI_StringButton DelComp    = new UI_StringButton(new Pos(0, 0, ORIGIN.BL, ORIGIN.DEFAULT, RenameComp), new Point((int)(App.Screenwidth * 0.08), buttonheight), "Delete Component", true, componentconf);

            EditComp.Add_UI_Elements(RenameComp, DelComp);
            EditComp.GetsUpdated = EditComp.GetsDrawn = false;

            //Libary Edit Window
            LibraryEditWindow             = new UI_LibraryEdit_Window(new Pos(App.Screenwidth / 2, App.Screenheight / 2), new Point(500, 500), "Libaries", new Point(400, 200), componentconf, true);
            LibraryEditWindow.GetsUpdated = LibraryEditWindow.GetsDrawn = false;


            //EditCompWindow
            editcompwindow = new UI_EditComp_Window(new Pos(App.Screenwidth / 3, App.Screenheight / 3), new Point((int)(App.Screenwidth * 0.5), (int)(App.Screenheight * 0.6)), "EditComponent", new Point(300, 300), componentconf, true);

            //Project Lib options
            EditProjectLib = new UI_Box <UI_StringButton>(new Pos(0, 0), new Point((int)(App.Screenwidth * 0.08), (int)(buttonheight)));
            UI_StringButton RemoveLib = new UI_StringButton(new Pos(0, 0), new Point((int)(App.Screenwidth * 0.08), buttonheight), "Remove Library", true, componentconf);

            EditProjectLib.Add_UI_Elements(RemoveLib);
            EditProjectLib.GetsUpdated = EditProjectLib.GetsDrawn = false;

            //ProjectLibraryWindow
            ProjectLibWindow             = new UI_ProjectLibrary_Window(new Pos(200), new Point(500, 500), "Project Libraries", new Point(300), componentconf, true);
            ProjectLibWindow.GetsUpdated = ProjectLibWindow.GetsDrawn = false;

            //ComponentparametersWindow
            parameterWindow             = new UI_ParameterWindow(new Pos(400, 250), new Point(300, 250), new Point(300, 100), componentconf);
            parameterWindow.GetsUpdated = parameterWindow.GetsDrawn = false;

            //SignalAnalyze
            SignalAnalyze = new UI_Window(new Pos(App.Screenwidth / 2, App.Screenheight / 2), new Point(800, 120), "Analyze", new Point(200, 90), componentconf, true);
            signal        = new UI_SignalAnalyze(new Pos(-5, UI_Window.headheight + 5, ORIGIN.TR, ORIGIN.TR, SignalAnalyze), new Point(500, 80));
            SignalAnalyze.Add_UI_Elements(signal);
            SignalAnalyze.GetsUpdated = SignalAnalyze.GetsDrawn = false;

            Hover_InfoBox = new UI_Box <UI_String>(new Pos(0), Point.Zero);
            Hover_InfoBox.Add_UI_Elements(new UI_String(new Pos(2), Point.Zero, UI_Handler.componentconf));
            Hover_InfoBox.GetsUpdated = Hover_InfoBox.GetsDrawn = false;

            notificationHandler = new UI_NotificationHandler(Pos.Zero);

            InitializeUISettings(spriteBatch);
            SetWireMask(0);
        }
Пример #8
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);
            }
        }