Example #1
0
        private async void CheckForFirstTime()
        {
            if (!GetPrefs().GetBoolean("FIRSTTIME", true)) return;

            try
            {
                ActivityHelp help = await ServerData.FetchHelp(ServerData.TaskType.None) as ActivityHelp;

                if (help == null) return;

                VideoPlayerFragment helpVidFragment = new VideoPlayerFragment(help.HelpVideo, help.ActivityName, help.ActivityDescription);
                helpVidFragment.Show(SupportFragmentManager, "video_helper");

                if (!string.IsNullOrWhiteSpace(help.HelpVideo))
                {
                    helpVidFragment.StartVideo();
                }

                ISharedPreferencesEditor editor = GetPrefs().Edit();
                editor.PutBoolean("FIRSTTIME", false);
                editor.Apply();
            }
            catch (Exception except)
            {
                ISharedPreferencesEditor editor = GetPrefs().Edit();
                editor.PutBoolean("FIRSTTIME", true);
                editor.Apply();
            }
        }
        private async void ShowHelpDialog()
        {
            FinishReading();

            ActivityHelp help = await ServerData.FetchHelp(currentMode) as ActivityHelp;

            if (help == null) return;

            VideoPlayerFragment helpVidFragment = new VideoPlayerFragment(help.HelpVideo, help.ActivityName, help.ActivityDescription);
            helpVidFragment.Show(SupportFragmentManager, "video_helper");

            if (!string.IsNullOrWhiteSpace(help.HelpVideo))
            {
                helpVidFragment.StartVideo();
            }
        }
        private void ShowInfo()
        {
            ActivityHelp help = currentFragment.GetHelp();

            VideoPlayerFragment helpVidFragment = new VideoPlayerFragment(help.HelpVideo, help.ActivityName, help.ActivityDescription);
            helpVidFragment.Show(SupportFragmentManager, "video_helper");

            helpVidFragment.StartVideo();
        }