public void Buy(items selectedItem, Player player) { switch (selectedItem) { case items.CargoBay: //Cargo Bay if (player.money >= cargobayCost) { player.CargoBayCapacity += 10; player.money -= Convert.ToInt32(cargobayCost); cargobayCost = Math.Floor(cargobayCost * 1.5); } break; case items.FuelTank: //Fuel Tank if (player.money >= fueltankCost) { player.FuelTankCapacity += Math.Floor(player.FuelTankCapacity * 0.5); player.money -= Convert.ToInt32(fueltankCost); fueltankCost = Math.Floor(fueltankCost * 1.3); } break; case items.Drill: //Drill if (player.money >= drillCost && drillList.Count > 2) { drillList.Remove(drillList[0]); player.playerDrill = drillList[0]; player.money -= Convert.ToInt32(drillCost); drillCost = drillList[1].price; } break; } }
/// <summary> /// 克隆物品格子 /// </summary> /// <param name="item">合成的物品</param> private void InstantiateImage(items item) { m_tempCompositeSlot = Instantiate(m_compositeSlot); m_tempCompositeSlot.transform.localScale = Vector3.one; setit(m_tempCompositeSlot, item); }
public void RemoveItem(items item) { lineCollection.RemoveAll(l => l.Item.Id.Equals(item.Id)); }
public void changeItem(string name) { curItem = itemPairs[name]; slotIsEmpty = false; curItemUI.enabled = true; }
=> CreateTransaction(items, TransactionType.Sales);
return(this.ReadManyItemsHelperAsync( items, readManyRequestOptions, cancellationToken));
await processBatchAsync(items, ct).ConfigureAwait(false);
/// <summary> /// Draw the current objects stats /// </summary> void drawCurrentObject() { GUILayout.Label("Current Object Awareness Info", EditorStyles.boldLabel); GUILayout.Space(5); // Make this section collapsable showPosition = EditorGUILayout.Foldout(showPosition, showPosition ? "Hide" : "Show"); if (showPosition) { GUILayout.BeginHorizontal(EditorStyles.helpBox); GUILayout.Space(15); // A truly roundabout way to show this information in the editor // It is devised of four variables that make up columns. var high = baseClass.currentChecks.High.obstacles; var med = baseClass.currentChecks.MedHigh.obstacles; var medLow = baseClass.currentChecks.MedLow.obstacles; var low = baseClass.currentChecks.Low.obstacles; var crouch = baseClass.currentChecks.crouchObstacles; var ground = baseClass.currentChecks.groundDropObst; var ledge = baseClass.currentChecks.ledgeObstacle; List <items> Items = new List <items>() { { new items("Current:", baseClass.currentChecks.type.ToString(), "", "") }, { new items("Mode:", mode, "", "") }, { new items("", "", "", "") }, { new items("", "Left", "Front", "Right") }, { new items("HIGH", "", "", "") }, { new items("Obstacle:", high.left.firstObjHit?.name ?? "None", high.front.firstObjHit?.name ?? "None", high.right.firstObjHit?.name ?? "None") }, { new items("Position:", high.left.firstObjHit?.transform.position.ToString() ?? "None", high.front.firstObjHit?.transform.position.ToString() ?? "None", high.right.firstObjHit?.transform.position.ToString() ?? "None") }, { new items("Distance:", high.left.distance.ToString(), high.front.distance.ToString(), high.right.distance.ToString()) }, { new items("Angle:", high.left.angleOfAttack.ToString(), high.front.angleOfAttack.ToString(), high.right.angleOfAttack.ToString()) }, { new items("", "", "", "") }, { new items("MIDDLE HIGH", "", "", "") }, { new items("Obstacle:", med.left.firstObjHit?.name ?? "None", med.front.firstObjHit?.name ?? "None", med.right.firstObjHit?.name ?? "None") }, { new items("Position:", med.left.firstObjHit?.transform.position.ToString() ?? "None", med.front.firstObjHit?.transform.position.ToString() ?? "None", med.right.firstObjHit?.transform.position.ToString() ?? "None") }, { new items("Distance:", med.left.distance.ToString(), med.front.distance.ToString(), med.right.distance.ToString()) }, { new items("Angle:", med.left.angleOfAttack.ToString(), med.front.angleOfAttack.ToString(), med.right.angleOfAttack.ToString()) }, { new items("", "", "", "") }, { new items("MIDDLE LOW", "", "", "") }, { new items("Obstacle:", medLow.left.firstObjHit?.name ?? "None", medLow.front.firstObjHit?.name ?? "None", medLow.right.firstObjHit?.name ?? "None") }, { new items("Position:", medLow.left.firstObjHit?.transform.position.ToString() ?? "None", medLow.front.firstObjHit?.transform.position.ToString() ?? "None", medLow.right.firstObjHit?.transform.position.ToString() ?? "None") }, { new items("Distance:", medLow.left.distance.ToString(), medLow.front.distance.ToString(), medLow.right.distance.ToString()) }, { new items("Angle:", medLow.left.angleOfAttack.ToString(), medLow.front.angleOfAttack.ToString(), medLow.right.angleOfAttack.ToString()) }, { new items("", "", "", "") }, { new items("LOW", "", "", "") }, { new items("Obstacle:", low.left.firstObjHit?.name ?? "None", low.front.firstObjHit?.name ?? "None", low.right.firstObjHit?.name ?? "None") }, { new items("Position:", low.left.firstObjHit?.transform.position.ToString() ?? "None", low.front.firstObjHit?.transform.position.ToString() ?? "None", low.right.firstObjHit?.transform.position.ToString() ?? "None") }, { new items("Distance:", low.left.distance.ToString(), low.front.distance.ToString(), low.right.distance.ToString()) }, { new items("Angle:", low.left.angleOfAttack.ToString(), low.front.angleOfAttack.ToString(), low.right.angleOfAttack.ToString()) }, { new items("", "", "", "") }, { new items("GROUND", "", "", "") }, { new items("Obstacle:", ground.left.firstObjHit?.name ?? "None", ground.front.firstObjHit?.name ?? "None", ground.right.firstObjHit?.name ?? "None") }, { new items("Position:", ground.left.firstObjHit?.transform.position.ToString() ?? "None", ground.front.firstObjHit?.transform.position.ToString() ?? "None", low.right.firstObjHit?.transform.position.ToString() ?? "None") }, { new items("Distance:", ground.left.distance.ToString(), ground.front.distance.ToString(), ground.right.distance.ToString()) }, { new items("Angle:", ground.left.angleOfAttack.ToString(), ground.front.angleOfAttack.ToString(), ground.right.angleOfAttack.ToString()) }, { new items("", "", "", "") }, { new items("CROUCH", "", "LEDGE", "", true) }, { new items("Obstacle:", crouch.top.firstObjHit?.name ?? "None", "Obstacle", ledge.front.firstObjHit?.name ?? "None", true) }, { new items("Position:", crouch.top.firstObjHit?.transform.position.ToString() ?? "None", "Position", ledge.front.firstObjHit?.transform.position.ToString() ?? "None", true) }, { new items("Distance:", crouch.top.distance.ToString(), "Distance", ledge.front.distance.ToString(), true) }, { new items("Angle:", crouch.top.angleOfAttack.ToString(), "Angle", ledge.front.angleOfAttack.ToString(), true) }, }; // check what values we would like to use if (!hold || manualUpdate) { cached = Items; } else { if (cached.Count > 0) { cached[1] = new items(n: cached[1].name, h: "Manual", "", ""); } } drawColumns(cached); GUILayout.EndHorizontal(); drawButtons(); GUILayout.Space(10); } }
public void sub(items diesesitem) { Inventar.Remove(diesesitem); p001.BerechneMovmentDelay(); }
public void add(items diesesitem) { Inventar.Add(diesesitem); p001.BerechneMovmentDelay(); }
void Start() { items tmp_item = new items(); //Nahkampfwaffen tmp_item = leeres_item(); tmp_item.name = "Dagger"; tmp_item.type = itemtype.Nahkampf; tmp_item.price = 10; tmp_item.phy_dmg = 25; tmp_item.gewicht = 1; Item_List.Add(tmp_item); tmp_item = leeres_item(); tmp_item.name = "Gladius"; tmp_item.type = itemtype.Nahkampf; tmp_item.price = 25; tmp_item.phy_dmg = 35; tmp_item.gewicht = 1; Item_List.Add(tmp_item); tmp_item = leeres_item(); tmp_item.name = "Saber"; tmp_item.type = itemtype.Nahkampf; tmp_item.price = 50; tmp_item.phy_dmg = 50; tmp_item.gewicht = 1; Item_List.Add(tmp_item); tmp_item = leeres_item(); tmp_item.name = "Longsword"; tmp_item.type = itemtype.Nahkampf; tmp_item.price = 100; tmp_item.phy_dmg = 75; tmp_item.gewicht = 1; Item_List.Add(tmp_item); tmp_item = leeres_item(); tmp_item.name = "Broadsword"; tmp_item.type = itemtype.Nahkampf; tmp_item.price = 125; tmp_item.phy_dmg = 90; tmp_item.gewicht = 1; Item_List.Add(tmp_item); tmp_item = leeres_item(); tmp_item.name = "Mastersword"; tmp_item.type = itemtype.Nahkampf; tmp_item.price = 1000; tmp_item.mag_dmg = 50; tmp_item.phy_dmg = 150; tmp_item.gewicht = 1; Item_List.Add(tmp_item); // Fernkampfwaffen tmp_item = leeres_item(); tmp_item.name = "Shortbow"; tmp_item.type = itemtype.Fernkampf; tmp_item.price = 100; tmp_item.phy_dmg = 50; tmp_item.gewicht = 1; Item_List.Add(tmp_item); tmp_item = leeres_item(); tmp_item.name = "Longbow"; tmp_item.type = itemtype.Fernkampf; tmp_item.price = 250; tmp_item.phy_dmg = 125; tmp_item.gewicht = 1; Item_List.Add(tmp_item); tmp_item = leeres_item(); tmp_item.name = "Crossbow"; tmp_item.type = itemtype.Fernkampf; tmp_item.price = 500; tmp_item.phy_dmg = 250; tmp_item.gewicht = 3; Item_List.Add(tmp_item); //Tränke tmp_item = leeres_item(); tmp_item.type = itemtype.Tränke; tmp_item.name = "Small Potion of Healing"; tmp_item.price = 10; tmp_item.refill_hp = 500; tmp_item.effect = tmp_item.refill_hp; tmp_item.effecttyp = "h"; tmp_item.gewicht = 0.1f; tmp_item.stock = 50; Item_List.Add(tmp_item); tmp_item = leeres_item(); tmp_item.type = itemtype.Tränke; tmp_item.name = "Large Potion of Healing"; tmp_item.price = 50; tmp_item.refill_hp = 2500; tmp_item.effect = tmp_item.refill_hp; tmp_item.effecttyp = "h"; tmp_item.gewicht = 0.5f; tmp_item.stock = 50; Item_List.Add(tmp_item); tmp_item = leeres_item(); tmp_item.type = itemtype.Tränke; tmp_item.name = "Small Potion of Mana"; tmp_item.price = 10; tmp_item.refill_mana = 500; tmp_item.effect = tmp_item.refill_mana; tmp_item.effecttyp = "m"; tmp_item.gewicht = 0.1f; tmp_item.stock = 50; Item_List.Add(tmp_item); tmp_item = leeres_item(); tmp_item.type = itemtype.Tränke; tmp_item.name = "Large Potion of Mana"; tmp_item.price = 50; tmp_item.refill_mana = 2500; tmp_item.effect = tmp_item.refill_mana; tmp_item.effecttyp = "m"; tmp_item.gewicht = 0.5f; tmp_item.stock = 50; Item_List.Add(tmp_item); //Rüstung //Leather tmp_item = leeres_item(); tmp_item.type = itemtype.Kopf_Rüstung; tmp_item.name = "Leather Helmet"; tmp_item.price = 25; tmp_item.phy_arm = 20; tmp_item.mag_arm = 10; tmp_item.gewicht = 1.5f; Item_List.Add(tmp_item); tmp_item = leeres_item(); tmp_item.type = itemtype.Torso_Rüstung; tmp_item.name = "Leather Chestplate"; tmp_item.price = 50; tmp_item.phy_arm = 80; tmp_item.mag_arm = 30; tmp_item.gewicht = 5; Item_List.Add(tmp_item); tmp_item = leeres_item(); tmp_item.type = itemtype.Beine_Rüstung; tmp_item.name = "Leather Cuisse"; tmp_item.price = 30; tmp_item.phy_arm = 22; tmp_item.mag_arm = 10; tmp_item.gewicht = 1.5f; Item_List.Add(tmp_item); tmp_item = leeres_item(); tmp_item.type = itemtype.Stiefel_Rüstung; tmp_item.name = "Leather Boots"; tmp_item.price = 20; tmp_item.phy_arm = 15; tmp_item.mag_arm = 5; tmp_item.gewicht = 0.5f; Item_List.Add(tmp_item); tmp_item = leeres_item(); tmp_item.type = itemtype.Handschuhe_Rüstung; tmp_item.name = "Leather Gloves"; tmp_item.price = 20; tmp_item.phy_arm = 15; tmp_item.mag_arm = 5; tmp_item.gewicht = 0.5f; Item_List.Add(tmp_item); //Iron tmp_item = leeres_item(); tmp_item.type = itemtype.Kopf_Rüstung; tmp_item.name = "Iron Helmet"; tmp_item.price = 50; tmp_item.phy_arm = 40; tmp_item.mag_arm = 20; tmp_item.gewicht = 5.5f; Item_List.Add(tmp_item); tmp_item = leeres_item(); tmp_item.type = itemtype.Torso_Rüstung; tmp_item.name = "Iron Chestplate"; tmp_item.price = 250; tmp_item.phy_arm = 300; tmp_item.mag_arm = 50; tmp_item.gewicht = 9; Item_List.Add(tmp_item); tmp_item = leeres_item(); tmp_item.type = itemtype.Beine_Rüstung; tmp_item.name = "Iron Cuisse"; tmp_item.price = 60; tmp_item.phy_arm = 44; tmp_item.mag_arm = 20; tmp_item.gewicht = 4.5f; Item_List.Add(tmp_item); tmp_item = leeres_item(); tmp_item.type = itemtype.Stiefel_Rüstung; tmp_item.name = "Iron Boots"; tmp_item.price = 50; tmp_item.phy_arm = 45; tmp_item.mag_arm = 15; tmp_item.gewicht = 1.5f; Item_List.Add(tmp_item); tmp_item = leeres_item(); tmp_item.type = itemtype.Handschuhe_Rüstung; tmp_item.name = "Iron Gloves"; tmp_item.price = 40; tmp_item.phy_arm = 30; tmp_item.mag_arm = 15; tmp_item.gewicht = 1; Item_List.Add(tmp_item); //Magieresistenzrüstung tmp_item = leeres_item(); tmp_item.type = itemtype.Kopf_Rüstung; tmp_item.name = "Witcher's Cap"; tmp_item.price = 75; tmp_item.phy_arm = 20; tmp_item.mag_arm = 100; tmp_item.gewicht = 1; Item_List.Add(tmp_item); tmp_item = leeres_item(); tmp_item.type = itemtype.Torso_Rüstung; tmp_item.name = "Witcher's Robe"; tmp_item.price = 150; tmp_item.phy_arm = 40; tmp_item.mag_arm = 300; tmp_item.gewicht = 3; Item_List.Add(tmp_item); tmp_item = leeres_item(); tmp_item.type = itemtype.Beine_Rüstung; tmp_item.name = "Witcher's Tunic"; tmp_item.price = 90; tmp_item.phy_arm = 22; tmp_item.mag_arm = 100; tmp_item.gewicht = 1; Item_List.Add(tmp_item); tmp_item = leeres_item(); tmp_item.type = itemtype.Stiefel_Rüstung; tmp_item.name = "Witcher's Slippers"; tmp_item.price = 60; tmp_item.phy_arm = 15; tmp_item.mag_arm = 50; tmp_item.gewicht = 0.2f; Item_List.Add(tmp_item); tmp_item = leeres_item(); tmp_item.type = itemtype.Handschuhe_Rüstung; tmp_item.name = "Witcher's Gloves"; tmp_item.price = 60; tmp_item.phy_arm = 15; tmp_item.mag_arm = 25; tmp_item.gewicht = 0.2f; Item_List.Add(tmp_item); //Kristalle tmp_item = leeres_item(); tmp_item.type = itemtype.anglegbares; tmp_item.name = "Health Crystal"; tmp_item.price = 500; tmp_item.addmaxhp = 500; tmp_item.effect = tmp_item.addmaxhp; tmp_item.effecttyp = "h"; tmp_item.gewicht = 0.3f; tmp_item.refill_mod = 0; Item_List.Add(tmp_item); tmp_item = leeres_item(); tmp_item.type = itemtype.anglegbares; tmp_item.name = "Mana Crystal"; tmp_item.price = 500; tmp_item.addmaxmana = 500; tmp_item.effect = tmp_item.addmaxmana; tmp_item.effecttyp = "m"; tmp_item.gewicht = 0.3f; tmp_item.refill_mod = 0; Item_List.Add(tmp_item); tmp_item = leeres_item(); tmp_item.type = itemtype.anglegbares; tmp_item.name = "Strenght Crystal"; tmp_item.price = 50; tmp_item.addpwr = 500; tmp_item.effect = tmp_item.addpwr; tmp_item.effecttyp = "p"; tmp_item.gewicht = 0.3f; tmp_item.refill_mod = 0; Item_List.Add(tmp_item); tmp_item = leeres_item(); tmp_item.type = itemtype.anglegbares; tmp_item.name = "Agility Crystal"; tmp_item.price = 50; tmp_item.addagility = 500; tmp_item.effect = tmp_item.addagility; tmp_item.effecttyp = "a"; tmp_item.gewicht = 0.3f; tmp_item.refill_mod = 0; Item_List.Add(tmp_item); //weitere wearables tmp_item = leeres_item(); tmp_item.type = itemtype.utility; tmp_item.name = "Small Quiver"; tmp_item.price = 5; tmp_item.maxcapacity = 50; //liste mit hinzugefügter munition tmp_item.gewicht = 2; Item_List.Add(tmp_item); tmp_item = leeres_item(); tmp_item.type = itemtype.utility; tmp_item.name = "Large Quiver"; tmp_item.price = 5; tmp_item.maxcapacity = 50; //liste mit hinzugefügter munition tmp_item.gewicht = 2; Item_List.Add(tmp_item); //Munition tmp_item = leeres_item(); tmp_item.type = itemtype.Munition; tmp_item.name = "Arrow"; tmp_item.price = 15; tmp_item.phy_dmg = 10; tmp_item.ammo_ammount = 20; tmp_item.gewicht = 0.1f; Item_List.Add(tmp_item); tmp_item = leeres_item(); tmp_item.type = itemtype.Munition; tmp_item.name = "Bolt"; tmp_item.price = 30; tmp_item.phy_dmg = 30; tmp_item.ammo_ammount = 10; tmp_item.gewicht = 0.3f; Item_List.Add(tmp_item); tmp_item = leeres_item(); tmp_item.type = itemtype.Munition; tmp_item.name = "Poisened Arrow"; tmp_item.price = 25; tmp_item.phy_dmg = 10; tmp_item.mag_dmg = 20; tmp_item.ammo_ammount = 10; tmp_item.gewicht = 0.2f; Item_List.Add(tmp_item); }
void IEmployeesHelper.EditProduct(Models.Employee.ItemModel model, HttpFileCollectionBase files) { //item var item = new items { Id = model.Item.Id, Title = model.Item.Title, Id_Category = model.SelectedCategory, Description = model.Item.Description, Id_Description = model.Item.Id_Description, Price = model.Item.Price }; //item details StringBuilder stringBulider = new StringBuilder(); for (int i = 0; i < model.DetailsItem.Count; i++) { if (!String.IsNullOrEmpty(model.DetailsItem[i])) { stringBulider.Append(model.DetailsItem[i]); stringBulider.Append(";"); } } stringBulider.Remove(stringBulider.Length - 1, 1); var itemDetails = new _dict_items_details { Id_Item = model.Item.Id, Name = stringBulider.ToString() }; //item quantity List <items_quantity> itemQuantity = new List <items_quantity>(); foreach (var quantity in model.Quantity) { itemQuantity.Add( new items_quantity { Id = quantity.Id, Id_Shop = quantity.Id_Shop, Quantity = quantity.Quantity }); } //item pictures List <items_picutures> itemPictures = new List <items_picutures>(); foreach (string file in files) { if (files[file].ContentType.Equals("image/jpeg")) { var picture = new items_picutures(); picture.PictureMimeType = files[file].ContentType; picture.PictureData = new byte[files[file].ContentLength]; files[file].InputStream.Read(picture.PictureData, 0, files[file].ContentLength); var ids = file.Split(new char[] { '-' }); picture.Id = int.Parse(ids[1]); itemPictures.Add(picture); } } _employeeRepository.EditProduct(item, itemPictures, itemDetails, itemQuantity); }
// Normalize and filter for duplicates. AddIfNew(items, expectStrings: true);
SerializeGeneric(items, ETFSerializer.SerializeMapExt);
base.Tests( modeData, accessibleEntryNodes, accessibleNodes, unlockedDoors, items, sequenceBreaks, dungeonID, id, expected);
/// <summary> /// Awake is called when the script instance is being loaded. /// </summary> void Awake() { items = items.instance; }
items.Length == 0 ? null : MapFrom(items as IEnumerable <(K, V)>);
private void bsave_Click(object sender, EventArgs e) //保存 { int iid = 0; int iout = 0; string itemsname = ""; items item1 = kindlist.SelectedItem as items; if (item1 != null) //确认选择项目的编号 { iout = item1.isout; itemsname = item1.iname; conn.Open(); comm.CommandText = @"select count(*) from [Lists]"; dr = comm.ExecuteReader(); while (dr.Read()) { iid = (int)dr[0]; } dr.Close(); conn.Close(); } decimal amount = numsa.Value; DateTime date = date1.Value; string explain = txtex.Text; string sql = string.Format("INSERT INTO [Lists](iid,iout,itemsname,money,datetime,explain,username) VALUES('{0}','{1}','{2}','{3}','{4}','{5}','{6}')", iid, iout, itemsname, amount, date, explain, username); try //添加新纪录,并在MessageBox中显示 { conn.Open(); comm.CommandText = sql; int count = comm.ExecuteNonQuery(); if (count > 0) { MessageBox.Show("记录成功", "添加成功", MessageBoxButtons.OK, MessageBoxIcon.Information); } else { MessageBox.Show("添加类别失败", "添加失败", MessageBoxButtons.OK, MessageBoxIcon.Information); } } catch (Exception ex) { MessageBox.Show(ex.Message, "操作数据库出错", MessageBoxButtons.OK, MessageBoxIcon.Exclamation); } finally { conn.Close(); } rmessage.Clear(); rmessage.AppendText("要保存的信息为:\n"); rmessage.AppendText(cbkind.SelectedItem.ToString()); rmessage.AppendText("-"); rmessage.AppendText(kindlist.SelectedItem.ToString()); rmessage.AppendText("\n日期:"); rmessage.AppendText(date1.Value.ToLongDateString()); rmessage.AppendText("\n说明:"); rmessage.AppendText(txtex.Text); rmessage.AppendText("\n金额:"); rmessage.AppendText(numsa.Value.ToString()); rmessage.AppendText("\n用户:" + username); }
public IEnumerable <items> Get() { items items = new items(); return(items.Get()); }
private void img_MouseMove(object sender, MouseEventArgs e) { SmallChampionItem icon = (SmallChampionItem)sender; BitmapImage img = (BitmapImage)icon.ChampionImage.Source; if (img == null) { return; } LargeChatPlayer PlayerItem = (LargeChatPlayer)icon.Tag; if (PlayerItem == null) { PlayerItem = new LargeChatPlayer(); string[] s = img.UriSource.Segments; int id = int.Parse(s[s.Length - 1].Replace(".png", "")); Client.MainGrid.Children.Add(PlayerItem); items Item = items.GetItem(id); PlayerItem.PlayerName.Content = Item.name; PlayerItem.PlayerName.Measure(new Size(double.PositiveInfinity, double.PositiveInfinity)); if (PlayerItem.PlayerName.DesiredSize.Width > 250) //Make title fit in item { PlayerItem.Width = PlayerItem.PlayerName.DesiredSize.Width; } else { PlayerItem.Width = 250; } PlayerItem.PlayerWins.Content = Item.price + " gold (" + Item.sellprice + " sell)"; PlayerItem.PlayerLeague.Content = "Item ID " + Item.id; PlayerItem.LevelLabel.Content = ""; PlayerItem.UsingLegendary.Visibility = System.Windows.Visibility.Hidden; string ParsedDescription = Item.description; ParsedDescription = ParsedDescription.Replace("<br>", Environment.NewLine); ParsedDescription = Regex.Replace(ParsedDescription, "<.*?>", string.Empty); PlayerItem.PlayerStatus.Text = ParsedDescription; PlayerItem.ProfileImage.Source = img; PlayerItem.HorizontalAlignment = System.Windows.HorizontalAlignment.Left; PlayerItem.VerticalAlignment = System.Windows.VerticalAlignment.Top; PlayerItem.Visibility = Visibility.Hidden; icon.Tag = PlayerItem; } if (PlayerItem.ActualHeight != 0 && PlayerItem.ActualWidth != 0) { double YMargin = (Client.MainGrid.ActualHeight / 2) - (PlayerItem.ActualHeight / 2); double XMargin = (Client.MainGrid.ActualWidth / 2) - (PlayerItem.ActualWidth / 2); PlayerItem.Margin = new Thickness(XMargin, YMargin, 0, 0); if (PlayerItem.Visibility == Visibility.Hidden) { PlayerItem.Visibility = Visibility.Visible; } } }
public Form2(Form1 form) { f1 = form; InitializeComponent(); rewind_sec.MaxLength = 3; forward_sec.MaxLength = 3; // 初期画面はアプリケーション設定 current_item = items.APPLICATION; // 設定の読み込み // Application rewind_sec.Text = Form1.rewind_sec.ToString(); forward_sec.Text = Form1.forward_sec.ToString(); trackBar_opacity.Value = (int)(f1.Opacity * 100); init_mp3dir = label_mp3dir.Text = Form1.Mp3_dir; // Shortcuts textBox_sc_speed_up.Text = Form1.key_speed_up.ToString(); textBox_sc_speed_down.Text = Form1.key_speed_down.ToString(); textBox_sc_prev.Text = Form1.key_prev.ToString(); textBox_sc_rewind.Text = Form1.key_rewind.ToString(); textBox_sc_start_stop.Text = Form1.key_start_stop.ToString(); textBox_sc_forward.Text = Form1.key_forward.ToString(); textBox_sc_next.Text = Form1.key_next.ToString(); textBox_sc_loop.Text = Form1.key_loop.ToString(); textBox_sc_auto.Text = Form1.key_auto.ToString(); // About label_version.Text = "Version: " + ConfigurationManager.AppSettings["version"]; label_author.Text = "Author: " + ConfigurationManager.AppSettings["authors"]; linkLabel_license.Text = "MIT"; linkLabel_source.Text = "github.com/yorimoi/zlp"; // ボタンをマウスオーバー時のテキスト表示 ToolTip tt = new ToolTip(); tt.InitialDelay = 0; tt.SetToolTip(linkLabel_license, "https://github.com/yorimoi/zlp/blob/master/LICENSE"); tt.SetToolTip(linkLabel_source, "https://github.com/yorimoi/zlp"); // キャレットの削除 textBox_sc_speed_up.GotFocus += (s, e) => { HideCaret(textBox_sc_speed_up.Handle); }; textBox_sc_speed_down.GotFocus += (s, e) => { HideCaret(textBox_sc_speed_down.Handle); }; textBox_sc_prev.GotFocus += (s, e) => { HideCaret(textBox_sc_prev.Handle); }; textBox_sc_rewind.GotFocus += (s, e) => { HideCaret(textBox_sc_rewind.Handle); }; textBox_sc_start_stop.GotFocus += (s, e) => { HideCaret(textBox_sc_start_stop.Handle); }; textBox_sc_forward.GotFocus += (s, e) => { HideCaret(textBox_sc_forward.Handle); }; textBox_sc_next.GotFocus += (s, e) => { HideCaret(textBox_sc_next.Handle); }; textBox_sc_loop.GotFocus += (s, e) => { HideCaret(textBox_sc_loop.Handle); }; textBox_sc_auto.GotFocus += (s, e) => { HideCaret(textBox_sc_auto.Handle); }; // KeysEnumと表示文字列の変換 string[] textBoxes = { textBox_sc_speed_up.Text, textBox_sc_speed_down.Text, textBox_sc_prev.Text, textBox_sc_rewind.Text, textBox_sc_start_stop.Text, textBox_sc_forward.Text, textBox_sc_next.Text, textBox_sc_loop.Text, textBox_sc_auto.Text }; for (int i = 0; i < textBoxes.Length; ++i) { switch (textBoxes[i]) { case "None": textBoxes[i] = ""; break; case "D0": textBoxes[i] = "0"; break; case "D1": textBoxes[i] = "1"; break; case "D2": textBoxes[i] = "2"; break; case "D3": textBoxes[i] = "3"; break; case "D4": textBoxes[i] = "4"; break; case "D5": textBoxes[i] = "5"; break; case "D6": textBoxes[i] = "6"; break; case "D7": textBoxes[i] = "7"; break; case "D8": textBoxes[i] = "8"; break; case "D9": textBoxes[i] = "9"; break; case "Oem1": textBoxes[i] = ":"; break; case "Oemplus": textBoxes[i] = ";"; break; case "Oemcomma": textBoxes[i] = ","; break; case "OemMinus": textBoxes[i] = "-"; break; case "OemPeriod": textBoxes[i] = "."; break; case "OemQuestion": textBoxes[i] = "/"; break; case "Oemtilde": textBoxes[i] = "@"; break; case "OemOpenBrackets": textBoxes[i] = "["; break; case "Oem5": textBoxes[i] = "\\"; break; case "Oem6": textBoxes[i] = "]"; break; case "Oem7": textBoxes[i] = "^"; break; } } textBox_sc_speed_up.Text = textBoxes[0]; textBox_sc_speed_down.Text = textBoxes[1]; textBox_sc_prev.Text = textBoxes[2]; textBox_sc_rewind.Text = textBoxes[3]; textBox_sc_start_stop.Text = textBoxes[4]; textBox_sc_forward.Text = textBoxes[5]; textBox_sc_next.Text = textBoxes[6]; textBox_sc_loop.Text = textBoxes[7]; textBox_sc_auto.Text = textBoxes[8]; changed(false); }
public void Create(items item) { _itemRepository.Add(item); }
public void Update(items item) { _itemRepository.Update(item); }
set => this.RaiseAndSetIfChanged(ref items, value);
public void Delete(items item) { _itemRepository.Delete(item); }
events.Should().BeEquivalentTo(items, c => c.ExcludingMissingMembers());
ToPager(items, currentPage, totalItems, PagesSettings.Default);
public Characters(items items) { gClassData = new CharacterClass[] { new CharacterClass("Shaman", 6, 9, 15, 7, 30, 40, 0x59DB, 26, 27, 0, PERSISTENT, new int[] { items.O_ELVENCLOAK, items.O_STAFF, items.O_HEALINGSPELL, items.O_PHANTOMSPELL, items.O_SPEEDSPELL, 0, 0, 0, 0, 0 }), new CharacterClass("Wizard", 4, 12, 12, 10, 50, 50, 0x51CB, 23, 31, 0, PERSISTENT, new int[] { items.O_CLOAK, items.O_DAGGER, items.O_FIREBALLSPELL, items.O_TELEPORTSPELL, items.O_VISIONSPELL, 0, 0, 0, 0, 0 }), new CharacterClass("Elf", 6, 14, 0, 15, 90, 0, 0x59DB, 116, 117, 0, PERSISTENT, new int[] { 60, 4, 5, 16, 0, 0, 0, 0, 0, 0 }), new CharacterClass("Barbarian", 4, 17, 0, 15, 120, 0, 0x51CB, 19, 35, 0, PERSISTENT, new int[] { 45, 17, 5, 16, 0, 0, 0, 0, 0, 0 }), new CharacterClass("Knight", 4, 24, 0, 11, 90, 0, 0x51CB, 25, 47, 0, PERSISTENT, new int[] { 1, 18, 11, 10, 0, 0, 0, 0, 0, 0 }), new CharacterClass("Duck", 5, 14, 0, 17, 100, 0, 0x51DF, 108, 108, 0, PERSISTENT, new int[] { items.O_MACE, items.O_LEATHER, items.O_GLOVES, items.O_BOW, items.O_ARROWS, 0, 0, 0, 0, 0 }), new CharacterClass("Dwarf", 4, 20, 0, 12, 120, 0, 0x51CB, 126, 174, 0, PERSISTENT, new int[] { 3, 17, 35, 0, 0, 0, 0, 0, 0, 0 }), new CharacterClass("Druid", 4, 14, 10, 10, 80, 20, 0x51CB, 127, 175, 0, PERSISTENT, new int[] { items.O_CLOAK, items.O_MACE, items.O_FIRESPELL, items.O_AIRSPELL, items.O_WATERSPELL, items.O_EARTHSPELL, 0, 0, 0, 0 }), new CharacterClass("Duck mage", 5, 10, 12, 9, 40, 60, 0x51DF, 141, 141, 0, PERSISTENT, new int[] { items.O_CLOAK, items.O_DAGGER, items.O_CONFUSIONSPELL, items.O_CHAOSSPELL, items.O_FREEZESPELL, 0, 0, 0, 0, 0 }), new CharacterClass("Orch", 4, 14, 0, 9, 50, 0, 0x51CB, 42, 42, 0, 40, new int[] { 12, 37, 0, 0, 0, 0, 0, 0, 0, 0 }), new CharacterClass("Orch", 4, 15, 0, 13, 60, 0, 0x51CB, 43, 43, 0, 80, new int[] { 18, 3, 11, 0, 0, 0, 0, 0, 0, 0 }), new CharacterClass("Orch", 4, 12, 12, 5, 40, 20, 0x51CB, 44, 44, 0, 80, new int[] { 20, 30, 26, 27, 37, 0, 0, 0, 0, 0 }), new CharacterClass("ChaosKnight", 4, 22, 0, 16, 100, 0, 0x51CB, 36, 36, 0, 100, new int[] { 43, 13, 2, 35, 0, 0, 0, 0, 0, 0 }), new CharacterClass("Spirit", 5, 50, 15, 15, 40, 10, 0x7FFF, 24, 24, 0, 120, new int[] { 0x1000 | items.O_CHAOSSPELL, 0x1000 | items.O_GHOSTBLADE, 0x1000 | items.O_SLEEPSPELL, 0, 0, 0, 0, 0, 0, 0 }), new CharacterClass("Ghost", 4, 10, 10, 15, 20, 10, 0x7FFF, 33, 33, 0, 100, new int[] { 0x1000 | items.O_CONFUSIONSPELL, 0x1000 | items.O_CHAINANDBALL, 0, 0, 0, 0, 0, 0, 0, 0 }), new CharacterClass("DeathKnight", 4, 40, 20, 20, 200, 20, 0x51CB, 37, 37, 0, 170, new int[] { 42, 3, 13, 10, 20, 35, 75, 0, 0, 0 }), new CharacterClass("Skeleton", 4, 7, 0, 7, 30, 0, 0x51CB, 32, 32, 0, 0, new int[] { items.O_CHAINANDBALL, 0, 0, 0, 0, 0, 0, 0, 0, 0 }), new CharacterClass("Zombie", 4, 12, 0, 10, 10, 0, 0x51CB, 20, 20, 0, 0, new int[] { items.O_CUTLASS, 0, 0, 0, 0, 0, 0, 0, 0, 0 }), new CharacterClass("Djinn", 14, 1, 0, 0, 1, 0, 0x51DF, 18, 18, 8, PERSISTENT, new int[] { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }), new CharacterClass("Fenix", 5, 10, 19, 17, 40, 5, 0x51C3, 34, 34, 2, PERSISTENT, new int[] { 0x1000 | items.O_FIREBLADE, 0, 0, 0, 0, 0, 0, 0, 0, 0 }), new CharacterClass("Undine", 6, 20, 0, 15, 30, 0, 0x51DF, 29, 29, 6, PERSISTENT, new int[] { 0x1000 | items.O_CUTLASS, 0, 0, 0, 0, 0, 0, 0, 0, 0 }), new CharacterClass("Golem", 3, 60, 0, 10, 80, 0, 0x51CB, 40, 40, 5, PERSISTENT, new int[] { 0x1000 | items.O_STONEAXE, 0, 0, 0, 0, 0, 0, 0, 0, 0 }), new CharacterClass("Demon", 6, 50, 10, 17, 200, 20, 0x7FFF, 39, 39, 9, PERSISTENT, new int[] { 0x1000 | items.O_FIREBALLSPELL, 0x1000 | items.O_FIREBLADE, 0, 0, 0, 0, 0, 0, 0, 0 }), new CharacterClass("Sorcerer", 5, 25, 20, 20, 150, 150, 0x51CB, 41, 41, 0, 120, new int[] { items.O_CHAINMAIL, items.O_GREENRING, items.O_FIRESPELL, items.O_DEMONSPELL, items.O_ENERGYSPELL, items.O_SLEEPSPELL, items.O_LIGHTNINGSPELL, items.O_TWOHANDEDSWORD, items.O_NEGATOR, items.O_FREEZESPELL }), new CharacterClass("Hobgoblin", 5, 10, 0, 9, 10, 0, 0x59DB, 115, 115, 0, 10, new int[] { 7, 4, 4, 41, 0, 0, 0, 0, 0, 0 }), new CharacterClass("Minotaur", 4, 20, 0, 12, 80, 0, 0x51CB, 109, 109, 0, 100, new int[] { 17, 45, 42, 0, 0, 0, 0, 0, 0, 0 }), new CharacterClass("Witchlord", 5, 20, 20, 20, 100, 100, 0x51CB, 118, 118, 0, 140, new int[] { items.O_LIGHTNINGSPELL, items.O_FIRESPELL, items.O_SHADOWCLOAK, items.O_FIREBLADE, items.O_FIREBALLSPELL, items.O_CONFUSIONSPELL, items.O_GREENRING, items.O_NEGATOR, 0, 0 }), new CharacterClass("Magician", 4, 12, 10, 10, 50, 30, 0x51CB, 22, 22, 0, 50, new int[] { 6, 36, 8, 41, 16, 0, 0, 0, 0, 0 }), new CharacterClass("Shadowbeast", 5, 20, 0, 10, 200, 0, 0x51DF, 28, 28, 3, PERSISTENT, new int[] { 0x1000 | items.O_MACE, 0, 0, 0, 0, 0, 0, 0, 0, 0 }), new CharacterClass("Lightning", 8, 4, 14, 0, 1, 10, 0x51DF, 21, 21, 1, PERSISTENT, new int[] { 0x1000 | items.O_CHOCKHAMMER, 0, 0, 0, 0, 0, 0, 0, 0, 0 }), new CharacterClass("Undead", 5, 17, 16, 20, 70, 15, 0x51CB, 38, 38, 0, 100, new int[] { 20, 27, 45, 17, 15, 26, 0, 0, 0, 0 }), new CharacterClass("Troll", 3, 20, 0, 7, 100, 0, 0x51CB, 17, 17, 0, 20, new int[] { items.O_STONEAXE, 0, 0, 0, 0, 0, 0, 0, 0, 0 }), new CharacterClass("Monk", 4, 14, 11, 16, 60, 20, 0x51CB, 125, 125, 0, 60, new int[] { 12, 38, 25, 24, 78, 23, 0, 0, 0, 0 }), new CharacterClass("Goblin", 4, 8, 0, 14, 30, 0, 0x51CB, 128, 128, 0, 10, new int[] { items.O_SWORD, items.O_LEATHER, 0, 0, 0, 0, 0, 0, 0, 0 }), new CharacterClass("Warrior", 4, 12, 0, 14, 80, 0, 0x51CB, 135, 135, 0, 60, new int[] { items.O_MACE, items.O_CHAINMAIL, 7, 7, 7, 0, 0, 0, 0, 0 }), new CharacterClass("ChaosWarrior", 4, 30, 0, 19, 300, 0, 0x51CB, 136, 136, 0, 200, new int[] { items.O_LARGEHELMET, items.O_TWOHANDEDSWORD, items.O_GLOVES, items.O_ARMOR, items.O_CLOAK, 0, 0, 0, 0, 0 }), new CharacterClass("DemonPrince", 6, 30, 0, 20, 500, 0, 0x51CB, 137, 137, 0, PERSISTENT, new int[] { items.O_GOLDENARMOR, items.O_BLOODTASTEAXE, items.O_GOLDENHELMET, items.O_GOLDENGLOVES, items.O_CLOAK, items.O_NEGATOR, items.O_GREENRING, items.O_GHOSTBLADE, 0, 0 }), new CharacterClass("Orch", 4, 13, 0, 10, 50, 0, 0x51CB, 30, 30, 0, 40, new int[] { items.O_BOW, items.O_ARROWS, 0, 0, 0, 0, 0, 0, 0, 0 }), new CharacterClass("Guardian", 5, 22, 0, 19, 200, 0, 0x51CB, 155, 155, 0, 200, new int[] { items.O_SILVERBOW, items.O_ARMOR, items.O_LARGEHELMET, items.O_GLOVES, items.O_FAITHFULARROW, items.O_TWOHANDEDSWORD, 0, 0, 0, 0 }), new CharacterClass("Dragon", 8, 60, 25, 25, 600, 300, 0x51DF, 156, 156, 0, 250, new int[] { 0x1000 | items.O_INFERNOSPELL, 0x1000 | items.O_DRAGONSTOOTH, items.O_DRAGONSTOOTH, 0x1000 | items.O_GOLDENARMOR, 0x1000 | items.O_NEGATOR, 0x1000 | items.O_GREENRING, 0, 0, 0, 0 }), new CharacterClass("DeathLord", 5, 25, 20, 20, 200, 100, 0x7FFF, 113, 113, 0, 230, new int[] { items.O_LARGEHELMET, items.O_ARMOR, items.O_GLOVES, items.O_LIGHTNINGSPELL, items.O_SLAYERSWORD, items.O_DEMONSPELL, 0, 0, 0, 0 }), new CharacterClass("The Dark One", 7, 80, 25, 25, 500, 1000, 0x7FFF, 105, 105, 0, PERSISTENT, new int[] { items.O_GOLDENARMOR, items.O_GOLDENHELMET, items.O_NEGATOR, items.O_BLOODTASTEAXE, items.O_ENERGYSPELL, items.O_GREENRING, items.O_STORMSPELL, items.O_DEMONSPELL, items.O_INFERNOSPELL, items.O_CHAOSSPELL }), new CharacterClass("Small one", 8, 5, 0, 0, 10, 0, 0x59DB, 45, 46, 0, 1200, new int[] { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }) }; }
private void ParseItemJson() { //文本在unity里面是TextAsset类型 TextAsset itemText = Resources.Load <TextAsset>("item"); //加载json文本 string itemJson = itemText.text; //得到json文本里面的内容 j = new JSONObject(itemJson); foreach (var item in j.list) { temp++; int id = (int)(item["id"].n); name = item["name"].str; int buyPrice = (int)(item["buyPrice"].n); int sellPrice = (int)(item["sellPrice"].n); sprite = item["sprite"].str; explain = item["Explain"].str; items.ItemQuality quality = (items.ItemQuality)System.Enum.Parse(typeof(items.ItemQuality), item["quality"].str); items.ItemType type = (items.ItemType)System.Enum.Parse(typeof(items.ItemType), item["type"].str); items.ItemjiNeng itemjiNeng = (items.ItemjiNeng)System.Enum.Parse(typeof(items.ItemjiNeng), item["itemjiNeng"].str); _synopis = item["synopsis"].str; compounds = item["Compounds"].str; compositepath = item["CompositePath"].str; switch (type) { case items.ItemType.gongJi: int _aggressivity = (int)(item["aggressivity"].n); _attackSpeed = (int)(item["attackspeed"].n); int _bloodsucking = (int)(item["bloodsucking"].n); int _criticalchance = (int)(item["criticalchance"].n); int _MaxHp = (int)(item["maxhp"].n); _runSpeed = (int)(item["RunSpeed"].n); _cd = (int)(item["cd"].n); _magicDefense = (int)(item["magicDefense"].n); _physicalPenetration = (int)(item["physicalpenetration"].n); tempitem = new attackItems(id, name, buyPrice, sellPrice, sprite, type, quality, itemjiNeng, _synopis, explain, compounds, compositepath, _aggressivity, _attackSpeed, _bloodsucking, _criticalchance, _MaxHp, _runSpeed, _cd, _magicDefense, _physicalPenetration); attackitem.Add(tempitem); break; case items.ItemType.faShu: tempitem = new midItems(id, name, buyPrice, sellPrice, sprite, type, quality, itemjiNeng, _synopis, explain, compounds, compositepath); miditem.Add(tempitem); break; case items.ItemType.fangYu: tempitem = new topItems(id, name, buyPrice, sellPrice, sprite, type, quality, itemjiNeng, _synopis, explain, compounds, compositepath); topitem.Add(tempitem); break; case items.ItemType.yiDong: _runSpeed = (int)(item["RunSpeed"].n); _attackSpeed = (int)(item["attackspeed"].n); _magicDefense = (int)(item["magicDefense"].n); _physicalPenetration = (int)(item["physicalpenetration"].n); _cd = (int)(item["cd"].n); int _upMp = (int)(item["upmp"].n); tempitem = new runspeedItems(id, name, buyPrice, sellPrice, sprite, type, quality, itemjiNeng, _synopis, explain, compounds, compositepath, _runSpeed, _attackSpeed, _magicDefense, _physicalPenetration, _cd, _upMp); runspeeditem.Add(tempitem); break; case items.ItemType.daYe: tempitem = new jungleItems(id, name, buyPrice, sellPrice, sprite, type, quality, itemjiNeng, _synopis, explain, compounds, compositepath); jungleitem.Add(tempitem); break; case items.ItemType.fuZhu: tempitem = new supItems(id, name, buyPrice, sellPrice, sprite, type, quality, itemjiNeng, _synopis, explain, compounds, compositepath); supitem.Add(tempitem); break; default: break; } } itemDic.Add("攻击", attackitem); itemDic.Add("移动", runspeeditem); itemDic.Add("打野", jungleitem); itemDic.Add("辅助", supitem); itemDic.Add("防御", topitem); itemDic.Add("法术", miditem); }
DefinitionList(items, item => Text(item.Term, TextStyles.Strong), item => Text(item.Description));
public void Add(items item) { items.Add(item); }
public feed(String Url) { Items = new items(); XmlTextReader xmlTextReader = new XmlTextReader(Url); XmlDocument xmlDoc = new XmlDocument(); try { xmlDoc.Load(xmlTextReader); xmlTextReader.Close(); XmlNode channelXmlNode = xmlDoc.GetElementsByTagName("channel")[0]; if (channelXmlNode != null) { foreach (XmlNode channelNode in channelXmlNode.ChildNodes) { switch (channelNode.Name) { case "title": { Title = channelNode.InnerText; break; } case "description": { Description = channelNode.InnerText; break; } case "link": { Link = channelNode.InnerText; break; } case "item": { item channelItem = new item(channelNode); Items.Add(channelItem); break; } } } } else { throw new Exception("Ошибка в XML.Описание канала не найдено!"); } } catch (System.Net.WebException ex) { if (ex.Status == System.Net.WebExceptionStatus.NameResolutionFailure) throw new Exception("Невозможно соединиться с указаным источником.\r\n" +Url); else throw ex; } catch (System.IO.FileNotFoundException) { throw new Exception("Файл " +Url + "не найден!"); } catch (Exception ex) { throw ex; } finally { xmlTextReader.Close(); } }
context.write(new IntWritable(items.length), value);