Esempio n. 1
0
        static void GameClientExplorerSettings_PropertyChanged(object sender, PropertyChangedEventArgs e)
        {
            if (e.PropertyName == "SortTanksBy" || e.PropertyName == "SortTanksDescending")
            {
                VehicleNodeVMBase.UpdateSortItemStates();

                if (VehicleNodeVMBase.VehicleSortingRuleChanged != null)
                {
                    VehicleNodeVMBase.VehicleSortingRuleChanged(null, EventArgs.Empty);
                }
            }
        }
Esempio n. 2
0
        static VehicleNodeVMBase()
        {
            s_sortByMenu           = new ExplorerTreeContextMenuItemVM(100, Localization.Instance.L("game_client_explorer", "sort_tanks_by_menu_item"), null);
            s_sortByMenu.IsDefault = false;

            s_sortByMenu.MenuItems.Add(VehicleNodeVMBase.CreateSortMenuItem(VehicleSortingRule.Name));
            s_sortByMenu.MenuItems.Add(VehicleNodeVMBase.CreateSortMenuItem(VehicleSortingRule.Tier));
            s_sortByMenu.MenuItems.Add(VehicleNodeVMBase.CreateSortMenuItem(VehicleSortingRule.Class));

            s_sortByMenuItems = s_sortByMenu.MenuItems.ToArray();

            VehicleNodeVMBase.UpdateSortItemStates();

            GameClientExplorerSettings.Default.PropertyChanged += VehicleNodeVMBase.GameClientExplorerSettings_PropertyChanged;
        }