public ActionResult MenuProfile(string tab) { var ProfileMenu = new ProfileMenu(); switch (tab) { case "general": ProfileMenu.Category = "_general"; break; case "general2": ProfileMenu.Category = "_general"; return(PartialView(ProfileMenu.Category, ProfileMenu)); case "history": { ProfileMenu.Category = "_history"; ProfileMenu.name = "3333"; } break; default: ProfileMenu.Category = "_general"; break; } if (Request.IsAjaxRequest()) { return(RedirectToAction("part", "Restaurants", new { ProfileMenu.Category, ProfileMenu })); } return(View(ProfileMenu)); }
public override void OnStartLocalPlayer() { if (isLocalPlayer) { CmdUsername(ProfileMenu.GetUsername()); } }
public static bool Prefix(DialogueBox __instance, int x, int y, bool playSound) { if (!Config.EnableMod || __instance.characterDialogue?.speaker is null) { return(true); } if (!dataDict.TryGetValue(__instance.characterDialogue.speaker.Name, out DialogueDisplayData data)) { data = dataDict[defaultKey]; } if (data == null || data.disabled) { return(true); } var sprite = data.sprite is null ? dataDict[defaultKey].sprite : data.sprite; if (sprite is not null && !sprite.disabled) { if (new Rectangle(Utility.Vector2ToPoint(GetDataVector(__instance, sprite)), new Point(128, 192)).Contains(new Point(x, y))) { ProfileMenu menu = new ProfileMenu(__instance.characterDialogue.speaker); Game1.activeClickableMenu = menu; return(false); } } return(true); }
public static void Postfix(DialogueBox __instance, Dialogue dialogue) { if (!Config.EnableMod || dialogue?.speaker is null) { return; } try { npcSpriteMenu = new ProfileMenu(dialogue.speaker); } catch { } LoadData(); if (!dataDict.TryGetValue(__instance.characterDialogue.speaker.Name, out DialogueDisplayData data)) { if (!dataDict.TryGetValue(defaultKey, out data)) { return; } } __instance.x += data.xOffset; __instance.y += data.yOffset; if (data.width > 0) { __instance.width = data.width; } if (data.height > 0) { __instance.height = data.height; } }
public void displayProfileMenu(Profile profile) { profileMenu.SetActive(true); ProfileMenu menu = profileMenu.GetComponent <ProfileMenu>(); menu.setProfile(profile); }
public static void StartBroadcasting() { Stop(); Singleton.broadcastData = ProfileMenu.GetUsername(); if (!Singleton.StartAsServer()) { Singleton.m_lobbyManager.InfoText = "An error occurred while starting broadcasting."; } }
public PI_ItemList(ProfileMenu context, string name, List <Item> values) : base(context, name) { _items = values; _components = new List <ClickableTextureComponent>(); _height = 0f; _emptyBoxPositions = new List <Vector2>(); _UpdateIcons(); }
private void ExecuteMenu(ProfileMenu menu) { try { menu.Action(); } catch { DependencyService.Get <IMessageHelper>().ShortAlert("Menu belum tersedia."); } }
public static void Serialize_ProfileMenu(dynamic menu, ProfileMenu pm, Point cursorPosition) { menu.menuType = "profileMenu"; menu.backButton = pm.backButton; menu.forwardButton = pm.forwardButton; menu.previousCharacterButton = pm.previousCharacterButton; menu.nextCharacterButton = pm.nextCharacterButton; menu.downArrow = pm.downArrow; menu.upArrow = pm.upArrow; menu.clickableProfileItems = pm.clickableProfileItems; }
protected new void Start() { if (!isServer) { GetComponent <BotController>().DisableScripts(); return; } m_rigidbody = GetComponent <Rigidbody>(); Vector2Int spawnPoint = BoardManager.GetMap().GetSpawnPoint(Team); transform.position = new Vector3(spawnPoint.x, 0, spawnPoint.y); Username = ProfileMenu.GetRandomName() + " (Bot)"; CmdUsername(Username); }
// When using the keyboard to navigate the DataGrid, show the highlighted row. Also, show the // context menu if the user hits Enter. private void DataGrid_KeyDown(object sender, KeyEventArgs e) { suppress_grid_enter = false; DataGrid_Enter(dgNetworks, e); if (e.KeyCode == Keys.Enter) { Rectangle dr = dgNetworks.GetCellDisplayRectangle(dgNetworks.CurrentCellAddress.X, dgNetworks.CurrentCellAddress.Y, true); if (sender == dgNetworks) { NetworkMenu.Show(dgNetworks, dr.X + dr.Width / 2, dr.Y + dr.Height / 2); } if (sender == dgProfiles) { ProfileMenu.Show(dgNetworks, dr.X + dr.Width / 2, dr.Y + dr.Height / 2); } e.Handled = true; } }
public ActionResult part(string tab, string name) { var ProfileMenu = new ProfileMenu(); switch (tab) { case "general": ProfileMenu.Category = "_general"; break; case "history": { ProfileMenu.Category = "_history"; ProfileMenu.name = !string.IsNullOrEmpty(name) ? name : "333"; } break; default: ProfileMenu.Category = "_general"; break; } return(PartialView(ProfileMenu.Category, ProfileMenu)); }
public bool SaveMenuItem(AddProfileMenu model) { if (this.Context.ProfileMenus.Any( m => m.System == model.System && m.Role == model.Role && m.Description == model.Description)) { return(false); } var menu = new ProfileMenu { System = model.System, Role = model.Role, Description = model.Description }; this.Context.ProfileMenus.Add(menu); this.Context.SaveChanges(); return(true); }
protected new void Start() { base.Start(); if (!isLocalPlayer) { return; } gameObject.AddComponent <AudioListener>(); m_hud = GetComponent <PlayerHUD>(); m_aim = GetComponent <Aim>(); m_playerController = GetComponent <PlayerController>(); CameraController.SetTarget(transform); EscapeMenu.Singleton.OnPauseToggled += PauseToggled; GameOverMenu.Singleton.OnRespawnClick += Respawn; Username = ProfileMenu.GetUsername(); CmdUsername(Username); // The player has been loaded, remove loading screen Destroy(LoadingScreen.Singleton.gameObject); }
public override void receiveLeftClick(int x, int y, bool playSound = true) { if (upButton.containsPoint(x, y) && slotPosition > 0) { upArrowPressed(); Game1.playSound("shwip"); } else if (downButton.containsPoint(x, y) && slotPosition < sprites.Count - 5) { downArrowPressed(); Game1.playSound("shwip"); } else if (scrollBar.containsPoint(x, y)) { scrolling = true; } else if (!downButton.containsPoint(x, y) && x > xPositionOnScreen + width - 96 && x < xPositionOnScreen + width + 128 && y > yPositionOnScreen && y < yPositionOnScreen + height) { scrolling = true; leftClickHeld(x, y); releaseLeftClick(x, y); } for (int i = 0; i < characterSlots.Count; i++) { if (i < slotPosition || i >= slotPosition + 5 || !characterSlots[i].bounds.Contains(x, y)) { continue; } bool fail = true; if (names[i] is string) { Character character = Game1.getCharacterFromName((string)names[i]); if (character != null && Game1.player.friendshipData.ContainsKey(character.name)) { fail = false; Game1.playSound("bigSelect"); int cached_slot_position = slotPosition; ProfileMenu menu = new ProfileMenu(character); menu.exitFunction = delegate { SocialPage socialPage = ((GameMenu)(Game1.activeClickableMenu = new GameMenu(2, -1, playOpeningSound: false))).GetCurrentPage() as SocialPage; if (socialPage != null) { Character character2 = menu.GetCharacter(); if (character2 != null) { int num = 0; while (true) { if (num >= socialPage.names.Count) { return; } if (socialPage.names[num] is string && character2.Name == (string)socialPage.names[num]) { break; } num++; } socialPage.slotPosition = cached_slot_position; socialPage._SelectSlot(socialPage.characterSlots[num]); } } }; Game1.activeClickableMenu = menu; if (Game1.options.SnappyMenus) { menu.snapToDefaultClickableComponent(); } } } if (fail) { Game1.playSound("shiny4"); } break; } slotPosition = Math.Max(0, Math.Min(sprites.Count - 5, slotPosition)); }
public UserProfileMenuResponse GetProfileMenu(string CookieMenu) { UserProfileMenuResponse ProfileMenu = new UserProfileMenuResponse(); bool ShouldFetchProfileFromServer = false; string Token = UserProfileObj.GetToken(); try { // check if token exists if (Token == null) { ProfileMenu.IsProfileAvailable = false; return(ProfileMenu); } else { bool response = new Security(UserProfileObj).AuthenticateUser(); if (response == false) { ProfileMenu.IsProfileAvailable = false; return(ProfileMenu); } else { if (CookieMenu == null) { ShouldFetchProfileFromServer = true; } else { ProfileMenu = new JavaScriptSerializer().Deserialize <UserProfileMenuResponse>(CookieMenu); if (ProfileMenu.IsProfileAvailable == false) { ShouldFetchProfileFromServer = true; } } } } // get the profile menu if (CookieMenu == null) { ShouldFetchProfileFromServer = true; } else { ProfileMenu = new JavaScriptSerializer().Deserialize <UserProfileMenuResponse>(CookieMenu); if (ProfileMenu.ShouldReupdate) { ShouldFetchProfileFromServer = true; } } if (ShouldFetchProfileFromServer) { ProfileMenu.SetUserProfile(new NormalUserTemplate(UserProfileObj).FetchParticularProfile(UserProfileObj)); ProfileMenu.IsProfileAvailable = true; } } catch (Exception ex) { Logger.Instance().Log(Fatal.Instance(), ex); ProfileMenu.IsProfileAvailable = false; throw ex; } return(ProfileMenu); }
void Start() { profileMenu = gameObject.GetComponentInParent <ProfileMenu>(); }
void Start() { profileMenu = gameObject.GetComponentInParent <ProfileMenu>(); anim = gameObject.GetComponent <Animation>(); HideSharedConnections(); }
public ProfileItem(ProfileMenu context, string name) { _context = context; itemName = name; }
//[AccessUser(Actions.Modify)] public HttpResponseMessage UpdateProfileMenu(Guid id, [FromBody] ProfileMenu item) { _processprofilemenu.UpdateProfileMenu(id, item, UpdatedId); _processprofilemenu.ClearCache(item: Session); return(Request.CreateResponse(HttpStatusCode.OK)); }
public void EnterState() { var window = new ProfileMenu(); Program.MainWindow.SwitchScreen(window); }