Пример #1
0
 private async Task <Windows.Storage.StorageFile> GetIfFileExistsAsync(string key, Windows.Storage.StorageFolder folder,
                                                                       Windows.Storage.CreationCollisionOption option = Windows.Storage.CreationCollisionOption.FailIfExists)
 {
     Windows.Storage.StorageFile retval;
     try
     {
         retval = await folder.GetFileAsync(key);
     }
     catch (System.IO.FileNotFoundException)
     {
         System.Diagnostics.Debug.WriteLine("GetIfFileExistsAsync:FileNotFoundException");
         return(null);
     }
     return(retval);
 }
        protected async static Task <Windows.Storage.StorageFile> GetFileBySubPathAsync(Windows.Storage.StorageFolder fldr, string sSubFolderPath)
        {
            Windows.Storage.StorageFile fle = null;

            try
            {
                fle = await fldr.GetFileAsync(sSubFolderPath);
            }
            catch (System.IO.FileNotFoundException)
            {
                //NOT EXIST...
            }

            return(fle);
        }
Пример #3
0
        private async void Page_Loaded(object sender, RoutedEventArgs e)
        {
            Windows.Storage.StorageFolder folder = await Windows.ApplicationModel.Package.Current.InstalledLocation.GetFolderAsync(@"Assets");

            Windows.Storage.StorageFile file = await folder.GetFileAsync("yarisma.mp3");

            player.Source = MediaSource.CreateFromStorageFile(file);

            dt.Interval = TimeSpan.FromSeconds(1);
            dt.Tick    += Dt_Tick;
            if (myPopup.IsOpen)
            {
                player.AutoPlay = true;
            }
        }
Пример #4
0
        public ObservableCollection <Song> GetMySong()
        {
            ObservableCollection <Song> mysongs = new ObservableCollection <Song>();
            HttpClient httpClient = new HttpClient();

            Windows.Storage.StorageFolder storageFolder = Windows.Storage.ApplicationData.Current.LocalFolder;
            Windows.Storage.StorageFile   sampleFile    = storageFolder.GetFileAsync("token.txt").GetAwaiter().GetResult();
            string token = Windows.Storage.FileIO.ReadTextAsync(sampleFile).GetAwaiter().GetResult();

            httpClient.DefaultRequestHeaders.Add("Authorization", "Basic " + token);
            var songcontent = httpClient.GetAsync(ApiUrl.MY_SONG_URL).Result.Content.ReadAsStringAsync().Result;

            mysongs = JsonConvert.DeserializeObject <ObservableCollection <Song> >(songcontent);
            return(mysongs);
        }
        private async Task InitMediaElementAsync(MoveType moveType, string audioFileName)
        {
            MediaElement moveMediaElement = new MediaElement();

            moveMediaElement.AutoPlay = false;

            Windows.Storage.StorageFolder folder = await Windows.ApplicationModel.Package.Current.InstalledLocation.GetFolderAsync("Assets");

            Windows.Storage.StorageFile file = await folder.GetFileAsync(audioFileName);

            var stream = await file.OpenAsync(Windows.Storage.FileAccessMode.Read);

            moveMediaElement.SetSource(stream, file.ContentType);
            mediaElements[moveType] = moveMediaElement;
        }
Пример #6
0
        /// <summary>
        /// 读取文件
        /// </summary>
        public async static Task <string> ReadTimestamp(string fileName)
        {
            try
            {
                Windows.Storage.StorageFile sampleFile = await LocalFolder.GetFileAsync(fileName);

                string contents = await Windows.Storage.FileIO.ReadTextAsync(sampleFile);

                return(contents);
            }
            catch (Exception)
            {
                return("read faild");
            }
        }
Пример #7
0
        public string PostSongFree(Song song)
        {
            HttpClient httpClient = new HttpClient();
            var        content    = new StringContent(JsonConvert.SerializeObject(song), Encoding.UTF8, "application/json");

            Windows.Storage.StorageFolder storageFolder = Windows.Storage.ApplicationData.Current.LocalFolder;
            Windows.Storage.StorageFile   sampleFile    = storageFolder.GetFileAsync("token.txt").GetAwaiter().GetResult();
            string token = Windows.Storage.FileIO.ReadTextAsync(sampleFile).GetAwaiter().GetResult();

            httpClient.DefaultRequestHeaders.Add("Authorization", "Basic " + token);
            var httpRequestMessage = httpClient.PostAsync(ApiUrl.UPLOAD_SONG_URL, content);
            var jsonResult         = httpRequestMessage.Result.Content.ReadAsStringAsync().Result;

            Debug.WriteLine(jsonResult);
            return(jsonResult);
        }
