private void MainProfileBtnAction(bool backUpMainProfileWarning)
        {
            string warningMassage = String.Empty;
            string infoMassage = String.Empty;
            if (backUpMainProfileWarning)
            {
                warningMassage = "BackUpProfile";
                infoMassage = "infoBackUpProfile";
            }
            else
            {
                warningMassage = "LoadProfile";
                infoMassage = "infoLoadProfile";
            }

            var loadedMod = modEntities.ParseTxtStateInfo(mainPath);

            if (loadedMod.Contains("No loaded mods"))
            {

                WarningWindow warningWindow = new WarningWindow(rm.GetString(warningMassage));
                if ((bool)warningWindow.ShowDialog())
                {
                    var backUpParth = mainPath + "\\mods\\ProfileBackUp\\profiles";
                    if (backUpMainProfileWarning) DirectoryCopyService.DirectoryCopy(mainPath + "\\data\\profiles", backUpParth);
                    else DirectoryCopyService.DirectoryCopy(backUpParth, mainPath + "\\data\\profiles");
                    InfoWindow infoWindow = new InfoWindow(rm.GetString(infoMassage));
                    infoWindow.ShowDialog();
                }
            }
            else
            {
                InfoWindow infoWindow = new InfoWindow(rm.GetString("errorLoadBackUpProfile"));
                infoWindow.ShowDialog();
            }
        }
 private void ClearData_Click(object sender, RoutedEventArgs e)
 {
     WarningWindow warningWindow = new WarningWindow(rm.GetString("ClearDataWarning"));
     if ((bool)warningWindow.ShowDialog())
     {
         DeleteModService.CleareData(mainPath);
         NameLoadMod.Text = "No loaded mods";
         InfoWindow infoWindow = new InfoWindow(rm.GetString("infoClean"));
         infoWindow.ShowDialog();
     }
 }
        private void UnloadMod_Click(object sender, RoutedEventArgs e)
        {
            var loadedMod = modEntities.ParseTxtStateInfo(mainPath);

            if (loadedMod.Contains("(!!!)"))
            {
                loadedMod = loadedMod.Replace("(!!!)", string.Empty);
                WarningWindow warningWindow = new WarningWindow(rm.GetString("UnloadManyModExeption"));
                if ((bool)warningWindow.ShowDialog()) UnloadModAction(loadedMod);
            }
            else if (loadedMod.Contains("No loaded mods"))
            {
                InfoWindow infoWindow = new InfoWindow(rm.GetString("infoUnloadModExeption"));
                infoWindow.ShowDialog();
            }
            else
            {
                WarningWindow warningWindow = new WarningWindow(rm.GetString("UnloadSingleModExeption"));
                if ((bool)warningWindow.ShowDialog()) UnloadModAction(loadedMod);

            }
        }
        private void LoadModToGame_Click(object sender, RoutedEventArgs e)
        {
            string modeState = String.Empty;
            string warningMassage = String.Empty;

            if (NameLoadMod.Text == "No loaded mods")
            {
                modeState = "1";
                warningMassage = "loadModWarning";
            }
            else
            {
                modeState = "2";
                warningMassage = "loadManyModWarning";
            }

            WarningWindow warningWindow = new WarningWindow(rm.GetString(warningMassage));
            if ((bool)warningWindow.ShowDialog())
            {
                LoadModToGameService loading = new LoadModToGameService();
                loading.Load(modEntities.ModEntityList.First(x => x.Name == (string)ListOfMods.SelectedValue), mainPath);
                File.WriteAllLines(mainPath + "\\mods\\StateInfo.txt", new string[] { "Mode state: " + modeState, "Mod Name: " + (string)ListOfMods.SelectedValue });
                NameLoadMod.Text = modEntities.ParseTxtStateInfo(mainPath);
                InfoWindow infoWindow = new InfoWindow((string)ListOfMods.SelectedValue + rm.GetString("infoLoadWindow"));
                infoWindow.ShowDialog();
            }
        }