コード例 #1
0
ファイル: TokenMarker.cs プロジェクト: alyssonds/Touchable
 public TokenMarker(int id, Vector2 postion, TouchState state, MarkerType type)
 {
     this._id = id;
     this._position = postion;
     this._state = state;
     this._type = type;
 }
コード例 #2
0
ファイル: TileProperties.cs プロジェクト: jordsti/TPulse
 public TileData(bool isTileImportant, Color colour, MarkerType hasMarker = MarkerType.Unknown)
 {
     this.isImportant = isTileImportant;
     this.colour = colour;
     this.drawMarker = false;
     this.markerType = hasMarker;
 }
コード例 #3
0
ファイル: Marker.cs プロジェクト: helloyou2012/ChartProject
 /// <summary>
 /// Constructor
 /// </summary>
 /// <param name="markertype">The marker type.</param>
 /// <param name="size">The marker size.</param>
 /// <param name="color">The marker color.</param>
 public Marker( MarkerType markertype, int size, Color color )
 {
     markerType_ = markertype;
     Size = size;
     Color = color;
     filled_ = false;
 }
コード例 #4
0
ファイル: Marker.cs プロジェクト: helloyou2012/ChartProject
 /// <summary>
 /// Constructor
 /// </summary>
 /// <param name="markertype">The marker type.</param>
 /// <param name="size">The marker size.</param>
 /// <param name="pen">The marker Pen.</param>
 public Marker( MarkerType markertype, int size, Pen pen )
 {
     markerType_ = markertype;
     Size = size;
     Pen = pen;
     filled_ = false;
 }
コード例 #5
0
ファイル: BaseController.cs プロジェクト: dcollioni/BrMobi
        protected string GetMarkerImage(MarkerType markerType)
        {
            var rawUri = WebConfigurationManager.AppSettings["RawUri"];
            string imagePath;

            switch (markerType)
            {
                case MarkerType.Bus:
                    imagePath = WebConfigurationManager.AppSettings["BusMarkerImagePath"];
                    break;
                case MarkerType.RideOffer:
                    imagePath = WebConfigurationManager.AppSettings["RideOfferMarkerImagePath"];
                    break;
                case MarkerType.RideRequest:
                    imagePath = WebConfigurationManager.AppSettings["RideRequestMarkerImagePath"];
                    break;
                case MarkerType.Help:
                    imagePath = WebConfigurationManager.AppSettings["HelpMarkerImagePath"];
                    break;
                default:
                    imagePath = string.Empty;
                    break;
            }

            var uri = string.Format("{0}{1}", rawUri, imagePath);
            return new Uri(uri).AbsoluteUri;
        }
コード例 #6
0
 public Vector3 Thrust(MarkerType reference)
 {
     Vector3 thrust, torque;
     GameObject marker = RCSBuildAid.GetMarker(reference);
     calcMarkerForces (marker.transform, out thrust, out torque);
     return thrust;
 }
コード例 #7
0
        private static ScatterSeries CreateRandomScatterSeries(int n, MarkerType markerType, bool setSize, bool setValue, LinearColorAxis colorAxis)
        {
            var s1 = new ScatterSeries
            {
                MarkerType = markerType,
                MarkerSize = 6,
                ColorAxisKey = colorAxis != null ? colorAxis.Key : "nix"
            };
            var random = new Random(13);
            for (int i = 0; i < n; i++)
            {
                var p = new ScatterPoint((random.NextDouble() * 2.2) - 1.1, random.NextDouble());
                if (setSize)
                {
                    p.Size = (random.NextDouble() * 5) + 5;
                }

                if (setValue)
                {
                    p.Value = (random.NextDouble() * 2.2) - 1.1;
                }

                s1.Points.Add(p);
            }

            return s1;
        }
コード例 #8
0
		public TileData()
		{
			this.isImportant = false;
			this.color = Color.Magenta;
            this.officialColor = Color.Magenta;
            this.transparent = false;
			this.markerType = MarkerType.Unknown;
		}
コード例 #9
0
ファイル: Waypoint.cs プロジェクト: Alshain01/SaltMaps
 // Constructor for new Waypoint Generation
 public Waypoint(Point p, MarkerType marker, IslandType island)
 {
     this.Location = Coordinates.FromPoint(p);
     this.Island = island;
     this.Marker = marker;
     this.Name = string.Empty;
     this.Notes = String.Empty;
 }
コード例 #10
0
ファイル: Waypoint.cs プロジェクト: Alshain01/SaltMaps
 // Constructor for new Waypoint Generation
 public Waypoint(Coordinates c, MarkerType marker, IslandType island)
 {
     this.Location = c;
     this.Island = island;
     this.Marker = marker;
     this.Name = string.Empty;
     this.Notes = String.Empty;
 }
コード例 #11
0
ファイル: Parser.cs プロジェクト: mpivko/01-quality
 private void CloseMarker(MarkerType type, int position)
 {
     if (!IsMarkerOpened(type))
         throw new Exception("Trying to close closed marker");
     var marker = openedMarkers[type];
     markers.Add(new Marker(marker.LInclusive, position, marker.Type));
     openedMarkers.Remove(type);
 }
