示例#1
0
        protected override void OnNavigatedTo(NavigationEventArgs e)
        {
            var user = ViewModel.CacheService.GetUser(ViewModel.CacheService.Options.MyId);

            if (user != null)
            {
                MessagePreview.Mockup(Strings.Resources.PrivacyForwardsMessageLine, user.GetFullName(), true, false, DateTime.Now);
            }

            BackgroundPresenter.Update(ViewModel.SessionId, ViewModel.ProtoService, ViewModel.Aggregator);
        }
        public SettingsPrivacyShowForwardedPage()
        {
            InitializeComponent();
            DataContext = TLContainer.Current.Resolve <SettingsPrivacyShowForwardedViewModel>();

            var user = ViewModel.CacheService.GetUser(ViewModel.CacheService.Options.MyId);

            if (user != null)
            {
                MessagePreview.Mockup(Strings.Resources.PrivacyForwardsMessageLine, user.GetFullName(), true, false, DateTime.Now);
            }

            BackgroundPresenter.Update(ViewModel.SessionId, ViewModel.ProtoService, ViewModel.Aggregator);

            if (ApiInfo.CanUseShadow)
            {
                var themeShadow = new ThemeShadow();
                ToolTip.Shadow       = themeShadow;
                ToolTip.Translation += new Vector3(0, 0, 32);

                themeShadow.Receivers.Add(BackgroundPresenter);
                themeShadow.Receivers.Add(MessagePreview);
            }
        }