Пример #8
0
        // PAGE NAVIGATION START =======================================================

        // Button brings you to the "Cove" XAML page
        private async void Button_Click(object sender, RoutedEventArgs e)
        {
            // gets assets folder where media is installed
            Windows.Storage.StorageFolder folder = await Windows.ApplicationModel.Package.Current.InstalledLocation.GetFolderAsync(@"Assets");

            // the name of the sound file you want played that corresponds to the selected area
            Windows.Storage.StorageFile file = await folder.GetFileAsync("Narration_cove_cleanse.wav");

            // turns off autoplay
            player.AutoPlay = false;
            player.Source   = MediaSource.CreateFromStorageFile(file);
            // plays wav file, mp3 can used as well
            player.Play();
            // navigates to the cove page
            this.Frame.Navigate(typeof(Cove));
        }
        public static async Task LoadAndPlayAsync()
        {
            Windows.Storage.StorageFolder folder = await Windows.ApplicationModel.Package.Current.InstalledLocation.GetFolderAsync(@"Assets");

            Windows.Storage.StorageFile file = await folder.GetFileAsync("Click.wav");

            var stream = await file.OpenAsync(Windows.Storage.FileAccessMode.Read);

            loop.AutoPlay = false;
            loop.SetSource(stream, file.ContentType);

            //or simpler -
            //loop.Source = new Uri("ms-appx:///Assets/Click.wav", UriKind.Absolute);
            loop.MediaOpened += Loop_MediaOpened;
            loop.IsLooping    = true;
        }
Пример #10
0
 public string ReadNoteFromLocalStorage(string fileName)
 {
     try
     {
         Windows.Storage.StorageFolder storageFolder = Windows.Storage.ApplicationData.Current.LocalFolder;
         Windows.Storage.StorageFile   noteFile      = storageFolder.GetFileAsync(fileName).GetAwaiter().GetResult();
         Debug.WriteLine(noteFile.Path);
         var note = Windows.Storage.FileIO.ReadTextAsync(noteFile).GetAwaiter().GetResult();
         return(note);
     }
     catch (Exception e)
     {
         Debug.WriteLine(e.Message);
         return(null);
     }
 }
Пример #11
0
        private async void playsAsync(string FileName)
        {
            Windows.Storage.StorageFolder folder = await Windows.ApplicationModel.Package.Current.InstalledLocation.GetFolderAsync(@"Assets");

            System.Diagnostics.Debug.WriteLine("folder \n" + folder);
            Windows.Storage.StorageFile file = await folder.GetFileAsync("ScanAudio.m4a");



            player.AutoPlay = false;
            source          = MediaSource.CreateFromStorageFile(file);
            player.Source   = source;


            //  player.Play();
        }
Пример #12
0
        private static async Task <string> _loadSession()
        {
            try
            {
                var us = localSettings.Values["LastUser"] as string;
                Windows.Storage.StorageFolder storageFolder = Windows.Storage.ApplicationData.Current.LocalFolder;
                Windows.Storage.StorageFile   File          = await storageFolder.GetFileAsync(us + ".txt");

                Debug.WriteLine(storageFolder);
                var json = await Windows.Storage.FileIO.ReadTextAsync(File);

                Debug.WriteLine(json);
                return(json);
            }
            catch { return(""); }
        }
 public string ReadTokenFromLocalStorage()
 {
     try
     {
         Windows.Storage.StorageFolder storageFolder = Windows.Storage.ApplicationData.Current.LocalFolder;
         Windows.Storage.StorageFile   tokenFile     = storageFolder.GetFileAsync("token.txt").GetAwaiter().GetResult();
         //Debug.WriteLine(tokenFile.Path);
         var token = Windows.Storage.FileIO.ReadTextAsync(tokenFile).GetAwaiter().GetResult();
         return(token);
     }
     catch (Exception e)
     {
         Debug.WriteLine(e.Message);
         return(null);
     }
 }