コード例 #12
0
 private static PlotModel CreateRandomScatterSeriesWithColorAxisPlotModel(int n, OxyPalette palette, MarkerType markerType, AxisPosition colorAxisPosition, OxyColor highColor, OxyColor lowColor)
 {
     var model = new PlotModel { Title = string.Format("ScatterSeries (n={0})", n), Background = OxyColors.LightGray };
     var colorAxis = new LinearColorAxis { Position = colorAxisPosition, Palette = palette, Minimum = -1, Maximum = 1, HighColor = highColor, LowColor = lowColor };
     model.Axes.Add(colorAxis);
     model.Series.Add(CreateRandomScatterSeries(n, markerType, false, true, colorAxis));
     return model;
 }
コード例 #13
0
 public EntityMarker(BankEntity entity, IconType iconType)
 {
     this.Entity = entity;
     this.MarkerOptions = new MarkerOptions ();
     this.MarkerOptions.SetTitle (entity.Description());
     this.MarkerOptions.SetPosition (new LatLng(entity.Latitude, entity.Longitude));
     this.Type = MarkerType.Regular;
     IconType = iconType;
 }
コード例 #14
0
ファイル: Marker.cs プロジェクト: TylerEspo/AnimationV
 public Marker(MarkerType markertype, Vector3 position, Color color, AnimationType type)
 {
     this.markertype = markertype;
     this.position = position;
     this.color = color;
     this.type = type;
     this.scale = Default_Scale;
     _time = 0;
 }
コード例 #15
0
		public TileData(bool isTileImportant, Color color, Color officialColor, MarkerType hasMarker = MarkerType.Unknown)
		{
			this.isImportant = isTileImportant;
			this.color = color;
            this.officialColor = officialColor;
            this.transparent = false;
			this.drawMarker = false;
			this.markerType = hasMarker;
		}
コード例 #16
0
ファイル: Map.cs プロジェクト: Alshain01/SaltMaps
        public Waypoint AddWaypoint(IslandType i, MarkerType m, Point p)
        {
            if (i == IslandType.None && m == MarkerType.None || waypoints.Exists(x => x.GetLocation() == p))
                return null;

            Waypoint wp = new Waypoint(p, m, i);
            waypoints.Add(wp);
            return wp;
        }
コード例 #17
0
ファイル: Map.cs プロジェクト: Alshain01/SaltMaps
        public Stamp AddStamp(MarkerType m, int size, Point p)
        {
            if (m == MarkerType.None || HasStamp(p))
                return null;

            Stamp stamp = new Stamp(p, size, m);
            stamps.Add(stamp);
            return stamp;
        }
コード例 #18
0
 public static void ActivateMarkerOnMouse(MarkerType markerType)
 {
     if (CachedDidHit) {
         PlayerManager.OrderMarker.PlayOneShot (CachedHit.point, CachedHit.normal, markerType);
         return;
     }
     Vector3 hitPoint = CachedRay.origin - CachedRay.direction * (CachedRay.origin.y / CachedRay .direction.y);
     if (PlayerManager.OrderMarker != null)
     PlayerManager.OrderMarker.PlayOneShot (hitPoint, Vector3.up, markerType);
 }
コード例 #19
0
        /// <summary>
        /// Initializes a new instance of the <see cref="Marker"/> class.
        /// </summary>
        /// <param name="offset">The offset of the marked region.</param>
        /// <param name="length">The length of the marked region.</param>
        /// <param name="markerType">Type of the text marker.</param>
        /// <param name="color">The color of the text marker.</param>
        public Marker(int offset, int length, MarkerType markerType, Color color)
        {
            if (length < 1)
            length = 1;

              _offset = offset;
              _length = length;
              _markerType = markerType;
              _color = color;
        }
コード例 #20
0
        /// <summary>
        /// Initializes a new instance of the <see cref="Marker"/> class.
        /// </summary>
        /// <param name="offset">The offset of the marked region.</param>
        /// <param name="length">The length of the marked region.</param>
        /// <param name="markerType">Type of the text marker.</param>
        /// <param name="color">The color of the text marker.</param>
        /// <param name="foreColor">The foreground color of the text.</param>
        public Marker(int offset, int length, MarkerType markerType, Color color, Color foreColor)
        {
            if (length < 1)
            length = 1;

              _offset = offset;
              _length = length;
              _markerType = markerType;
              _color = color;
              _textColor = foreColor;
              _overrideTextColor = true;
        }
コード例 #21
0
        /// <summary>
        /// Generates a base marker image of the specified type for the provided seed.
        /// </summary>
        /// <param name="type">The type of marker you would like to generate</param>
        /// <param name="seed">The seed for the Random object</param>
        /// <returns>A new base marker image. This is a low resolution image and should be scaled before use.</returns>
        public Bitmap GenerateMarkerImage(MarkerType type, int seed)
        {
            // Decide which type of marker was requested and generate it.
            switch (type)
            {
            case MarkerType.ARToolkit:
                return(GenerateMarkerImage(seed, 32, 8, 1));

            case MarkerType.Vuforia:
            default:
                return(GenerateMarkerImage(seed, 64, 4, 3));
            }
        }
