void ReleaseDesignerOutlets() { if (CountriesSearchBar != null) { CountriesSearchBar.Dispose(); CountriesSearchBar = null; } if (CountriesTableView != null) { CountriesTableView.Dispose(); CountriesTableView = null; } if (CountriesTextField != null) { CountriesTextField.Dispose(); CountriesTextField = null; } if (ButtonReturn != null) { ButtonReturn.Dispose(); ButtonReturn = null; } }
protected override void OnClose() { MusicSlider.onValueChanged.RemoveAllListeners(); AudioSlider.onValueChanged.RemoveAllListeners(); ButtonReturn.RemoveAllCallback(); base.OnClose(); }
// Update is called once per frame void LateUpdate() { if (!this.m_IsGuide) { if (BattleSceneHelper.Instance.GetAllBuildings().Count > 0 && !this.m_IsMasked) { NewbieCommonHelper.ChangeAllSpritesColor(this.m_MaskColorPercentage, null); this.m_IsMasked = true; } if (LockScreen.Instance.Inputable) { //this.m_GuideStartSecond = Time.timeSinceLevelLoad; this.StartCoroutine("Guide"); this.m_IsGuide = true; } } if (BattleDirector.Instance.IsReceivedReplayID && this.m_SummaryArrow == null) { ButtonReturn button = GameObject.FindObjectOfType(typeof(ButtonReturn)) as ButtonReturn; if (button != null) { this.m_SummaryArrow = GameObject.Instantiate(this.m_SummaryArrowPrefab) as GameObject; this.m_SummaryArrow.transform.position = button.transform.position + this.m_SummaryArrowOffset; } } }
public void Draw(SpriteBatch spriteBatch, GameWindow Window) { spriteBatch.Draw(Bg, new Rectangle(0, 0, Window.ClientBounds.Width, Window.ClientBounds.Height), Color.White); spriteBatch.Draw(SkillPointPanel, new Rectangle(1000, 20, SkillPointPanel.Width, SkillPointPanel.Height), Color.White); SkillPointLabel.Draw(spriteBatch, Color.White); for (int i = 0; i < Skill.Length; i++) { if (ActiveSkill == i) { spriteBatch.Draw(Select, new Rectangle(Skill[i].Button.Rectangle.X - SelectRadius, Skill[i].Button.Rectangle.Y - SelectRadius, Skill[i].Button.Rectangle.Width + SelectRadius * 2, Skill[i].Button.Rectangle.Height + SelectRadius * 2), Color.White); Description.Text = Skill[i].Description; Description.Draw(spriteBatch); } Skill[i].Button.Draw(spriteBatch, Window); } if (!Skill[ActiveSkill].inPanel) { ButtonLearn.Draw(spriteBatch, Window); } ButtonStart.Draw(spriteBatch, Window); ButtonReturn.Draw(spriteBatch, Window); }
public void Initialize(string title, string message, string positiveAnswer, string negativeAnswer, ButtonReturn callback) { titleText.text = title; messageText.text = message; positiveButtonText.text = positiveAnswer; negativeButtonText.text = negativeAnswer; this.callback = callback; }
private async void Page_Loaded(object sender, RoutedEventArgs e) { Flags.DialogPushed = false; SetLabel(); ButtonReturn.Focus(); (FindResource("BlinkButton") as Storyboard).Begin(); await General.CheckNextButton(); if (!Flags.DialogPushed) { 後処理(); } }
public void Update(GameTime gameTime) { for (int i = 0; i < Skill.Length; i++) { Skill[i].Button.Rectangle = LocalPosition[i]; Skill[i].Button.Update(gameTime); if (Skill[i].Button.ButtonUp) { Main.ThisGame.ButtonClick.Play(); ActiveSkill = i; } } ButtonStart.Update(gameTime); ButtonReturn.Update(gameTime); ButtonLearn.Update(gameTime); if (ButtonReturn.ButtonUp) { Main.ThisGame.ButtonClick.Play(); Main.ThisGame.WindowState = WindowState.Start; } if (ButtonStart.ButtonUp) { for (int i = 0; i < Skill.Length; i++) { Skill[i].Button.Rectangle = SavedPosition[i]; } Main.ThisGame.ButtonClick.Play(); Main.ThisGame.WindowState = WindowState.Battle; MediaPlayer.Play(Main.ThisGame.BattleSong); } if (ButtonLearn.ButtonUp) { if (SkillPoint > 0) { BuySkill.Play(); Skill[ActiveSkill].inPanel = true; SkillPoint--; } else { Main.ThisGame.ButtonClick.Play(); } } SkillPointLabel.Text = SkillPoint.ToString(); }
protected override void ButtonPressEvent(ButtonReturn btn) { if (btn.name == "plus") { this.Parent.i += 1; } else if (btn.name == "minus") { this.Parent.i -= 1; } else if (btn.name == "end") { this.Terminate(); } }
public static ButtonReturn ReadButtonSecure(params string[] tags) { entry1: ButtonReturn btn = MiddleConsole.ReadButton(); entry2: Func <string, bool> Checker = (str) => { if (tags.Contains(str)) { return(true); } else { return(false); } }; if (btn.tags.Any(Checker)) { Format format = new Format("secure_ask"); format.AppendLine("정말 " + btn.name + " 선택합니까?"); format.AppendLine("[예] [아니오]"); format.ToButton("[예]", "예"); format.ToButton("[아니오]", "아니오"); format.Print(); ButtonReturn btn2 = SimpleConsole.ReadButton(); if (btn2.name == "예") { return(btn); } else if (btn2.name == "아니오") { SimpleConsole.Clear("secure_ask"); goto entry1; } else { SimpleConsole.Clear("secure_ask"); goto entry2; } } else { SimpleConsole.Clear("secure_ask"); return(btn); } }
protected override void RegisterUIEvent() { MusicSlider.onValueChanged.AddListener((volume) => { AudioManager.Instance.SetBGMVolume(volume); }); AudioSlider.onValueChanged.AddListener((volume) => { AudioManager.Instance.SetEffectVolume(volume); }); ButtonReturn.AddCallback(() => { UIMgr.ClosePanel <AudioSettingPanel>(); }); }
private void LoadApplications(object sender, EventArgs e) { foreach (Button i in applicationButtons) { i.Show(); } sort[0].Show(); sort[1].Show(); ApplicationTextBox.Clear(); ApplicationTextBox.Hide(); ButtonApproved.Hide(); ButtonMeeting.Hide(); ButtonNotApproved.Hide(); ButtonReturn.Hide(); ButtonDelete.Hide(); }
private void loadApplication(object sender, EventArgs e) { Button a = (Button)sender; BD bd = new BD(); DataTable table = new DataTable(); MySqlDataAdapter adapter = new MySqlDataAdapter(); MySqlCommand command = new MySqlCommand(getEverythingFromBD, bd.getConnection()); command.Parameters.Add("@nm", MySqlDbType.VarChar).Value = a.Tag; bd.openBD(); MySqlDataReader reader = command.ExecuteReader(); id = Convert.ToInt32(a.Tag); while (reader.Read()) { dataFromBD[0] = Convert.ToString(reader.GetInt32(0)); dataFromBD[1] = Convert.ToString(reader.GetString(1)); dataFromBD[2] = Convert.ToString(reader.GetString(2)); dataFromBD[3] = Convert.ToString(reader.GetString(3)); dataFromBD[4] = Convert.ToString(reader.GetString(4)); dataFromBD[5] = Convert.ToString(reader.GetString(5)); dataFromBD[6] = Convert.ToString(reader.GetString(6)); dataFromBD[7] = Convert.ToString(reader.GetString(7)); dataFromBD[8] = Convert.ToString(reader.GetString(8)); dataFromBD[9] = Convert.ToString(reader.GetString(9)); dataFromBD[10] = Convert.ToString(reader.GetDateTime(10)); dataFromBD[11] = Convert.ToString(reader.GetString(11)); } reader.Close(); bd.closeBD(); foreach (Button i in applicationButtons) { i.Hide(); } sort[0].Hide(); sort[1].Hide(); ButtonApproved.Show(); ButtonMeeting.Show(); ButtonNotApproved.Show(); ButtonReturn.Show(); ButtonDelete.Show(); //Тут тоже костыль, можно вместо потехи с 6 строками, сделать цикл, пробегающийся по двумерному массиву - // - 1 строка это имена столбцов, а 2 - сами данные. Пока что только так ApplicationTextBox.Visible = true; ApplicationTextBox.Text += $"Номер анкеты: {dataFromBD[0]}\n\n"; ApplicationTextBox.Text += $"Имя: {dataFromBD[1]}\n\n"; ApplicationTextBox.Text += $"Ник в игре: {dataFromBD[2]}\n\n"; ApplicationTextBox.Text += $"Ник в дискорде: {dataFromBD[3]}\n\n"; ApplicationTextBox.Text += $"Возраст: {dataFromBD[4]}\n\n"; ApplicationTextBox.Text += $"О себе: {dataFromBD[5]}\n\n"; ApplicationTextBox.Text += $"Любимая книга: {dataFromBD[6]}\n\n"; ApplicationTextBox.Text += $"Кем себя видит: {dataFromBD[7]}\n\n"; ApplicationTextBox.Text += $"Причина: {dataFromBD[8]}\n\n"; ApplicationTextBox.Text += $"Правила: {dataFromBD[9]}\n\n"; ApplicationTextBox.Text += $"Дата поступления анкеты: {dataFromBD[10]}\n\n"; ApplicationTextBox.Text += $"IP: {dataFromBD[11]}\n\n"; try { if (int.Parse(dataFromBD[4]) < 16) { int positionInText = ApplicationTextBox.Find("Возраст"); string lengthInText = $"Возраст: {dataFromBD[4]}\n\n"; ApplicationTextBox.SelectionStart = positionInText; ApplicationTextBox.SelectionLength = lengthInText.Length; ApplicationTextBox.SelectionColor = Color.Red; } } catch (Exception exce) { } finally { } }