/// <summary> /// Update the mouse manager. /// </summary> public override void Update(bool isActive) { //clear out the taps & touches Clicks.Clear(); Highlights.Clear(); Drags.Clear(); Drops.Clear(); Flicks.Clear(); Pinches.Clear(); if (null != Pinch) { //reset the pinch delta Pinch.Delta = 0f; } if (isActive) { TouchCollection = TouchPanel.GetState(); //get the new taps & touches GetGestures(); GetTouches(); } //Add the pinch event if there is an ongoing gesture if (null != Pinch) { Pinches.Add(new PinchEventArgs(Pinch.Delta)); } }
public async void CompletedSettings() { PredictionWeek.Text = CurrentWeek(); YearList = FindTemplateElementByName <Picker>(this, "YearList"); Activity = FindTemplateElementByName <ActivityIndicator>(this, "Activity"); SearchResults = FindTemplateElementByName <ResultsList>(this, "SearchResults"); SearchResults.NavigationParent = this; SeasonList.Clear(); Highlights.Clear(); foreach (Year y in NetworkDatabase.YearList) { SeasonList.Add(y); } YearList.BindingContext = this; if (YearList.SelectedIndex == -1) { YearList.BindingContext = null; YearList.BindingContext = this; } YearList.IsVisible = true; //YearList.SelectedIndexChanged += YearList_SelectedIndexChanged; NetworkDatabase.CurrentYearUpdated += NetworkDatabase_CurrentYearUpdated; PredictionYear.Text = NetworkDatabase.YearList[NetworkDatabase.YearList.Count - 1].Season + " Predictions"; CurrentStatus.IsVisible = false; LoadHighlights(); Activity.IsRunning = false; Activity.IsVisible = false; UseMenu.IsVisible = true; CurrentStatus.FormattedText = await FetchLabels(); //if (Highlights.Count > 0) //{ // HighlightsTitle.IsVisible = true; // ViewPost.IsVisible = true; // TMDBNotice.IsVisible = true; //} //else // CurrentStatus.IsVisible = true; Completed = true; }
private T FindSource(bool randomize) { if (!randomize && Highlights.Count > 0) { return(Highlights[0]); } T source = FindNode(NodeLocation.Random); Highlights.Clear(); Highlights.Add(source); return(source); }
/*--------------------------------------------------------------------------------------------*/ public void Update() { Highlights.Clear(); NearestHighlight = null; UpdateIsHighlightPrevented(); if (IsHighlightPrevented || ProximityProvider == null || CursorDataProvider == null || InteractionSettings == null) { return; } AddLatestHighlightsAndFindNearest(); }
public void ResetToDefault() { if (BiographyText != null) { BiographyText.Blocks.Clear(); } MediaGeneratror.ResetCache(); UserShort = null; FriendshipStatus = null; User = null; Username = null; TVChannel = null; Highlights.Clear(); Stories.Clear(); ChainingSuggestions.Clear(); PrivateVisibility = NoPostsVisibility = ChainingVisibility = IGTVVisibility = HighlightsVisibility = Visibility.Collapsed; View = null; }
/// <summary> /// Update the mouse manager. /// </summary> public override void Update(bool isActive) { //clear out the taps & touches Clicks.Clear(); Highlights.Clear(); Drags.Clear(); Drops.Clear(); Flicks.Clear(); Pinches.Clear(); Holds.Clear(); if (null != Pinch) { //reset the pinch delta Pinch.Delta = 0f; } if (isActive && IsEnabled) { TouchCollection = TouchPanel.GetState(); //get the new taps & touches GetGestures(); GetTouches(); } //Add the pinch event if there is an ongoing gesture if (null != Pinch) { if (Pinch.Finished) { Pinches.Add(new PinchEventArgs(Pinch.First, Pinch.Second, Pinch.Delta) { Release = true }); Pinch = null; } else { Pinches.Add(new PinchEventArgs(Pinch.First, Pinch.Second, Pinch.Delta)); } } }
public bool ShowAStar() { // highlight top left node T source = FindNode(NodeLocation.TopLeft); Highlights.Clear(); Highlights.Add(source); // highlight bottom right node T target = FindNode(NodeLocation.BottomRight); Highlights.Add(target); // find best path from top left to bottom right node var aStar = new AStar <T>(Graph); aStar.UseWorldDistance = true; bool success = aStar.FindBestPath(this, source, target); Locations = aStar.Nodes; Renderer.InvalidateVisual(); return(success); }
async void GetHighlights() { try { var hightlights = await InstaApi.StoryProcessor.GetHighlightFeedsAsync(UserShort.Pk); if (hightlights.Succeeded) { Highlights.Clear(); if (hightlights.Value?.Items?.Count > 0) { Highlights.AddRange(hightlights.Value.Items); HighlightsVisibility = Visibility.Visible; try { // ehyanan az inja nist?:| await MainPage.Current.Dispatcher.RunAsync(Windows.UI.Core.CoreDispatcherPriority.Normal, async() => { var users = new List <string>(); foreach (var item in hightlights.Value.Items.Take(5)) { users.Add(item.HighlightId); } var highlightsAfterResult = await InstaApi.StoryProcessor.GetUsersStoriesAsHighlightsAsync(users.ToArray()); if (highlightsAfterResult.Succeeded) { var highlightsAfter = highlightsAfterResult.Value.Items; foreach (var item in Highlights) { try { var single = highlightsAfter.SingleOrDefault(ss => ss.Id == item.HighlightId); if (single != null) { item.Items.Clear(); item.Items.AddRange(single.Items); } } catch { } } } }); } catch { } } else { HighlightsVisibility = Visibility.Collapsed; } TVChannel = hightlights.Value.TVChannel; if (hightlights.Value.TVChannel != null) { IGTVVisibility = Visibility.Visible; } else { IGTVVisibility = Visibility.Collapsed; } } } catch { } }