Пример #14
0
        private async static void LoadfavoriteSongsFromFile()
        {
            Windows.Storage.StorageFolder storageFolder = Windows.Storage.ApplicationData.Current.LocalFolder;
            Windows.Storage.StorageFile   favTextFile   = await storageFolder.GetFileAsync("FavoriteSongsList.txt");

            string allFavSongs = await Windows.Storage.FileIO.ReadTextAsync(favTextFile);

            var allSongs = getSongs();

            SongManager.favoriteSongs.Clear();
            foreach (string strAudioFile in allFavSongs.Split(Environment.NewLine, StringSplitOptions.RemoveEmptyEntries))
            {
                Song existingSong = getSongs().FirstOrDefault(s => s.AudioFile.Equals(strAudioFile));
                SongManager.favoriteSongs.Add(existingSong);
            }
        }
Пример #15
0
 public string GetTokenFromLocalStorage()
 {
     Windows.Storage.StorageFolder storageFolder =
         Windows.Storage.ApplicationData.Current.LocalFolder;
     try
     {
         Windows.Storage.StorageFile sampleFile =
             storageFolder.GetFileAsync("ez.txt").GetAwaiter().GetResult();
         return(Windows.Storage.FileIO.ReadTextAsync(sampleFile).GetAwaiter().GetResult().ToString());
     }
     catch (Exception e)
     {
         Console.WriteLine(e);
         return("");
     }
 }
        private async void playSelectedBoxSound(ClsCasilla casilla)
        {
            MediaElement mysong = new MediaElement();

            Windows.Storage.StorageFolder folder = await Windows.ApplicationModel.Package.Current.InstalledLocation.GetFolderAsync("Assets");

            String archivoMusica = "";

            switch (casilla.Item.TipoItem)
            {
            case 1:
                if (casilla.Item.Monedas == 0)    //Si es un fantasma
                {
                    archivoMusica = "boo.wav";
                }
                else
                {
                    if (casilla.Item.Monedas == 20)    //si es una estrella
                    {
                        archivoMusica = "star.wav";
                    }
                    else
                    {
                        archivoMusica = "coin.wav";
                    }
                }
                break;

            case 2:
                archivoMusica = "mushroom.wav";
                break;

            case 3:
                archivoMusica = "bomb.wav";
                break;

            case 4:
                archivoMusica = "bowser.wav";
                break;
            }
            Windows.Storage.StorageFile file = await folder.GetFileAsync(archivoMusica);

            var stream = await file.OpenAsync(Windows.Storage.FileAccessMode.Read);

            mysong.SetSource(stream, file.ContentType);
            mysong.Play();
        }
Пример #17
0
        //in the sentence allreay see who send the message
        public static async Task <bool> WriteConversation(string sentence, string FileName)
        {
            try
            {
                Windows.Storage.StorageFolder storageFolder =
                    Windows.Storage.ApplicationData.Current.LocalFolder;
                if (storageFolder == null)
                {
                    return(false);
                }
                Windows.Storage.StorageFile userFile =
                    await storageFolder.GetFileAsync(FileName);

                if (userFile == null)
                {
                    return(false);
                }
                IEnumerable <string> toAdd = new List <string>()
                {
                    sentence
                };
                await Windows.Storage.FileIO.AppendLinesAsync(userFile, toAdd);
            }
            //trying to create the file
            catch
            {
                try
                {
                    Windows.Storage.StorageFolder storageFolder =
                        Windows.Storage.ApplicationData.Current.LocalFolder;
                    Windows.Storage.StorageFile userFile =
                        await storageFolder.CreateFileAsync(FileName,
                                                            Windows.Storage.CreationCollisionOption.ReplaceExisting);

                    IEnumerable <string> toAdd = new List <string>()
                    {
                        sentence
                    };
                    await Windows.Storage.FileIO.AppendLinesAsync(userFile, toAdd);
                }
                catch
                {
                    return(false);
                }
            }
            return(true);
        }
Пример #18
0
 //Plays a sound with sound source being controller by what Soundtype parameter is being passed.
 public async void PlaySound(SoundType type)
 {
     Task.Run(async() =>
     {
         await Windows.ApplicationModel.Core.CoreApplication.MainView.CoreWindow.Dispatcher.RunAsync(CoreDispatcherPriority.High,
                                                                                                     async() =>
         {
             MediaElement mysong = new MediaElement();
             Windows.Storage.StorageFolder folder = await Windows.ApplicationModel.Package.Current.InstalledLocation.GetFolderAsync("Assets");
             Windows.Storage.StorageFile file     = await folder.GetFileAsync(type.ToString() + ".wav");
             var stream = await file.OpenAsync(Windows.Storage.FileAccessMode.Read);
             mysong.SetSource(stream, file.ContentType);
             mysong.Volume = 0.1;
             mysong.Play();
         });
     });
 }
