void handlePassives() { foreach (string attributeName in AttributesPassives.Keys) { IamAttribute temp; AttributesPassives.TryGetValue(attributeName, out temp); AttributeState state = temp.UpdateLogic(this); switch (state) { case AttributeState.Done: { removalListForPassives.Add(attributeName); break; } case AttributeState.InProgress: { break; } case AttributeState.Loop: { break; } default: break; } } foreach (string name in removalListForPassives) { AttributesPassives.Remove(name); } }
void handleActives() { if (Commands.Count > 0) { AttributesActives.TryGetValue(Commands.Peek(), out IamAttribute attribute); AttributeState state = attribute.UpdateLogic(this); switch (state) { case AttributeState.Done: { Commands.Dequeue(); break; } case AttributeState.InProgress: { break; } case AttributeState.Loop: { break; } default: break; } } }
public AccessAttributeImpl(IOptions <AppSetting> _appSettings, IHttpContextAccessor _httpContextAccessor, IMemoryCache _memoryCache, AttributeState _attributeState = AttributeState.Respected) { p_appSettings = _appSettings; p_httpContextAccessor = _httpContextAccessor; p_state = _attributeState; p_memoryCache = _memoryCache; }
public AccessAttribute(AttributeState _attributeState) : base(typeof(AccessAttributeImpl)) { Arguments = new object[] { _attributeState }; }
public override bool MoveToElement() { if (attr_state == AttributeState.None) { return(false); } attr_state = AttributeState.None; return(true); }
public override bool MoveToFirstAttribute() { if (current_node != XmlNodeType.Element) { return(false); } attr_state = AttributeState.Type; return(true); }
public IAttributeState Get(string id) { IAttributeState state = CurrentSession.Get <AttributeState> (id); if (state == null) { state = new AttributeState(); (state as AttributeState).AttributeId = id; } return(state); }
public static IEnumerable <IAttributeState> ToAttributeStateCollection(IEnumerable <string> ids) { var states = new List <AttributeState>(); foreach (var id in ids) { var s = new AttributeState(); s.AttributeId = id; states.Add(s); } return(states); }
public override bool ReadAttributeValue() { switch (attr_state) { case AttributeState.Type: attr_state = AttributeState.TypeValue; return(true); case AttributeState.RuntimeType: attr_state = AttributeState.RuntimeTypeValue; return(true); } return(false); }
public IAttributeState Get(string id, bool nullAllowed) { IAttributeState state = CurrentSession.Get <AttributeState> (id); if (!nullAllowed && state == null) { state = new AttributeState(); (state as AttributeState).AttributeId = id; } if (ReadOnlyProxyGenerator != null && state != null) { return(ReadOnlyProxyGenerator.CreateProxy <IAttributeState>(state, new Type[] { typeof(ISaveable) }, _readOnlyPropertyNames)); } return(state); }
public override bool MoveToAttribute(string name) { if (current_node != XmlNodeType.Element) { return(false); } switch (name) { case "type": attr_state = AttributeState.Type; return(true); case "__type": if (current_runtime_type == null) { return(false); } attr_state = AttributeState.RuntimeType; return(true); default: return(false); } }
public override bool MoveToFirstAttribute() { if (current_node != XmlNodeType.Element) return false; attr_state = AttributeState.Type; return true; }
// 속성 지속 IEnumerator StartChangeAttribute(AttributeState attribute) { curAttribute = attribute; InGameUI.instance.ChangeAttribute(); while (true) { yield return new WaitForSeconds(0.05f); _countDownForAttribute -= 0.05f; if(_countDownForAttribute < 0.05f) { _countDownForAttribute = attributeDuration; curAttribute = AttributeState.noraml; InGameUI.instance.ChangeAttribute(); break; } } }
void Awake() { // instance = this; curAttribute = AttributeState.noraml; _countDownForAttribute = attributeDuration; }
/*********************************************************************/ public void ProcessAttributes(string strAttributes) { strAttributes = TextNode.Normalize(strAttributes).Trim(); if (strAttributes == "") { return; } string strName = ""; string strValue = ""; bool bHaveQuote = false; bool bSingleQuote = false; AttributeState eState = AttributeState.Nothing; foreach (char chFind in strAttributes) { switch (chFind) { case ' ': { switch (eState) { // Found whitespace case AttributeState.Name: eState = AttributeState.AfterName; break; case AttributeState.InValue: { if (bHaveQuote) { strValue += " "; } else { AddAttribute(strName, strValue); strName = ""; strValue = ""; eState = AttributeState.Nothing; } break; } // Ignore white space here case AttributeState.Nothing: case AttributeState.StartValue: case AttributeState.AfterName: default: break; } break; } case '=': { switch (eState) { case AttributeState.Name: case AttributeState.AfterName: eState = AttributeState.StartValue; break; case AttributeState.InValue: { if (bHaveQuote) { strValue += "+"; } break; } default: // ??? this is bad??? Ignore for now! break; } break; } case '\'': { switch (eState) { case AttributeState.StartValue: eState = AttributeState.InValue; bHaveQuote = true; bSingleQuote = true; break; case AttributeState.InValue: { if (bHaveQuote && !bSingleQuote) { strValue += "\'"; } else if (bHaveQuote && bSingleQuote) { bSingleQuote = false; bHaveQuote = false; AddAttribute(strName, strValue); strName = ""; strValue = ""; eState = AttributeState.Nothing; } break; } default: // ??? this is bad??? Ignore for now! break; } break; } case '\"': { switch (eState) { case AttributeState.StartValue: eState = AttributeState.InValue; bHaveQuote = true; bSingleQuote = false; break; case AttributeState.InValue: { if (bHaveQuote && bSingleQuote) { strValue += "\""; } else if (bHaveQuote && !bSingleQuote) { bSingleQuote = false; bHaveQuote = false; AddAttribute(strName, strValue); strName = ""; strValue = ""; eState = AttributeState.Nothing; } break; } default: // ??? this is bad??? Ignore for now! break; } break; } default: { switch (eState) { case AttributeState.AfterName: { AddAttribute(strName, strName.ToLower()); strName = ""; strValue = ""; eState = AttributeState.Nothing; break; } case AttributeState.StartValue: strValue = chFind.ToString(); eState = AttributeState.InValue; break; case AttributeState.Nothing: strName += chFind; eState = AttributeState.Name; break; case AttributeState.Name: strName += chFind; break; case AttributeState.InValue: strValue += chFind; break; default: break; } break; } } } AddAttribute(strName, strValue); return; }
public void ChangeAttribute(AttributeState attribute) { StopAllCoroutines(); InGameUI.instance.ChangeCountDownForAttributeBar(); StartCoroutine(StartChangeAttribute(attribute)); }
public static List<BrowserScriptPocketQueriesPQSetting> Load(string filename) { List<BrowserScriptPocketQueriesPQSetting> result = new List<BrowserScriptPocketQueriesPQSetting>(); if (System.IO.File.Exists(filename)) { XmlDocument doc = new XmlDocument(); doc.Load(filename); XmlElement root = doc.DocumentElement; XmlNodeList bmNodes = root.SelectNodes("Setting"); if (bmNodes != null) { foreach (XmlNode n in bmNodes) { BrowserScriptPocketQueriesPQSetting pq = new BrowserScriptPocketQueriesPQSetting(); pq.ID = n.SelectSingleNode("ID").InnerText; pq.Name = n.SelectSingleNode("Name").InnerText; pq.GenerateOnDays = new List<int>(); XmlNode subn = n.SelectSingleNode("GenerateOnDays"); if (subn != null) { XmlNodeList subs = subn.SelectNodes("Day"); if (subs != null) { foreach (XmlNode sn in subs) { pq.GenerateOnDays.Add(int.Parse(sn.InnerText)); } } } pq.ExecutionScheme = int.Parse(n.SelectSingleNode("ExecutionScheme").InnerText); pq.MaximumCaches = n.SelectSingleNode("MaximumCaches").InnerText; pq.GeocacheTypes = new List<int>(); subn = n.SelectSingleNode("GeocacheTypes"); if (subn != null) { XmlNodeList subs = subn.SelectNodes("Type"); if (subs != null) { foreach (XmlNode sn in subs) { pq.GeocacheTypes.Add(int.Parse(sn.InnerText)); } } } pq.GeocacheContainer = new List<int>(); subn = n.SelectSingleNode("GeocacheContainer"); if (subn != null) { XmlNodeList subs = subn.SelectNodes("Container"); if (subs != null) { foreach (XmlNode sn in subs) { pq.GeocacheContainer.Add(int.Parse(sn.InnerText)); } } } pq.WhichOptions = new List<int>(); subn = n.SelectSingleNode("WhichOptions"); if (subn != null) { XmlNodeList subs = subn.SelectNodes("Option"); if (subs != null) { foreach (XmlNode sn in subs) { pq.WhichOptions.Add(int.Parse(sn.InnerText)); } } } pq.DifficultyCondition = n.SelectSingleNode("DifficultyCondition").InnerText; pq.DifficultyValue = n.SelectSingleNode("DifficultyValue").InnerText; pq.TerrainCondition = n.SelectSingleNode("TerrainCondition").InnerText; pq.TerrainValue = n.SelectSingleNode("TerrainValue").InnerText; pq.WithinSelection = n.SelectSingleNode("WithinSelection").InnerText; pq.Countries = new List<string>(); subn = n.SelectSingleNode("Countries"); if (subn != null) { XmlNodeList subs = subn.SelectNodes("Country"); if (subs != null) { foreach (XmlNode sn in subs) { pq.Countries.Add(sn.InnerText); } } } pq.States = new List<string>(); subn = n.SelectSingleNode("States"); if (subn != null) { XmlNodeList subs = subn.SelectNodes("State"); if (subs != null) { foreach (XmlNode sn in subs) { pq.States.Add(sn.InnerText); } } } pq.FromPointSelection = n.SelectSingleNode("FromPointSelection").InnerText; pq.FromPointGCCode = n.SelectSingleNode("FromPointGCCode").InnerText; pq.FromPointPostalCode = n.SelectSingleNode("FromPointPostalCode").InnerText; pq.LatLonFormatValue = n.SelectSingleNode("LatLonFormatValue").InnerText; pq.NorthSouthValues = new List<string>(); subn = n.SelectSingleNode("NorthSouthValues"); if (subn != null) { XmlNodeList subs = subn.SelectNodes("Value"); if (subs != null) { foreach (XmlNode sn in subs) { pq.NorthSouthValues.Add(sn.InnerText); } } } pq.EastWestValues = new List<string>(); subn = n.SelectSingleNode("EastWestValues"); if (subn != null) { XmlNodeList subs = subn.SelectNodes("Value"); if (subs != null) { foreach (XmlNode sn in subs) { pq.EastWestValues.Add(sn.InnerText); } } } pq.WithinRadius = n.SelectSingleNode("WithinRadius").InnerText; pq.WithinRadiusUnitType = n.SelectSingleNode("WithinRadiusUnitType").InnerText; pq.PlacedDuring = n.SelectSingleNode("PlacedDuring").InnerText; pq.PlacedDuringFixedInterval = n.SelectSingleNode("PlacedDuringFixedInterval").InnerText; pq.PlacedDuringFromDate = DateTime.Parse(n.SelectSingleNode("PlacedDuringFromDate").InnerText); pq.PlacedDuringToDate = DateTime.Parse(n.SelectSingleNode("PlacedDuringToDate").InnerText); pq.IncludeAttributes = new List<AttributeState>(); subn = n.SelectSingleNode("IncludeAttributes"); if (subn != null) { XmlNodeList subs = subn.SelectNodes("Attr"); if (subs != null) { foreach (XmlNode sn in subs) { AttributeState attr = new AttributeState(); attr.ID = sn.SelectSingleNode("ID").InnerText; attr.Value = sn.SelectSingleNode("Value").InnerText; pq.IncludeAttributes.Add(attr); } } } pq.ExcludeAttributes = new List<AttributeState>(); subn = n.SelectSingleNode("ExcludeAttributes"); if (subn != null) { XmlNodeList subs = subn.SelectNodes("Attr"); if (subs != null) { foreach (XmlNode sn in subs) { AttributeState attr = new AttributeState(); attr.ID = sn.SelectSingleNode("ID").InnerText; attr.Value = sn.SelectSingleNode("Value").InnerText; pq.ExcludeAttributes.Add(attr); } } } pq.EMail = n.SelectSingleNode("EMail").InnerText; pq.FileFormat = n.SelectSingleNode("FileFormat").InnerText; pq.CompressFile = bool.Parse(n.SelectSingleNode("CompressFile").InnerText); pq.PQNameInFileName = bool.Parse(n.SelectSingleNode("PQNameInFileName").InnerText); result.Add(pq); } } } return result; }
public override bool MoveToElement() { if (attr_state == AttributeState.None) return false; attr_state = AttributeState.None; return true; }
public override bool MoveToAttribute(string name) { if (current_node != XmlNodeType.Element) return false; switch (name) { case "type": attr_state = AttributeState.Type; return true; case "__type": if (current_runtime_type == null) return false; attr_state = AttributeState.RuntimeType; return true; default: return false; } }
public override bool Read() { switch (read_state) { case ReadState.EndOfFile: case ReadState.Closed: case ReadState.Error: return(false); case ReadState.Initial: read_state = ReadState.Interactive; next_element = "root"; current_node = XmlNodeType.Element; break; } MoveToElement(); if (content_stored) { if (current_node == XmlNodeType.Element) { if (elements.Peek().Type == "null") { // since null is not consumed as text content, it skips Text state. current_node = XmlNodeType.EndElement; content_stored = false; } else { current_node = XmlNodeType.Text; } return(true); } else if (current_node == XmlNodeType.Text) { current_node = XmlNodeType.EndElement; content_stored = false; return(true); } } else if (current_node == XmlNodeType.EndElement) { // clear EndElement state elements.Pop(); if (elements.Count > 0) { elements.Peek().HasContent = true; } else { finished = true; } } SkipWhitespaces(); attr_state = AttributeState.None; // Default. May be overriden only as EndElement or None. current_node = XmlNodeType.Element; if (!ReadContent(false)) { return(false); } if (finished) { throw XmlError("Multiple top-level content is not allowed"); } return(true); }
public override bool Read() { switch (read_state) { case ReadState.EndOfFile: case ReadState.Closed: case ReadState.Error: return false; case ReadState.Initial: read_state = ReadState.Interactive; next_element = "root"; current_node = XmlNodeType.Element; break; } if (content_stored) { if (current_node == XmlNodeType.Element) { if (elements.Peek ().Type == "null") { // since null is not consumed as text content, it skips Text state. current_node = XmlNodeType.EndElement; content_stored = false; } else current_node = XmlNodeType.Text; return true; } else if (current_node == XmlNodeType.Text) { current_node = XmlNodeType.EndElement; content_stored = false; return true; } } else if (current_node == XmlNodeType.EndElement) { // clear EndElement state elements.Pop (); if (elements.Count > 0) elements.Peek ().HasContent = true; else finished = true; } SkipWhitespaces (); attr_state = AttributeState.None; // Default. May be overriden only as EndElement or None. current_node = XmlNodeType.Element; if (!ReadContent (false)) return false; if (finished) throw XmlError ("Multiple top-level content is not allowed"); return true; }
public static BrowserScriptPocketQueriesPQSetting FromPQPage(Framework.Interfaces.ICore core, Framework.Interfaces.IPlugin plugin, WebBrowser wb) { BrowserScriptPocketQueriesPQSetting result = new BrowserScriptPocketQueriesPQSetting(); try { result.ID = Guid.NewGuid().ToString("N"); core.DebugLog(Framework.Data.DebugLogLevel.Info, plugin, null, "ctl00_ContentBody_tbName"); result.Name = wb.Document.GetElementById("ctl00_ContentBody_tbName").GetAttribute("value"); result.GenerateOnDays = new List<int>(); core.DebugLog(Framework.Data.DebugLogLevel.Info, plugin, null, "ctl00_ContentBody_cbDays_"); for (int i = 0; i < 7; i++) { if (checkBoxChecked(wb, string.Format("ctl00_ContentBody_cbDays_{0}", i))) { result.GenerateOnDays.Add(i); } } core.DebugLog(Framework.Data.DebugLogLevel.Info, plugin, null, "ctl00_ContentBody_rbRunOption_"); for (int i = 0; i < 3; i++) { if (checkBoxChecked(wb, string.Format("ctl00_ContentBody_rbRunOption_{0}", i))) { result.ExecutionScheme = i; break; } } core.DebugLog(Framework.Data.DebugLogLevel.Info, plugin, null, "ctl00_ContentBody_tbResults"); result.MaximumCaches = wb.Document.GetElementById("ctl00_ContentBody_tbResults").GetAttribute("value"); result.GeocacheTypes = new List<int>(); core.DebugLog(Framework.Data.DebugLogLevel.Info, plugin, null, "ctl00_ContentBody_rbTypeAny"); if (!radioButtonChecked(wb, "ctl00_ContentBody_rbTypeAny")) { core.DebugLog(Framework.Data.DebugLogLevel.Info, plugin, null, "ctl00_ContentBody_cbTaxonomy_"); for (int i = 0; i < 11; i++) { if (checkBoxChecked(wb, string.Format("ctl00_ContentBody_cbTaxonomy_{0}", i))) { result.GeocacheTypes.Add(i); } } } result.GeocacheContainer = new List<int>(); core.DebugLog(Framework.Data.DebugLogLevel.Info, plugin, null, "ctl00_ContentBody_rbContainerAny"); if (!radioButtonChecked(wb, "ctl00_ContentBody_rbContainerAny")) { core.DebugLog(Framework.Data.DebugLogLevel.Info, plugin, null, "ctl00_ContentBody_cbContainers_"); for (int i = 0; i < 7; i++) { if (checkBoxChecked(wb, string.Format("ctl00_ContentBody_cbContainers_{0}", i))) { result.GeocacheContainer.Add(i); } } } result.WhichOptions = new List<int>(); core.DebugLog(Framework.Data.DebugLogLevel.Info, plugin, null, "ctl00_ContentBody_cbOptions_"); for (int i = 0; i < 14; i++) { if (checkBoxChecked(wb, string.Format("ctl00_ContentBody_cbOptions_{0}", i))) { result.WhichOptions.Add(i); } } core.DebugLog(Framework.Data.DebugLogLevel.Info, plugin, null, "ctl00_ContentBody_cbDifficulty"); if (checkBoxChecked(wb, "ctl00_ContentBody_cbDifficulty")) { core.DebugLog(Framework.Data.DebugLogLevel.Info, plugin, null, "ctl00_ContentBody_ddDifficulty"); result.DifficultyCondition = wb.Document.GetElementById("ctl00_ContentBody_ddDifficulty").GetAttribute("value"); } else { result.DifficultyCondition = ""; } core.DebugLog(Framework.Data.DebugLogLevel.Info, plugin, null, "ctl00_ContentBody_ddDifficultyScore"); result.DifficultyValue = wb.Document.GetElementById("ctl00_ContentBody_ddDifficultyScore").GetAttribute("value"); core.DebugLog(Framework.Data.DebugLogLevel.Info, plugin, null, "ctl00_ContentBody_cbTerrain"); if (checkBoxChecked(wb, "ctl00_ContentBody_cbTerrain")) { core.DebugLog(Framework.Data.DebugLogLevel.Info, plugin, null, "ctl00_ContentBody_ddTerrain"); result.TerrainCondition = wb.Document.GetElementById("ctl00_ContentBody_ddTerrain").GetAttribute("value"); } else { result.TerrainCondition = ""; } core.DebugLog(Framework.Data.DebugLogLevel.Info, plugin, null, "ctl00_ContentBody_ddTerrainScore"); result.TerrainValue = wb.Document.GetElementById("ctl00_ContentBody_ddTerrainScore").GetAttribute("value"); core.DebugLog(Framework.Data.DebugLogLevel.Info, plugin, null, "ctl00_ContentBody_rbNone"); if (radioButtonChecked(wb, "ctl00_ContentBody_rbNone")) { core.DebugLog(Framework.Data.DebugLogLevel.Info, plugin, null, "ctl00_ContentBody_rbNone"); result.WithinSelection = "ctl00_ContentBody_rbNone"; } else if (radioButtonChecked(wb, "ctl00_ContentBody_rbCountries")) { core.DebugLog(Framework.Data.DebugLogLevel.Info, plugin, null, "ctl00_ContentBody_rbCountries"); result.WithinSelection = "ctl00_ContentBody_rbCountries"; } else if (radioButtonChecked(wb, "ctl00_ContentBody_rbStates")) { core.DebugLog(Framework.Data.DebugLogLevel.Info, plugin, null, "ctl00_ContentBody_rbStates"); result.WithinSelection = "ctl00_ContentBody_rbStates"; } else { result.WithinSelection = ""; } result.Countries = new List<string>(); core.DebugLog(Framework.Data.DebugLogLevel.Info, plugin, null, "ctl00_ContentBody_lbCountries"); HtmlElement listel = wb.Document.GetElementById("ctl00_ContentBody_lbCountries"); foreach (HtmlElement el in listel.Children) { if (el.GetAttribute("selected") != null && (el.GetAttribute("selected").ToLower() == "selected" || el.GetAttribute("selected").ToLower() == "true")) { result.Countries.Add(el.GetAttribute("value")); } } result.States = new List<string>(); core.DebugLog(Framework.Data.DebugLogLevel.Info, plugin, null, "ctl00_ContentBody_lbStates"); listel = wb.Document.GetElementById("ctl00_ContentBody_lbStates"); foreach (HtmlElement el in listel.Children) { if (el.GetAttribute("selected") != null && (el.GetAttribute("selected").ToLower() == "selected" || el.GetAttribute("selected").ToLower() == "true")) { result.States.Add(el.GetAttribute("value")); } } core.DebugLog(Framework.Data.DebugLogLevel.Info, plugin, null, "ctl00_ContentBody_rbOriginNone"); if (radioButtonChecked(wb, "ctl00_ContentBody_rbOriginNone")) { core.DebugLog(Framework.Data.DebugLogLevel.Info, plugin, null, "ctl00_ContentBody_rbOriginNone"); result.FromPointSelection = "ctl00_ContentBody_rbOriginNone"; } else if (radioButtonChecked(wb, "ctl00_ContentBody_rbOriginHome")) { core.DebugLog(Framework.Data.DebugLogLevel.Info, plugin, null, "ctl00_ContentBody_rbOriginHome"); result.FromPointSelection = "ctl00_ContentBody_rbOriginHome"; } else if (radioButtonChecked(wb, "ctl00_ContentBody_rbOriginGC")) { core.DebugLog(Framework.Data.DebugLogLevel.Info, plugin, null, "ctl00_ContentBody_rbOriginGC"); result.FromPointSelection = "ctl00_ContentBody_rbOriginGC"; } else if (radioButtonChecked(wb, "ctl00_ContentBody_rbPostalCode")) { core.DebugLog(Framework.Data.DebugLogLevel.Info, plugin, null, "ctl00_ContentBody_rbPostalCode"); result.FromPointSelection = "ctl00_ContentBody_rbPostalCode"; } else if (radioButtonChecked(wb, "ctl00_ContentBody_rbOriginWpt")) { core.DebugLog(Framework.Data.DebugLogLevel.Info, plugin, null, "ctl00_ContentBody_rbOriginWpt"); result.FromPointSelection = "ctl00_ContentBody_rbOriginWpt"; } core.DebugLog(Framework.Data.DebugLogLevel.Info, plugin, null, "ctl00_ContentBody_tbGC"); result.FromPointGCCode = wb.Document.GetElementById("ctl00_ContentBody_tbGC").GetAttribute("value"); core.DebugLog(Framework.Data.DebugLogLevel.Info, plugin, null, "ctl00_ContentBody_tbPostalCode"); result.FromPointPostalCode = wb.Document.GetElementById("ctl00_ContentBody_tbPostalCode").GetAttribute("value"); core.DebugLog(Framework.Data.DebugLogLevel.Info, plugin, null, "ctl00$ContentBody$LatLong"); result.LatLonFormatValue = GetElementByName(wb.Document.Body, "ctl00$ContentBody$LatLong").GetAttribute("value"); result.NorthSouthValues = new List<string>(); result.EastWestValues = new List<string>(); core.DebugLog(Framework.Data.DebugLogLevel.Info, plugin, null, "ctl00_ContentBody_LatLong:_selectNorthSouth"); result.NorthSouthValues.Add(wb.Document.GetElementById("ctl00_ContentBody_LatLong:_selectNorthSouth").GetAttribute("value")); core.DebugLog(Framework.Data.DebugLogLevel.Info, plugin, null, "ctl00_ContentBody_LatLong:_selectEastWest"); result.EastWestValues.Add(wb.Document.GetElementById("ctl00_ContentBody_LatLong:_selectEastWest").GetAttribute("value")); if (result.LatLonFormatValue == "0") { core.DebugLog(Framework.Data.DebugLogLevel.Info, plugin, null, "ctl00_ContentBody_LatLong__inputLatDegs"); result.NorthSouthValues.Add(wb.Document.GetElementById("ctl00_ContentBody_LatLong__inputLatDegs").GetAttribute("value")); core.DebugLog(Framework.Data.DebugLogLevel.Info, plugin, null, "ctl00_ContentBody_LatLong__inputLongDegs"); result.EastWestValues.Add(wb.Document.GetElementById("ctl00_ContentBody_LatLong__inputLongDegs").GetAttribute("value")); } else if (result.LatLonFormatValue == "1") { core.DebugLog(Framework.Data.DebugLogLevel.Info, plugin, null, "ctl00_ContentBody_LatLong__inputLatDegs"); result.NorthSouthValues.Add(wb.Document.GetElementById("ctl00_ContentBody_LatLong__inputLatDegs").GetAttribute("value")); core.DebugLog(Framework.Data.DebugLogLevel.Info, plugin, null, "ctl00_ContentBody_LatLong__inputLatMins"); result.NorthSouthValues.Add(wb.Document.GetElementById("ctl00_ContentBody_LatLong__inputLatMins").GetAttribute("value")); core.DebugLog(Framework.Data.DebugLogLevel.Info, plugin, null, "ctl00_ContentBody_LatLong__inputLongDegs"); result.EastWestValues.Add(wb.Document.GetElementById("ctl00_ContentBody_LatLong__inputLongDegs").GetAttribute("value")); core.DebugLog(Framework.Data.DebugLogLevel.Info, plugin, null, "ctl00_ContentBody_LatLong__inputLongMins"); result.EastWestValues.Add(wb.Document.GetElementById("ctl00_ContentBody_LatLong__inputLongMins").GetAttribute("value")); } else if (result.LatLonFormatValue == "2") { core.DebugLog(Framework.Data.DebugLogLevel.Info, plugin, null, "ctl00_ContentBody_LatLong__inputLatDegs"); result.NorthSouthValues.Add(wb.Document.GetElementById("ctl00_ContentBody_LatLong__inputLatDegs").GetAttribute("value")); core.DebugLog(Framework.Data.DebugLogLevel.Info, plugin, null, "ctl00_ContentBody_LatLong__inputLatMins"); result.NorthSouthValues.Add(wb.Document.GetElementById("ctl00_ContentBody_LatLong__inputLatMins").GetAttribute("value")); core.DebugLog(Framework.Data.DebugLogLevel.Info, plugin, null, "ctl00_ContentBody_LatLong__inputLatSecs"); result.NorthSouthValues.Add(wb.Document.GetElementById("ctl00_ContentBody_LatLong__inputLatSecs").GetAttribute("value")); core.DebugLog(Framework.Data.DebugLogLevel.Info, plugin, null, "ctl00_ContentBody_LatLong__inputLongDegs"); result.EastWestValues.Add(wb.Document.GetElementById("ctl00_ContentBody_LatLong__inputLongDegs").GetAttribute("value")); core.DebugLog(Framework.Data.DebugLogLevel.Info, plugin, null, "ctl00_ContentBody_LatLong__inputLongMins"); result.EastWestValues.Add(wb.Document.GetElementById("ctl00_ContentBody_LatLong__inputLongMins").GetAttribute("value")); core.DebugLog(Framework.Data.DebugLogLevel.Info, plugin, null, "ctl00_ContentBody_LatLong__inputLongSecs"); result.EastWestValues.Add(wb.Document.GetElementById("ctl00_ContentBody_LatLong__inputLongSecs").GetAttribute("value")); } core.DebugLog(Framework.Data.DebugLogLevel.Info, plugin, null, "ctl00_ContentBody_tbRadius"); result.WithinRadius = wb.Document.GetElementById("ctl00_ContentBody_tbRadius").GetAttribute("value"); if (radioButtonChecked(wb, "ctl00_ContentBody_rbUnitType_0")) { result.WithinRadiusUnitType = "ctl00_ContentBody_rbUnitType_0"; } else { result.WithinRadiusUnitType = "ctl00_ContentBody_rbUnitType_1"; } core.DebugLog(Framework.Data.DebugLogLevel.Info, plugin, null, "ctl00_ContentBody_rbPlacedNone"); if (radioButtonChecked(wb, "ctl00_ContentBody_rbPlacedNone")) { result.PlacedDuring = "ctl00_ContentBody_rbPlacedNone"; } else if (radioButtonChecked(wb, "ctl00_ContentBody_rbPlacedLast")) { result.PlacedDuring = "ctl00_ContentBody_rbPlacedLast"; } else if (radioButtonChecked(wb, "ctl00_ContentBody_rbPlacedBetween")) { result.PlacedDuring = "ctl00_ContentBody_rbPlacedBetween"; } core.DebugLog(Framework.Data.DebugLogLevel.Info, plugin, null, "ctl00_ContentBody_ddLastPlaced"); result.PlacedDuringFixedInterval = wb.Document.GetElementById("ctl00_ContentBody_ddLastPlaced").GetAttribute("value"); core.DebugLog(Framework.Data.DebugLogLevel.Info, plugin, null, "ctl00_ContentBody_DateTimeBegin_Year"); result.PlacedDuringFromDate = new DateTime( int.Parse(wb.Document.GetElementById("ctl00_ContentBody_DateTimeBegin_Year").GetAttribute("value")), int.Parse(wb.Document.GetElementById("ctl00_ContentBody_DateTimeBegin_Month").GetAttribute("value")), int.Parse(wb.Document.GetElementById("ctl00_ContentBody_DateTimeBegin_Day").GetAttribute("value")) ); core.DebugLog(Framework.Data.DebugLogLevel.Info, plugin, null, "ctl00_ContentBody_DateTimeEnd_Year"); result.PlacedDuringToDate = new DateTime( int.Parse(wb.Document.GetElementById("ctl00_ContentBody_DateTimeEnd_Year").GetAttribute("value")), int.Parse(wb.Document.GetElementById("ctl00_ContentBody_DateTimeEnd_Month").GetAttribute("value")), int.Parse(wb.Document.GetElementById("ctl00_ContentBody_DateTimeEnd_Day").GetAttribute("value")) ); result.IncludeAttributes = new List<AttributeState>(); core.DebugLog(Framework.Data.DebugLogLevel.Info, plugin, null, "ctl00_ContentBody_ctlAttrInclude_dtlAttributeIcons_ctl{0}_hidInput"); for (int i = 0; i < 70; i++) { HtmlElement el = wb.Document.GetElementById(string.Format("ctl00_ContentBody_ctlAttrInclude_dtlAttributeIcons_ctl{0}_hidInput", i.ToString("00"))); if (el != null) { AttributeState ats = new AttributeState(); ats.ID = el.GetAttribute("AttID"); ats.Value = el.GetAttribute("value"); result.IncludeAttributes.Add(ats); } } result.ExcludeAttributes = new List<AttributeState>(); core.DebugLog(Framework.Data.DebugLogLevel.Info, plugin, null, "ctl00_ContentBody_ctlAttrExclude_dtlAttributeIcons_ctl{0}_hidInput"); for (int i = 0; i < 70; i++) { HtmlElement el = wb.Document.GetElementById(string.Format("ctl00_ContentBody_ctlAttrExclude_dtlAttributeIcons_ctl{0}_hidInput", i.ToString("00"))); if (el != null) { AttributeState ats = new AttributeState(); ats.ID = el.GetAttribute("AttID"); ats.Value = el.GetAttribute("value"); result.ExcludeAttributes.Add(ats); } } core.DebugLog(Framework.Data.DebugLogLevel.Info, plugin, null, "ctl00_ContentBody_ddlAltEmails"); try { result.EMail = wb.Document.GetElementById("ctl00_ContentBody_ddlAltEmails").GetAttribute("value"); } catch { result.EMail = ""; } core.DebugLog(Framework.Data.DebugLogLevel.Info, plugin, null, "ctl00_ContentBody_cbZip"); result.CompressFile = checkBoxChecked(wb, "ctl00_ContentBody_cbZip"); core.DebugLog(Framework.Data.DebugLogLevel.Info, plugin, null, "ctl00_ContentBody_ddFormats"); result.FileFormat = wb.Document.GetElementById("ctl00_ContentBody_ddFormats").GetAttribute("value"); core.DebugLog(Framework.Data.DebugLogLevel.Info, plugin, null, "ctl00_ContentBody_cbIncludePQNameInFileName"); result.PQNameInFileName = checkBoxChecked(wb, "ctl00_ContentBody_cbIncludePQNameInFileName"); } catch { result = null; } return result; }
public override bool ReadAttributeValue() { switch (attr_state) { case AttributeState.Type: attr_state = AttributeState.TypeValue; return true; case AttributeState.RuntimeType: attr_state = AttributeState.RuntimeTypeValue; return true; } return false; }