private void OnShowRowDetails(GearPiece row)
 {
     if (row != null)
     {
         MessageBox.Show(row.ToString(), "STEVE");
     }
 }
        private void NewGear()
        {
            if (_newGearViewModel == null)
            {
                _newGearViewModel = _newGearViewModelFactory();
            }

            var result = DialogNewGearService.ShowDialog(
                new[]
            {
                _newGearViewModel.CancelCommand, _newGearViewModel.SaveGearCommand
            },
                "New Gear",
                "Mapping",
                _newGearViewModel,
                SelectedGearType,
                this);

            if (result.Id == _newGearViewModel.SaveGearCommand.Id)
            {
                var folder = Environment.GetFolderPath(Environment.SpecialFolder.Personal);
                using (var conn = new SQLiteConnection(System.IO.Path.Combine(folder, "Gear2.db")))
                {
                    GearPiece gearPiece = _newGearViewModel.NewGear;
                    gearPiece.GearType = SelectedGearType;
                    conn.Insert(gearPiece);
                    GearPieces.Add(gearPiece);
                }
            }
        }
示例#3
0
 public GearItem(uint id, GearTier t, GearPiece p, int enchant, long exp)
 {
     Id         = id;
     Tier       = t;
     Piece      = p;
     Enchant    = enchant;
     Experience = exp;
 }
 private bool ValidateGearpiece(GearPiece gear)
 {
     if (gear.Armor < 852 || gear.Armor > 1001)
     {
         return(false);
     }
     return(true);
 }
 public NewGearViewModel(IPropertyValidator <NewGearViewModel> propertyValidator)
 {
     _propertyValidator = propertyValidator;
     NewGear            = new GearPiece();
     LoadedCommand      = new DelegateCommand(Load);
 }
 private void CancelDelegate(CancelEventArgs eventArgs)
 {
     NewGear = new GearPiece();
 }
示例#7
0
 public GearItemData(uint itemId, GearTier tier, GearPiece piece)
 {
     Id    = itemId;
     Tier  = tier;
     Piece = piece;
 }