コード例 #22
0
 /// <summary>
 /// Constructor
 /// </summary>
 public PointBreak() : base()
 {
     BreakType     = BreakTypes.PointBreak;
     _markerType   = MarkerType.Simple;
     _fontName     = "Arial";
     _charIndex    = 0;
     _outlineColor = Color.Black;
     _size         = 1.0f;
     _style        = PointStyle.Circle;
     _drawOutline  = true;
     _drawFill     = true;
     _angle        = 0;
 }
コード例 #23
0
        private VertexMarker CreateMarker(MarkerType markerType, PointF point, int index, Figure fig)
        {
            var marker = new VertexMarker
            {
                MarkerType = markerType,
                Cursor     = CursorFactory.GetCursor(UserCursor.MoveAll),
                Position   = point,
                Index      = index,
                Owner      = fig
            };

            return(marker);
        }
コード例 #24
0
        public void CanMissAPlacedShip()
        {
            var testGame = new Game {
                PlayerOne = new Player("one"), PlayerTwo = new Player("two")
            };

            testGame.PlaceShip(testGame.PlayerOne, ShipType.Cruiser, "A1", "A3");
            testGame.PlaceShip(testGame.PlayerTwo, ShipType.Cruiser, "A1", "A3");
            testGame.Start();
            MarkerType markerType = testGame.Call(new BoardCoordinate("B1"));

            Assert.AreEqual(markerType, MarkerType.Miss);
        }
コード例 #25
0
        /// <summary>
        /// Tests if a marker is a marker segment
        /// From ISO 115443-1 A.4: Delimiting markers and marker segments
        /// </summary>
        /// <param name="type"></param>
        /// <returns> True iff the marker belongs to a marker segment</returns>
        public static bool IsSegment(MarkerType type)
        {
            switch (type)
            {
            case MarkerType.SOC:
            case MarkerType.SOD:
            case MarkerType.EOC:
                return(false);

            default:
                return(true);
            }
        }
コード例 #26
0
        public void Update(IPoint loc, string tooltip, MarkerType markertype)
        {
            ToolTipText = tooltip;
            if (markertype != this.type)
            {
                if (type != MarkerType.none)
                {
                    LoadBitmap();
                }
            }

            Location = loc;
        }
コード例 #27
0
        /// <summary>
        /// Constructor for the <see cref="VoteLine"/> class.
        /// </summary>
        /// <param name="prefix">Optional indention prefix for the vote line.</param>
        /// <param name="marker">The vote marker used for the vote line.</param>
        /// <param name="task">The task specified for the vote line.</param>
        /// <param name="content">The content of the vote line.</param>
        /// <param name="markerType">The classification of the marker used for the vote.</param>
        /// <param name="markerValue">The value of the marker used for the vote.</param>
        public VoteLine(string prefix, string marker, string task, string content, MarkerType markerType, int markerValue)
        {
            Prefix      = prefix;
            Marker      = marker;
            Task        = task.Trim();
            Content     = content.Trim();
            MarkerType  = markerType;
            MarkerValue = markerValue;

            Depth        = Prefix.Length;
            CleanContent = VoteLineParser.StripBBCode(Content);
            _hash        = Agnostic.InsensitiveComparer.GetHashCode(CleanContent);
        }
コード例 #28
0
 public Window2DPlot(IEnumerable <PointLight> points, string title, Plot2DType plot2DType, bool closeShape,
                     MarkerType marker) : this(title)
 {
     if (plot2DType == Plot2DType.Line)
     {
         AddLineSeriesToModel(points.ToList(), closeShape, marker);
     }
     else
     {
         AddScatterSeriesToModel(points.ToList(), marker);
     }
     InitializeComponent();
 }
コード例 #29
0
 public Display_Detail_Help_MS1()
 {
     this.mgf_marker    = MarkerType.Plus;
     this.theory_marker = MarkerType.Circle;
     this.other_marker  = MarkerType.Cross;
     this.mgf_color     = OxyColors.Red;
     this.theory_color  = OxyColors.Red;
     this.other_color   = OxyColors.Red;
     this.mgf_size      = 4;
     this.theory_size   = 4;
     this.other_size    = 4;
     this.peak_size     = 2;
 }
コード例 #30
0
        public static bool TryGetMarker(this Expression e, out MarkerType markerType)
        {
            e          = e.StripCasts();
            markerType = MarkerType.None;
            var result = (ExtendedExpressionType)e.NodeType == ExtendedExpressionType.Marker;

            if (result)
            {
                var marker = (MarkerExpression)e;
                markerType = marker.MarkerType;
            }
            return(result);
        }
コード例 #31
0
        /// <summary>
        /// Changes the list style of the text range.
        /// </summary>
        /// <param name="range">The text range to update.</param>
        /// <param name="marker">The list type.</param>
        public static void ChangeList(this ITextRange range, MarkerType marker)
        {
            range.ParagraphFormat.ListType = marker;

            if (marker != MarkerType.None)
            {
                var format = range.ParagraphFormat;

                format.ListStart      = 1;
                format.ListTab        = TabSize;
                format.ListLevelIndex = 1;
            }
        }
