private static void OnTitle1BrushPropertyChanged(DependencyObject dependencyObject,
                                                         DependencyPropertyChangedEventArgs e)
        {
            MQLevelButton myUserControl = dependencyObject as MQLevelButton;

            myUserControl.OnTitle1BrushChanged(e);
        }
        private static void OnProgressPercentPropertyChanged(DependencyObject dependencyObject,
                                                             DependencyPropertyChangedEventArgs e)
        {
            MQLevelButton myUserControl = dependencyObject as MQLevelButton;

            myUserControl.OnProgressPercentChanged(e);
        }
        private static void OnLabelNamePropertyChanged(DependencyObject dependencyObject,
                                                       DependencyPropertyChangedEventArgs e)
        {
            MQLevelButton myUserControl = dependencyObject as MQLevelButton;

            myUserControl.OnLabelChanged(e);
        }
Exemple #4
0
        private void MQLevelButton_ButtonClicked(object sender, EventArgs e)
        {
            MQLevelButton button = sender as MQLevelButton;

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

            LevelPresenter levelPresenter = button.DataContext as LevelPresenter;

            if (levelPresenter == null)
            {
                return;
            }

            if (levelPresenter.IsLocal == false)
            {
                EasyTracker.GetTracker().SendEvent("ui_action", "download_level", levelPresenter.Id.ToString(), levelPresenter.Number);
                this.CurrentViewModel.DownloadLevel(levelPresenter);
            }
            else
            {
                this.CurrentViewModel.NavigateToPacksListPage(levelPresenter.Id);
            }
        }