public void Entrar() { Repositorios.UsuarioLogado = Usuario; var sistema = new PrincipalMenu(); sistema.ExibirMenu(); }
private async void Button_Clicked_1(object sender, EventArgs e) { PrincipalMenu.IsVisible = true; ComoJugarTxt.IsVisible = false; Puntuacion.IsVisible = false; PrincipalMenu.Scale = 0; await PrincipalMenu.ScaleTo(1, 300); }
static void Main(string[] args) { PrincipalMenu menu = new PrincipalMenu(); menu.afficheIntro(); Console.ReadLine(); }
private void initState() { states = new GameState[Constant.STATES]; states[0] = new PrincipalMenu(); states[1] = GameManager.Instance; states[2] = new PauseMenu(); states[3] = new ScoreMenu(); states[4] = new GameRules(); states[5] = new Win(); }
private void InitHUD() { int deviceWidth = D3DDevice.Instance.Width; int deviceHeight = D3DDevice.Instance.Height; healthTextBox.Text = "✚ 100"; healthTextBox.Color = Color.DarkOrange; healthTextBox.Position = new Point((int)FastMath.Floor(0.05f * deviceWidth), (int)FastMath.Floor(0.9f * deviceHeight)); healthTextBox.Size = new Size(600, 200); healthTextBox.changeFont(new Font("TimesNewRoman", 25, FontStyle.Bold)); healthTextBox.Align = TgcText2D.TextAlign.LEFT; oxygenTextBox.Text = "◴ 100"; oxygenTextBox.Color = Color.DarkOrange; oxygenTextBox.Position = new Point((int)FastMath.Floor(0.12f * deviceWidth), (int)FastMath.Floor(0.9f * deviceHeight)); oxygenTextBox.Size = new Size(600, 200); oxygenTextBox.changeFont(new Font("TimesNewRoman", 25, FontStyle.Bold)); oxygenTextBox.Align = TgcText2D.TextAlign.LEFT; crossHair.Text = "+"; crossHair.Color = Color.White; crossHair.Position = new Point(deviceWidth / 2 - 8, deviceHeight / 2 - 40); crossHair.Size = new Size(600, 200); crossHair.changeFont(new Font("TimesNewRoman", 25, FontStyle.Regular)); crossHair.Align = TgcText2D.TextAlign.LEFT; gameTimer.Text = "Time: "; gameTimer.Color = Color.DarkOrange; gameTimer.Position = new Point((int)FastMath.Floor(0.05f * deviceWidth), (int)FastMath.Floor(0.85f * deviceHeight)); gameTimer.Size = new Size(300, 600); gameTimer.changeFont(new Font("TimesNewRoman", 12, FontStyle.Regular)); gameTimer.Align = TgcText2D.TextAlign.LEFT; pauseMenu = new PauseMenu(this); principalMenu = new PrincipalMenu(this); }
protected void Application_PostAuthenticateRequest(Object sender, EventArgs e) { HttpCookie authCookie = Request.Cookies[FormsAuthentication.FormsCookieName]; if (authCookie != null) { try { FormsAuthenticationTicket authTicket = FormsAuthentication.Decrypt(authCookie.Value); MyPrincipalSerializeModel serializeModel = JsonConvert.DeserializeObject <MyPrincipalSerializeModel>(authTicket.UserData); MyPrincipal newUser = new MyPrincipal(authTicket.Name); newUser.id = serializeModel.id; newUser.username = serializeModel.username; newUser.password = serializeModel.password; newUser.firstname = serializeModel.firstname; newUser.lastname = serializeModel.lastname; newUser.path_foto = serializeModel.path_foto; newUser.menus = new List <PrincipalMenu>(); newUser.RoleUser = new List <string>(); tms_mka_v2.Context.ContextModel dbcontext = new tms_mka_v2.Context.ContextModel(); tms_mka_v2.Context.User dbuser = dbcontext.User.Where(u => u.Id == newUser.id).FirstOrDefault(); foreach (var _menu in dbuser.UserMenus) { PrincipalMenu _menuUser = new PrincipalMenu(); _menuUser.MenuName = _menu.Menu.MenuName; _menuUser.Action = new List <string>(); if (_menu.IsCreate) { _menuUser.Action.Add("create"); } if (_menu.IsRead) { _menuUser.Action.Add("read"); } if (_menu.IsUpdate) { _menuUser.Action.Add("update"); } if (_menu.IsDelete) { _menuUser.Action.Add("delete"); } if (_menu.IsPrint) { _menuUser.Action.Add("print"); } if (_menu.IsProses) { _menuUser.Action.Add("proses"); } newUser.menus.Add(_menuUser); } foreach (var _role in dbuser.UserRole) { newUser.RoleUser.Add(_role.Role.RoleName); } HttpContext.Current.User = newUser; } catch (Exception) { //SignOut(); //return; } } }