Beispiel #1
0
        private void ThrowDartTo(string str)
        {
            var       point = new PointF(0.0f, 0.0f);
            var       side  = 0;
            ThrowType type;
            var       sector = Converter.ToInt(str.Substring(str.IndexOf("_") + 1));

            if (str.Contains("Tremble"))
            {
                type = ThrowType.Tremble;
            }
            else if (str.Contains("Double"))
            {
                type = ThrowType.Double;
            }
            else if (str.Contains("Single"))
            {
                type = ThrowType.Single;
            }
            else if (str.Contains("_25"))
            {
                type = ThrowType._25;
            }
            else if (str.Contains("Bull"))
            {
                type = ThrowType.Bull;
            }
            else
            {
                type = ThrowType.Zero;
            }

            detectionService.InvokeOnThrowDetected(new DetectedThrow(point,
                                                                     null,
                                                                     null,
                                                                     sector,
                                                                     type,
                                                                     side),
                                                   true);
            if (!App.ThrowPanel)
            {
                HidePanel();
            }
        }
Beispiel #2
0
        public void ThrowDartTo(string multiplier, int sector)
        {
            var       point = new PointF(0.0f, 0.0f);
            var       side  = 0;
            ThrowType type;

            if (multiplier.Contains("Tremble"))
            {
                type = ThrowType.Tremble;
            }
            else if (multiplier.Contains("Double"))
            {
                type = ThrowType.Double;
            }
            else if (multiplier.Contains("Single"))
            {
                type = ThrowType.Single;
            }
            else if (multiplier == "_25")
            {
                type = ThrowType._25;
            }
            else if (multiplier == "Bulleye")
            {
                type = ThrowType.Bulleye;
            }
            else
            {
                type = ThrowType.Zero;
            }

            detectionService.InvokeOnThrowDetected(new DetectedThrow(point,
                                                                     null,
                                                                     null,
                                                                     sector,
                                                                     type,
                                                                     side),
                                                   true);
        }