private void checkBtn_Click(object sender, RoutedEventArgs e) { Check checkbox = new Check(); checkbox.showText(finalStr); checkbox.Show(); }
private void tabSumosEgg_Click(object sender, RoutedEventArgs e) { AllSelData asd = new AllSelData(); if (sumosFinalStr.IndexOf('{') != -1) { string temp = sumosFinalStr.Substring(sumosFinalStr.IndexOf('{') + 1, sumosFinalStr.Length - sumosFinalStr.IndexOf('{') - 2); sumosFinalStr = "/give @p minecraft:spawn_egg 1 0 {EntityTag:{id:\"" + asd.getAt(tabSumosType.SelectedIndex) + "\"," + temp + "}}"; } else { sumosFinalStr = "/give @p minecraft:spawn_egg 1 0 {EntityTag:{id:\"" + asd.getAt(tabSumosType.SelectedIndex) + "\"}}"; } Check cbox = new Check(); cbox.showText(sumosFinalStr); cbox.Show(); }
private void checkBtn_Click(object sender, RoutedEventArgs e) { //string temp = "/* API LIST */\r\n"; //temp += "globalPotionString: \r\n"; //temp += "\t" + globalPotionString + "\r\n"; //temp += "globalPotionYN: \r\n"; //temp += "\t" + globalPotionYN + "\r\n"; //temp += "globalPotionNBT: \r\n"; //temp += "\t" + globalPotionNBT + ""; //Check checkbox = new Check(); //checkbox.showText(temp); //checkbox.ShowDialog(); Check checkbox = new Check(); checkbox.showText(finalStr); checkbox.Show(); }
private void checkBtn_Click(object sender, RoutedEventArgs e) { Check cbox = new Check(); cbox.showText(createText); cbox.Show(); }
private void PoolCheckBtn_Click(object sender, RoutedEventArgs e) { string output = "{\"pools\":["; if (globalPool != "") { output += globalPool.Substring(0, globalPool.Length - 1); } output += "]}"; if (LootTableFileName.Text.IndexOf(':') == -1) { Check cbox = new Check(); cbox.showText(LootTableFileName.ToolTip + " Error."); cbox.Show(); } else { string path = LootTableFileName.Text.Split(':')[1]; string namespacePath = LootTableFileName.Text.Split(':')[0]; try { JObject allText = (JObject)JsonConvert.DeserializeObject(output); if (!Directory.Exists(Directory.GetCurrentDirectory() + @"\data\loot_tables\" + namespacePath + @"\")) { Directory.CreateDirectory(Directory.GetCurrentDirectory() + @"\data\loot_tables\" + namespacePath + @"\"); } path = path.Replace("\\\\\\", "\\"); path = path.Replace("\\\\", "\\"); path = path.Replace('/', '\\'); string[] dirCheck = path.Split('\\'); string dirCheckPath = ""; for (int i = 0; i < dirCheck.Length - 1; i++) { dirCheckPath += dirCheck[i] + @"\"; } if (!Directory.Exists(Directory.GetCurrentDirectory() + @"\data\loot_tables\" + namespacePath + @"\" + dirCheckPath)) { Directory.CreateDirectory(Directory.GetCurrentDirectory() + @"\data\loot_tables\" + namespacePath + @"\" + dirCheckPath); } if (File.Exists(Directory.GetCurrentDirectory() + @"\data\loot_tables\" + namespacePath + @"\" + path + ".json")) { File.Delete(Directory.GetCurrentDirectory() + @"\data\loot_tables\" + namespacePath + @"\" + path + ".json"); } using (FileStream fs = new FileStream(Directory.GetCurrentDirectory() + @"\data\loot_tables\" + namespacePath + @"\" + path + ".json", FileMode.Create)) { using (StreamWriter sw = new StreamWriter(fs, System.Text.Encoding.UTF8)) { sw.Write(allText); } } } catch (Exception) { this.ShowMessageAsync(FloatErrorTitle, LootTableError, MessageDialogStyle.Affirmative, new MetroDialogSettings() { AffirmativeButtonText = FloatConfirm, NegativeButtonText = FloatCancel }); } Check cbox = new Check(); cbox.showText(output, LootTableSaveTitle + @"\data\loot_tables\" + namespacePath + @"\" + path + ".json"); cbox.Show(); } }
private void LootTableFileNameList_Click(object sender, RoutedEventArgs e) { Check cbox = new Check(); cbox.showText(LootTableWiki, "Wiki"); cbox.Show(); }