コード例 #32
0
 protected MarkerSegment(
     MarkerType type,
     ushort markerLength,
     byte[] markerBody)
 {
     Type          = type;
     _markerLength = markerLength;
     _markerBody   = markerBody;
     // continue to specific class constructor and call Parse there.
     // Parsing is class specific and may need initialization of data
     // members that belong to that class.
     // Parse(); -- keep this comment
 }
コード例 #33
0
        private static ScatterSeries CreateRandomScatterSeries2(int n, string title, MarkerType markerType)
        {
            var series = new ScatterSeries
            {
                Title                 = title,
                MarkerType            = markerType,
                MarkerStroke          = OxyColors.Black,
                MarkerStrokeThickness = 1.0,
            };

            series.Points.AddRange(CreateRandomScatterPoints(n));
            return(series);
        }
コード例 #34
0
 /// <summary>
 /// Renders the marker.
 /// </summary>
 /// <param name="rc">The render context.</param>
 /// <param name="clippingRectangle">The clipping rectangle.</param>
 /// <param name="p">The center point of the marker.</param>
 /// <param name="type">The marker type.</param>
 /// <param name="outline">The outline.</param>
 /// <param name="size">The size of the marker.</param>
 /// <param name="fill">The fill color.</param>
 /// <param name="stroke">The stroke color.</param>
 /// <param name="strokeThickness">The stroke thickness.</param>
 public static void DrawMarker(
     this IRenderContext rc,
     OxyRect clippingRectangle,
     ScreenPoint p,
     MarkerType type,
     IList <ScreenPoint> outline,
     double size,
     OxyColor fill,
     OxyColor stroke,
     double strokeThickness)
 {
     rc.DrawMarkers(clippingRectangle, new[] { p }, type, outline, new[] { size }, fill, stroke, strokeThickness);
 }
コード例 #35
0
        public static TimeSeriesPlotInfo Create(
            TimeSeries series = null,
            Type seriesType   = null,
            string title      = null,
            Color?color       = null,
            Func <DateValue, Color> colorFunction = null,
            Func <Color, string> legendFunction   = null,
            MarkerType markerType = MarkerType.None,
            LineStyle lineStyle   = LineStyle.None,
            int plotOrder         = 0)
        {
            TimeSeriesPlotInfo result = new TimeSeriesPlotInfo
            {
                Series     = series,
                SeriesType = seriesType ?? typeof(FunctionSeries),
                LineStyle  = lineStyle,
                Marker     = markerType
            };

            if (color != null)
            {
                result.Color = color.Value;
            }
            if (colorFunction != null)
            {
                result.ColorFunction = colorFunction;
            }
            if (result.Color == null &&
                result.ColorFunction == null)
            {
                result.Color = Color.Blue;
            }

            if (!string.IsNullOrEmpty(title))
            {
                result.Title = title;
            }
            if (legendFunction != null)
            {
                result.LegendTitleFunction = legendFunction;
            }
            if (string.IsNullOrEmpty(result.Title) &&
                result.LegendTitleFunction == null)
            {
                result.Title = string.IsNullOrEmpty(series?.Name)
                    ? "NO NAME"
                    : series.Name;
            }

            return(result);
        }
コード例 #36
0
        public async Task <int> GetBitmapId(MarkerType type, MarkerColor color)
        {
            var image = await GetImage(type, color);

            var content = new MemoryStream(image.Encode().ToArray());
            int bitmapId;

            lock (BitmapRegistry.Instance)
            {
                bitmapId = BitmapRegistry.Instance.Register(content);
            }

            return(bitmapId);
        }
コード例 #37
0
        public TodoAnnotation(double lat, double lng, bool done)
        {
            // Initialize
            Coordinate = new CLLocationCoordinate2D(new NSNumber(lat).NFloatValue, new NSNumber(lng).NFloatValue);

            if (done)
            {
                Type = MarkerType.Done;
            }
            else
            {
                Type = MarkerType.NotDone;
            }
        }
コード例 #38
0
 public override void Clear()
 {
     tvMarkerType.SelectedNode = null;
     txtName.Text           = string.Empty;
     txtName.Enabled        = true;
     cbSymbol.SelectedIndex = 0;
     cbSymbol.Enabled       = true;
     _imagename             = string.Empty;
     cbSize.SelectedIndex   = 0;
     cbSize.Enabled         = true;
     pbSymbol.Image         = null;
     _markerType            = MarkerTypeHelper.GetNew();
     btnRemove.Enabled      = false;
 }
コード例 #39
0
ファイル: Marker.cs プロジェクト: gipasoft/Sfera
      public Marker(PointLatLng pos, MarkerType type, MarkerColor color)
      {
         this.Position = pos;
         this.Type = type;
         this.Color = color;
         this.Text = string.Empty;
         this.TooltipMode = MarkerTooltipMode.OnMouseOver;
         this.Visible = true;
         this.CustomMarkerAlign = CustomMarkerAlign.MiddleMiddle;
         this.CustomMarkerCenter = Point.Empty;

         this.IsMouseOver = false;
         this.ToolTipOffset = new Point(14, -44);
      }
