private void regresarBttn_Click(object sender, RoutedEventArgs e)
        {
            MenuInicio inicio = new MenuInicio(NombreJugador);

            inicio.Show();
            Close();
        }
        private void Button_Click(object sender, RoutedEventArgs e)
        {
            MenuInicio turnback = new MenuInicio(NombreJugador);

            turnback.Show();
            Close();
        }
예제 #3
0
        private void reaccionRespuesta(int respuesta)
        {
            switch (respuesta)
            {
            case -2:
                MessageBox.Show("No existe ese usuario o está inhabilitado");
                break;

            case -1:
                this.mostrarLabelUsuarioDeshabilitado(textBox_usuario.Text.ToString());
                break;

            case 0:
//                    contador = contador - 1;
//                    label_intentos.Visible = true;
//                    label_intentos.Text = label_intentos.Tag.ToString() + " " + contador;
                MessageBox.Show("Contraseña incorrecta");
                break;

            case 1:
                MessageBox.Show("Te loggeaste correctamente");
                MenuInicio menu = new MenuInicio(this.buscarCodigoUsuario(textBox_usuario.Text.ToString()), this);
                this.Hide();
                menu.Show();
                break;
            }
        }
예제 #4
0
    void Awake()
    {
        Instance = GetComponent <MenuInicio>();
//		ShowWindow(window1.transform);
//		HideWindow(window2.transform);
//		HideWindow(window3.transform);
//		Debug.Log ("Entre");
    }
예제 #5
0
        private void button1_Click(object sender, EventArgs e)
        {
            bool habilitado = this.estaHabilitadoUsuario(textBox_usuario.Text.ToString());

            while (habilitado && contador < 3)
            {
                String passwordEncontrada = this.buscarPassword(textBox_usuario.Text.ToString());



                if (encriptacion_password(textBox_contrasenia.Text.ToString()) == passwordEncontrada)
                {
//                    Menu menuParaUsuario = new Menu();
//                    menuParaUsuario.View();

                    // MenuProveedor menuParaMostrar

                    //aca deberiamos crear el menu y pasarle el codigo de usuario por parametro


                    int codigo_usuario = this.buscarCodigoUsuario(textBox_usuario.Text.ToString());

                    MenuInicio mostrarMenu = new MenuInicio(codigo_usuario);

                    mostrarMenu.Show();
                    this.Hide();
                    break;
                }

                else
                {
                    label_intentos.Visible = true;
                    label_intentos.Text    = label_intentos.Tag.ToString() + " " + contador;
                    MessageBox.Show("Contraseña incorrecta.");
                    contador++;
                    break;
                }
            }



            if (contador == 3)
            {
                this.inhabilitarUsuario(textBox_usuario.Text.ToString());
            }
        }
예제 #6
0
    // Start is called before the first frame update
    void Start()
    {
        if (Instance == null)
        {
            Instance = this;
        }
        else
        {
            Destroy(this.gameObject);
        }

        languageControl.selectedLanguage = 1;
        languageControl.UpdateTextTranslation();

        prefabsPivot = GameObject.FindGameObjectWithTag("PrefabPivot").transform;

        AssetBundle bundle = AssetBundle.LoadFromFile(Path.Combine(Application.streamingAssetsPath, "objeto"));

        objetoBasePrefab = Instantiate(bundle.LoadAsset <GameObject>("ObjetoBasico"), new Vector3(400, 400, 400), Quaternion.Euler(0, 0, 0), prefabsPivot).GetComponent <ObjetoBase>();
        bundle.Unload(false);

        bundle = AssetBundle.LoadFromFile(Path.Combine(Application.streamingAssetsPath, "variable_objeto"));
        variableObjetoPrefab = Instantiate(bundle.LoadAsset <GameObject>("VariableObjeto"), new Vector3(500, 500, 500), Quaternion.Euler(0, 0, 0), prefabsPivot).GetComponent <VariableObjeto>();
        bundle.Unload(false);

        bundle              = AssetBundle.LoadFromFile(Path.Combine(Application.streamingAssetsPath, "variables"));
        intVariablePrefab   = Instantiate(bundle.LoadAsset <GameObject>("IntVariable"), new Vector3(700, 700, 700), Quaternion.Euler(0, 0, 0), prefabsPivot).GetComponent <IntVariable>();
        floatVariablePrefab = Instantiate(bundle.LoadAsset <GameObject>("FloatVariable"), new Vector3(700, 700, 700), Quaternion.Euler(0, 0, 0), prefabsPivot).GetComponent <FloatVariable>();
        boolVariablePrefab  = Instantiate(bundle.LoadAsset <GameObject>("BoolVariable"), new Vector3(700, 700, 700), Quaternion.Euler(0, 0, 0), prefabsPivot).GetComponent <BoolVariable>();
        bundle.Unload(false);

        bundle = AssetBundle.LoadFromFile(Path.Combine(Application.streamingAssetsPath, "metodos"));
        List <GameObject> metodos = bundle.LoadAllAssets <GameObject>().ToList();

        foreach (GameObject g in metodos)
        {
            MetodoBase m = Instantiate(g, new Vector3(800, 800, 800), Quaternion.Euler(0, 0, 0), prefabsPivot).GetComponent <MetodoBase>();
            metodosPrefab.Add(m.nombre, m);
        }
        bundle.Unload(false);

        menus = new Dictionary <string, CustomMenu>();

        List <CustomMenu> menusList = FindObjectsOfType <CustomMenu>().ToList();

        foreach (CustomMenu c in menusList)
        {
            menus.Add(c.name, c);
        }

        foreach (CustomMenu c in menus.Values)
        {
            c.Init();
        }

        StringExtension.Init();

        mg  = (MenuGrid)GetMenu("MenuGrid");
        mc  = (MenuClases)GetMenu("MenuClases");
        c   = (Consola)GetMenu("Consola");
        co  = (CreadorObjetos)GetMenu("CreadorObjetos");
        ca  = (CreadorAtributos)GetMenu("CreadorAtributos");
        cm  = (CreadorMetodos)GetMenu("CreadorMetodos");
        ini = (MenuInicio)GetMenu("MenuInicio");

        aud = GetComponent <AudioSource>();

        string path = Path.Combine(Application.streamingAssetsPath, "save.sv");

        if (!File.Exists(path))
        {
            ini.GetButton("Cargar").Blocked = true;
        }
    }