public void Paint(LinearLayout Parent, Context context, float ps = 1) { if (this.Layout == null) { this.Layout = new RelativeLayout(context); Layout.SetMinimumHeight((int)(Size.Height * ps)); Layout.SetMinimumWidth((int)(Size.Width * ps)); Layout.SetBackgroundColor(Android.Graphics.Color.White); Parent.AddView(Layout); } foreach (MPSReportField Curr in this.Fields) { Curr.Paint(Layout, context, ps); } }
private void ChangeNext() { if (Next == null) { return; } if (Next == Curr) { return; } Curr?.Invoke(StateMachineCase.Exit); Next?.Invoke(StateMachineCase.Enter); Prev = Curr; Curr = Next; Next = null; }
public override byte[] WriteMsg() { string data = Sum.ToString("X").PadLeft(4, '0'); data += Curr.ToString("X").PadLeft(4, '0'); data += HexStringUtility.ByteArrayToHexString(Content); IsPW = false; PW = ""; IsTP = false; TP = ""; UserData = data; UserDataBytes = HexStringUtility.HexStringToByteArray(UserData); return(WriteMsg2()); }
public float GetFloat(string name) { return(Curr.GetFloat(name)); }
public bool IsPressed(string button) { return(Curr.IsPressed(button)); }
public void Exit() { Curr?.Invoke(StateMachineCase.Exit); Curr = Prev = Next = null; }
public void Update() { ChangeNext(); Curr?.Invoke(StateMachineCase.Exec); }
public void Do() { Curr.Do(); }
public int AxisValue(string name) => Curr.AxisValue(name);
public bool IsPressed(string button) => Curr.IsPressed(button);
public Currency(string name, double course, Curr curr) { this.Name = name; this.Curr = curr; }
public float AxisValue(string name) => Curr.AxisValue(name);
public override int GetHashCode() { return(Last.GetHashCode() * 31 + Curr.GetHashCode()); }
/// <summary> /// Wil initialize the object from the passed string parameter. /// </summary> /// <param name="schemaString"></param> public ProjectExtensions(string schemaString) { var SchemaXml = XElement.Parse(schemaString); var RestrictionBaseElement = SchemaXml.DescendantNodes().OfType <XElement>().FirstOrDefault(Curr => Curr.Attributes().Any(Attr => Attr.Name.LocalName == "name" && Attr.Value == "TopicType")); if (RestrictionBaseElement != null) { TopicType = RestrictionBaseElement.Nodes().OfType <XElement>().First().Nodes().OfType <XElement>().Select(Curr => Curr.Attribute("value").Value).ToList(); } RestrictionBaseElement = SchemaXml.DescendantNodes().OfType <XElement>().FirstOrDefault(Curr => Curr.Attributes().Any(Attr => Attr.Name.LocalName == "name" && Attr.Value == "TopicStatus")); if (RestrictionBaseElement != null) { TopicStatus = RestrictionBaseElement.Nodes().OfType <XElement>().First().Nodes().OfType <XElement>().Select(Curr => Curr.Attribute("value").Value).ToList(); } RestrictionBaseElement = SchemaXml.DescendantNodes().OfType <XElement>().FirstOrDefault(Curr => Curr.Attributes().Any(Attr => Attr.Name.LocalName == "name" && Attr.Value == "TopicLabel")); if (RestrictionBaseElement != null) { TopicLabel = RestrictionBaseElement.Nodes().OfType <XElement>().First().Nodes().OfType <XElement>().Select(Curr => Curr.Attribute("value").Value).ToList(); } RestrictionBaseElement = SchemaXml.DescendantNodes().OfType <XElement>().FirstOrDefault(Curr => Curr.Attributes().Any(Attr => Attr.Name.LocalName == "name" && Attr.Value == "SnippetType")); if (RestrictionBaseElement != null) { SnippetType = RestrictionBaseElement.Nodes().OfType <XElement>().First().Nodes().OfType <XElement>().Select(Curr => Curr.Attribute("value").Value).ToList(); } RestrictionBaseElement = SchemaXml.DescendantNodes().OfType <XElement>().FirstOrDefault(Curr => Curr.Attributes().Any(Attr => Attr.Name.LocalName == "name" && Attr.Value == "Priority")); if (RestrictionBaseElement != null) { Priority = RestrictionBaseElement.Nodes().OfType <XElement>().First().Nodes().OfType <XElement>().Select(Curr => Curr.Attribute("value").Value).ToList(); } RestrictionBaseElement = SchemaXml.DescendantNodes().OfType <XElement>().FirstOrDefault(Curr => Curr.Attributes().Any(Attr => Attr.Name.LocalName == "name" && Attr.Value == "UserIdType")); if (RestrictionBaseElement != null) { UserIdType = RestrictionBaseElement.Nodes().OfType <XElement>().First().Nodes().OfType <XElement>().Select(Curr => Curr.Attribute("value").Value).ToList(); } }