示例#1
0
        private void MQPackagePresenterControl_ButtonClicked(object sender, EventArgs e)
        {
            MQPackagePresenterControl button = sender as MQPackagePresenterControl;

            if (button == null || this.CurrentViewModel == null)
            {
                return;
            }

            Pack pack = button.DataContext as Pack;

            if (pack == null)
            {
                return;
            }

            if (pack.IsRemotePack)
            {
                //EasyTracker.GetTracker().SendEvent("ui_action", "download_level", levelPresenter.Id.ToString(), levelPresenter.Number);
                this.CurrentViewModel.DownloadLevel(pack.LevelId);
            }
            else
            {
                this.CurrentViewModel.NavigateToPackagePage(pack);
            }
        }
        private static void OnPackagePropertyChanged(DependencyObject dependencyObject,
                                                     DependencyPropertyChangedEventArgs e)
        {
            MQPackagePresenterControl myUserControl = dependencyObject as MQPackagePresenterControl;

            myUserControl.OnCaptionPropertyChanged(e);
        }
示例#3
0
        private void MQPackagePresenterControl_ButtonClicked(object sender, EventArgs e)
        {
            Debug.WriteLine("Pack clicked");


            if (sender == null || this.CurrentViewModel == null)
            {
                return;
            }
            MQPackagePresenterControl pckPres = sender as MQPackagePresenterControl;

            EasyTracker.GetTracker().SendEvent("ui_action", "play_pack", pckPres.Package.Title, 0);

            this.CurrentViewModel.NavigateToPackagePage(pckPres.Package);
        }