コード例 #40
0
        private nuint CountByType(IMKAnnotation[] members, MarkerType type)
        {
            nuint count = 0;

            foreach (TodoAnnotation member in members)
            {
                if (member.Type == type)
                {
                    ++count;
                }
            }

            return(count);
        }
コード例 #41
0
        /// <summary>
        /// Создание маркера
        /// </summary>
        /// <param name="type">Тип маркера</param>
        /// <param name="posX">Нормированная координата маркера по горизонтали</param>
        /// <param name="posY">Нормированная координата маркера по вертикали</param>
        /// <param name="cursor">Курсор на маркере</param>
        /// <param name="anchorX">Нормированная координата якоря по горизонтали</param>
        /// <param name="anchorY">Нормированная координата якоря по вертикали</param>
        /// <param name="offsetX">Смещение координаты якоря по горизонтали </param>
        /// <param name="offsetY">Смещение координаты якоря по вертикали</param>
        /// <returns></returns>
        private Marker CreateMarker(MarkerType type, float posX, float posY, UserCursor cursor,
                                    float anchorX, float anchorY, float offsetX = 0, float offsetY = 0)
        {
            var normPoint = new PointF(posX, posY);
            var anchPoint = new PointF(anchorX, anchorY);

            return(new Marker
            {
                MarkerType = type,
                Cursor = CursorFactory.GetCursor(cursor),
                Position = _selection.ToWorldCoordinates(normPoint).Add(new PointF(offsetX, offsetY)),
                AnchorPosition = _selection.ToWorldCoordinates(anchPoint)
            });
        }
コード例 #42
0
        /// <summary>
        /// Initializes a new instance of the <see cref="Marker"/> class.
        /// </summary>
        /// <param name="offset">The offset of the marked region.</param>
        /// <param name="length">The length of the marked region.</param>
        /// <param name="markerType">Type of the text marker.</param>
        /// <param name="color">The color of the text marker.</param>
        /// <param name="foreColor">The foreground color of the text.</param>
        public Marker(int offset, int length, MarkerType markerType, Color color, Color foreColor)
        {
            if (length < 1)
            {
                length = 1;
            }

            _offset            = offset;
            _length            = length;
            _markerType        = markerType;
            _color             = color;
            _textColor         = foreColor;
            _overrideTextColor = true;
        }
コード例 #43
0
        public static void LoadConfig()
        {
            configAbsolutePath = Path.Combine(KSPUtil.ApplicationRootPath, configPath);
            settings           = ConfigNode.Load(configAbsolutePath) ?? new ConfigNode();

            com_reference = (MarkerType)GetValue("com_reference", (int)MarkerType.CoM);
            plugin_mode   = (PluginMode)GetValue("plugin_mode", (int)PluginMode.RCS);
            direction     = (Direction)GetValue("direction", (int)Direction.right);

            menu_vessel_mass = GetValue("menu_vessel_mass", false);
            menu_res_mass    = GetValue("menu_res_mass", false);
            marker_scale     = GetValue("marker_scale", 1f);
            include_rcs      = GetValue("include_rcs", true);
            include_wheels   = GetValue("include_wheels", false);
            eng_include_rcs  = GetValue("eng_include_rcs", false);
            resource_amount  = GetValue("resource_amount", false);
            use_dry_mass     = GetValue("use_dry_mass", true);
            show_marker_com  = GetValue("show_marker_com", true);
            show_marker_dcom = GetValue("show_marker_dcom", true);
            show_marker_acom = GetValue("show_marker_acom", false);
            marker_autoscale = GetValue("marker_autoscale", true);
            menu_minimized   = GetValue("menu_minimized", false);
            applauncher      = GetValue("applauncher", true);
            action_screen    = GetValue("action_screen", false);
            toolbar_plugin   = GetValue("toolbar_plugin", true);
            window_x         = GetValue("window_x", 280);
            window_y         = GetValue("window_y", 114);
            disable_mod_compatibility_check = GetValue("disable_mod_compatibility_check", false);

            /* for these resources, set some defaults */
            resource_cfg ["LiquidFuel"]     = GetValue(resourceKey("LiquidFuel"), false);
            resource_cfg ["Oxidizer"]       = GetValue(resourceKey("Oxidizer"), false);
            resource_cfg ["SolidFuel"]      = GetValue(resourceKey("SolidFuel"), false);
            resource_cfg ["XenonGas"]       = GetValue(resourceKey("XenonGas"), true);
            resource_cfg ["IntakeAir"]      = GetValue(resourceKey("IntakeAir"), true);
            resource_cfg ["Ablator"]        = GetValue(resourceKey("Ablator"), true);
            resource_cfg ["Ore"]            = GetValue(resourceKey("Ore"), false);
            resource_cfg ["MonoPropellant"] = GetValue(resourceKey("MonoPropellant"), true);

            string bodyname = GetValue("selected_body", "Kerbin");

            selected_body = PSystemManager.Instance.localBodies.Find(b => b.name == bodyname);
            if (selected_body == null)
            {
                /* can happen in a corrupted settings.cfg */
                selected_body = Planetarium.fetch.Home;
            }

            Events.ConfigSaving += SaveConfig;
        }
