private void ClearTasprojExtras() { LagLog.Clear(); StateManager.Clear(); Markers.Clear(); ChangeLog.ClearLog(); }
public void Clear() { MathItems.Clear(); Cursors.Clear(); Markers.Clear(); Traces.Clear(); }
private void ClearTasprojExtras() { _lagLog.Clear(); _stateManager.ClearStateHistory(); Markers.Clear(); ChangeLog.ClearLog(); }
private void _LayerCollectionChanged(object sender, System.Collections.Specialized.NotifyCollectionChangedEventArgs e) { ObservableCollection <LayerClass> layers = (ObservableCollection <LayerClass>)sender; switch (e.Action) { case NotifyCollectionChangedAction.Add: _InsertMarkers(layers, e.NewItems.Cast <LayerClass>(), e.NewStartingIndex); break; case NotifyCollectionChangedAction.Move: case NotifyCollectionChangedAction.Replace: _RemoveMarkers(layers, e.OldItems.Count, e.OldStartingIndex); _InsertMarkers(layers, e.NewItems.Cast <LayerClass>(), e.NewStartingIndex); break; case NotifyCollectionChangedAction.Remove: _RemoveMarkers(layers, e.OldItems.Count, e.OldStartingIndex); break; case NotifyCollectionChangedAction.Reset: Markers.Clear(); break; } }
public void ClearAll() { SignalClear(); NoiseClear(); Frequencys.Clear(); CenterFrequencys.Clear(); Markers.Clear(); }
public void ClearData() { MathItems.Clear(); Cursors.Clear(); Markers.Clear(); foreach (var v in Traces) { v.Points.Clear(); } }
private void ClearMarkers() { // Remove all markers foreach (var marker in Markers) { marker.Value.Remove(); marker.Value.Dispose(); UnbindPin(marker.Key); } Markers.Clear(); }
public void Clear() { lock (_syncObject) { previousPosition = null; // clean up any previously active markers that are no longer in the markers list or are out of range foreach (var marker in previouslyActiveMarkers.ToList()) { OnMarkerLeft(marker); previouslyActiveMarkers.Remove(marker); } Markers.Clear(); } }
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 void Draw(GameTime gameTime) { spriteBatch.Begin(); foreach (var marker in Markers) { marker.Draw(spriteBatch); } spriteBatch.End(); if (Clear) { Markers.Clear(); } }
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; }
//Loads the cache into the current data, without deleting the cache public void RestoreCache() { Name = CachedName; Moves.Clear(); Moves.AddRange(CachedMoves); Passive = CachedPassive; Picture = CachedPicture; Dead = CachedDead; TotalHP = CachedTotalHP; CurrentHP = CachedCurrentHP; TotalActions = CachedTotalActions; Actions = CachedActions; IsPuppet = CachedIsPuppet; CanPassTurn = CachedCanPassTurn; DeathMessage = CachedDeathMessage; Effects.Clear(); Effects.AddRange(Effects); Markers.Clear(); Markers.AddRange(CachedMarkers); }
private async Task LoadAsync() { Permission userPermission; (Model, Owner, userPermission) = await Api.GetImageAsync(EntryId, ImageId); UpdateOriginal(); Permissions.IsOwner = Model.UserId == UserState.UserId; Permissions.IsEditable = userPermission == Permission.Write; Markers.Clear(); Markers.Add(new MapMarkerModel { Latitude = Model.Location.Latitude, Longitude = Model.Location.Longitude, Altitude = Model.Location.Altitude, IsEditable = true }); }
//Copies all essential elements from one card to this one public void CopyCard(BasicCard card) { Name = card.Name; Moves.Clear(); Moves.AddRange(card.Moves); Passive = card.Passive; Picture = card.Picture; HasUltimate = card.HasUltimate; HasPassive = card.HasPassive; Dead = card.Dead; TotalHP = card.TotalHP; CurrentHP = card.CurrentHP; TotalActions = card.TotalActions; Actions = card.Actions; IsPuppet = card.IsPuppet; CanPassTurn = card.CanPassTurn; DeathMessage = card.DeathMessage; Effects.Clear(); Effects.AddRange(card.Effects); Markers.Clear(); Markers.AddRange(card.Markers); }
public override void Draw() { FindMaxMinValue(); foreach (Shape lPoint in Markers) { Canvas.Children.Remove(lPoint); } Markers.Clear(); foreach (KeyValuePair <int, double> lPoint in Values) { Point lPosition = FindChartPlot(lPoint); Console.WriteLine("New Point - {0}", lPosition); ValuePoint lNewValuePoint = new ValuePoint() { Position = lPosition, Stroke = Brushes.Blue, Fill = Brushes.Blue, }; Markers.Add(lNewValuePoint); Canvas.Children.Add(lNewValuePoint); } }
public override void Draw() { FindMaxMinValue(); foreach (Shape lColumn in Markers) { Canvas.Children.Remove(lColumn); } Markers.Clear(); double lWidth = FindChartPlot(Values[0]).X; foreach (KeyValuePair <int, double> lPoint in Values) { Point lPosition = FindChartPlot(lPoint); Console.WriteLine("New Point - {0}", lPosition); ValueShape lColumn = new ValueColumn { ColumnWidth = lWidth - 10, Position = lPosition, Stroke = Brushes.Blue, Fill = Brushes.DodgerBlue, }; Markers.Add(lColumn); Canvas.Children.Add(lColumn); } }
/// <summary> /// Метод строит маркеры у объекта Selection /// </summary> private void BuildMarkers() { // стираем предыдущие маркеры Markers.Clear(); // если ничего не выбрано, выходим if (Selection.Count == 0) { return; } switch (_editorMode) { case EditorMode.Warp: //создаём маркеры искажения по горизонтали и по вертикали if (_selection.Geometry.AllowedOperations.HasFlag(AllowedOperations.Warp)) //если разрешёно искажение { // создаём маркеры искажения foreach (var fig in RendererDecorator.WhereContainsDecorator(_selection, typeof(WarpRendererDecorator))) { var warped = fig.Renderer as WarpRendererDecorator; //get transformed points if (warped == null) { continue; } var points = warped.GetWarpPoints(fig); for (var i = 0; i < points.Length; i++) { Markers.Add(CreateMarker(MarkerType.Warp, points[i], i, fig)); } } } break; case EditorMode.Skew: //создаём маркеры скоса по горизонтали и по вертикали if (_selection.Geometry.AllowedOperations.HasFlag(AllowedOperations.Skew)) //если разрешён скос { Markers.Add(CreateMarker(MarkerType.SkewX, 0.5f, 0, UserCursor.SkewHorizontal, 1, 1)); Markers.Add(CreateMarker(MarkerType.SkewY, 0, 0.5f, UserCursor.SkewVertical, 1, 1)); Markers.Add(CreateMarker(MarkerType.SkewY, 1, 0.5f, UserCursor.SkewVertical, 0, 0)); Markers.Add(CreateMarker(MarkerType.SkewX, 0.5f, 1, UserCursor.SkewHorizontal, 0, 0)); } break; case EditorMode.Verticies: // создаём маркеры на вершинах фигур if (_selection.Geometry.AllowedOperations.HasFlag(AllowedOperations.Vertex)) //если разрешено редактирование вершин { foreach (var fig in _selection.Where(figure => figure.Geometry is ITransformedGeometry)) { var transformed = fig.Geometry as ITransformedGeometry; //get transformed points if (transformed == null) { continue; } var points = transformed.GetTransformedPoints(fig); var types = transformed.GetTransformedPointTypes(fig); Markers.Add(CreateMarker(MarkerType.Vertex, points[0], 0, fig)); var nt = 0; MarkerType mt; for (var i = 1; i < points.Length; i++) { var typ = types[i]; if ((typ & 0x07) == 3) { mt = nt % 3 == 2 ? MarkerType.Vertex : MarkerType.ControlBezier; nt++; } else { mt = MarkerType.Vertex; nt = 0; } Markers.Add(CreateMarker(mt, points[i], i, fig)); } } } // создаём маркеры градиента foreach (var fig in _selection.Where(figure => figure.Style.FillStyle is IGradientFill)) { var gradient = fig.Style.FillStyle as IGradientFill; //get transformed points if (gradient == null) { continue; } var points = gradient.GetGradientPoints(fig); for (var i = 0; i < points.Length; i++) { Markers.Add(CreateMarker(MarkerType.Gradient, points[i], i, fig)); } } break; case EditorMode.Select: // создаём маркеры масштаба if (Selection.Geometry.AllowedOperations.HasFlag(AllowedOperations.Scale)) //если разрешено масштабирование { Markers.Add(CreateMarker(MarkerType.Scale, 0, 0, UserCursor.SizeNWSE, 1, 1)); Markers.Add(CreateMarker(MarkerType.Scale, 1, 0, UserCursor.SizeNESW, 0, 1)); Markers.Add(CreateMarker(MarkerType.Scale, 1, 1, UserCursor.SizeNWSE, 0, 0)); Markers.Add(CreateMarker(MarkerType.Scale, 0, 1, UserCursor.SizeNESW, 1, 0)); } // создаём маркеры ресайза по вертикали и горизонтали if (Selection.Geometry.AllowedOperations.HasFlag(AllowedOperations.Size)) //если разрешено изменение размера { Markers.Add(CreateMarker(MarkerType.SizeY, 0.5f, 0, UserCursor.SizeNS, 0.5f, 1)); Markers.Add(CreateMarker(MarkerType.SizeX, 1, 0.5f, UserCursor.SizeWE, 0, 0.5f)); Markers.Add(CreateMarker(MarkerType.SizeY, 0.5f, 1, UserCursor.SizeNS, 0.5f, 0)); Markers.Add(CreateMarker(MarkerType.SizeX, 0, 0.5f, UserCursor.SizeWE, 1, 0.5f)); } // создаём маркер вращения if (Selection.Geometry.AllowedOperations.HasFlag(AllowedOperations.Rotate)) //если разрешено вращение { var sf = ScaleFactor; var rotateMarker = CreateMarker(MarkerType.Rotate, 1, 0, UserCursor.Rotate, 0.5f, 0.5f, 15 / sf, -15 / sf); Markers.Add(rotateMarker); } break; } // задаём геометрию маркеров по умолчанию foreach (var marker in Markers) { FigureBuilder.BuildMarkerGeometry(marker); } }
/// <summary> /// Get the data from the database. Then draw the plot. /// </summary> /// <param name="minIndex">Minimum index in the database.</param> /// <param name="maxIndex">Maximum index in the database.</param> private async void DrawPlot(int minIndex, int maxIndex) { // Clear the current markers Application.Current.Dispatcher.Invoke((Action) delegate { Markers.Clear(); }); // Init the list of data List <ShipTrackData> data = new List <ShipTrackData>(); // Verify a file was given if (!string.IsNullOrEmpty(_ProjectFilePath)) { // Verify the file exist if (File.Exists(_ProjectFilePath)) { // Create data Source string string dataSource = string.Format("Data Source={0};Version=3;", _ProjectFilePath); try { // Create a new database connection: using (SQLiteConnection sqlite_conn = new SQLiteConnection(dataSource)) { // Open the connection: sqlite_conn.Open(); // Get total number of ensembles in the project await Task.Run(() => TotalNumEnsembles = GetNumEnsembles(sqlite_conn)); // If this is the first time loading // show the entire plot if (_firstLoad) { _firstLoad = false; minIndex = 1; maxIndex = TotalNumEnsembles; } // Get the data from the project await Task.Run(() => data = GetData(sqlite_conn, _MagScale, minIndex, maxIndex)); // Close connection sqlite_conn.Close(); } // If there is no data, do not plot if (data != null && data.Count > 0) { // Update status StatusMsg = "Drawing Plot"; Application.Current.Dispatcher.Invoke((Action) delegate { // Plot the data PlotMapData(data); }); } else { StatusMsg = "No GPS data to plot"; } } catch (SQLiteException e) { Debug.WriteLine("Error using database", e); return; } catch (Exception e) { Debug.WriteLine("Error using database", e); return; } } } }
public void RemoveAllMarkers() { Markers.Clear(); }
//Swaps current data with the cache public void SwapCache() { var tempName = Name; Name = CachedName; CachedName = tempName; List <BasicMove> tempMoves = new List <BasicMove>(); tempMoves.AddRange(Moves); Moves.Clear(); Moves.AddRange(CachedMoves); CachedMoves.Clear(); CachedMoves.AddRange(tempMoves); var tempPassive = Passive; Passive = CachedPassive; CachedPassive = tempPassive; var tempPicture = Picture; Picture = CachedPicture; CachedPicture = tempPicture; var tempDead = Dead; Dead = CachedDead; CachedDead = tempDead; var tempTotalHP = TotalHP; TotalHP = CachedTotalHP; CachedTotalHP = tempTotalHP; var tempCurrentHP = CurrentHP; CurrentHP = CachedCurrentHP; CachedCurrentHP = tempCurrentHP; var tempTotalActions = TotalActions; TotalActions = CachedTotalActions; CachedTotalActions = tempTotalActions; var tempActions = Actions; Actions = CachedActions; CachedActions = tempActions; var tempIsPuppet = IsPuppet; IsPuppet = CachedIsPuppet; CachedIsPuppet = tempIsPuppet; var tempCanPassTurn = CanPassTurn; CanPassTurn = CachedCanPassTurn; CachedCanPassTurn = tempCanPassTurn; var tempDeathMessage = DeathMessage; DeathMessage = CachedDeathMessage; CachedDeathMessage = tempDeathMessage; List <BuffDebuff> tempEffects = new List <BuffDebuff>(); tempEffects.AddRange(Effects); Effects.Clear(); Effects.AddRange(CachedEffects); CachedEffects.Clear(); CachedEffects.AddRange(tempEffects); List <Marker> tempMarkers = new List <Marker>(); tempMarkers.AddRange(Markers); Markers.Clear(); Markers.AddRange(CachedMarkers); CachedMarkers.Clear(); CachedMarkers.AddRange(tempMarkers); }
internal void BeginUpdateMarkers() { Markers.Clear(); }
internal void ClearPositionMarkers() { Markers.Clear(); OnPropertyChanged(nameof(Markers)); }
public void Clear() { Markers.Clear(); Routes.Clear(); Polygons.Clear(); }
/// <summary> /// Метод строит маркеры у объекта Selection /// </summary> private void BuildMarkers() { // стираем предыдущие маркеры Markers.Clear(); // если ничего не выбрано, выходим if (Selection.Count == 0) { return; } switch (_editorMode) { case EditorMode.Skew: //создаём маркеры скоса по горизонтали и по вертикали if (_selection.Geometry.AllowedOperations.HasFlag(AllowedOperations.Skew)) //если разрешён скос { Markers.Add(CreateMarker(MarkerType.SkewX, 0.5f, 0, UserCursor.SkewHorizontal, 1, 1)); Markers.Add(CreateMarker(MarkerType.SkewY, 0, 0.5f, UserCursor.SkewVertical, 1, 1)); Markers.Add(CreateMarker(MarkerType.SkewY, 1, 0.5f, UserCursor.SkewVertical, 0, 0)); Markers.Add(CreateMarker(MarkerType.SkewX, 0.5f, 1, UserCursor.SkewHorizontal, 0, 0)); } break; case EditorMode.Verticies: // создаём маркеры на вершинах фигур if (_selection.Geometry.AllowedOperations.HasFlag(AllowedOperations.Vertex)) //если разрешено редактирование вершин { foreach (var fig in _selection.Where(figure => figure.Geometry is PolygoneGeometry)) { var polygone = fig.Geometry as PolygoneGeometry; //get transformed points if (polygone == null) { continue; } var points = polygone.GetTransformedPoints(fig); for (var i = 0; i < points.Length; i++) { Markers.Add(CreateMarker(MarkerType.Vertex, points[i], i, fig)); } } } // создаём маркеры градиента foreach (var fig in _selection.Where(figure => figure.Style.FillStyle is IGradientFill)) { var gradient = fig.Style.FillStyle as IGradientFill; //get transformed points if (gradient == null) { continue; } var points = gradient.GetGradientPoints(fig); for (var i = 0; i < points.Length; i++) { Markers.Add(CreateMarker(MarkerType.Grafient, points[i], i, fig)); } } break; case EditorMode.Select: // создаём маркеры масштаба if (Selection.Geometry.AllowedOperations.HasFlag(AllowedOperations.Scale)) //если разрешено масштабирование { Markers.Add(CreateMarker(MarkerType.Scale, 0, 0, UserCursor.SizeNWSE, 1, 1)); Markers.Add(CreateMarker(MarkerType.Scale, 1, 0, UserCursor.SizeNESW, 0, 1)); Markers.Add(CreateMarker(MarkerType.Scale, 1, 1, UserCursor.SizeNWSE, 0, 0)); Markers.Add(CreateMarker(MarkerType.Scale, 0, 1, UserCursor.SizeNESW, 1, 0)); } // создаём маркеры ресайза по вертикали и горизонтали if (Selection.Geometry.AllowedOperations.HasFlag(AllowedOperations.Size)) //если разрешено изменение размера { Markers.Add(CreateMarker(MarkerType.SizeY, 0.5f, 0, UserCursor.SizeNS, 0.5f, 1)); Markers.Add(CreateMarker(MarkerType.SizeX, 1, 0.5f, UserCursor.SizeWE, 0, 0.5f)); Markers.Add(CreateMarker(MarkerType.SizeY, 0.5f, 1, UserCursor.SizeNS, 0.5f, 0)); Markers.Add(CreateMarker(MarkerType.SizeX, 0, 0.5f, UserCursor.SizeWE, 1, 0.5f)); } // создаём маркер вращения if (Selection.Geometry.AllowedOperations.HasFlag(AllowedOperations.Rotate)) //если разрешено вращение { var sf = ScaleFactor; var rotateMarker = CreateMarker(MarkerType.Rotate, 1, 0, UserCursor.Rotate, 0.5f, 0.5f, 15 / sf, -15 / sf); Markers.Add(rotateMarker); } break; } // задаём геометрию маркеров по умолчанию foreach (var marker in Markers) { FigureBuilder.BuildMarkerGeometry(marker); } }