Пример #19
0
        private async void AddToFile()
        {
            Windows.Storage.StorageFile jsonFile = await localFolder.GetFileAsync("PillPopperUsers.json");

            var jsonContent = await Windows.Storage.FileIO.ReadTextAsync(jsonFile);

            List <User> users = JsonConvert.DeserializeObject <List <User> >(jsonContent);

            for (int u = 0; u < users.Count; u++)
            {
                if (users[u].Name.Equals(user.Name))
                {
                    users[u] = user;
                }
            }
            await Windows.Storage.FileIO.WriteTextAsync(jsonFile, JsonConvert.SerializeObject(users));
        }
Пример #20
0
        private void LoadSongs()
        {
            string token = null;
            ObservableCollection <Song> songs = new ObservableCollection <Song>();

            Windows.Storage.StorageFolder storageFolder = Windows.Storage.ApplicationData.Current.LocalFolder;
            Windows.Storage.StorageFile   sampleFile    = storageFolder.GetFileAsync("abcdz.txt").GetAwaiter().GetResult();
            token = Windows.Storage.FileIO.ReadTextAsync(sampleFile).GetAwaiter().GetResult();
            var client = new HttpClient();

            client.DefaultRequestHeaders.Add("Authorization", "Basic " + token);
            var responseContent = client.GetAsync(ApiUrl.GET_SONG_URL).Result.Content.ReadAsStringAsync().Result;

            _songs = JsonConvert.DeserializeObject <ObservableCollection <Song> >(responseContent);
            ListViewSong.ItemsSource = _songs;
            _currentIndex            = 0;
        }
Пример #21
0
        /// <summary>
        /// Se encarga de reproducir una pista de sonido.
        /// </summary>
        /// <param name="sonido">Nombre del archivo a reproducir dentro de la carpeta Sounds.</param>
        /// <param name="volumen">Volumen de la reproduccion.</param>
        private async void playSounds(string sonido, double volumen)
        {
            MediaElement mysong = new MediaElement();

            mysong.Volume = volumen;
            Windows.Storage.StorageFolder folder = await Windows.ApplicationModel.Package.Current.InstalledLocation.GetFolderAsync("Sounds");

            String archivoMusica = sonido;

            Windows.Storage.StorageFile file = await folder.GetFileAsync(archivoMusica);

            var stream = await file.OpenAsync(Windows.Storage.FileAccessMode.Read);

            mysong.SetSource(stream, file.ContentType);

            mysong.Play();
        }
Пример #22
0
        public AllPost()
        {
            this.InitializeComponent();
            Windows.Storage.StorageFolder storageFolder = Windows.Storage.ApplicationData.Current.LocalFolder;
            Windows.Storage.StorageFile   sampleFile    = storageFolder.GetFileAsync("sample.txt").GetAwaiter().GetResult();
            var token = Windows.Storage.FileIO.ReadTextAsync(sampleFile).GetAwaiter().GetResult();

            HttpClient client = new HttpClient();

            client.DefaultRequestHeaders.Add("Authorization", "Basic " + token);
            var responseContent = client.GetAsync(API_ALL_SONG).Result.Content.ReadAsStringAsync().Result;

            Debug.WriteLine(responseContent);
            var convertSongs = JsonConvert.DeserializeObject <List <Song> >(responseContent);

            ls1.ItemsSource = convertSongs;
        }
Пример #23
0
        private async void LoadTimeTables()
        {
            try
            {
                TimeTableProgressBar.Visibility = Visibility.Visible;

                if (app.TimeTables == null)
                {
                    Debug.WriteLine("Started: Load Timetable");
                    Windows.Storage.StorageFolder storageFolder =
                        Windows.Storage.ApplicationData.Current.LocalFolder;
                    Windows.Storage.StorageFile file =
                        await storageFolder.GetFileAsync("timetable.txt");

                    string text = await Windows.Storage.FileIO.ReadTextAsync(file);

                    app.TimeTables = JsonConvert.DeserializeObject <List <TableCourses> >(text);
                    Debug.WriteLine("Finished: Load Timetable");
                }

                if (app.HomePage_Models == null)
                {
                    foreach (var table in app.TimeTables)
                    {
                        TimetableModels.Add(await TimeTableHelper.GenerateOneDayTimeTableModel(table));
                    }
                    app.HomePage_Models = TimetableModels.ToList();
                }
                else
                {
                    foreach (var item in app.HomePage_Models)
                    {
                        TimetableModels.Add(item);
                    }
                }
            }
            catch (FileNotFoundException)
            {
                app.TimeTables = new List <TableCourses>();
                SaveTimeTables();
            }
            finally
            {
                TimeTableProgressBar.Visibility = Visibility.Collapsed;
            }
        }
