コード例 #1
0
        public async void SetStoryItem(InstaStoryItem storyItem)
        {
            Visibility = Visibility.Visible;
            await Task.Delay(420);

            StoryVM.SetStoryItem(storyItem, MainLV?.FindScrollViewer());
        }
コード例 #2
0
        public StoryMenuDialog(InstaReelFeed reelFeed, InstaStoryItem storyItem, Views.Main.StoryView view)
        {
            StoryItem = storyItem;
            ReelFeed  = reelFeed;
            View      = view;
            InitializeComponent();
            LVMenu.Items.Add(new StoryMenu {
                Text = "Download", Command = StoryMenuCommand.Download
            });
            LVMenu.Items.Add(new StoryMenu {
                Text = "Share Link", Command = StoryMenuCommand.ShareLink
            });

            if (reelFeed.User.IsMine())
            {
                LVMenu.Items.Add(new StoryMenu {
                    Text = "Delete", Command = StoryMenuCommand.Delete
                });
            }
            else
            {
                LVMenu.Items.Add(new StoryMenu {
                    Text = "Report", Command = StoryMenuCommand.Report
                });
            }
            LVMenu.Items.Add(new StoryMenu {
                Text = "Cancel", Command = StoryMenuCommand.Cancel
            });
        }
コード例 #3
0
 public void SetItem(InstaStoryItem storyItem, InstaStoryQuizStickerItem storyQuizStickerItem, ScrollViewer scrollViewer)
 {
     ResetCache();
     StoryItem            = storyItem;
     StoryQuizStickerItem = storyQuizStickerItem;
     RunLoadMore(true);
     SetLV(scrollViewer);
 }
コード例 #4
0
 public void SetItem(InstaStoryItem storyItem, InstaStoryQuestionInfo storyQuestionInfo, ScrollViewer scrollViewer)
 {
     ResetCache();
     StoryItem         = storyItem;
     StoryQuestionInfo = storyQuestionInfo;
     RunLoadMore(true);
     SetLV(scrollViewer);
 }
コード例 #5
0
 public void SetItem(InstaStorySliderItem slider, InstaStoryItem storyItem)
 {
     if (slider == null)
     {
         return;
     }
     if (storyItem == null)
     {
         return;
     }
     SliderItem = slider;
     StoryItem  = storyItem;
 }
コード例 #6
0
        public async void SetStoryItem(InstaStoryItem storyItem)
        {
            ShowGrid(true);
            Visibility = Visibility.Visible;
            InsightsButton.Visibility = UserHelper.IsBusiness ? Visibility.Visible : Visibility.Collapsed;
            await Task.Delay(420);

            StoryVM.SetStoryItem(storyItem, MainLV?.FindScrollViewer());
            if (UserHelper.IsBusiness)
            {
                StoryInsightUc.SetItem(storyItem);
            }
        }
コード例 #7
0
        public void SetItem(InstaStoryCountdownItem countdownItem, InstaStoryItem storyItem)
        {
            if (countdownItem == null)
            {
                return;
            }
            if (storyItem == null)
            {
                return;
            }
            CountdownItem = countdownItem;
            StoryItem     = storyItem;
            try
            {
                if (countdownItem.CountdownSticker != null)
                {
                    var backgroundGradient = new LinearGradientBrush();
                    var startBG            = new GradientStop {
                        Color = ("#ff" + countdownItem.CountdownSticker.StartBackgroundColor.Replace("#", "")).GetColorFromHex()
                    };
                    var endBG = new GradientStop {
                        Color = ("#ff" + countdownItem.CountdownSticker.EndBackgroundColor.Replace("#", "")).GetColorFromHex(), Offset = 1
                    };
                    backgroundGradient.GradientStops.Add(startBG);
                    backgroundGradient.GradientStops.Add(endBG);
                    MainGrid.Background  = backgroundGradient;
                    txtText.Text         = countdownItem.CountdownSticker.Text;
                    txtText.Foreground   = countdownItem.CountdownSticker.TextColor.GetColorBrush();
                    HoursText.Foreground = MinutesText.Foreground = SecondsText.Foreground
                                                                        = countdownItem.CountdownSticker.DigitColor.GetColorBrush();

                    HoursGrid.Background = MinutesGrid.Background = SecondsGrid.Background = countdownItem.CountdownSticker.DigitCardColor.GetColorBrush();

                    CountdownTime = DateTime.UtcNow - countdownItem.CountdownSticker.EndTime;
                }
            }
            catch { }
        }
コード例 #8
0
 public void SetItem(InstaStoryPollItem poll, InstaStoryItem storyItem)
 {
     if (poll == null)
     {
         return;
     }
     if (storyItem == null)
     {
         return;
     }
     PollItem  = poll;
     StoryItem = storyItem;
     try
     {
         // age viewer vote -1 nabod
         if (poll.PollSticker?.Tallies?.Count > 0)
         {
             YesButton.Content = txtYes.Text = poll.PollSticker.Tallies[0].Text;
             NoButton.Content  = txtNo.Text = poll.PollSticker.Tallies[1].Text;
             CalculateYesNo();
         }
     }
     catch { }
 }
コード例 #9
0
 public UsersDialog(InstaStoryItem storyItem, InstaReelFeed reelFeed) : this()
 {
     StoryItem          = storyItem;
     ReelFeed           = reelFeed;
     UsersDialogCommand = UsersDialogCommand.Story;
     try
     {
         IsPrivate = reelFeed.User.IsPrivate;
     }
     catch { }
     try
     {
         if (IsPrivate)
         {
             txtPrivateAccount.Text        = $"Only {reelFeed.User.UserName.ToLower()}'s followers can see this story.";
             PrivateAccountGrid.Visibility = Visibility.Visible;
         }
         else
         {
             PrivateAccountGrid.Visibility = Visibility.Collapsed;
         }
     }
     catch { }
 }
コード例 #10
0
 public StoryMenuDialog(InstaReelFeed reelFeed, InstaStoryItem storyItem, Views.Stories.UserStoryUc view2) : this(reelFeed, storyItem)
 {
     View2 = view2;
 }
コード例 #11
0
 public StoryMenuDialog(InstaReelFeed reelFeed, InstaStoryItem storyItem, Views.Main.StoryView view) : this(reelFeed, storyItem)
 {
     View = view;
 }