void LateUpdate() { if (Input.GetKeyDown(KeyCode.DownArrow)) { selItem = (item)(((int)selItem + 1) % numItem); } if (Input.GetKeyDown(KeyCode.UpArrow)) { if (selItem != 0) selItem -= 1; else selItem = (item)numItem-1; } if (Input.GetKeyDown(KeyCode.Return)) { switch (selItem) { case item.continuar: Application.LoadLevel(2); break; case item.autores: Application.LoadLevel(4); break; case item.creditos: Application.LoadLevel(5); break; case item.sair: Application.Quit(); break; } } }
void loadListitem() { WareHouse ser=new WareHouse(); string[] a=ser.ReturnItem(); NuItem=(a.Length+1)/9; listItem=new item[(a.Length+1)/9]; for(int i=0;i<(a.Length+1)/9;i++) { listItem[i] = new item(1,"Cake", 80, 100, 20, 0, 0f, 0f, "image20"); listItem[i].id=int.Parse(a[i*9+0]); listItem[i].name=a[i*9+1]; listItem[i].priceSell=int.Parse(a[i*9+2]); listItem[i].priceBuy=int.Parse(a[i*9+3]); listItem[i].valueMana=int.Parse(a[i*9+4]); listItem[i].valueBlood=int.Parse(a[i*9+5]); listItem[i].percentAttack=int.Parse(a[i*9+6]); listItem[i].percentDefence=int.Parse(a[i*9+7]); listItem[i].avatar=a[i*9+8]; print(listItem[i].name); } /* listItem = new item[3]; //load skills from database listItem[0] = new item("Cake", 80, 100, 20, 0, 0f, 0f, "image20"); listItem[1] = new item("Cake", 80, 100, 20, 0, 0f, 0f, "image20"); listItem[2] = new item("Cake", 80, 100, 20, 0, 0f, 0f, "image20"); */ }
// construct from REST response item internal ProductModule(item source) { if (!Constants.ProductModule.TYPE_NAME.Equals(source.type)) { throw new NetLicensingException(String.Format("Wrong object type '{0}', expected '{1}'", (source.type != null) ? source.type : "<null>", Constants.ProductModule.TYPE_NAME)); } productModuleProperties = new Dictionary<String, String>(); foreach (property p in source.property) { switch (p.name) { case Constants.NAME: name = p.Value; break; case Constants.ProductModule.PRODUCT_MODULE_LICENSING_MODEL: licensingModel = p.Value; break; case Constants.Product.PRODUCT_NUMBER: productNumber = p.Value; break; default: if (!base.setFromProperty(p)) // Not BaseEntity property? { // custom property productModuleProperties.Add(p.name, p.Value); } break; } } }
public void select(int _t, int _c, item _o) { selectedItems [_t-1] = _o; if (_t == 1) { selectedSpawner [_t - 1] = itemsTable1 [_c-1]; } else if (_t == 2) { pumpkin=(_c==4); pine=(_c==1); selectedSpawner [_t - 1] = itemsTable2 [_c-1]; } else if (_t == 3) { ground = _c-1; selectedSpawner [_t - 1] = itemsTable3 [_c-1]; } else { selectedSpawner [_t - 1] = itemsTable4 [_c-1]; } selectedType [_t-1] = 1; int _total = 0; for (int i=0;i<4;i++) { _total += selectedType [i]; //Debug.Log (i+", " +selectedType[i] ); } //Debug.Log (_total); GameObject.Find ("UNIVERSE").GetComponent<Light> ().range = 0.87f+ + _total * 0.15f; GameObject.Find ("UNIVERSE").GetComponent<Light> ().intensity = 0.65f+ + _total * 0.3f; GameObject.Find ("UNIVERSE").GetComponent<spinAround> ().spinSpeedX = 0.2f+ + _total * 0.5f; ready = (_total == 4); Debug.Log (ready); }
public void InsertItem(string name, string url) { if (url == "") { if (contains(name)) { foreach (item curr in Content) { if (curr.name == name) { core.irc._SlowQueue.DeliverMessage("This item was enabled now", owner.Name); curr.reset(); curr.disabled = false; return; } } } core.irc._SlowQueue.DeliverMessage("There is no such item, if you want to define new item, please use 2 parameters", owner.Name); return; } if (!contains(name)) { item Item = new item(); Item.name = name; Item.URL = url; lock (Content) { Content.Add(Item); } Save(); core.irc._SlowQueue.DeliverMessage("Item was inserted to feed", owner.Name); return; } core.irc._SlowQueue.DeliverMessage("This item already exist", owner.Name); }
public order GetOrderObjectRequestByExternalRef(long external_ref, string status_description) { order o = new order(); using (var dc = new stylusDataContext()) { List<item> itm = new List<item>(); List<tracking> trk = new List<tracking>(); ISingleResult<sp_get_order_by_external_refResult> res = dc.sp_get_order_by_external_ref(external_ref); foreach (sp_get_order_by_external_refResult ret in res) { o.id = ret.order_external_ref; o.status = status_description; item i = new item(); i.id = ret.item_external_ref; itm.Add(i); o.item = itm; tracking t = new tracking(); t.number = ret.tracking; trk.Add(t); o.tracking = trk; } } return o; }
void client_OpenReadCompleted(object sender, OpenReadCompletedEventArgs e) { if (e.Error != null) return; Stream str = e.Result; try { String eve = "item"; XDocument loadedData = XDocument.Load(str); foreach (var x in loadedData.Descendants(eve)) { try { item c = new item(); c.title = x.Element("title").Value; c.link = x.Element("link").Value; c.description = x.Element("description").Value; c.pubDate = x.Element("pubDate").Value; Items.Add(c); } catch (Exception ex) { } } list.ItemsSource = Items; } catch (System.Xml.XmlException ex) { MessageBox.Show("Bağlantı Hatası!\nLütfen Tekrar Deneyin."); } }
public static void adicionaItem(nomeIDitem nomeItem,heroi H) { item I = new item(nomeItem); bool foi = false; if(I.acumulavel>1) { int ondeTem = -1; for(int i=0;i<H.itens.Count;i++) { if(H.itens[i].nome == I.nome) { if(H.itens[i].estoque<H.itens[i].acumulavel) { if(!foi) { ondeTem = i; foi = true; } } } } if(foi) { H.itens[ondeTem].estoque++; }else { H.itens.Add(new item(nomeItem)); } }else { H.itens.Add(new item(nomeItem)); } }
// construct from REST response item internal LicenseTemplate(item source) { if (!Constants.LicenseTemplate.LICENSE_TEMPLATE_TYPE.Equals(source.type)) { throw new LmBoxException(String.Format("Wrong object type '{0}', expected '{1}'", (source.type != null) ? source.type : "<null>", Constants.LicenseTemplate.LICENSE_TEMPLATE_TYPE)); } licenseTemplateProperties = new Dictionary<String, String>(); foreach (property p in source.property) { switch (p.name) { case Constants.NAME: name = p.Value; break; case Constants.ProductModule.PRODUCT_MODULE_NUMBER: productModuleNumber = p.Value; break; case Constants.LICENSE_TYPE: licenseType = p.Value; break; default: if (!base.setFromProperty(p)) // Not BaseEntity property? { // custom property licenseTemplateProperties.Add(p.name, p.Value); } break; } } }
public static void Main(string[] args) { // jsc needs to see args to make Main into main for javac.. // see also> // X:\jsc.svn\examples\javascript\android\AndroidBroadcastLogger\AndroidBroadcastLogger\ApplicationWebService.cs System.Console.WriteLine( typeof(object).AssemblyQualifiedName ); try { //- javac //"C:\Program Files (x86)\Java\jdk1.7.0_45\bin\javac.exe" -classpath "Y:\staging\web\java";release -d release java\JVMCLRFirstOrDefault\Program.java //java\JVMCLRFirstOrDefault\Program.java:31: error: method Of in class __SZArrayEnumerator_1<T#2> cannot be applied to given types; // num1 = __Enumerable.<Long>FirstOrDefault(__SZArrayEnumerator_1.<Long>Of(numArray0)); // ^ // required: T#1[] // found: long[] // reason: actual argument long[] cannot be converted to Long[] by method invocation conversion // where T#1,T#2 are type-variables: // T#1 extends Object declared in method <T#1>Of(T#1[]) // T#2 extends Object declared in class __SZArrayEnumerator_1 //var e = new long[0]; { var e = new item[0]; var z = e.Select(x => x.value).FirstOrDefault(); Console.WriteLine(new { z }); } { var e = new[] { new item { value = //Error 1 Cannot implicitly convert type 'int' to 'JVMCLRFirstOrDefault.xlong'. An explicit conversion exists (are you missing a cast?) X:\jsc.svn\examples\java\Test\JVMCLRFirstOrDefault\JVMCLRFirstOrDefault\Program.cs 68 56 JVMCLRFirstOrDefault (JVMCLRFirstOrDefault.xlong) 666 } }; var z = e.Select(x => x.value).FirstOrDefault(); Console.WriteLine(new { z }); } } catch { Console.WriteLine("NOK"); } CLRProgram.CLRMain(); }
public void EquipItem(item Item) { for(int i = 0; i < equipSlots; i++){ if(!Equipped.ContainsKey(i)) { Equipped[i] = Item; return; } } }
public select_zip_file_form(string zip_file, IEnumerable< Tuple<string,long>> files ) { InitializeComponent(); foreach (var file in files) { item i = new item() { file = file.Item1, size = file.Item2 }; list.AddObject(i); } list.SelectedIndex = 0; util.postpone( () => list.Focus(), 10); }
public void createItem(string itemId, string categoryId, string uomId, int reorderLevel, int reorderQty, int stockBalance, string description) { item i = new item(); i.itemId = itemId; i.categoryId = categoryId; i.uomId = uomId; i.reorderLevel = reorderLevel; i.reorderQty = reorderQty; i.stockBalance = stockBalance; i.description = description; i.status = "Active"; clf.createItem_Yuanyuan(i); }
public void AddItem(item Item) { if(Contents.Count < maxItems){ for(int i = 0; i < maxItems; i++){ if (!Contents.ContainsKey(i)){ Contents.Add(i, Item); return; } } } else { Debug.Log("Max Items Reached"); } DebugPrintInventory(); }
// construct from REST response item internal Token(item source) { if (!Constants.Token.TYPE_NAME.Equals(source.type)) { throw new LmBoxException(String.Format("Wrong object type '{0}', expected '{1}'", (source.type != null) ? source.type : "<null>", Constants.Token.TYPE_NAME)); } tokenProperties = new Dictionary<String, String>(); foreach (property p in source.property) { if (!base.setFromProperty(p)) // Not BaseEntity property? { // custom property tokenProperties.Add(p.name, p.Value); } } }
public static Int32 size_of(item value) { Int32 size = 0; UInt64 tag = 7; { size += adata.stream.size_of(value.id); } { size += adata.stream.size_of(value.type); } { size += adata.stream.size_of(value.level); } size += adata.stream.size_of(tag); size += adata.stream.size_of(size + adata.stream.size_of(size)); return size; }
// construct from REST response item internal LicenseTemplate(item source) { if (!Constants.LicenseTemplate.TYPE_NAME.Equals(source.type)) { throw new LmBoxException(String.Format("Wrong object type '{0}', expected '{1}'", (source.type != null) ? source.type : "<null>", Constants.LicenseTemplate.TYPE_NAME)); } licenseTemplateProperties = new Dictionary<String, String>(); foreach (property p in source.property) { switch (p.name) { case Constants.NAME: name = p.Value; break; case Constants.ProductModule.PRODUCT_MODULE_NUMBER: productModuleNumber = p.Value; break; case Constants.LicenseTemplate.LICENSE_TYPE: licenseType = p.Value; break; case Constants.PRICE: price = Utilities.CheckedParseDecimal(p.Value, Constants.PRICE); break; case Constants.CURRENCY: currency = p.Value; break; case Constants.LicenseTemplate.AUTOMATIC: automatic = Utilities.CheckedParseBoolean(p.Value, Constants.LicenseTemplate.AUTOMATIC); break; case Constants.LicenseTemplate.HIDDEN: hidden = Utilities.CheckedParseBoolean(p.Value, Constants.LicenseTemplate.HIDDEN); break; case Constants.LicenseTemplate.HIDE_LICENSES: hideLicenses = Utilities.CheckedParseBoolean(p.Value, Constants.LicenseTemplate.HIDE_LICENSES); break; default: if (!base.setFromProperty(p)) // Not BaseEntity property? { // custom property licenseTemplateProperties.Add(p.name, p.Value); } break; } } }
void LateUpdate() { if (active) { if (Input.GetKeyDown(KeyCode.DownArrow)) { selItem = (item)(((int)selItem + 1) % numItem); } if (Input.GetKeyDown(KeyCode.UpArrow)) { if (selItem != 0) selItem -= 1; else selItem = (item)numItem-1; } if (Input.GetKeyDown(KeyCode.Return)) { switch (selItem) { case item.continuar: UnPauseGame(); break; case item.voltar: Application.LoadLevel("Menu"); break; case item.sair: Application.Quit(); break; } } if (Input.GetKeyDown(KeyCode.Escape)) { if (!death) UnPauseGame(); } } else if (Input.GetKeyDown(KeyCode.Escape)) { PauseGame(); } }
public void EquipItem(item Item, int slot) { Item.RespawnEquip(slot); for(int i = 0; i < transform.childCount; i++){ Debug.Log (transform.GetChild(i)); if(transform.GetChild (i).name == "AttachPoints"){ int numPoints = transform.GetChild (i).childCount; for(int x = 0; x < numPoints; x++){ if(transform.GetChild (i).GetChild(x).name == "Point"+slot){ Transform trans = transform.GetChild(i).GetChild(x).transform; Debug.Log("Transform name: " + trans.name); Debug.Log("Point"+slot); Transform attachPoint = trans; Item.transform.position = attachPoint.position; if(slot == 1 || slot == 2){ //Item.transform.LookAt(alignPoints[slot-1].transform.position); Item.transform.rotation = cam.rotation; } else { Item.transform.LookAt(trans.GetChild(0).transform.position); } } } } if(transform.GetChild(i).name == "Camera") Item.transform.parent = transform.GetChild(i); } //Item.transform.position = GameObject.Find("AttachPoints").transform.GetChild(slot).position; //Item.transform.rotation = this.transform.GetChild(0).rotation; //Item.transform.parent = GameObject.Find("Camera").transform; Item.gameObject.rigidbody.isKinematic = true; Item.gameObject.collider.enabled = false; //Destroy (Item.gameObject.rigidbody); //todo: make this just disable the rigidbody //todo: don't use gameobject.find, figure out how it selects which child is which }
public static void skip_read(adata.zero_copy_buffer stream, ref item value) { int offset = stream.read_length(); UInt64 tag = 0; adata.stream.read(stream,ref tag); if(stream.error()){return;} Int32 len_tag = 0; adata.stream.read(stream,ref len_tag); if(stream.error()){return;} if((tag&1)>0) {Int64 dummy_value = 0;adata.stream.skip_read(stream,ref dummy_value);{if(stream.error()){stream.trace_error("id",-1);return;}}} if((tag&2)>0) {Int32 dummy_value = 0;adata.stream.skip_read(stream,ref dummy_value);{if(stream.error()){stream.trace_error("type",-1);return;}}} if((tag&4)>0) {Int32 dummy_value = 0;adata.stream.skip_read(stream,ref dummy_value);{if(stream.error()){stream.trace_error("level",-1);return;}}} if(len_tag >= 0) { UInt32 read_len = (UInt32)(stream.read_length() - offset); UInt32 len = (UInt32)len_tag; if(len > read_len) stream.skip_read(len - read_len); } }
public void addItem(int houseID, string name_, string desc_, string category_) { using (var context = new houseMateEntities01()) { int listID = getListID(houseID); bool added = false; item newItem = new item { FK_listID = listID, name = name_, category = category_, bought_ = 0, description = desc_ }; var itemArr = from item in context.items where item.FK_listID == listID select item; List<item> itemList = new List<item>(); itemList.AddRange(itemArr); foreach (item i in itemList) { if (!added) { if (i.name.ToLower().Equals(newItem.name.ToLower()) && i.description.ToLower().Equals(newItem.description.ToLower())) { i.bought_ = 0; context.SaveChanges(); added = true; } } } if (!added) { context.items.Add(newItem); context.SaveChanges(); } } }
// construct from REST response item internal Product(item source) { if (!Constants.Product.TYPE_NAME.Equals(source.type)) { throw new LmBoxException(String.Format("Wrong object type '{0}', expected '{1}'", (source.type != null) ? source.type : "<null>", Constants.Product.TYPE_NAME)); } productProperties = new Dictionary<String, String>(); foreach (property p in source.property) { switch (p.name) { case Constants.NAME: name = p.Value; break; default: if (!base.setFromProperty(p)) // Not BaseEntity property? { // custom property productProperties.Add(p.name, p.Value); } break; } } }
public void Load() { try { if (File.Exists(DB)) { System.Xml.XmlDocument data = new System.Xml.XmlDocument(); data.Load(DB); lock (Content) { Content.Clear(); foreach (System.Xml.XmlNode xx in data.ChildNodes[0].ChildNodes) { item i = new item(); i.name = xx.Attributes[0].Value; i.URL = xx.Attributes[1].Value; try { if (xx.Attributes.Count > 2) { i.disabled = bool.Parse(xx.Attributes[2].Value); } if (xx.Attributes.Count > 3) { i.message = xx.Attributes[3].Value; } } catch (Exception) { core.DebugLog("unable to load item for feed item name: " + i.name + " channel name " + owner.Name + " item was removed"); i.disabled = false; } Content.Add(i); } } } } catch (Exception fail) { core.handleException(fail, "Feed"); } }
internal int GetGoldCost(item item) { string originalCodeID; if (ComplexItems == null) { if (MorphingItems.TryGetValue(item.codeID, out originalCodeID)) { if (DHHELPER.IsNewVersionItem(originalCodeID)) { return(DHMpqDatabase.UnitSlkDatabase["UnitBalance"][originalCodeID].GetIntValue("GoldCost")); } else { return(DHLOOKUP.hpcItemData[originalCodeID].GetIntValue("GoldCost")); } } else { return(item.goldCost); } } if (ComplexItemCosts == null) { ComplexItemCosts = new Dictionary <string, int>(ComplexItems.Count); } int result = 0; if (ComplexItemCosts.TryGetValue(item.codeID, out result)) { return(result); } List <List <string> > componentsList; if (!ComplexItems.TryGetValue(item.codeID, out componentsList)) { if (MorphingItems.TryGetValue(item.codeID, out originalCodeID)) { return(DHLOOKUP.hpcItemData[originalCodeID].GetIntValue("GoldCost")); } else { return(item.goldCost); } } List <string> components = componentsList[0]; foreach (string codeID in components) { if (!MorphingItems.TryGetValue(codeID, out originalCodeID)) { originalCodeID = codeID; } HabProperties hpsComponent = DHLOOKUP.hpcItemData[originalCodeID]; result += hpsComponent.GetIntValue("GoldCost"); } ComplexItemCosts.Add(item.codeID, result); return(result); }
public void CollectItemCombiningData() { if (MorphingItems != null) { return; } sameLookingComplexItems = null; Current.player.AcceptMessages = false; Dictionary <string, widget> dcItems = new Dictionary <string, widget>(); foreach (unit shop in DHLOOKUP.shops) { if (DHHELPER.IsNewVersionItemShop(shop)) { foreach (string unitID in shop.sellunits) { if (!dcItems.ContainsKey(unitID)) { unit u = new unit(unitID); u.DoSummon = true; u.set_owningPlayer(Current.player); dcItems.Add(unitID, u); } } } else { foreach (string itemID in shop.sellitems) { if (!dcItems.ContainsKey(itemID)) { dcItems.Add(itemID, new item(itemID)); } } } } unit test_unit = new unit(); test_unit.codeID = "test"; test_unit.Inventory.init(0, 10); test_unit.set_owningPlayer(Current.player); DHJassExecutor.CaughtReferences.Clear(); DHJassExecutor.CatchArrayReference = true; DBINVENTORY inventory = test_unit.Inventory; List <widget> itemList = new List <widget>(dcItems.Values); MorphingItems = new Dictionary <string, string>(itemList.Count); SplashScreen splashScreen = new SplashScreen(); splashScreen.Show(); splashScreen.ShowText("Collecting item combining data..."); for (int i = 0; i < itemList.Count; i++) { widget item = itemList[i]; if (DHHELPER.IsNewVersionItem(item.codeID)) { test_unit.OnSell(item as unit); Thread.Sleep(2); // to pass control to item handling script thread } else { test_unit.OnSellItem(item as item, test_unit); inventory.put_item(item as item); } item result = inventory[0].Item; if (result != null) { if (result.codeID != item.codeID) { MorphingItems.Add(result.codeID, item.codeID); } inventory[0].drop_item(); } splashScreen.ShowProgress((double)i, (double)itemList.Count); } Current.player.remove_unit(test_unit); test_unit.destroy(); List <string> arrays = DHJassExecutor.CaughtReferences; if (arrays.Count == 6) { Dictionary <int, DHJassValue> dcA = (DHJassExecutor.Globals[arrays[0]] as DHJassArray).Array; Dictionary <int, DHJassValue> dcB = (DHJassExecutor.Globals[arrays[1]] as DHJassArray).Array; Dictionary <int, DHJassValue> dcC = (DHJassExecutor.Globals[arrays[2]] as DHJassArray).Array; Dictionary <int, DHJassValue> dcD = (DHJassExecutor.Globals[arrays[3]] as DHJassArray).Array; Dictionary <int, DHJassValue> dcCombined = (DHJassExecutor.Globals[arrays[4]] as DHJassArray).Array; ComplexItems = new Dictionary <string, List <List <string> > >(dcA.Count); int value; foreach (int key in dcA.Keys) { List <string> components = new List <string>(4); value = dcA[key].IntValue; if (value != 0) { components.Add(DHJassInt.int2id(value)); } value = dcB[key].IntValue; if (value != 0) { components.Add(DHJassInt.int2id(value)); } value = dcC[key].IntValue; if (value != 0) { components.Add(DHJassInt.int2id(value)); } value = dcD[key].IntValue; if (value != 0) { components.Add(DHJassInt.int2id(value)); } value = dcCombined[key].IntValue; if (value != 0) { string strValue = DHJassInt.int2id(value); List <List <string> > componentsList; if (!ComplexItems.TryGetValue(strValue, out componentsList)) { componentsList = new List <List <string> >(1); ComplexItems.Add(strValue, componentsList); } componentsList.Add(components); } } } splashScreen.Close(); Current.player.AcceptMessages = true; }
protected virtual string GetContentFromDatabase(AttributeCollectionAdapter itemAttributes, int nodeIdInt, string currentField) { var c = new Content(nodeIdInt); var property = c.getProperty(currentField); if (property == null) throw new ArgumentException(String.Format("Could not find property {0} of node {1}.", currentField, nodeIdInt)); var umbItem = new item(property.Value.ToString(), itemAttributes); var tempElementContent = umbItem.FieldContent; // If the current content object is a document object, we'll only output it if it's published if (c.nodeObjectType == Document._objectType) { try { var d = (Document)c; if (!d.Published) tempElementContent = ""; } catch { } } // Add the content to the cache if (!string.IsNullOrEmpty(tempElementContent)) { ApplicationContext.Current.ApplicationCache.InsertCacheItem( string.Format("{0}{1}_{2}", CacheKeys.ContentItemCacheKey, nodeIdInt, currentField), CacheItemPriority.Default, () => tempElementContent); } return tempElementContent; }
/// <summary> /// Renders the field contents. /// Checks via the NodeId attribute whether to fetch data from another page than the current one. /// </summary> /// <returns>A string of field contents (macros not parsed)</returns> protected virtual string GetFieldContents(Item item) { var tempElementContent = string.Empty; // if a nodeId is specified we should get the data from another page than the current one if (string.IsNullOrEmpty(item.NodeId) == false) { var tempNodeId = item.GetParsedNodeId(); if (tempNodeId != null && tempNodeId.Value != 0) { //moved the following from the catch block up as this will allow fallback options alt text etc to work var cache = Umbraco.Web.UmbracoContext.Current.ContentCache.InnerCache as PublishedContentCache; if (cache == null) throw new InvalidOperationException("Unsupported IPublishedContentCache, only the Xml one is supported."); var xml = cache.GetXml(Umbraco.Web.UmbracoContext.Current, Umbraco.Web.UmbracoContext.Current.InPreviewMode); var itemPage = new page(xml.GetElementById(tempNodeId.ToString())); tempElementContent = new item(item.ContentItem, itemPage.Elements, item.LegacyAttributes).FieldContent; } } else { // gets the field content from the current page (via the PageElements collection) tempElementContent = new item(item.ContentItem, item.PageElements, item.LegacyAttributes).FieldContent; } return tempElementContent; }
this.AddEntry(item, weight);
public void PickUpItem(item Item) { inventory.AddItem(Item); Item.Despawn(); }
public RegistrantExtraInfo(item item) { var detailsArray = item.Item as dt_assoc; try { aero_ens_id = OpsObjectHelper.GetItemFromArray(detailsArray, "aero_ens_id").Text; } catch { } try { aero_ens_password = OpsObjectHelper.GetItemFromArray(detailsArray, "aero_ens_password").Text; } catch { } try { coop_verification_code = OpsObjectHelper.GetItemFromArray(detailsArray, "coop_verification_code").Text; } catch { } try { country_of_birth = OpsObjectHelper.GetItemFromArray(detailsArray, "country_of_birth").Text; } catch { } try { date_of_birth = OpsObjectHelper.ConvertToNullableDateTime(OpsObjectHelper.GetItemFromArray(detailsArray, "date_of_birth").Text); } catch { } try { id_card_authority = OpsObjectHelper.GetItemFromArray(detailsArray, "id_card_authority").Text; } catch { } try { id_card_issue_date = OpsObjectHelper.ConvertToNullableDateTime(OpsObjectHelper.GetItemFromArray(detailsArray, "id_card_issue_date").Text); } catch { } try { id_card_number = OpsObjectHelper.GetItemFromArray(detailsArray, "id_card_number").Text; } catch { } try { jobs_admin_type = OpsObjectHelper.GetItemFromArray(detailsArray, "jobs_admin_type").Text; } catch { } try { jobs_association_member = OpsObjectHelper.GetItemFromArray(detailsArray, "jobs_association_member").Text; } catch { } try { jobs_industry_type = OpsObjectHelper.GetItemFromArray(detailsArray, "jobs_industry_type").Text; } catch { } try { jobs_title = OpsObjectHelper.GetItemFromArray(detailsArray, "jobs_title").Text; } catch { } try { jobs_website = OpsObjectHelper.GetItemFromArray(detailsArray, "jobs_website").Text; } catch { } try { place_of_birth = OpsObjectHelper.GetItemFromArray(detailsArray, "place_of_birth").Text; } catch { } try { postal_code_of_birth = OpsObjectHelper.GetItemFromArray(detailsArray, "postal_code_of_birth").Text; } catch { } try { province_of_birth = OpsObjectHelper.GetItemFromArray(detailsArray, "province_of_birth").Text; } catch { } try { registration_number = OpsObjectHelper.GetItemFromArray(detailsArray, "registration_number").Text; } catch { } try { registrant_type = OpsObjectHelper.GetItemFromArray(detailsArray, "registrant_type").Text; } catch { } try { registrant_vat_id = OpsObjectHelper.GetItemFromArray(detailsArray, "registrant_vat_id").Text; } catch { } try { siren_siret = OpsObjectHelper.GetItemFromArray(detailsArray, "siren_siret").Text; } catch { } try { tax_number = OpsObjectHelper.GetItemFromArray(detailsArray, "tax_number").Text; } catch { } try { trademark_number = OpsObjectHelper.GetItemFromArray(detailsArray, "trademark_number").Text; } catch { } try { travel_uin = OpsObjectHelper.GetItemFromArray(detailsArray, "travel_uin").Text; } catch { } }
public void UnequipItem(item Item) { Item.transform.parent = null; Item.gameObject.rigidbody.isKinematic = false; Item.gameObject.collider.enabled = true; Item.Despawn(); }
public void WriteStatus(string nick, string host, string place, item.Action action, string newnick = "", string reason = "") { item user = null; lock (global) { foreach (item xx in global) { if (nick.ToUpper() == xx.nick.ToUpper()) { user = xx; break; } } if (user == null) { user = new item(nick, host, place, action, null, newnick, reason); global.Add(user); } else { user.nick = nick; user.LastAc = action; user.LastSeen = DateTime.Now; user.hostname = host; user.lastplace = place; user.quit = reason; user.newnick = newnick; } } save = true; }
private void add_Click(object sender, EventArgs e) { item n = new item(); //copy whatever n.BotBase = this.BBcb1.Text; n.Profile = this.SelectedProfile1.Text; n.Zone = this.Zone1.Text; n.Hours = this.P1Hours.Value.ToString(); n.Minutes = this.P1Mins.Value.ToString(); //save it in the list routes.Items.Add(new ListViewItem(n.columns)); //reset the screen }
public void LoadData() { SearchHostThread = new Thread(StartRegex); SearchHostThread.Start(); try { core.recoverFile(variables.config + System.IO.Path.DirectorySeparatorChar + "seen.db"); if (System.IO.File.Exists(variables.config + System.IO.Path.DirectorySeparatorChar + "seen.db")) { lock (global) { global = new List<item>(); XmlDocument stat = new XmlDocument(); stat.Load(variables.config + System.IO.Path.DirectorySeparatorChar + "seen.db"); if (stat.ChildNodes[0].ChildNodes.Count > 0) { foreach (XmlNode curr in stat.ChildNodes[0].ChildNodes) { try { string user = curr.Attributes[0].Value; item.Action action = item.Action.Exit; switch (curr.Attributes[3].Value) { case "Join": action = item.Action.Join; break; case "Part": action = item.Action.Part; break; case "Talk": action = item.Action.Talk; break; case "Kick": action = item.Action.Kick; break; case "Nick": action = item.Action.Nick; break; } string Newnick = ""; string Reason = ""; if (curr.Attributes.Count > 4) { if (curr.Attributes[4].Name == "newnick") { Newnick = curr.Attributes[4].Value; } else if (curr.Attributes[4].Name == "reason") { Reason = curr.Attributes[5].Value; } } if (curr.Attributes.Count > 5) { if (curr.Attributes[5].Name == "reason") { Reason = curr.Attributes[5].Value; } } item User = new item(user, curr.Attributes[1].Value, curr.Attributes[2].Value, action, curr.Attributes[4].Value, Newnick, Reason); global.Add(User); } catch (Exception fail) { handleException(fail); } } } } } } catch (Exception f) { handleException(f); } }
void Start() { instant = this; }
foreach (var(item, weight) in entries)
: WithLatestFromFixed(item, command.CanExecute, (value, canExecute) => new InvokeCommandInfo <ReactiveCommandBase <T, TResult>, T>(command, canExecute, value))
public void additem(item i) { package_panel.addItem(i); }
// Use this for initialization void Start() { //item creation item i0 = new item(); i0.itemnum = 0; i0.cost = 100; i0.name = "미도리"; i0.cancount = false; i0.type = item.Type.skin; i0.sprite = sprites[0]; itemlist.Add(i0); item i1 = new item(); i1.itemnum = 1; i1.cost = 10; i1.name = "프린세스"; i1.cancount = true; i1.type = item.Type.skin; i1.sprite = sprites[1]; itemlist.Add(i1); item i2 = new item(); i2.itemnum = 2; i2.cost = 99; i2.name = "할리퀸"; i2.cancount = true; i2.type = item.Type.skin; i2.sprite = sprites[2]; itemlist.Add(i2); item i3 = new item(); i3.itemnum = 3; i3.cost = 30; i3.name = "a1"; i3.cancount = true; i3.type = item.Type.skin; i3.sprite = sprites[3]; itemlist.Add(i3); item i4 = new item(); i4.itemnum = 4; i4.cost = 31; i4.name = "a2"; i4.cancount = true; i4.type = item.Type.skin; i4.sprite = sprites[4]; itemlist.Add(i4); item i5 = new item(); i5.itemnum = 5; i5.cost = 32; i5.name = "a3"; i5.cancount = true; i5.type = item.Type.skin; i5.sprite = sprites[5]; itemlist.Add(i5); item i6 = new item(); i6.itemnum = 6; i6.cost = 33; i6.name = "a4"; i6.cancount = true; i6.type = item.Type.skin; i6.sprite = sprites[6]; itemlist.Add(i6); item i7 = new item(); i7.itemnum = 7; i7.cost = 34; i7.name = "a5"; i7.cancount = true; i7.type = item.Type.skin; i7.sprite = sprites[7]; itemlist.Add(i7); item i8 = new item(); i8.itemnum = 8; i8.cost = 35; i8.name = "a6"; i8.cancount = true; i8.type = item.Type.skin; i8.sprite = sprites[8]; itemlist.Add(i8); item i9 = new item(); i9.itemnum = 9; i9.cost = 36; i9.name = "a7"; i9.cancount = true; i9.type = item.Type.skin; i9.sprite = sprites[9]; itemlist.Add(i9); item i10 = new item(); i10.itemnum = 10; i10.cost = 37; i10.name = "a8"; i10.cancount = true; i10.type = item.Type.skin; i10.sprite = sprites[10]; itemlist.Add(i10); item i11 = new item(); i11.itemnum = 11; i11.cost = 38; i11.name = "a9"; i11.cancount = true; i11.type = item.Type.skin; i11.sprite = sprites[11]; itemlist.Add(i11); item i12 = new item(); i12.itemnum = 12; i12.cost = 39; i12.name = "a10"; i12.cancount = true; i12.type = item.Type.skin; i12.sprite = sprites[12]; itemlist.Add(i12); item i13 = new item(); i13.itemnum = 13; i13.cost = 40; i13.name = "a10"; i13.cancount = true; i13.type = item.Type.skin; i13.sprite = sprites[13]; itemlist.Add(i13); }
//======================================== //addItem(item obj) add new item to file //======================================== public void addItem(item obj) { data.Add(obj); itemdal.addOneItems(obj); }