public CheckLocalizationsView() { InitializeComponent(); PART_ListViewLanguages = new ClListViewLanguages(true); PART_ListViewLanguages.SetGameLocalizations(); PART_LvContener.Children.Add(PART_ListViewLanguages); }
public override void AddCustomElements() { if (ListCustomElements.Count > 0) { #if DEBUG logger.Debug($"CheckLocalizations [Ignored] - CustomElements allready insert - {ListCustomElements.Count}"); #endif return; } FrameworkElement PART_ClButtonWithJustIcon = null; FrameworkElement PART_ClButtonWithTitle = null; FrameworkElement PART_ClButtonWithTitleAndDetails = null; FrameworkElement PART_ClButtonWithJustIconAndDetails = null; FrameworkElement PART_ClListLanguages = null; try { PART_ClButtonWithJustIcon = IntegrationUI.SearchElementByName("PART_ClButtonWithJustIcon", false, true); PART_ClButtonWithTitle = IntegrationUI.SearchElementByName("PART_ClButtonWithTitle", false, true); PART_ClButtonWithTitleAndDetails = IntegrationUI.SearchElementByName("PART_ClButtonWithTitleAndDetails", false, true); PART_ClButtonWithJustIconAndDetails = IntegrationUI.SearchElementByName("PART_ClButtonWithJustIconAndDetails", false, true); PART_ClListLanguages = IntegrationUI.SearchElementByName("PART_ClListLanguages", false, true); } catch (Exception ex) { Common.LogError(ex, "CheckLocalizations", $"Error on find custom element"); } if (PART_ClButtonWithJustIcon != null) { PART_ClButtonWithJustIcon = new ClButton(true); ((Button)PART_ClButtonWithJustIcon).Click += OnBtActionBarClick; try { ui.AddElementInCustomTheme(PART_ClButtonWithJustIcon, "PART_ClButtonWithJustIcon"); ListCustomElements.Add(new CustomElement { ParentElementName = "PART_ClButtonWithJustIcon", Element = PART_ClButtonWithJustIcon }); } catch (Exception ex) { Common.LogError(ex, "CheckLocalizations"); } } if (PART_ClButtonWithTitle != null) { PART_ClButtonWithTitle = new ClButton(false); ((Button)PART_ClButtonWithTitle).Click += OnBtActionBarClick; try { ui.AddElementInCustomTheme(PART_ClButtonWithTitle, "PART_ClButtonWithTitle"); ListCustomElements.Add(new CustomElement { ParentElementName = "PART_ClButtonWithTitle", Element = PART_ClButtonWithTitle }); } catch (Exception ex) { Common.LogError(ex, "CheckLocalizations"); } } if (PART_ClButtonWithTitleAndDetails != null) { PART_ClButtonWithTitleAndDetails = new ClButtonAdvanced(false); try { ui.AddElementInCustomTheme(PART_ClButtonWithTitleAndDetails, "PART_ClButtonWithTitleAndDetails"); ListCustomElements.Add(new CustomElement { ParentElementName = "PART_ClButtonWithTitleAndDetails", Element = PART_ClButtonWithTitleAndDetails }); } catch (Exception ex) { Common.LogError(ex, "CheckLocalizations"); } } if (PART_ClButtonWithJustIconAndDetails != null) { PART_ClButtonWithJustIconAndDetails = new ClButtonAdvanced(true); try { ui.AddElementInCustomTheme(PART_ClButtonWithJustIconAndDetails, "PART_ClButtonWithJustIconAndDetails"); ListCustomElements.Add(new CustomElement { ParentElementName = "PART_ClButtonWithJustIconAndDetails", Element = PART_ClButtonWithJustIconAndDetails }); } catch (Exception ex) { Common.LogError(ex, "CheckLocalizations"); } } if (PART_ClListLanguages != null) { PART_ClListLanguages = new ClListViewLanguages(true); try { ui.AddElementInCustomTheme(PART_ClListLanguages, "PART_ClListLanguages"); ListCustomElements.Add(new CustomElement { ParentElementName = "PART_ClListLanguages", Element = PART_ClListLanguages }); } catch (Exception ex) { Common.LogError(ex, "CheckLocalizations"); } } }