/// <summary> /// Right menu button events /// </summary> private void RightMenuButtonEvents(object sender, RoutedEventArgs e) { Button btn = sender as Button; switch (btn.Name) { case "BtnMakeDLL": if (string.IsNullOrEmpty(DM.Config.config.DLLCompilerPath)) { Tools.MessageBoxTools.ShowErrorMessageBox(DM.LocalizeCore.GetLanguageData(DM.LANGUAGE_FILE_NAME.OPTION, $"DLLCompilerPathError2")); return; } DLLEditor.CodeBlock buffBaseBlock = DLLEditor.CodeBlockDataManagement.GetBaseBlockFromTargetPathOrTitle("BASE_UNIT_BUFF_CODES/BASE_BATTLE_UNIT_BUF").Copy(); buffBaseBlock.inputtedParameterList[0] = TbxBuffID.Text; DLLEditor.CodeBlock buffKeywordBaseBlock = DLLEditor.CodeBlockDataManagement.GetBaseBlockFromTargetPathOrTitle("BASE_UNIT_BUFF_CODES/BASE_BATTLE_UNIT_BUF_KEYWORD").Copy(); buffKeywordBaseBlock.inputtedParameterList[0] = TbxBuffID.Text; buffBaseBlock.subCodeBlocks.Add(buffKeywordBaseBlock); new DLLEditor.DLLEditorMainWindow($"customBuff_{TbxBuffID.Text}", rootCodeBlocksToUse: new List <DLLEditor.CodeBlock>() { buffBaseBlock }).ShowDialog(); break; case "BtnCopyBuff": DM.EditGameData_Buff.LocalizedBuff.rootDataNode.ActionXmlDataNodesByPath("effectTextList", (DM.XmlDataNode effectTextList) => { effectTextList.subNodes.Add( innerBuffNode.Copy()); }); initStack(); MainWindow.mainWindow.UpdateDebugInfo(); MainWindow.mainWindow.ChangeDebugLocation(MainWindow.DEBUG_LOCATION.LOCALIZED_BUFF_DESC); break; case "BtnDelete": DM.EditGameData_Buff.LocalizedBuff.rootDataNode.ActionXmlDataNodesByPath("effectTextList", (DM.XmlDataNode effectTextList) => { effectTextList.subNodes.Remove(innerBuffNode); }); initStack(); MainWindow.mainWindow.UpdateDebugInfo(); MainWindow.mainWindow.ChangeDebugLocation(MainWindow.DEBUG_LOCATION.LOCALIZED_BUFF_DESC); break; } }
/// <summary> /// Right menu button events /// </summary> private void RightMenuButtonEvents(object sender, RoutedEventArgs e) { Button btn = sender as Button; switch (btn.Name) { case "BtnCopyDeck": DM.EditGameData_DeckInfo.StaticDeckInfo.rootDataNode.subNodes.Add(innerDeckNode.Copy()); initStack(); MainWindow.mainWindow.UpdateDebugInfo(); MainWindow.mainWindow.ChangeDebugLocation(MainWindow.DEBUG_LOCATION.STATIC_DECKS); break; case "BtnDelete": DM.EditGameData_DeckInfo.StaticDeckInfo.rootDataNode.subNodes.Remove(innerDeckNode); initStack(); MainWindow.mainWindow.UpdateDebugInfo(); MainWindow.mainWindow.ChangeDebugLocation(MainWindow.DEBUG_LOCATION.STATIC_DECKS); break; } }
/// <summary> /// Right menu button events /// </summary> private void RightMenuButtonEvents(object sender, RoutedEventArgs e) { Button btn = sender as Button; switch (btn.Name) { case "BtnRetreat": if (innerEnemyNode.CheckIfGivenPathWithXmlInfoExists("Retreat")) { innerEnemyNode.RemoveXmlInfosByPath("Retreat"); } else { innerEnemyNode.AddXmlInfoByPath("Retreat", "true"); } MainWindow.mainWindow.ChangeDebugLocation(MainWindow.DEBUG_LOCATION.STATIC_ENEMY_INFO); InitRetreatButton(); break; case "BtnCopyEnemy": DM.EditGameData_EnemyInfo.StaticEnemyUnitInfo.rootDataNode.subNodes.Add(innerEnemyNode.Copy()); initStack(); MainWindow.mainWindow.UpdateDebugInfo(); MainWindow.mainWindow.ChangeDebugLocation(MainWindow.DEBUG_LOCATION.STATIC_ENEMY_INFO); break; case "BtnDelete": if (DM.EditGameData_EnemyInfo.LocalizedCharactersName.rootDataNode.CheckIfGivenPathWithXmlInfoExists("Name", attributeToCheck: new Dictionary <string, string>() { { "ID", innerEnemyNode.GetAttributesSafe("ID") } })) { DM.EditGameData_EnemyInfo.LocalizedCharactersName.rootDataNode.RemoveXmlInfosByPath("Name", attributeToCheck: new Dictionary <string, string>() { { "ID", innerEnemyNode.GetAttributesSafe("id") } }); } DM.EditGameData_EnemyInfo.StaticEnemyUnitInfo.rootDataNode.subNodes.Remove(innerEnemyNode); initStack(); MainWindow.mainWindow.UpdateDebugInfo(); MainWindow.mainWindow.ChangeDebugLocation(MainWindow.DEBUG_LOCATION.STATIC_ENEMY_INFO); break; } }
/// <summary> /// Right menu button events /// </summary> private void RightMenuButtonEvents(object sender, RoutedEventArgs e) { Button btn = sender as Button; switch (btn.Name) { case "BtnExtraInfo": string AffectionPrev = ""; innerCardNode.ActionXmlDataNodesByPath("Spec", (DM.XmlDataNode specNode) => { AffectionPrev = specNode.GetAttributesSafe("Affection"); }); new SubWindows.Global_MultipleValueInputed(new Dictionary <string, string>() { { DM.LocalizeCore.GetLanguageData(DM.LANGUAGE_FILE_NAME.CARD_INFO, $"Chapter"), DM.LocalizeCore.GetLanguageData(DM.LANGUAGE_FILE_NAME.CARD_INFO, $"%BtnDropCards_ToolTip%") }, { DM.LocalizeCore.GetLanguageData(DM.LANGUAGE_FILE_NAME.CARD_INFO, $"PriorityEnemy"), DM.LocalizeCore.GetLanguageData(DM.LANGUAGE_FILE_NAME.CARD_INFO, $"PriorityEnemy_ToolTip") }, { DM.LocalizeCore.GetLanguageData(DM.LANGUAGE_FILE_NAME.CARD_INFO, $"PriorityUser"), DM.LocalizeCore.GetLanguageData(DM.LANGUAGE_FILE_NAME.CARD_INFO, $"PriorityUser_ToolTip") }, { DM.LocalizeCore.GetLanguageData(DM.LANGUAGE_FILE_NAME.CARD_INFO, $"PriorityScript"), DM.LocalizeCore.GetLanguageData(DM.LANGUAGE_FILE_NAME.CARD_INFO, $"PriorityScript_ToolTip") }, { DM.LocalizeCore.GetLanguageData(DM.LANGUAGE_FILE_NAME.CARD_INFO, $"EmotionLimit"), DM.LocalizeCore.GetLanguageData(DM.LANGUAGE_FILE_NAME.CARD_INFO, $"EmotionLimit_ToolTip") }, { DM.LocalizeCore.GetLanguageData(DM.LANGUAGE_FILE_NAME.CARD_INFO, $"WideAreaCode"), DM.LocalizeCore.GetLanguageData(DM.LANGUAGE_FILE_NAME.CARD_INFO, $"WideAreaCode_ToolTip") } }, new List <string>() { innerCardNode.GetInnerTextByPath("Chapter"), innerCardNode.GetInnerTextByPath("Priority"), innerCardNode.GetInnerTextByPath("SortPriority"), innerCardNode.GetInnerTextByPath("PriorityScript"), innerCardNode.GetInnerTextByPath("EmotionLimit"), AffectionPrev }, new List <Action <string> >() { (string inputedVar) => { innerCardNode.SetXmlInfoByPathAndEmptyWillRemove("Chapter", inputedVar); }, (string inputedVar) => { innerCardNode.SetXmlInfoByPathAndEmptyWillRemove("Priority", inputedVar); }, (string inputedVar) => { innerCardNode.SetXmlInfoByPathAndEmptyWillRemove("SortPriority", inputedVar); }, (string inputedVar) => { innerCardNode.SetXmlInfoByPathAndEmptyWillRemove("PriorityScript", inputedVar); }, (string inputedVar) => { innerCardNode.SetXmlInfoByPathAndEmptyWillRemove("EmotionLimit", inputedVar); }, (string inputedVar) => { innerCardNode.ActionXmlDataNodesByPath("Spec", (DM.XmlDataNode specNode) => { specNode.attribute["Affection"] = inputedVar; MainWindow.mainWindow.UpdateDebugInfo(); }); } }).ShowDialog(); UpdateExtrainfoIcon(); MainWindow.mainWindow.ChangeDebugLocation(MainWindow.DEBUG_LOCATION.STATIC_CARD); break; case "BtnDropCards": List <string> selectedCardDropTables = new List <string>(); DM.EditGameData_CardInfos.StaticCardDropTable.rootDataNode.GetXmlDataNodesByPath("DropTable").ForEachSafe((DM.XmlDataNode cardDropTableID) => { if (cardDropTableID.CheckIfGivenPathWithXmlInfoExists("Card", innerCardNode.GetAttributesSafe("ID"))) { selectedCardDropTables.Add(DM.FullyLoclalizedGameDescriptions.GetFullDescriptionForDropBook(cardDropTableID.attribute["ID"])); } }); new SubWindows.Global_AddItemToListWindow((string addedDropTableItemID) => { if (DM.EditGameData_CardInfos.StaticCardDropTable.rootDataNode.CheckIfGivenPathWithXmlInfoExists("DropTable", attributeToCheck: new Dictionary <string, string>() { { "ID", addedDropTableItemID } })) { List <DM.XmlDataNode> foundCardDropTableNode = (DM.EditGameData_CardInfos.StaticCardDropTable.rootDataNode.GetXmlDataNodesByPathWithXmlInfo("DropTable", attributeToCheck: new Dictionary <string, string>() { { "ID", addedDropTableItemID } })); if (foundCardDropTableNode.Count > 0 && !foundCardDropTableNode[0].CheckIfGivenPathWithXmlInfoExists("Card", innerCardNode.GetAttributesSafe("ID"))) { foundCardDropTableNode[0].AddXmlInfoByPath("Card", innerCardNode.GetAttributesSafe("ID")); } } else { DM.XmlDataNode madeDropTableNode = DM.EditGameData_CardInfos.MakeNewStaticCardDropTableBase(addedDropTableItemID); if (!madeDropTableNode.CheckIfGivenPathWithXmlInfoExists("Card", innerCardNode.GetAttributesSafe("ID"))) { madeDropTableNode.AddXmlInfoByPath("Card", innerCardNode.GetAttributesSafe("ID")); DM.EditGameData_CardInfos.StaticCardDropTable.rootDataNode.subNodes.Add(madeDropTableNode); } } MainWindow.mainWindow.UpdateDebugInfo(); }, (string deletedDropTableItemID) => { if (DM.EditGameData_CardInfos.StaticCardDropTable.rootDataNode.CheckIfGivenPathWithXmlInfoExists("DropTable", attributeToCheck: new Dictionary <string, string>() { { "ID", deletedDropTableItemID } })) { List <DM.XmlDataNode> foundCardDropTableNode = (DM.EditGameData_CardInfos.StaticCardDropTable.rootDataNode.GetXmlDataNodesByPathWithXmlInfo("DropTable", attributeToCheck: new Dictionary <string, string>() { { "ID", deletedDropTableItemID } })); if (foundCardDropTableNode.Count > 0) { DM.XmlDataNode FOUND_CARD_DROP_TABLE_NODE = foundCardDropTableNode[0]; List <DM.XmlDataNode> baseCardDropTableNode = DM.GameInfos.staticInfos["CardDropTable"].rootDataNode.GetXmlDataNodesByPathWithXmlInfo("DropTable", attributeToCheck: new Dictionary <string, string>() { { "ID", deletedDropTableItemID } }); if (baseCardDropTableNode.Count > 0) { DM.XmlDataNode FOUND_CARD_DROP_TABLE_IN_GAME = baseCardDropTableNode[0]; List <string> foundCardDropTablesInGameItems = new List <string>(); FOUND_CARD_DROP_TABLE_IN_GAME.ActionXmlDataNodesByPath("Card", (DM.XmlDataNode cardNode) => { foundCardDropTablesInGameItems.Add(cardNode.innerText); }); if (DM.EditGameData_CardInfos.StaticCard.rootDataNode.GetXmlDataNodesByPathWithXmlInfo("Card", attributeToCheck: new Dictionary <string, string>() { { "ID", innerCardNode.GetAttributesSafe("ID") } }).Count == 1 && !foundCardDropTablesInGameItems.Contains(innerCardNode.GetAttributesSafe("ID"))) { FOUND_CARD_DROP_TABLE_NODE.RemoveXmlInfosByPath("Card", innerCardNode.GetAttributesSafe("ID")); } List <string> foundCardDropTables = new List <string>(); FOUND_CARD_DROP_TABLE_NODE.ActionXmlDataNodesByPath("Card", (DM.XmlDataNode cardNode) => { foundCardDropTables.Add(cardNode.innerText); }); if (foundCardDropTables.Count == foundCardDropTablesInGameItems.Count && foundCardDropTables.Except(foundCardDropTablesInGameItems).Count() == 0 && DM.EditGameData_CardInfos.StaticCard.rootDataNode.GetXmlDataNodesByPathWithXmlInfo("Card", attributeToCheck: new Dictionary <string, string>() { { "ID", innerCardNode.GetAttributesSafe("ID") } }).Count == 1) { bool isContainAnyExistCard = false; DM.EditGameData_CardInfos.StaticCard.rootDataNode.ActionXmlDataNodesByPath("Card", (DM.XmlDataNode cardNode) => { if (foundCardDropTables.Contains(cardNode.GetAttributesSafe("ID")) && cardNode.GetAttributesSafe("ID") != innerCardNode.GetAttributesSafe("ID")) { isContainAnyExistCard = true; } }); if (!isContainAnyExistCard) { DM.EditGameData_CardInfos.StaticCardDropTable.rootDataNode.RemoveXmlInfosByPath("DropTable", attributeToCheck: new Dictionary <string, string>() { { "ID", deletedDropTableItemID } }, deleteOnce: true); } } } } MainWindow.mainWindow.UpdateDebugInfo(); } }, selectedCardDropTables, SubWindows.AddItemToListWindow_PRESET.DROP_TABLE).ShowDialog(); List <string> selectedCardDropTablesToCheck = new List <string>(); DM.EditGameData_CardInfos.StaticCardDropTable.rootDataNode.GetXmlDataNodesByPath("DropTable").ForEachSafe((DM.XmlDataNode cardDropTableID) => { if (cardDropTableID.CheckIfGivenPathWithXmlInfoExists("Card", innerCardNode.attribute["ID"])) { selectedCardDropTablesToCheck.Add(cardDropTableID.attribute["ID"]); } }); if (selectedCardDropTablesToCheck.Count > 0) { string extraInfo = ""; selectedCardDropTablesToCheck.ForEach((string dropBookInfo) => { extraInfo += $"{DM.FullyLoclalizedGameDescriptions.GetFullDescriptionForDropBook(dropBookInfo)}\n"; }); extraInfo = extraInfo.TrimEnd('\n'); BtnDropCards.Background = Tools.ColorTools.GetImageBrushFromPath(this, "../Resources/iconYesDropBook.png"); BtnDropCards.ToolTip = $"{DM.LocalizeCore.GetLanguageData(DM.LANGUAGE_FILE_NAME.CARD_INFO, $"%BtnDropCards_ToolTip%")} ({DM.LocalizeCore.GetLanguageData(DM.LANGUAGE_FILE_NAME.BOOK_INFO, $"Inputted")})\n{extraInfo}"; } else { BtnDropCards.Background = Tools.ColorTools.GetImageBrushFromPath(this, "../Resources/iconNoDropBook.png"); BtnDropCards.ToolTip = $"{DM.LocalizeCore.GetLanguageData(DM.LANGUAGE_FILE_NAME.CARD_INFO, $"%BtnDropCards_ToolTip%")} ({DM.LocalizeCore.GetLanguageData(DM.LANGUAGE_FILE_NAME.BOOK_INFO, $"NotInputted")})"; } MainWindow.mainWindow.ChangeDebugLocation(MainWindow.DEBUG_LOCATION.STATIC_CARD_DROP_TABLE); break; case "BtnCopyCard": DM.EditGameData_CardInfos.StaticCard.rootDataNode.subNodes.Add(innerCardNode.Copy()); initStack(); MainWindow.mainWindow.UpdateDebugInfo(); MainWindow.mainWindow.ChangeDebugLocation(MainWindow.DEBUG_LOCATION.STATIC_CARD); break; case "BtnDelete": if (DM.EditGameData_CardInfos.LocalizedBattleCards.rootDataNode.CheckIfGivenPathWithXmlInfoExists("cardDescList/BattleCardDesc", attributeToCheck: new Dictionary <string, string>() { { "ID", innerCardNode.GetAttributesSafe("ID") } })) { DM.EditGameData_CardInfos.LocalizedBattleCards.rootDataNode.RemoveXmlInfosByPath("cardDescList/BattleCardDesc", attributeToCheck: new Dictionary <string, string>() { { "ID", innerCardNode.GetAttributesSafe("ID") } }, deleteOnce: true); } DM.EditGameData_CardInfos.StaticCardDropTable.rootDataNode.GetXmlDataNodesByPath("DropTable").ForEach((DM.XmlDataNode dropTableNode) => { List <DM.XmlDataNode> baseCardDropTableNode = DM.GameInfos.staticInfos["CardDropTable"].rootDataNode.GetXmlDataNodesByPathWithXmlInfo("DropTable", attributeToCheck: new Dictionary <string, string>() { { "ID", dropTableNode.GetAttributesSafe("ID") } }); if (baseCardDropTableNode.Count > 0) { DM.XmlDataNode FOUND_CARD_DROP_TABLE_IN_GAME = baseCardDropTableNode[0]; List <string> foundCardDropTablesInGameItems = new List <string>(); FOUND_CARD_DROP_TABLE_IN_GAME.ActionXmlDataNodesByPath("Card", (DM.XmlDataNode cardNode) => { foundCardDropTablesInGameItems.Add(cardNode.innerText); }); if (DM.EditGameData_CardInfos.StaticCard.rootDataNode.GetXmlDataNodesByPathWithXmlInfo("Card", attributeToCheck: new Dictionary <string, string>() { { "ID", innerCardNode.GetAttributesSafe("ID") } }).Count == 1 && !foundCardDropTablesInGameItems.Contains(innerCardNode.GetAttributesSafe("ID"))) { dropTableNode.RemoveXmlInfosByPath("Card", innerCardNode.GetAttributesSafe("ID")); } List <string> foundCardDropTables = new List <string>(); dropTableNode.ActionXmlDataNodesByPath("Card", (DM.XmlDataNode cardNode) => { foundCardDropTables.Add(cardNode.innerText); }); if (foundCardDropTables.Count == foundCardDropTablesInGameItems.Count && foundCardDropTables.Except(foundCardDropTablesInGameItems).Count() == 0 && DM.EditGameData_CardInfos.StaticCard.rootDataNode.GetXmlDataNodesByPathWithXmlInfo("Card", attributeToCheck: new Dictionary <string, string>() { { "ID", innerCardNode.GetAttributesSafe("ID") } }).Count == 1) { bool isContainAnyExistCard = false; DM.EditGameData_CardInfos.StaticCard.rootDataNode.ActionXmlDataNodesByPath("Card", (DM.XmlDataNode cardNode) => { if (foundCardDropTables.Contains(cardNode.GetAttributesSafe("ID")) && cardNode.GetAttributesSafe("ID") != innerCardNode.GetAttributesSafe("ID")) { isContainAnyExistCard = true; } }); if (!isContainAnyExistCard) { DM.EditGameData_CardInfos.StaticCardDropTable.rootDataNode.RemoveXmlInfosByPath("DropTable", attributeToCheck: new Dictionary <string, string>() { { "ID", dropTableNode.GetAttributesSafe("ID") } }, deleteOnce: true); } } } }); DM.EditGameData_CardInfos.StaticCard.rootDataNode.subNodes.Remove(innerCardNode); initStack(); MainWindow.mainWindow.UpdateDebugInfo(); MainWindow.mainWindow.ChangeDebugLocation(MainWindow.DEBUG_LOCATION.STATIC_CARD); break; } }
/// <summary> /// Right menu button events /// </summary> private void RightMenuButtonEvents(object sender, RoutedEventArgs e) { Button btn = sender as Button; switch (btn.Name) { case "BtnCondition": List <string> selectedConditions = new List <string>(); innerStageNode.ActionXmlDataNodesByPath("Condition/Stage", (DM.XmlDataNode xmlDataNode) => { selectedConditions.Add(DM.FullyLoclalizedGameDescriptions.GetFullDescriptionForStage(xmlDataNode.innerText)); }); new SubWindows.Global_AddItemToListWindow((string addedStageID) => { innerStageNode.AddXmlInfoByPath("Condition/Stage", addedStageID); }, (string deletedStageID) => { innerStageNode.RemoveXmlInfosByPath("Condition/Stage", deletedStageID); List <DM.XmlDataNode> conditonNode = innerStageNode.GetXmlDataNodesByPath("Condition"); if (conditonNode.Count > 0) { DM.XmlDataNode CONDITION_NODE = conditonNode[0]; if (CONDITION_NODE.GetXmlDataNodesByPath("Stage").Count <= 0) { innerStageNode.RemoveXmlInfosByPath("Condition"); } } }, selectedConditions, SubWindows.AddItemToListWindow_PRESET.STAGES).ShowDialog(); if (innerStageNode.GetXmlDataNodesByPath("Condition/Stage").Count > 0) { string extraInfo = ""; innerStageNode.ActionXmlDataNodesByPath("Condition/Stage", (DM.XmlDataNode xmlDataNode) => { extraInfo += $"{DM.FullyLoclalizedGameDescriptions.GetFullDescriptionForStage(xmlDataNode.GetInnerTextSafe())}\n"; }); extraInfo = extraInfo.TrimEnd('\n'); BtnCondition.Background = Tools.ColorTools.GetImageBrushFromPath(this, "../Resources/IconYesCondition.png"); BtnCondition.ToolTip = $"{DM.LocalizeCore.GetLanguageData(DM.LANGUAGE_FILE_NAME.STAGE_INFO, $"STAGE_CONDITION")} ({DM.LocalizeCore.GetLanguageData(DM.LANGUAGE_FILE_NAME.BOOK_INFO, $"Inputted")})\n{extraInfo}"; } else { BtnCondition.Background = Tools.ColorTools.GetImageBrushFromPath(this, "../Resources/IconNoCondition.png"); BtnCondition.ToolTip = $"{DM.LocalizeCore.GetLanguageData(DM.LANGUAGE_FILE_NAME.STAGE_INFO, $"%BtnCondition_ToolTip%")} ({DM.LocalizeCore.GetLanguageData(DM.LANGUAGE_FILE_NAME.BOOK_INFO, $"NotInputted")})"; } MainWindow.mainWindow.ChangeDebugLocation(MainWindow.DEBUG_LOCATION.STATIC_STAGE_INFO); break; case "BtnMapInfo": new SubWindows.Global_InputInfoWithSearchWindow((string selectedItem) => { innerStageNode.SetXmlInfoByPathAndEmptyWillRemove("MapInfo", selectedItem); }, SubWindows.InputInfoWithSearchWindow_PRESET.MAP_INFO).ShowDialog(); string MAP_INFO = innerStageNode.GetInnerTextByPath("MapInfo"); if (!string.IsNullOrEmpty(MAP_INFO)) { BtnMapInfo.Background = Tools.ColorTools.GetImageBrushFromPath(this, "../Resources/IconYesMapInfo.png"); BtnMapInfo.ToolTip = $"{DM.LocalizeCore.GetLanguageData(DM.LANGUAGE_FILE_NAME.STAGE_INFO, $"%BtnMapInfo_ToolTip%")} ({DM.LocalizeCore.GetLanguageData(DM.LANGUAGE_FILE_NAME.BOOK_INFO, $"Inputted")})\n{DM.LocalizedGameDescriptions.GetDescriptionForMapInfo(innerStageNode.GetInnerTextByPath("MapInfo"))}"; } else { BtnMapInfo.Background = Tools.ColorTools.GetImageBrushFromPath(this, "../Resources/IconNoMapInfo.png"); BtnMapInfo.ToolTip = $"{DM.LocalizeCore.GetLanguageData(DM.LANGUAGE_FILE_NAME.STAGE_INFO, $"%BtnMapInfo_ToolTip%")} ({DM.LocalizeCore.GetLanguageData(DM.LANGUAGE_FILE_NAME.BOOK_INFO, $"NotInputted")})"; } MainWindow.mainWindow.ChangeDebugLocation(MainWindow.DEBUG_LOCATION.STATIC_STAGE_INFO); break; case "BtnCopyStage": DM.EditGameData_StageInfo.StaticStageInfo.rootDataNode.subNodes.Add(innerStageNode.Copy()); initStack(); MainWindow.mainWindow.UpdateDebugInfo(); MainWindow.mainWindow.ChangeDebugLocation(MainWindow.DEBUG_LOCATION.STATIC_STAGE_INFO); break; case "BtnDelete": if (DM.EditGameData_StageInfo.LocalizedStageName.rootDataNode.CheckIfGivenPathWithXmlInfoExists("Name", attributeToCheck: new Dictionary <string, string>() { { "ID", innerStageNode.GetAttributesSafe("id") } })) { DM.EditGameData_StageInfo.LocalizedStageName.rootDataNode.RemoveXmlInfosByPath("Name", attributeToCheck: new Dictionary <string, string>() { { "ID", innerStageNode.GetAttributesSafe("id") } }); } DM.EditGameData_StageInfo.StaticStageInfo.rootDataNode.subNodes.Remove(innerStageNode); initStack(); MainWindow.mainWindow.UpdateDebugInfo(); MainWindow.mainWindow.ChangeDebugLocation(MainWindow.DEBUG_LOCATION.STATIC_STAGE_INFO); break; } }
/// <summary> /// Right menu button events /// </summary> private void RightMenuButtonEvents(object sender, RoutedEventArgs e) { Button btn = sender as Button; switch (btn.Name) { case "BtnMakeDLL": if (string.IsNullOrEmpty(DM.Config.config.DLLCompilerPath)) { Tools.MessageBoxTools.ShowErrorMessageBox(DM.LocalizeCore.GetLanguageData(DM.LANGUAGE_FILE_NAME.OPTION, $"DLLCompilerPathError2")); return; } new DLLEditor.DLLEditorMainWindow($"customCardAbility_{TbxAbilityID.Text}", new List <string>() { $"BASE_CARD_ABILITY_CODES/BASE_CARD_ABILITY,{TbxAbilityID.Text}" }).ShowDialog(); break; case "BtnCopyAbility": DM.EditGameData_CardAbilityInfo.LocalizedCardAbility.rootDataNode.subNodes.Add(innerAbilityNode.Copy()); initStack(); MainWindow.mainWindow.UpdateDebugInfo(); MainWindow.mainWindow.ChangeDebugLocation(MainWindow.DEBUG_LOCATION.LOCALIZED_CARD_ABILITY_DESC); break; case "BtnDelete": DM.EditGameData_CardAbilityInfo.LocalizedCardAbility.rootDataNode.subNodes.Remove(innerAbilityNode); initStack(); MainWindow.mainWindow.UpdateDebugInfo(); MainWindow.mainWindow.ChangeDebugLocation(MainWindow.DEBUG_LOCATION.LOCALIZED_CARD_ABILITY_DESC); break; } }
/// <summary> /// Right menu button events /// </summary> private void RightMenuButtonEvents(object sender, RoutedEventArgs e) { Button btn = sender as Button; switch (btn.Name) { case "BtnMakeDLL": if (string.IsNullOrEmpty(DM.Config.config.DLLCompilerPath)) { Tools.MessageBoxTools.ShowErrorMessageBox(DM.LocalizeCore.GetLanguageData(DM.LANGUAGE_FILE_NAME.OPTION, $"DLLCompilerPathError2")); return; } new DLLEditor.DLLEditorMainWindow($"customPassive_{TbxPassiveID.Text}", new List <string>() { $"BASE_PASSIVE_CODES/BASE_KEY_CARD_PASSIVE,{TbxPassiveID.Text}" }).ShowDialog(); break; case "BtnCopyPassive": DM.EditGameData_PassiveInfo.StaticPassiveList.rootDataNode.subNodes.Add(innerPassiveNode.Copy()); initStack(); MainWindow.mainWindow.UpdateDebugInfo(); MainWindow.mainWindow.ChangeDebugLocation(MainWindow.DEBUG_LOCATION.STATIC_PASSIVE_INTO); break; case "BtnDelete": if (DM.EditGameData_PassiveInfo.LocalizedPassiveDesc.rootDataNode.CheckIfGivenPathWithXmlInfoExists("PassiveDesc", attributeToCheck: new Dictionary <string, string>() { { "ID", innerPassiveNode.GetAttributesSafe("ID") } })) { if (DM.EditGameData_PassiveInfo.StaticPassiveList.rootDataNode.GetXmlDataNodesByPathWithXmlInfo("Passive", attributeToCheck: new Dictionary <string, string>() { { "ID", innerPassiveNode.GetAttributesSafe("ID") } }).Count == 1) { DM.EditGameData_PassiveInfo.LocalizedPassiveDesc.rootDataNode.RemoveXmlInfosByPath("PassiveDesc", attributeToCheck: new Dictionary <string, string>() { { "ID", innerPassiveNode.GetAttributesSafe("ID") } }); } } DM.EditGameData_PassiveInfo.StaticPassiveList.rootDataNode.subNodes.Remove(innerPassiveNode); initStack(); MainWindow.mainWindow.UpdateDebugInfo(); MainWindow.mainWindow.ChangeDebugLocation(MainWindow.DEBUG_LOCATION.STATIC_PASSIVE_INTO); break; } }
/// <summary> /// Right menu button events /// </summary> private void RightMenuButtonEvents(object sender, RoutedEventArgs e) { Button btn = sender as Button; switch (btn.Name) { case "BtnCopyBook": DM.EditGameData_DropBookInfo.StaticDropBookInfo.rootDataNode.subNodes.Add(innerBookNode.Copy()); initStack(); MainWindow.mainWindow.UpdateDebugInfo(); MainWindow.mainWindow.ChangeDebugLocation(MainWindow.DEBUG_LOCATION.STATIC_DROP_BOOK_INFO); break; case "BtnDelete": if (DM.EditGameData_DropBookInfo.LocalizedDropBookName.rootDataNode.CheckIfGivenPathWithXmlInfoExists("text", attributeToCheck: new Dictionary <string, string>() { { "id", innerBookNode.GetInnerTextByPath("TextId") } })) { if (DM.EditGameData_DropBookInfo.StaticDropBookInfo.rootDataNode.GetXmlDataNodesByPathWithXmlInfo("BookUse/TextId", innerBookNode.GetInnerTextByPath("TextId")).Count == 1) { DM.EditGameData_DropBookInfo.LocalizedDropBookName.rootDataNode.RemoveXmlInfosByPath("text", attributeToCheck: new Dictionary <string, string>() { { "id", innerBookNode.GetInnerTextByPath("TextId") } }); } } if (DM.EditGameData_DropBookInfo.StaticCardDropTableInfo.rootDataNode.CheckIfGivenPathWithXmlInfoExists("DropTable", attributeToCheck: new Dictionary <string, string>() { { "ID", innerBookNode.GetAttributesSafe("ID") } })) { if (DM.EditGameData_DropBookInfo.StaticDropBookInfo.rootDataNode.GetXmlDataNodesByPathWithXmlInfo("BookUse", attributeToCheck: new Dictionary <string, string>() { { "ID", innerBookNode.GetAttributesSafe("ID") } }).Count == 1) { DM.EditGameData_DropBookInfo.StaticCardDropTableInfo.rootDataNode.RemoveXmlInfosByPath("DropTable", attributeToCheck: new Dictionary <string, string>() { { "ID", innerBookNode.GetAttributesSafe("ID") } }); } } DM.EditGameData_DropBookInfo.StaticDropBookInfo.rootDataNode.subNodes.Remove(innerBookNode); initStack(); MainWindow.mainWindow.UpdateDebugInfo(); MainWindow.mainWindow.ChangeDebugLocation(MainWindow.DEBUG_LOCATION.STATIC_DROP_BOOK_INFO); break; } }