コード例 #44
0
        private Task OnCheckpointPlacementReset()
        {
            ChatHelper.SendMessage("Creator", "Resetting checkpoint edit mode", 255, 120, 0);

            checkpointState        = 0;
            checkpointLastPosition = Vector3.Zero;
            checkpointOffset       = Vector3.Zero;
            checkpointRotation     = 0.0f;
            checkpointSize         = 1.0f;
            checkpointIconCount    = 0;
            checkpointIcon         = MarkerType.ChevronUpx1;

            return(Task.FromResult(0));
        }
コード例 #45
0
        /// <summary>
        ///     Constructs an observable that tracks the value of a given
        ///     marker.
        ///     <para>
        ///         The marker value is the most recent of 0, the last
        ///         marker value announced by the event feed, and
        ///         a constant marker of 0 emitted very time a non-text,
        ///         non-audio track is loaded.
        ///     </para>
        /// </summary>
        /// <param name="marker">
        ///     The marker whose value is being computed.
        /// </param>
        /// <returns>
        ///     An <see cref="IObservable{T}"/> that computes the
        ///     value of <paramref name="marker"/>
        /// </returns>
        private IObservable <uint> MarkerValue(MarkerType marker)
        {
            var directChanges =
                from x in PlaybackEvents.ObserveMarker
                where x.Marker == marker
                select x.NewValue;

            var trackLoadZero =
                from x in PlaybackEvents.ObserveTrackLoad
                where !x.Track.IsTextItem && !x.Track.IsAudioItem
                select 0u;

            return(directChanges.Merge(trackLoadZero));
        }
コード例 #46
0
    //상대방이 Cell을 선택했을 경우
    void EventSelected(SocketIOEvent e)
    {
        //상대가 어느 위치를 선택했는지 인덱스로 알수 있다.
        int index = -1;

        e.data.GetField(ref index, "index");

        //상대가 무슨 모양을 했는지 보여주는것          플레이어 마커타입이 써클이라면 써클, 아니라면 크로스
        MarkerType markerType = (playerMarkerType == MarkerType.Circle) ? MarkerType.Cross : MarkerType.Circle;

        cells[index].GetComponent <Cell>().MarkerType = markerType;

        CurrentState = GameState.playerTurn;
    }
コード例 #47
0
 private static Series CreateRandomLineSeries(int n, string title, MarkerType markerType)
 {
     var s1 = new LineSeries { Title = title, MarkerType = markerType, MarkerStroke = OxyColors.Black, MarkerStrokeThickness = 1.0 };
     double x = 0;
     double y = 0;
     for (int i = 0; i < n; i++)
     {
         x += 2 + Randomizer.NextDouble() * 10;
         y += 1 + Randomizer.NextDouble();
         var p = new DataPoint(x, y);
         s1.Points.Add(p);
     }
     return s1;
 }
コード例 #48
0
    private GameObject GetMarker(MarkerType mType)
    {
        switch (mType)
        {
        case MarkerType.O:
            return(m_oMarker);

        case MarkerType.X:
            return(m_oMarker);

        default:
            return(null);
        }
    }
コード例 #49
0
ファイル: Marker.cs プロジェクト: koflin/Chess
    public Marker(MarkerType type)
    {
        if (type == MarkerType.CHECK)
        {
            this.IsChoosable = false;
        }

        else
        {
            this.IsChoosable = true;
        }

        this.Type = type;
    }
コード例 #50
0
        public static void ActivateMarkerOnMouse(MarkerType markerType)
        {
            if (CachedDidHit)
            {
                PlayerManager.OrderMarker.PlayOneShot(CachedHit.point, CachedHit.normal, markerType);
                return;
            }
            Vector3 hitPoint = CachedRay.origin - CachedRay.direction * (CachedRay.origin.y / CachedRay.direction.y);

            if (PlayerManager.OrderMarker != null)
            {
                PlayerManager.OrderMarker.PlayOneShot(hitPoint, Vector3.up, markerType);
            }
        }
コード例 #51
0
        public Window2DPlot(IEnumerable <IEnumerable <IEnumerable <Vector2> > > listofListOfListOfPoints,
                            string title, Plot2DType plot2DType, bool closeShape, MarkerType marker) : this(title)
        {
            var i = 0;

            var colorPalet = Presenter.ColorPalette();
            var maxLength  = colorPalet.Length;
            foreach (var listOfListOfPoints in listofListOfListOfPoints)
            {
                if (plot2DType == Plot2DType.Line)
                {
                    //Set each list of points as its own color.
                    //Close each list of points
                    foreach (var points in listOfListOfPoints)
                    {
                        var color = new Color(colorPalet[i]);
                        i++;
                        if (i == maxLength)
                        {
                            i = 0;
                        }
                        var series = new LineSeries
                        {
                            MarkerType = marker,
                            Color      = OxyColor.FromRgb(color.R, color.G, color.B)
                        };
                        foreach (var point in points)
                        {
                            series.Points.Add(new DataPoint(point.X, point.Y));
                        }
                        if (closeShape)
                        {
                            series.Points.Add(new DataPoint(points.First().X, points.First().Y));
                        }
                        Model.Series.Add(series);
                    }
                }
                else
                {
                    foreach (var points in listOfListOfPoints)
                    {
                        AddScatterSeriesToModel(points, marker);
                    }
                }
            }
            SetAxes(listofListOfListOfPoints.SelectMany(poly => poly.SelectMany(v => v)));
            InitializeComponent();
            Title = title;
        }
