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);
            }
        }
Beispiel #2
0
        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;
        }
Beispiel #3
0
        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());
        }
Beispiel #4
0
 public float GetFloat(string name)
 {
     return(Curr.GetFloat(name));
 }
Beispiel #5
0
 public bool IsPressed(string button)
 {
     return(Curr.IsPressed(button));
 }
Beispiel #6
0
 public void Exit()
 {
     Curr?.Invoke(StateMachineCase.Exit);
     Curr = Prev = Next = null;
 }
Beispiel #7
0
 public void Update()
 {
     ChangeNext();
     Curr?.Invoke(StateMachineCase.Exec);
 }
Beispiel #8
0
 public void Do()
 {
     Curr.Do();
 }
Beispiel #9
0
 public int AxisValue(string name) => Curr.AxisValue(name);
Beispiel #10
0
 public bool IsPressed(string button) => Curr.IsPressed(button);
Beispiel #11
0
 public Currency(string name, double course, Curr curr)
 {
     this.Name = name;
     this.Curr = curr;
 }
Beispiel #12
0
 public float AxisValue(string name) => Curr.AxisValue(name);
Beispiel #13
0
 public override int GetHashCode()
 {
     return(Last.GetHashCode() * 31 + Curr.GetHashCode());
 }
Beispiel #14
0
        /// <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();
            }
        }