private async Task LoadAsync() { Permission userPermission; (Model, Owner, userPermission) = await Api.GetEntryAsync(EntryId); UpdateOriginal(); Log.Debug($"Entry user permission '{userPermission}'."); Permissions.IsEditable = UserState.IsEditable && userPermission == Permission.Write; Permissions.IsOwner = UserState.UserId == Owner.Id; Markers.Clear(); foreach (var location in Model.Locations) { Markers.Add(new MapMarkerModel { Latitude = location.Latitude, Longitude = location.Longitude, Altitude = location.Altitude, IsEditable = true }); } if (Log.IsDebugEnabled()) { Log.Debug($"Load, markers: {Markers.Count}, entry locations: {Model.Locations.Count}."); Log.Debug(Json.Serialize(Markers)); } }
public override IThing FittingMarker(object data) { if (data == null) { return(null); } var marker = base.FittingMarker(data); if (marker != null) { return(marker); } var graph = this.Graph.ThingGraph(); if (graph == null) { return(null); } marker = graph.GetByData(data).FirstOrDefault(); if (marker != null && !Markers.Contains(marker)) { Markers.Add(marker); } return(marker); }
public void MarkersAddRange(Dictionary <string, Type> markers) { foreach (var marker in markers) { Markers.Add(marker.Key, marker.Value); } }
public void AddMarker(bool editText = false, int?frame = null) { // feos: we specify the selected frame if we call this from TasView, otherwise marker should be added to the emulated frame var markerFrame = frame ?? Global.Emulator.Frame; if (editText) { InputPrompt i = new InputPrompt { Text = "Marker for frame " + markerFrame, TextInputType = InputPrompt.InputType.Text, Message = "Enter a message", InitialValue = Markers.IsMarker(markerFrame) ? Markers.PreviousOrCurrent(markerFrame).Message : "" }; var result = i.ShowHawkDialog(); if (result == DialogResult.OK) { Markers.Add(new TasMovieMarker(markerFrame, i.PromptText)); UpdateValues(); } } else { Markers.Add(new TasMovieMarker(markerFrame, "")); UpdateValues(); } }
void AddExplosion(vec2 Pos, vec2 Size) { vec2 size = vec(1.266f, 1.35f) * Size * CellWorldSize; Markers.Add(new Marker(this, Pos, size, ExsplosionSprite, -1f, frames: ExplosionSpriteSheet.AnimLength, DrawOrder: DrawOrder.AfterTiles, frame_length: .066f)); Markers.Add(new Marker(this, Pos, size, ExsplosionSprite, -1f, frames: ExplosionSpriteSheet.AnimLength, DrawOrder: DrawOrder.AfterUnits, frame_length: .066f, alpha: 1)); }
internal void MoveMarker(int?index, double latitude, double longitude, double?altitude) { if (!IsEditable) { return; } Log.Debug($"MoveMarker: {index?.ToString() ?? "<null>"}, {latitude}, {longitude}, {altitude}"); MapMarkerModel marker; if (index == null) { Markers.Add(marker = new MapMarkerModel() { IsEditable = true }); } else { marker = Markers[index.Value]; } if (marker.IsEditable) { marker.Latitude = latitude; marker.Longitude = longitude; marker.Altitude = altitude; MarkersChanged?.Invoke(); } }
void AddBuildBuildingEffect(vec2 GridCoord) { vec2 size = 6 * vec(1.266f, 1.35f) * CellWorldSize; vec2 pos = GridToWorldCood(floor(GridCoord)) + new vec2(CellWorldSize.x, -CellWorldSize.y) / 2; Markers.Add(new Marker(this, pos, size, Assets.SmokeTexture, -1f, frames: 4, DrawOrder: DrawOrder.AfterUnits, alpha: 1, dsize_dt: vec(.01f, .01f))); }
public void BuildAutomaticPoints() { ClearAll(); if (!IntervalSettings.isAuto) { Markers.Add(((IntervalSettings.PointsQuantity - 1) / 2) + 1); CenterFrequencys.Add(IntervalSettings.HandCenterFrequency); } else { if (IntervalSettings.FrequencyInnerStep <= 0) { MessageBox.Show("ШАГ СКАНИРОВАНИЯ ДОЛЖЕН БЫТЬ БОЛЬШЕ 0"); return; } if (IntervalSettings.FrequencyStart > IntervalSettings.FrequencyStop) { MessageBox.Show("КОНЕЦ ДИАПАЗОНА ДОЛЖЕН БЫТЬ БОЛЬШЕ НАЧАЛА ДИАПАЗОНА"); return; } long CurrentCenterFrequency; long innerStepQuantity = (IntervalSettings.FrequencyStop - IntervalSettings.FrequencyStart) / IntervalSettings.FrequencyInnerStep; if (innerStepQuantity <= IntervalSettings.PointsQuantity - 1) { IntervalSettings.Span = IntervalSettings.FrequencyStop - IntervalSettings.FrequencyStart; CurrentCenterFrequency = IntervalSettings.FrequencyStart + IntervalSettings.Span / 2; CenterFrequencys.Add(CurrentCenterFrequency); for (int counter = 0; counter <= innerStepQuantity; counter++) { Markers.Add(counter * ((IntervalSettings.PointsQuantity - 1) / (int)innerStepQuantity)); } } else { IntervalSettings.Span = (IntervalSettings.PointsQuantity - 1) * IntervalSettings.FrequencyInnerStep; CurrentCenterFrequency = IntervalSettings.FrequencyStart + IntervalSettings.Span / 2; CenterFrequencys.Add(CurrentCenterFrequency); while ((CurrentCenterFrequency + IntervalSettings.Span / 2) < IntervalSettings.FrequencyStop) { CurrentCenterFrequency += IntervalSettings.Span; CenterFrequencys.Add(CurrentCenterFrequency); } for (int counter = 0; counter <= innerStepQuantity; counter++) { Markers.Add(counter); } } } }
public void DuplicatePlot(ShipTrackGmapPlotViewModel vm) { foreach (var marker in vm.Markers) { Markers.Add(marker); } }
void AddSummonUnitEffect(vec2 GridCoord) { vec2 size = vec(1.266f, 1.35f) * 2 * CellWorldSize; vec2 pos = GridToWorldCood(floor(GridCoord)) + new vec2(CellWorldSize.x, -CellWorldSize.y) / 2; Markers.Add(new Marker(this, pos, size, Assets.MagicTexture, -1f, frames: 4, DrawOrder: DrawOrder.AfterTiles, dsize_dt: vec(.002f, .002f))); Markers.Add(new Marker(this, pos, size, Assets.MagicTexture, -1f, frames: 4, DrawOrder: DrawOrder.AfterUnits, dsize_dt: vec(.002f, .002f), alpha: 1)); }
void AddSummonAreaEffect(vec2 pos, vec2 area) { vec2 cell_size = 2 * (1 / DataGroup.GridSize); vec2 size = vec(1.266f, 1.35f) * area * cell_size; Markers.Add(new Marker(this, pos, size, Assets.MagicTexture, alpha_fade: -1.5f, frames: 4, frame_length: .1375f, DrawOrder: DrawOrder.AfterTiles, dsize_dt: .65f * size)); Markers.Add(new Marker(this, pos, size, Assets.MagicTexture, alpha_fade: -1.5f, frames: 4, frame_length: .1375f, DrawOrder: DrawOrder.AfterUnits, dsize_dt: .65f * size, alpha: 1)); }
public override void StartNewRecording() { ClearTasprojExtras(); Markers.Add(0, StartsFromSavestate ? "Savestate" : "Power on"); ChangeLog = new TasMovieChangeLog(this); base.StartNewRecording(); }
/// <summary> /// Adds a textMarker to the Markers list /// </summary> /// <param name="list">Entries that will be binded to the TextMarker</param> /// <param name="author">Author of the TextMarker</param> /// <param name="message">Message of the Textmarker</param> /// <returns></returns> public TextMarker AddTextMarker(List <LogEntry> list, string author, string message) { var marker = new TextMarker(list, author, message); Markers.Add(marker); return(marker); }
private bool Get3DSettings() { bool getstatus = mProtocol.Get3Dsettings(); if (getstatus) { mUpAxis = mProtocol.Settings3D.axisUpwards; Rotation.ECoordinateAxes xAxis, yAxis, zAxis; Rotation.GetCalibrationAxesOrder(mUpAxis, out xAxis, out yAxis, out zAxis); mCoordinateSystemChange = Rotation.GetAxesOrderRotation(xAxis, yAxis, zAxis); // Save marker settings mMarkers.Clear(); foreach (Settings3DLabel marker in mProtocol.Settings3D.labels3D) { LabeledMarker newMarker = new LabeledMarker(); newMarker.Label = marker.Name; newMarker.Position = Vector3.zero; newMarker.Color.r = (marker.ColorRGB) & 0xFF; newMarker.Color.g = (marker.ColorRGB >> 8) & 0xFF; newMarker.Color.b = (marker.ColorRGB >> 16) & 0xFF; newMarker.Color /= 255; newMarker.Color.a = 1F; Markers.Add(newMarker); } // Save bone settings if (mProtocol.Settings3D.bones != null) { Bones.Clear(); //Save bone settings foreach (var settingsBone in mProtocol.Settings3D.bones) { Bone bone = new Bone(); bone.From = settingsBone.from; bone.FromMarker = GetMarker(settingsBone.from); bone.To = settingsBone.to; bone.ToMarker = GetMarker(settingsBone.to); bone.Color.r = (settingsBone.color) & 0xFF; bone.Color.g = (settingsBone.color >> 8) & 0xFF; bone.Color.b = (settingsBone.color >> 16) & 0xFF; bone.Color /= 255; bone.Color.a = 1F; mBones.Add(bone); } } return(true); } return(false); }
private void BuildForTangerine() { int[] markerFrames = { 0, 10, 20, 30, 40 }; string[] makerIds = { "Normal", "Focus", "Press", "Release", "Disable" }; for (var i = 0; i < 5; i++) { Markers.Add(new Marker(makerIds[i], markerFrames[i], MarkerAction.Stop)); } }
private void LoadPoints(IEnumerable <string> lines) { foreach (var line in lines) { var fields = line.Split(';'); Markers.Add(new Marker { Id = fields[2], Description = fields[3] }); } }
public void SetDefaultValues(Node NodeOne, Node NodeTwo) { Y = (NodeOne.Y + NodeTwo.Y) / 2; XStart = Drawing.GetSizeF(NodeOne).Width / 2 / Converter.Scale; XEnd = Drawing.GetSizeF(NodeTwo).Width / 2 / Converter.Scale; LinePoints = RefreshPoints(NodeOne, NodeTwo); Markers.Add(Utils.MarkerType.Center, new PointF((CenterE.X + End.X) / 2, Converter.YYtoJJ(Y))); Markers.Add(Utils.MarkerType.CenterStart, new PointF(Start.X, (Start.Y + CenterS.Y) / 2)); Markers.Add(Utils.MarkerType.CenterEnd, new PointF(End.X, (End.Y + CenterE.Y) / 2)); }
private void AddMarker(MapPin pin) { using (var op = new MarkerOptions()) { op.SetTitle(pin.Label); op.SetPosition(pin.Position.ToLatLng()); op.SetIcon(BitmapDescriptorFactory.DefaultMarker(pin.Color.ToAndroidMarkerHue())); var marker = NativeMap.AddMarker(op); pin.Id = marker.Id; Markers.Add(pin, marker); } }
public override void SetMarkers(IGraph <IVisual, IVisualEdge> source) { this.Markers = new IThing[] { }; var graph = source.ThingGraph(); if (graph != null) { SetMarkers(graph.Markers()); if (!this.Markers.Contains(DefaultMarker) && DefaultMarker != null) { Markers.Add(DefaultMarker); } } }
private void AddMarker(Marker marker) { if (marker is Polyline) { AddPolyline(marker as Polyline); return; } MarkerAnnotation annotation = new MarkerAnnotation(marker); Control.AddAnnotation(annotation); Markers.Add(marker, annotation); marker.PropertyChanged += Marker_PropertyChanged; }
public bool AddMarker(Marker marker) { Markers.Add(marker); if (Markers.Count > 2 && Markers[0].Bounds.IntersectsWith(Markers[Markers.Count - 1].Bounds)) { ContourReady = true; Markers.RemoveAt(Markers.Count - 1); return(true); } return(false); }
private void CalculateMarkers() { Markers.Clear(); Markers.Add(new ZeroLine(_context, Resource.Drawable.zeroline1, (int)Grid.EndWidth, (int)Grid.StartWidth, (int)(Grid.Height / 2.3))); Markers.Add(new ZeroLine(_context, Resource.Drawable.zeroline2, (int)Grid.EndWidth, (int)Grid.StartWidth, (int)(Grid.Height / 1.7))); Markers.Add(new YMarker(_context, Resource.Drawable.markera, Grid.EndWidth, (int)(Grid.Height / 3))); Markers.Add(new YMarker(_context, Resource.Drawable.markerb, Grid.EndWidth, (int)(Grid.Height * 0.75))); Markers.Add(new TriggerMarker(_context, Resource.Drawable.markertriggerup, Resource.Drawable.markertriggerdown, Grid.EndWidth, (int)(Grid.Height / 4))); Markers.Add(new XMarker(_context, Resource.Drawable.marker1, (int)Grid.EndHeight, (int)(Grid.Width / 3))); Markers.Add(new XMarker(_context, Resource.Drawable.marker2, (int)Grid.EndHeight, (int)(Grid.Width * 0.75))); }
public override IThing CreateMarker(object data) { if (Transformer != null) { var marker = Transformer.ThingFactory.CreateItem(data); if (!Markers.Contains(marker)) { Markers.Add(marker); } return(marker); } return(null); }
public MarkerGroup(CacheBase Cache, int Address) { EndianReader Reader = Cache.Reader; Reader.SeekTo(Address); Name = Cache.Strings.GetItemByID(Reader.ReadInt32()); int iCount = Reader.ReadInt32(); int iOffset = Reader.ReadInt32() - Cache.Magic; for (int i = 0; i < iCount; i++) { Markers.Add(new Marker(Cache, iOffset + 48 * i)); } }
public OverworldMap() : base() { _eventAggregator.Subscribe(this); MapProvider = new OverworldMapProvider(); Position = new PointLatLng(0, 0); Manager.Mode = AccessMode.ServerOnly; DragButton = MouseButton.Left; MouseWheelZoomType = MouseWheelZoomType.MousePositionWithoutCenter; ShowCenter = false; MinZoom = 0; MaxZoom = 6; IgnoreMarkerOnMouseWheel = true; Overlay = new LocationBorderOverlay(new PointLatLng(90, -180)); Markers.Add(Overlay); OnMapZoomChanged += OverworldMap_OnMapZoomChanged; PreviewMouseDoubleClick += OverworldMap_PreviewMouseDoubleClick; }
protected override void LoadFields(ZipStateLoader bl, bool preload) { LoadBk2Fields(bl, preload); if (!preload) { if (MovieService.IsCurrentTasVersion(Header[HeaderKeys.MovieVersion])) { LoadTasprojExtras(bl); } else { Session.PopupMessage("The current .tasproj is not compatible with this version of BizHawk! .tasproj features failed to load."); Markers.Add(0, StartsFromSavestate ? "Savestate" : "Power on"); } } }
private async Task LoadAsync() { Entries = await Api.GetMapListAsync(); Markers.Clear(); foreach (var entry in Entries) { Markers.Add(new MapMarkerModel() { Latitude = entry.Location.Latitude, Longitude = entry.Location.Longitude, Altitude = entry.Location.Altitude, Title = entry.Title }); } IsLoading = false; }
/// <summary> /// Adds new marker rule /// </summary> /// <param name="item">The item.</param> public void Add(IRegexMarker item) { if (item == null) { return; } if (item.marker == null) { //item.marker = defaultMarker; } if (!Index.ContainsKey(item.marker)) { Index.Add(item.marker, item); } Markers.Add(item); }
public MarkerGroup(CacheBase Cache, int Address) { EndianReader Reader = Cache.Reader; Reader.SeekTo(Address); Name = Reader.ReadNullTerminatedString(32); Reader.ReadInt16(); Reader.SeekTo(Address + 0x34); int iCount = Reader.ReadInt32(); int iOffset = Reader.ReadInt32() - Cache.Magic; for (int i = 0; i < iCount; i++) { Markers.Add(new Marker(Cache, iOffset + 32 * i)); } }
public void CreateMarker(int type, MultiVShared.Vector3 position, MultiVShared.Vector3 rotation, MultiVShared.Vector3 dir, MultiVShared.Vector3 scale, int r, int g, int b, int a, int netHandle) { if (!Markers.ContainsKey(netHandle)) { Markers.Add(netHandle, new MarkerProperties() { MarkerType = type, Position = position, Rotation = rotation, Direction = dir, Scale = scale, Red = r, Green = g, Blue = b, Alpha = (byte)a, }); } }