コード例 #52
0
ファイル: Settings.cs プロジェクト: ZiwKerman/RCSBuildAid
        public static void LoadConfig ()
        {
            configAbsolutePath = Path.Combine (KSPUtil.ApplicationRootPath, configPath);
            settings = ConfigNode.Load (configAbsolutePath) ?? new ConfigNode ();

            com_reference = (MarkerType)GetValue ("com_reference", (int)MarkerType.CoM);
            plugin_mode = (PluginMode)GetValue ("plugin_mode", (int)PluginMode.RCS);
            direction = (Direction)GetValue ("direction", (int)Direction.right);

            menu_vessel_mass = GetValue ("menu_vessel_mass", false);
            menu_res_mass    = GetValue ("menu_res_mass"   , false);
            marker_scale     = GetValue ("marker_scale"    , 1f   );
            include_rcs      = GetValue ("include_rcs"     , true );
            include_wheels   = GetValue ("include_wheels"  , false);
            eng_include_rcs  = GetValue ("eng_include_rcs" , false);
            resource_amount  = GetValue ("resource_amount" , false);
            use_dry_mass     = GetValue ("use_dry_mass"    , true );
            show_marker_com  = GetValue ("show_marker_com" , true );
            show_marker_dcom = GetValue ("show_marker_dcom", true );
            show_marker_acom = GetValue ("show_marker_acom", false);
            marker_autoscale = GetValue ("marker_autoscale", true );
            menu_minimized   = GetValue ("menu_minimized"  , false);
            applauncher      = GetValue ("applauncher"     , true );
            action_screen    = GetValue ("action_screen"   , false);
            toolbar_plugin   = GetValue ("toolbar_plugin"  , true );
            window_x         = GetValue ("window_x"        , 280  );
            window_y         = GetValue ("window_y"        , 114  );

            /* for these resources, set some defaults */
            resource_cfg ["LiquidFuel"] = GetValue (resourceKey ("LiquidFuel"), false);
            resource_cfg ["Oxidizer"]   = GetValue (resourceKey ("Oxidizer")  , false);
            resource_cfg ["SolidFuel"]  = GetValue (resourceKey ("SolidFuel") , false);
            resource_cfg ["XenonGas"]   = GetValue (resourceKey ("XenonGas")  , true );
            resource_cfg ["IntakeAir"]  = GetValue (resourceKey ("IntakeAir") , true );
            resource_cfg ["Ablator"]    = GetValue (resourceKey ("Ablator")   , true );
            resource_cfg ["Ore"]        = GetValue (resourceKey ("Ore")       , false );
            resource_cfg ["MonoPropellant"] = GetValue (resourceKey ("MonoPropellant"), true);

            string bodyname = GetValue ("selected_body", "Kerbin");
            selected_body = PSystemManager.Instance.localBodies.Find (b => b.name == bodyname);
            if (selected_body == null) {
                /* can happen in a corrupted settings.cfg */
                selected_body = Planetarium.fetch.Home;
            }

            Events.ConfigSaving += SaveConfig;
        }
コード例 #53
0
    private static string[] ReadDataSetTrackerName(MarkerType markerType)
    {
        string[] result = new string[2];
        string datasetPath;
        if (markerType == MarkerType.IMAGE)
        {
            datasetPath = IMAGE_DATASET_PATH;
        }
        else
        {
            datasetPath = OBJECT_DATASET_PATH;
        }

        //Get DataSet name
        string[] tempArray = Directory.GetDirectories(Application.dataPath + datasetPath );
        
        if (tempArray.Length == 0)
        {
            EditorApplication.Exit(INVALID_PACKAGE_ERROR_CODE);
        }

        result[0] = Path.GetFileName(tempArray[0]);
        string temp = tempArray[0];
        

        //Get target Name
        tempArray = Directory.GetFiles(temp);
        if (tempArray.Length == 0)
        {
            EditorApplication.Exit(INVALID_PACKAGE_ERROR_CODE);
        }
        temp = Path.GetFileNameWithoutExtension(tempArray[0]);
        
      
        if (temp.Substring(temp.Length - 7, 7).Equals("_scaled"))
        {
            temp = temp.Substring(0, temp.Length-7);
        }

        result[1] = temp;

        return result;
    }
コード例 #54
0
        public static PlotModel CreateRandomScatterSeriesWithColorAxisPlotModel(int n, OxyPalette palette, MarkerType markerType = MarkerType.Square, AxisPosition colorAxisPosition = AxisPosition.Right, OxyColor highColor = null, OxyColor lowColor = null)
        {
            var model = new PlotModel(string.Format("ScatterSeries (n={0})", n)) { Background = OxyColors.LightGray };
            model.Axes.Add(new ColorAxis { Position = colorAxisPosition, Palette = palette, Minimum = -1, Maximum = 1, HighColor = highColor, LowColor = lowColor });

            var s1 = new ScatterSeries
            {
                MarkerType = markerType,
                MarkerSize = 6,
            };
            var random = new Random();
            for (int i = 0; i < n; i++)
            {
                double x = random.NextDouble() * 2.2 - 1.1;
                s1.Points.Add(new ScatterPoint(x, random.NextDouble()) { Value = x });
            }

            model.Series.Add(s1);
            return model;
        }
