private static void CreateCharacter_Class() { short Texture_Num = 0; Lists.Structures.Class Class = Lists.Class[Game.CreateCharacter_Class]; // Textura do personagem if (CheckBoxes.Get("GenderMale").Checked&& Class.Tex_Male.Length > 0) { Texture_Num = Class.Tex_Male[Game.CreateCharacter_Tex]; } else if (Class.Tex_Female.Length > 0) { Texture_Num = Class.Tex_Female[Game.CreateCharacter_Tex]; } // Desenha o personagem if (Texture_Num > 0) { Render(Tex_Face[Texture_Num], new Point(425, 440)); Character(Texture_Num, new Point(433, 501), Game.Directions.Down, Game.Animation_Stopped); } // Desenha o nome da classe string Text = Class.Name; DrawText(Text, 347 - Tools.MeasureString(Text) / 2, 509, SFML.Graphics.Color.White); // Descrição DrawText(Class.Description, 282, 526, SFML.Graphics.Color.White, 123); }
private void LoadBuffsFromCharacter() { try { _loadingBuffsFromCharacter = true; if (CheckBoxes == null || Character == null || Character.ActiveBuffs == null) { return; } foreach (KeyValuePair <Buff, CheckBox> kvp in CheckBoxes) { kvp.Value.IsChecked = false; } List <CheckBox> toCheck = new List <CheckBox>(); foreach (Buff b in Character.ActiveBuffs) { if (CheckBoxes.ContainsKey(Buff.GetBuffByName(b.Name))) { toCheck.Add(CheckBoxes[Buff.GetBuffByName(b.Name)]); } } foreach (CheckBox cb in toCheck) { cb.IsChecked = true; } } finally { _loadingBuffsFromCharacter = false; UpdateSavedSets(); } }
private static void JoinGame() { // Reseta os valores Chat.Order = new System.Collections.Generic.List <Chat.Structure>(); Chat.Lines_First = 0; Loop.Chat_Timer = Environment.TickCount + Chat.Sleep_Timer; TextBoxes.Get("Chat").Text = string.Empty; CheckBoxes.Get("Options_Sounds").Checked = Lists.Options.Sounds; CheckBoxes.Get("Options_Musics").Checked = Lists.Options.Musics; CheckBoxes.Get("Options_Chat").Checked = Lists.Options.Chat; Game.Need_Information = 0; Loop.Chat_Timer = Loop.Chat_Timer = Environment.TickCount + 10000; Player.Me.Party = new byte[0]; // Fecha os paineis Panels.Get("Menu_Character").Visible = false; Panels.Get("Menu_Inventory").Visible = false; Panels.Get("Menu_Options").Visible = false; Panels.Get("Chat").Visible = false; Panels.Get("Drop").Visible = false; Panels.Get("Party_Invitation").Visible = false; // Abre o jogo Audio.Music.Stop(); Tools.CurrentWindow = Tools.Windows.Game; }
private Hashtable CheckMetadataOK() { Hashtable metadataProblems = new Hashtable(); List <SPUser> newUsers = PublishingApprovedBy.WBxGetMultiResolvedUsers(SPContext.Current.Web); if (newUsers.Count == 0) { metadataProblems.Add("PublishingApprovedBy", "You must enter at least one person who approved publication."); } String[] checkBoxesCodes = CheckBoxesCodes.Value.Split(';'); bool allChecked = true; foreach (String code in checkBoxesCodes) { CheckBox checkBox = (CheckBox)CheckBoxes.WBxFindNestedControlByID(code); if (!checkBox.Checked) { allChecked = false; } } if (!allChecked) { metadataProblems.Add("CheckList", "You have to read and tick all check boxes"); } return(metadataProblems); }
/// <summary> /// Use this method to define which processor the current Option should be using. /// </summary> /// <param name="type">OptionType - the type of option the current object should be defined as.</param> public void SetProcessor(OptionTypes type) { switch (type) { case OptionTypes.CheckBoxes: Processor = new CheckBoxes(); break; case OptionTypes.DropDownList: Processor = new DropDownList(); break; case OptionTypes.FileUpload: Processor = new FileUpload(); break; case OptionTypes.Html: Processor = new Html(); break; case OptionTypes.RadioButtonList: Processor = new RadioButtonList(); break; case OptionTypes.TextInput: Processor = new TextInput(); break; } }
public void AddBox(JCheckbox box) { if (!CheckBoxes.Contains(box)) { CheckBoxes.Add(box); box.Group = this; } }
public CheckBoxSe CheckBox(Predicate <ElementSe> predicate) { try { return(CheckBoxes.Find(predicate)); } catch (Exception) { return(null); } }
public static void CreateCharacter() { NetOutgoingMessage Data = Socket.Device.CreateMessage(); // Envia os dados Data.Write((byte)Packets.CreateCharacter); Data.Write(TextBoxes.Get("CreateCharacter_Name").Text); Data.Write(Game.CreateCharacter_Class); Data.Write(CheckBoxes.Get("GenderMale").Checked); Data.Write(Game.CreateCharacter_Tex); Packet(Data); }
public SoundForm() { InitializeComponent(); // Disable NPC Randomization cbNpcSounds.Enabled = false; flpNpcSounds.Enabled = false; flpNpcSounds.Visible = false; cbMixNpcParty.Enabled = false; cbMixNpcParty.Visible = false; RandomizeAreaMusic = Properties.Settings.Default.RandomizeAreaMusic; RandomizeBattleMusic = Properties.Settings.Default.RandomizeBattleMusic; RandomizeAmbientNoise = Properties.Settings.Default.RandomizeAmbientNoise; RandomizeCutsceneNoise = Properties.Settings.Default.RandomizeCutsceneNoise; //RandomizeNpcSounds = Properties.Settings.Default.RandomizeNpcSounds; RandomizeNpcSounds = RandomizationLevel.None; // Functionality Disabled RandomizePartySounds = Properties.Settings.Default.RandomizePartySounds; cbRemoveDmca.Checked = Properties.Settings.Default.RemoveDmcaMusic; //MixNpcAndParty = Properties.Settings.Default.MixNpcAndPartySounds; MixNpcAndParty = false; // Functionality Disabled // Create easy access lists. CheckBoxes.AddRange(new List <CheckBox>() { cbAreaMusic, cbBattleMusic, cbAmbientNoise, cbCutsceneNoise, //cbNpcSounds, // Randomization not implemented. cbPartySounds, }); TypeRadioButtons.AddRange(new List <RadioButton>() { rbAreaMusicType, rbBattleMusicType, rbAmbientNoiseType, rbCutsceneNoiseType, rbPartySoundsType, }); MaxRadioButtons.AddRange(new List <RadioButton>() { rbAreaMusicMax, rbBattleMusicMax, rbAmbientNoiseMax, rbCutsceneNoiseMax, rbPartySoundsMax, }); }
private static void CreateCharacter() { // Reseta os valores TextBoxes.Get("CreateCharacter_Name").Text = string.Empty; CheckBoxes.Get("GenderMale").Checked = true; CheckBoxes.Get("GenderFemale").Checked = false; Game.CreateCharacter_Class = 1; Game.CreateCharacter_Tex = 0; // Abre o painel de criação de personagem Panels.Menu_Close(); Panels.Get("CreateCharacter").Visible = true; }
private static void Options() { // Termina a conexão Socket.Disconnect(); // Define as marcações corretas CheckBoxes.Get("Sounds").Checked = Lists.Options.Sounds; CheckBoxes.Get("Musics").Checked = Lists.Options.Musics; // Abre o painel Panels.Menu_Close(); Panels.Get("Options").Visible = true; }
static public void UnCheckAll(TreeNodeEx treeNode) { lock (m_syncRoot) { TreeViewEx treeView = (TreeViewEx)treeNode.TreeView; if (treeView != null) { treeView.SuspendCheckEvents(); } CheckBoxes.UnCheckAll((TreeNode)treeNode); if (treeView != null) { treeView.InvokeTreeViewExNodesChecked(); treeView.ResumeCheckEvents(); } } }
private void LoadBuffsFromCharacter() { try { _loadingBuffsFromCharacter = true; if (CheckBoxes == null || Character == null || Character.ActiveBuffs == null) { return; } foreach (KeyValuePair <Buff, CheckBox> kvp in CheckBoxes) { kvp.Value.IsChecked = false; } List <CheckBox> toCheck = new List <CheckBox>(); foreach (Buff b in Character.ActiveBuffs) { if (CheckBoxes.ContainsKey(Buff.GetBuffByName(b.Name))) { toCheck.Add(CheckBoxes[Buff.GetBuffByName(b.Name)]); } } foreach (CheckBox cb in toCheck) { cb.IsChecked = true; } // update set bonuses foreach (CheckBox checkBox in CheckBoxes.Values) { Buff buff = (Buff)checkBox.Tag; if (!string.IsNullOrEmpty(buff.SetName)) { int setCount; Character.SetBonusCount.TryGetValue(buff.SetName, out setCount); checkBox.IsChecked = setCount >= buff.SetThreshold; } } } finally { _loadingBuffsFromCharacter = false; UpdateSavedSets(); } }
/// <summary> /// Adição de uma acção no Popup Menu /// </summary> /// <param name="TagString">Id definido para a acção</param> /// <param name="LabelText">Texto da acção</param> /// <param name="ImageUrl">Url da imagem</param> /// <param name="HoverImageUrl">Hover Url da imagem</param> /// <param name="Separator">Separador</param> /// <param name="Enabled">Activo</param> /// <param name="Hidden">Escondido</param> /// <param name="TargetUrl">Url de destino ou javascipt</param> /// <param name="CheckBox">CheckBox visível</param> /// <param name="Checked">Valor da CheckBox</param> public void AddAction ( string TagString, string LabelText, string ImageUrl, string HoverImageUrl, bool Separator, bool Enabled, bool Hidden, string TargetUrl, CheckBoxes CheckBox, bool Checked) { //---------------------------------------------------------------- // Declaração de variáveis //---------------------------------------------------------------- Item item = new Item(); item.TagString = TagString; item.Text = LabelText; item.ImageUrl = ImageUrl; item.HoverImageUrl = HoverImageUrl; item.Separator = Separator; item.Enabled = Enabled; item.Hidden = Hidden; item.TargetUrl = TargetUrl; item.CheckBox = CheckBox; item.Checked = Checked; //---------------------------------------------------------------- // Inserção do item //---------------------------------------------------------------- this.Items.Add(item); }
private static void Options() { // Cria o arquivo se ele não existir if (!Directories.Options.Exists) { Clear.Options(); Write.Options(); } // Lê os dados else { FileStream Stream = Directories.Options.OpenRead(); Lists.Options = (Lists.Structures.Options) new BinaryFormatter().Deserialize(Stream); Stream.Close(); } // Eventos CheckBoxes.Get("Connect_Save_Username").Checked = Lists.Options.SaveUsername; if (Lists.Options.SaveUsername) { TextBoxes.Get("Connect_Username").Text = Lists.Options.Username; } }
private static void CreateCharacter_Texture_ChangeLeft() { // Lista de texturas short[] Tex_List; if (CheckBoxes.Get("GenderMale").Checked == true) { Tex_List = Lists.Class[Game.CreateCharacter_Class].Tex_Male; } else { Tex_List = Lists.Class[Game.CreateCharacter_Class].Tex_Female; } // Altera a classe selecionada pelo jogador if (Game.CreateCharacter_Tex == 0) { Game.CreateCharacter_Tex = (byte)(Tex_List.Length - 1); } else { Game.CreateCharacter_Tex -= 1; } }
public MouseDialog() : base(new Rect(0, 0, 34, 12), "Mouse options") { Rect R; View V; Options |= OptionFlags.ofCentered; R = new Rect(3, 4, 30, 5); MouseScrollBar = new ScrollBar(R); MouseScrollBar.SetParams(1, 1, 20, 20, 1); MouseScrollBar.Options |= OptionFlags.ofSelectable; MouseScrollBar.SetValue(W32Kbd.DoubleDelay); Insert(MouseScrollBar); R = new Rect(2, 2, 21, 3); V = new Label(R, "~M~ouse double click", MouseScrollBar); Insert(V); R = new Rect(3, 3, 30, 4); V = new ClickTester(R, "Fast Medium Slow"); Insert(V); R = new Rect(3, 6, 30, 7); V = new CheckBoxes(R, CheckBoxes.NewSItem("~R~everse mouse buttons", null)); Insert(V); OldDelay = W32Kbd.DoubleDelay; R = new Rect(9, 9, 19, 11); V = new Button(R, "O~K~", cmOk, Button.ButtonFlags.Default); Insert(V); R.A.X += 12; R.B.X += 12; V = new Button(R, "Cancel", cmCancel, Button.ButtonFlags.Normal); Insert(V); SelectNext(false); }
static public void UnCheckAll(TreeNode treeNode) { lock (m_syncRoot) { if (treeNode == null) { return; } TreeView treeView = treeNode.TreeView; if (treeView == null || !treeView.CheckBoxes) { return; } else { foreach (TreeNode childNode in treeNode.Nodes) { CheckBoxes.UnCheckAll(childNode); } } treeNode.Checked = false; } }
/// <summary> /// Returns a checkbox by id. /// </summary> /// <param name="commandId"></param> /// <returns></returns> public RibbonCheckBox GetCheckBox(int commandId) { return(CheckBoxes.Where(x => x.CommandId == commandId).FirstOrDefault()); }
public TextureForm() { InitializeComponent(); // Set Initial Values RandomizeCubeMaps = Properties.Settings.Default.TextureRandomizeCubeMaps; RandomizeCreatures = Properties.Settings.Default.TextureRandomizeCreatures; RandomizeEffects = Properties.Settings.Default.TextureRandomizeEffects; RandomizeItems = Properties.Settings.Default.TextureRandomizeItems; RandomizePlanetary = Properties.Settings.Default.TextureRandomizePlanetary; RandomizeNPC = Properties.Settings.Default.TextureRandomizeNPC; RandomizePlayHeads = Properties.Settings.Default.TextureRandomizePlayHeads; RandomizePlayBodies = Properties.Settings.Default.TextureRandomizePlayBodies; RandomizePlaceables = Properties.Settings.Default.TextureRandomizePlaceables; RandomizeParty = Properties.Settings.Default.TextureRandomizeParty; RandomizeStunt = Properties.Settings.Default.TextureRandomizeStunt; RandomizeVehicles = Properties.Settings.Default.TextureRandomizeVehicles; RandomizeWeapons = Properties.Settings.Default.TextureRandomizeWeapons; RandomizeOther = Properties.Settings.Default.TextureRandomizeOther; // Radio switch for which texture pack is to be randomized. // Right now its set up to only allow the user to randomize one of the 3 texture packs in the game. Primarily because most // people only use the high quality pack, and also if there are stability issues this allows them to switch to a stable pack // in-game, without opening this program up. switch (Properties.Settings.Default.TexturePack) { default: case TexturePack.HighQuality: rbTextHigh.Checked = true; break; case TexturePack.MedQuality: rbTextMed.Checked = true; break; case TexturePack.LowQuality: rbTextLow.Checked = true; break; } // Create easy access lists. CheckBoxes.AddRange(new List <CheckBox>() { cbCubeMaps, cbCreatures, cbEffects, cbItems, cbPlanetary, cbNPC, cbPlayHeads, cbPlayBodies, cbPlaceables, cbParty, cbStunt, cbVehicles, cbWeapons, cbOther, }); TypeRadioButtons.AddRange(new List <RadioButton>() { rbCubeMapsType, rbCreaturesType, rbEffectsType, rbItemsType, rbPlanetaryType, rbNPCType, rbPlayHeadsType, rbPlayBodiesType, rbPlaceablesType, rbPartyType, rbStuntType, rbVehiclesType, rbWeaponsType, rbOtherType, }); MaxRadioButtons.AddRange(new List <RadioButton>() { rbCubeMapsMax, rbCreaturesMax, rbEffectsMax, rbItemsMax, rbPlanetaryMax, rbNPCMax, rbPlayHeadsMax, rbPlayBodiesMax, rbPlaceablesMax, rbPartyMax, rbStuntMax, rbVehiclesMax, rbWeaponsMax, rbOtherMax, }); }
private void UpdateButtonState() { buttonDownload.Enabled = CheckBoxes.Any(cb => cb.Checked) && Destination.NotEmpty(); }
public ItemForm() { InitializeComponent(); lbOmitItems.DataSource = Globals.OmitItems; //Set Intiial Values RandomizeArmbands = Properties.Settings.Default.RandomizeArmbands; RandomizeArmor = Properties.Settings.Default.RandomizeArmor; RandomizeBelts = Properties.Settings.Default.RandomizeBelts; RandomizeBlasters = Properties.Settings.Default.RandomizeBlasters; RandomizeHides = Properties.Settings.Default.RandomizeHides; RandomizeCreature = Properties.Settings.Default.RandomizeCreature; RandomizeDroid = Properties.Settings.Default.RandomizeDroid; RandomizeGloves = Properties.Settings.Default.RandomizeGloves; RandomizeGrenades = Properties.Settings.Default.RandomizeGrenades; RandomizeImplants = Properties.Settings.Default.RandomizeImplants; RandomizeLightsabers = Properties.Settings.Default.RandomizeLightsabers; RandomizeMask = Properties.Settings.Default.RandomizeMask; RandomizeMelee = Properties.Settings.Default.RandomizeMelee; RandomizeMines = Properties.Settings.Default.RandomizeMines; RandomizePaz = Properties.Settings.Default.RandomizePaz; RandomizeStims = Properties.Settings.Default.RandomizeStims; RandomizeUpgrade = Properties.Settings.Default.RandomizeUpgrade; RandomizeVarious = Properties.Settings.Default.RandomizeVarious; // Create easy access lists. CheckBoxes.AddRange(new List <CheckBox>() { cbArmband, cbArmor, cbBelt, cbBlaster, cbCreatureHide, cbCreatureWeapon, cbDroid, cbGlove, cbGrenade, cbImplant, cbLightsaber, cbMask, cbMelee, cbMine, cbPazaak, cbStimulant, cbUpgrade, cbVarious, }); SubtypeRadioButtons.AddRange(new List <RadioButton>() { rbArmbandSType, rbArmorSType, rbBlasterSType, rbCreatureWeaponSType, rbDroidSType, rbImplantSType, rbLightsaberSType, rbMaskSType, rbMeleeSType, rbMineSType, rbStimSType, rbUpgradeSType, }); TypeRadioButtons.AddRange(new List <RadioButton>() { rbArmbandType, rbArmorType, rbBeltType, rbBlasterType, rbCreatureHideType, rbCreatureWeaponType, rbDroidType, rbGloveType, rbGrenadeType, rbImplantType, rbLightsaberType, rbMaskType, rbMeleeType, rbMineType, rbPazaakType, rbStimulantType, rbUpgradeType, rbVariousType, }); MaxRadioButtons.AddRange(new List <RadioButton>() { rbArmbandMax, rbArmorMax, rbBeltMax, rbBlasterMax, rbCreatureHideMax, rbCreatureWeaponMax, rbDroidMax, rbGloveMax, rbGrenadeMax, rbImplantMax, rbLightsaberMax, rbMaskMax, rbMeleeMax, rbMineMax, rbPazaakMax, rbStimulantMax, rbUpgradeMax, rbVariousMax, }); }
public void AddElement(BrowserElement element) { element.OrderIndex = AddedElements++; //element.Position = this.Position; switch (element.Type) { case BrowserElementType.BrowserBoxSelection: BrowserBoxSelection boxSelection = element as BrowserBoxSelection; break; case BrowserElementType.Button: BrowserButton button = element as BrowserButton; Buttons.Add(button); break; case BrowserElementType.Title: BrowserTitle title = element as BrowserTitle; Titles.Add(title); break; case BrowserElementType.Text: BrowserText text = element as BrowserText; Texts.Add(text); break; case BrowserElementType.TextBox: BrowserTextBox textBox = element as BrowserTextBox; TextBoxes.Add(textBox); break; case BrowserElementType.Card: BrowserCard card = element as BrowserCard; Cards.Add(card); break; case BrowserElementType.Password: BrowserPasswordTextBox passwordTextBox = element as BrowserPasswordTextBox; PasswordTextBoxes.Add(passwordTextBox); break; //case BrowserElementType.YesNoDialog: // BrowserYesNoDialog yesNoDialog = element as BrowserYesNoDialog; // YesNoDialog = yesNoDialog; // break; case BrowserElementType.Checkbox: BrowserCheckBox checkBox = element as BrowserCheckBox; CheckBoxes.Add(checkBox); break; case BrowserElementType.DropDown: BrowserDropDown dropDown = element as BrowserDropDown; DropDowns.Add(dropDown); break; case BrowserElementType.ProgressBar: BrowserProgressBar progressBar = element as BrowserProgressBar; ProgressBars.Add(progressBar); break; case BrowserElementType.Container: BrowserContainer container = element as BrowserContainer; Container.Add(container); break; case BrowserElementType.Icon: BrowserButtonIcon icon = element as BrowserButtonIcon; Icons.Add(icon); break; default: NAPI.Util.ConsoleOutput($"UNKNOWN ELEMENT OF TYPE {element.Type}"); break; } }