/// <summary>Speak the text.</summary> public void Speak() { Silence(); stack.Clear(); clipDict.Clear(); foreach (AudioClip clip in Clips) { clipDict.Add("#" + clip.name + "#", clip); } string[] speechParts = splitRegex.Split(Text).Where(s => s != string.Empty).ToArray(); System.Text.RegularExpressions.MatchCollection mc = splitRegex.Matches(Text); int index = 0; foreach (System.Text.RegularExpressions.Match match in mc) { //Debug.Log("MATCH: '" + match + "' - " + Text.IndexOf(match.ToString(), index)); stack.Add(index = Text.IndexOf(match.ToString(), index), match.ToString()); index++; } index = 0; foreach (string speech in speechParts) { //Debug.Log("PART: '" + speech + "' - " + Text.IndexOf(speech, index)); stack.Add(index = Text.IndexOf(speech, index), speech); index++; } StartCoroutine(processStack()); }
protected override void OnCompile(BaseClothing o, System.Collections.Generic.IDictionary <string, System.SimpleType> data) { if (o == null || o.Deleted) { data.Clear(); return; } base.OnCompile(o, data); data.Add("resource", o.Resource.ToString()); data.Add("quality", o.Quality.ToString()); data.Add("crafter", o.Crafter != null ? o.Crafter.Serial.Value : -1); data.Add("identified", o.Identified); data.Add("rarity", o.ArtifactRarity); data.Add("hits", o.HitPoints); data.Add("hitsmax", o.MaxHitPoints); data.Add("reqstr", o.StrRequirement); data.Add("reqrace", o.RequiredRace != null ? o.RequiredRace.RaceID : -1); data.Add("bonusstr", o.BaseStrBonus); data.Add("bonusdex", o.BaseDexBonus); data.Add("bonusint", o.BaseIntBonus); }
public List <string> GetFormData() { List <string> dataList = new List <string>(); PdfReader pdfReader = new PdfReader(PdfLocation); System.Collections.Generic.IDictionary <string, iTextSharp.text.pdf.AcroFields.Item> fields = pdfReader.AcroFields.Fields; AcroFields.Item acroFieldItem; PdfDictionary pdfDictionary; int flags; int fieldInstance = 0; foreach (var field in fields) { acroFieldItem = field.Value; /* http://api.itextpdf.com/com/itextpdf/text/pdf/AcroFields.Item.html * field.Value.GetMerged Retrieve the merged dictionary for the given instance. * field.Value.GetPage Retrieve the page number of the given instance * field.Value.GetTabOrder Gets the tabOrder * field.Value.GetValue Retrieve the value dictionary of the given instance * field.Value.GetWidget Retrieve the widget dictionary of the given instance * field.Value.GetWidgetRef Retrieve the reference to the given instance * * field.Value.MarkUsed Mark all the item dictionaries used matching the given flags * field.Value.Size Preferred method of determining the number of instances of a given field * */ // Size should always be one unless there is more than one of a field with the same name fieldInstance = 0; do { // http://api.itextpdf.com/com/itextpdf/text/pdf/PdfDictionary.html // http://api.itextpdf.com/com/itextpdf/text/pdf/PdfName.html /* PDF Name http://www.pdf-tools.com/public/downloads/pdf-reference/pdfreference12.pdf * * AP Appearance dictionary * AS Appearance state * BS Border Style * D Dash Array * N Normal appearance * R Rollover appearance * W Width * * */ pdfDictionary = field.Value.GetMerged(fieldInstance); flags = pdfDictionary.GetAsNumber(PdfName.FF).IntValue; fieldInstance++; } while (fieldInstance < field.Value.Size); dataList.Add(field.Key + " " + field.Value); } pdfReader.Close(); fields.Clear(); acroFieldItem = null; pdfDictionary = null; return(dataList); }
public virtual void Clear() { rapidAccessForSystemClassesByName.Clear(); rapidAccessForUserClassesByName.Clear(); rapidAccessForSystemClassesByName = null; rapidAccessForUserClassesByName = null; allClassInfos.Clear(); }
protected internal virtual void ResetListeners() { foreach (Net.Vpc.Upa.Impl.Persistence.MultiRecordListTracker tracker in (currentRecords).Values) { tracker.record.RemovePropertyChangeListener(tracker.changeListener); } currentRecords.Clear(); }
public virtual Net.Vpc.Upa.Persistence.EntityExecutionContext ResetHints() { if (hints != null) { hints.Clear(); } hints = null; return(this); }
private static void Construct() { operators.Clear(); operators.Add('+', st => st.Pop <int>() + st.Pop <int>()); operators.Add('-', st => - st.Pop <int>() - st.Pop <int>()); operators.Add('/', st => (int)(1.0 / st.Pop <int>() * st.Pop <int>())); operators.Add('*', st => st.Pop <int>() * st.Pop <int>()); operators.Add('#', st => - st.Pop <int>()); }
public override void Clear(bool setToNull) { base.Clear(setToNull); oidsOfNNoi.Clear(); if (setToNull) { oidsOfNNoi = null; } }
/// <exception cref="System.Exception"></exception> public virtual void Commit() { storageEngine.Commit(); NeoDatis.Odb.OID oid = null; // release update mutexes System.Collections.IEnumerator iterator = oidsLockedForUpdate.Keys.GetEnumerator( ); while (iterator.MoveNext()) { oid = (NeoDatis.Odb.OID)iterator.Current; connectionManager.UnlockOidForConnection(oid, this); if (NeoDatis.Odb.OdbConfiguration.IsDebugEnabled(LogId)) { NeoDatis.Tool.DLogger.Debug("Release object lock for " + oid); } } oidsLockedForUpdate.Clear(); }
public override NeoDatis.Odb.Core.Layers.Layer2.Meta.AbstractObjectInfo GetMetaRepresentation (object @object, NeoDatis.Odb.Core.Layers.Layer2.Meta.ClassInfo ci, bool recursive , System.Collections.Generic.IDictionary <object, NeoDatis.Odb.Core.Layers.Layer2.Meta.NonNativeObjectInfo > alreadyReadObjects, NeoDatis.Odb.Core.Layers.Layer1.Introspector.IIntrospectionCallback callback) { clientOids.Clear(); aois.Clear(); objects.Clear(); return(base.GetObjectInfo(@object, ci, recursive, alreadyReadObjects, callback)); }
protected override void OnCompile(HouseRegion o, System.Collections.Generic.IDictionary <string, System.SimpleType> data) { if (o == null || !o.Registered) { data.Clear(); return; } base.OnCompile(o, data); data.Add("house", o.House != null ? o.House.Serial.Value : -1); }
protected override void OnCompile(GuardedRegion o, System.Collections.Generic.IDictionary <string, System.SimpleType> data) { if (o == null || !o.Registered) { data.Clear(); return; } base.OnCompile(o, data); data.Add("guarded", !o.Disabled); data.Add("allowreds", o.AllowReds); }
public virtual void Clear(bool setToNull) { if (objects != null) { objects.Clear(); oids.Clear(); objectInfoPointersCacheFromOid.Clear(); insertingObjects.Clear(); objectPositionsByIds.Clear(); readingObjectInfo.Clear(); unconnectedZoneOids.Clear(); } if (setToNull) { objects = null; oids = null; objectInfoPointersCacheFromOid = null; insertingObjects = null; objectPositionsByIds = null; readingObjectInfo = null; unconnectedZoneOids = null; } }
public System.Collections.Generic.IDictionary <string, string> Parse( System.IO.Stream input) { _data.Clear(); _context.Clear(); // https://dotnetfiddle.net/rrR2Bb YamlDotNet.RepresentationModel.YamlStream yaml = new YamlDotNet.RepresentationModel.YamlStream(); yaml.Load(new System.IO.StreamReader(input, detectEncodingFromByteOrderMarks: true)); foreach (YamlDotNet.RepresentationModel.YamlDocument doc in yaml.Documents) { YamlDotNet.RepresentationModel.YamlMappingNode mapping = (YamlDotNet.RepresentationModel.YamlMappingNode)doc.RootNode; // The document node is a mapping node VisitYamlMappingNode(mapping); } return(_data); }
protected override void OnCompile(BaseArmor o, System.Collections.Generic.IDictionary <string, System.SimpleType> data) { if (o == null || o.Deleted) { data.Clear(); return; } base.OnCompile(o, data); data.Add("resource", o.Resource.ToString()); data.Add("quality", o.Quality.ToString()); data.Add("durability", o.Durability.ToString()); data.Add("crafter", o.Crafter != null ? o.Crafter.Serial.Value : -1); data.Add("identified", o.Identified); data.Add("rarity", o.ArtifactRarity); data.Add("slayers", JoinData(o.Slayer, o.Slayer2)); data.Add("armorbase", o.ArmorBase); data.Add("hits", o.HitPoints); data.Add("hitsmax", o.MaxHitPoints); data.Add("reqstr", o.StrRequirement); data.Add("reqdex", o.DexRequirement); data.Add("reqint", o.IntRequirement); data.Add("reqrace", o.RequiredRace != null ? o.RequiredRace.RaceID : -1); data.Add("bonusstr", o.StrBonus); data.Add("bonusdex", o.DexBonus); data.Add("bonusint", o.IntBonus); data.Add("bonusluck", o.GetLuckBonus()); data.Add("bonusdurability", o.GetDurabilityBonus()); }
public virtual bool HasNext() { try { if (closed || (resultSet).IsClosed) { log.TraceEvent(System.Diagnostics.TraceEventType.Warning, 90, Net.Vpc.Upa.Impl.FwkConvertUtils.LogMessageExceptionFormatter("ResultSet closed, unable to retrieve next record", null)); } updates.Clear(); return(resultSet.NextResult()); } catch (System.Exception e) { bool alreadyClosed = false; try { alreadyClosed = (resultSet).IsClosed; } catch (System.Exception e2) { } //ignore if (alreadyClosed) { return(false); } throw new Net.Vpc.Upa.Exceptions.FindException(e, new Net.Vpc.Upa.Types.I18NString("ReadQueryHasNextFailed")); } }
public virtual void ClearOnCommit() { objectPositionsByIds.Clear(); unconnectedZoneOids.Clear(); }
public virtual V Put(System.Type key, V @value) { cache.Clear(); return(data[key] = @value); }
public virtual void Clear() { oids.Clear(); modifiedObjectOids.Clear(); modifiedObjectOidList.Clear(); }
public void Clear() { _Dict.Clear(); }
public virtual void Reset() { classMap.Clear(); construtorsMap.Clear(); }
// Object is in memory, do not need to re-put in map. The key has // not changed // readingObjectInfo.put(oid, objects); public virtual void ClearObjectInfos() { readingObjectInfo.Clear(); }