Пример #24
0
        public MyInfor()
        {
            this.InitializeComponent();
            this.memberService = new MemberServiceApi();

            Windows.Storage.StorageFolder storageFolder = Windows.Storage.ApplicationData.Current.LocalFolder;
            Windows.Storage.StorageFile   sampleFile    = storageFolder.GetFileAsync("token.txt").GetAwaiter().GetResult();
            string text = Windows.Storage.FileIO.ReadTextAsync(sampleFile).GetAwaiter().GetResult();

            var memberInfor = memberService.GetInformation(text);

            avatar.Source     = new BitmapImage(new Uri(memberInfor.avatar));
            firstName.Text    = memberInfor.firstName;
            lastName.Text     = memberInfor.lastName;
            gender.Text       = (memberInfor.gender).ToString();
            introduction.Text = memberInfor.introduction;
        }
Пример #25
0
        private async void getUsers()
        {
            //Check if file exists
            if (File.Exists(localFolder.Path + "\\PillPopperUsers.json"))
            {
                //Get the File
                Windows.Storage.StorageFile jsonFile = await localFolder.GetFileAsync("PillPopperUsers.json");

                var jsonContent = await Windows.Storage.FileIO.ReadTextAsync(jsonFile);

                users = JsonConvert.DeserializeObject <List <User> >(jsonContent);
                if (users != null)
                {
                    PutOutUsers(users);
                }
            }
        }
Пример #26
0
        /// <summary>
        /// Get File
        /// </summary>
        public static async System.Threading.Tasks.Task <Windows.Storage.StorageFile> GetFile(Windows.Storage.StorageFolder folder, string fileName)
        {
            try
            {
                if (folder != null)
                {
                    var file = await folder.GetFileAsync(fileName);

                    return(file);
                }
            }
            catch (Exception)
            {
                // System.Diagnostics.Debug.WriteLine("Exception while getting file: " + Ex.Message);
            }
            return(null);
        }
Пример #27
0
        private async void Button_Click(object sender, RoutedEventArgs e)
        {
            //Clear searchbox
            ViewAQuotes.Blocks.Clear();

            Paragraph deskQuoteObjects   = new Paragraph();
            Run       deskQuoteObjectRun = new Run();

            Windows.Storage.StorageFolder storageFolder = Windows.Storage.ApplicationData.Current.LocalFolder;
            Windows.Storage.StorageFile   file          = await storageFolder.GetFileAsync("quotes.json");

            using (var inputStream = await file.OpenReadAsync())
                using (var classicStream = inputStream.AsStreamForRead())
                    using (var streamReader = new StreamReader(classicStream))
                    {
                        while (streamReader.Peek() >= 0)
                        {
                            string    json       = streamReader.ReadLine();
                            DeskQuote printQuote = JsonConvert.DeserializeObject <DeskQuote>(json);


                            if (variableMaterial.SelectedItem.ToString() == System.Convert.ToString(printQuote.newDesk1.surface))
                            {
                                //Desk.SurfaceMaterials MaterialSelected = (Desk.SurfaceMaterials)Enum.Parse(typeof(Desk.SurfaceMaterials), MaterialSelectedText);
                                //Print the matching quotes

                                deskQuoteObjectRun.Text +=
                                    "Date: \t" + printQuote.date +
                                    "\n First Name: \t" + printQuote.FirstName +
                                    "\n Last Name: \t" + printQuote.LastName +
                                    "\n Desk Specs:" +
                                    "\n Width: \t\t" + System.Convert.ToString(printQuote.newDesk1.width) +
                                    "\n Depth: \t\t" + System.Convert.ToString(printQuote.newDesk1.depth) +
                                    "\n Drawers: \t" + System.Convert.ToString(printQuote.newDesk1.drawerCount) +
                                    "\n Material: \t\t" + System.Convert.ToString(printQuote.newDesk1.surface) +
                                    "\n Shipping: \t" + System.Convert.ToString(printQuote.ShippingDays) + " Day" +
                                    "\n Total Cost: \t" + "$" + System.Convert.ToString(printQuote.DeskCost + printQuote.ShippingCost) +
                                    "\n" +
                                    "==============================" +
                                    "\n";
                            }
                        }
                        deskQuoteObjects.Inlines.Add(deskQuoteObjectRun);
                        ViewAQuotes.Blocks.Add(deskQuoteObjects);
                    }
        }
        private async void BtnPlayWav()
        {
            MediaElement mysong = new MediaElement();

            Windows.Storage.StorageFolder folder = await Windows.ApplicationModel.Package.Current.InstalledLocation.GetFolderAsync("Assets");

            Windows.Storage.StorageFolder soundsAndVideos = await folder.GetFolderAsync("sounds_videos");

            Windows.Storage.StorageFile file = await soundsAndVideos.GetFileAsync("ingame_2.mp3");

            var stream = await file.OpenAsync(Windows.Storage.FileAccessMode.Read);

            mysong.SetSource(stream, file.ContentType);
            mysong.IsLooping = true;
            mysong.Volume    = 100;
            mysong.Play();
        }