コード例 #55
0
ファイル: BaseController.cs プロジェクト: dcollioni/BrMobi
        protected string GetMarkerInfoTemplate(MarkerType markerType)
        {
            string infoHtmlPath = string.Empty;

            switch (markerType)
            {
                case MarkerType.Bus:
                    infoHtmlPath = WebConfigurationManager.AppSettings["BusInfoHtmlPath"];
                    break;
                case MarkerType.RideOffer:
                    infoHtmlPath = WebConfigurationManager.AppSettings["RideOfferInfoHtmlPath"];
                    break;
                case MarkerType.RideRequest:
                    infoHtmlPath = WebConfigurationManager.AppSettings["RideRequestInfoHtmlPath"];
                    break;
                case MarkerType.Help:
                    infoHtmlPath = WebConfigurationManager.AppSettings["HelpInfoHtmlPath"];
                    break;
            }

            return ReadHtmlFile(string.Concat("~", infoHtmlPath)).ToString();
        }
コード例 #56
0
    public void PlayOneShot(Vector3 pos, Vector3 norm, MarkerType markerType)
    {
        if (markerType == MarkerType.None) return;
        renderer.gameObject.SetActiveIfNot (true);

        transform.position = pos;
        switch (markerType)
        {
        case MarkerType.Neutral:
            material.color = NeutralColor;
            break;
        case MarkerType.Friendly:
            material.color = FriendlyColor;
            break;
        case MarkerType.Aggresive:
            material.color = AggresiveColor;
            break;
        }
        animation.Stop ();
        animation.Play ();
        transform.up = norm;
        //UnityEditor.EditorApplication.isPaused = true;
    }
コード例 #57
0
    private static void SetupVuforiaTools(MarkerType markerType)
    {
        Scene currentScene = EditorSceneManager.NewScene(NewSceneSetup.EmptyScene);
        ARCamera = Instantiate(FileLoader.LoadVuforia(AR_CAMERA_PREFAB_NAME));
        string[] dataSetTrackerName = ReadDataSetTrackerName(markerType);
        Vuforia.DatabaseLoadBehaviour vuforiaTrackerPackage = ARCamera.GetComponent<Vuforia.DatabaseLoadBehaviour>();
        vuforiaTrackerPackage.SetupDataSets(dataSetTrackerName[0]);
        if(markerType == MarkerType.IMAGE){
            marker2d = Instantiate(FileLoader.LoadVuforia(IMAGE_TARGET_PREFAB_NAME));
            Vuforia.ImageTargetBehaviour imageTargetBehaviour = marker2d.GetComponent<Vuforia.ImageTargetBehaviour>();
            imageTargetBehaviour.ChangeImageTarget(dataSetTrackerName[0],dataSetTrackerName[1]);
        }
        else{
            marker3d = Instantiate(FileLoader.LoadVuforia(OBJECT_TARGET_PREFAB_NAME));
            Vuforia.ObjectTargetBehaviour objectTargetBehavior = marker3d.GetComponent<Vuforia.ObjectTargetBehaviour>();
            objectTargetBehavior.ChangeImageTarget(dataSetTrackerName[0], dataSetTrackerName[1]);
        }
 
       
    }
コード例 #58
0
ファイル: Ocr.cs プロジェクト: nico-izo/KOIB
 public int GetOnlineMarker(MarkerType mtMarkerType)
 {
     try
     {
         int res;
         switch( mtMarkerType )
         {
             case MarkerType.Standard:
                 res = OnlineDefStandartMarker();
                 break;
             case MarkerType.Digital:
                 res = OnlineDefCharMarker();
                 break;
             default:
                 SetError(ErrorCode.IllegalUse, "GetOnlineMarker: неверный тип маркера: " + mtMarkerType);
                 res = -1;
                 break;
         }
         return res;
     }
     catch (Exception ex)
     {
         SetError(ErrorCode.UnexpectedError, "GetOnlineMarker: " + ex);
         throw;
     }
 }
コード例 #59
0
ファイル: Ocr.cs プロジェクト: nico-izo/KOIB
 public int EndRecognize(MarkerType mtMarkerType)
 {
     lock (s_runSync)
     {
         try
         {
             if (!_isRunningNow)
                 return _endRecognitionLastResult;
             _isRunningNow = false;
             _endRecognitionLastResult = -1;
             _endRecognitionLastResult = EndRecognition(mtMarkerType, _lastLines[0], _lastLines[1]);
             return _endRecognitionLastResult;
         }
         catch (Exception ex)
         {
             SetError(ErrorCode.UnexpectedError, "EndRecognize: " + ex);
             throw;
         }
     }
 }
コード例 #60
0
ファイル: Ocr.cs プロジェクト: nico-izo/KOIB
 internal static extern int EndRecognition(MarkerType DoIt, int y0, int y1);