Пример #29
0
        protected async override void OnNavigatedTo(NavigationEventArgs e) //EN CASO DE QUE PASES PARAMETROS
        {
            //ApplicationLanguages.PrimaryLanguageOverride = "fr";
            NavigationInfo a = e.Parameter as NavigationInfo;


            if (a == null)
            {
                a          = new NavigationInfo();
                a.language = "Español";
            }
            if (a.source != null)
            {
                PerfilImagen.Source = a.source;
            }
            if (!string.IsNullOrWhiteSpace(a.language))
            {
                idioma = a.language;
            }
            if (a.name != null)
            {
                name        = a.name;
                NOMBRE.Text = name;
            }
            if (a.playing != null)
            {
                playing = a.playing;
            }
            Windows.Storage.StorageFolder folder = await Windows.ApplicationModel.Package.Current.InstalledLocation.GetFolderAsync(@"Assets");

            Windows.Storage.StorageFile file = await folder.GetFileAsync("Hahne_-_8bit_Dancer.mp3");

            player.AutoPlay = false;
            player.Source   = MediaSource.CreateFromStorageFile(file);
            player.Volume   = 0.5;
            if (!a.playing)
            {
                player.Play();
                playing = true;
            }
            else
            {
                player.Source = null;
            }
        }
Пример #30
0
        async void CheckLogic()
        {
            maxValue          += 1;
            BadGoodBar.Maximum = maxValue;
            if (RuWord.Text == JsonWords.RWArray[currentEngWord])
            {
                IfTrue();
                positiveBtClick += 1;
                if (TrainerModel.timesAmount == positiveBtClick && TrainerModel.trainEnabled == true)
                {
                    positiveBtClick = 0;
                    Frame.Navigate(typeof(PickFromFour));
                }
                WordPic.Opacity = 0.0;
                EngWord.Opacity = 0.0;
                Windows.Storage.StorageFolder folder = await Windows.ApplicationModel.Package.Current.InstalledLocation.GetFolderAsync(@"Assets");

                Windows.Storage.StorageFile file = await folder.GetFileAsync("Windows Balloon.wav");

                player.AutoPlay = false;
                player.Source   = MediaSource.CreateFromStorageFile(file);
                player.Play();
                ShowOpacityButton();
                ElementSoundPlayer.Play(ElementSoundKind.MoveNext);
                currentEngWord        = random.Next(0, JsonWords.EWArray.Length);
                EngWord.Text          = JsonWords.EWArray[currentEngWord];
                bitmapImage.UriSource = new Uri(WordPic.BaseUri, $"ArrayPics/{JsonWords.EWArray[currentEngWord]}.jpg");
                WordPic.Source        = bitmapImage;
                ShowOpacityPic();
                ShowOpacityEngWord();
                RuWord.Text = "";
                ratingBar  += 1;
                //
                MainProBar.MainProBarLocal.Value++;
                BadGoodBar.Value = ratingBar;
            }
            else
            {
                IfFalse();
                badRatingBar += 1;
            }
            MaxOfBar.Text = $"{Convert.ToString(BadGoodBar.Maximum)}";
            TrueBar.Text  = $"{Convert.ToString(BadGoodBar.Value)}";
            FalseBar.Text = $"{badRatingBar}";
        }