Browse Source

WIP

WIP_branch
oskar3123 9 months ago
parent
commit
7598f3a530
15 changed files with 2166 additions and 9 deletions
  1. +89
    -0
      GTAOnlineCasinoHelper/Classes/CeoCollection.cs
  2. +78
    -0
      GTAOnlineCasinoHelper/Classes/CeoModel.cs
  3. +133
    -0
      GTAOnlineCasinoHelper/Classes/CeoPlate.cs
  4. +15
    -0
      GTAOnlineCasinoHelper/Classes/CeoRange.cs
  5. +29
    -0
      GTAOnlineCasinoHelper/Extensions/CeoExtensions.cs
  6. +20
    -1
      GTAOnlineCasinoHelper/GTAOnlineCasinoHelper.csproj
  7. +34
    -3
      GTAOnlineCasinoHelper/MainWindow.xaml
  8. +2
    -0
      GTAOnlineCasinoHelper/MainWindow.xaml.cs
  9. +5
    -5
      GTAOnlineCasinoHelper/Properties/AssemblyInfo.cs
  10. +11
    -0
      GTAOnlineCasinoHelper/Properties/Settings.Designer.cs
  11. +3
    -0
      GTAOnlineCasinoHelper/Properties/Settings.settings
  12. +505
    -0
      GTAOnlineCasinoHelper/Views/CeoVehicle/CeoVehicleInventory.xaml
  13. +327
    -0
      GTAOnlineCasinoHelper/Views/CeoVehicle/CeoVehicleInventory.xaml.cs
  14. +831
    -0
      GTAOnlineCasinoHelper/Views/CeoVehicle/CeoVehicleSource.xaml
  15. +84
    -0
      GTAOnlineCasinoHelper/Views/CeoVehicle/CeoVehicleSource.xaml.cs

+ 89
- 0
GTAOnlineCasinoHelper/Classes/CeoCollection.cs View File

@ -0,0 +1,89 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace GTAOnlineCasinoHelper.Classes
{
public class CeoCollection
{
/*public static readonly CeoPlate Z_TYPE_BIGMONEY = new CeoPlate(CeoModel.Z_TYPE, "B1GMON3Y", true);
public static readonly CeoPlate Z_TYPE_KINGPIN = new CeoPlate(CeoModel.Z_TYPE, "K1NGP1N", false);
public static readonly CeoPlate Z_TYPE_CEO = new CeoPlate(CeoModel.Z_TYPE, "CE0", false);
public static readonly CeoPlate ETR_ONE_PRETTY = new CeoPlate(CeoModel.ETR_ONE, "PR3TTY", true);
public static readonly CeoPlate ETR_ONE_BIGBOY = new CeoPlate(CeoModel.ETR_ONE, "B1GB0Y", false);
public static readonly CeoPlate ETR_ONE_MONARCH = new CeoPlate(CeoModel.ETR_ONE, "M0N4RCH", false);
public static readonly CeoPlate EIGHT_ELEVEN_SLICK = new CeoPlate(CeoModel.EIGHT_ELEVEN, "SL1CK", true);
public static readonly CeoPlate EIGHT_ELEVEN_MIDLIFE = new CeoPlate(CeoModel.EIGHT_ELEVEN, "M1DL1F3", false);
public static readonly CeoPlate EIGHT_ELEVEN_REGAL = new CeoPlate(CeoModel.EIGHT_ELEVEN, "R3G4L", false);
public static readonly CeoPlate OSIRIS_SLEEK = new CeoPlate(CeoModel.OSIRIS, "SL33K", true);
public static readonly CeoPlate OSIRIS_OHELLO = new CeoPlate(CeoModel.OSIRIS, "OH3LL0", false);
public static readonly CeoPlate OSIRIS_PHARAOH = new CeoPlate(CeoModel.OSIRIS, "PH4R40H", false);
public static readonly CeoPlate REAPER_DEATH4U = new CeoPlate(CeoModel.REAPER, "D34TH4U", true);
public static readonly CeoPlate REAPER_2FAST4U = new CeoPlate(CeoModel.REAPER, "2FA5T4U", false);
public static readonly CeoPlate REAPER_GRIM = new CeoPlate(CeoModel.REAPER, "GR1M", false);
public static readonly CeoPlate MAMBA_BLKMAMBA = new CeoPlate(CeoModel.MAMBA, "BLKM4MB4", true);
public static readonly CeoPlate MAMBA_OLDBLUE = new CeoPlate(CeoModel.MAMBA, "0LDBLU3", false);
public static readonly CeoPlate MAMBA_VIP = new CeoPlate(CeoModel.MAMBA, "V1P", false);
public static readonly CeoPlate FMJ_CATCHME = new CeoPlate(CeoModel.FMJ, "C4TCHM3", true);
public static readonly CeoPlate FMJ_JOKER = new CeoPlate(CeoModel.FMJ, "J0K3R", false);
public static readonly CeoPlate FMJ_HOT4U = new CeoPlate(CeoModel.FMJ, "H0T4U", false);
public static readonly CeoPlate STIRLING_GT_RALLY = new CeoPlate(CeoModel.STIRLING_GT, "R4LLY", true);
public static readonly CeoPlate STIRLING_GT_MAJESTIC = new CeoPlate(CeoModel.STIRLING_GT, "M4J3ST1C", false);
public static readonly CeoPlate STIRLING_GT_TOURER = new CeoPlate(CeoModel.STIRLING_GT, "T0UR3R", false);
public static readonly CeoPlate X_EIGHTY_PROTO_MAKEBANK = new CeoPlate(CeoModel.X_EIGHTY_PROTO, "M4K3B4NK", true);
public static readonly CeoPlate X_EIGHTY_PROTO_FUTURE = new CeoPlate(CeoModel.X_EIGHTY_PROTO, "FUTUR3", false);
public static readonly CeoPlate X_EIGHTY_PROTO_TURBO = new CeoPlate(CeoModel.X_EIGHTY_PROTO, "TURB0", false);
public static readonly CeoPlate TYRUS_CITRUS = new CeoPlate(CeoModel.TYRUS, "C1TRUS", true);
public static readonly CeoPlate TYRUS_BESTLAP = new CeoPlate(CeoModel.TYRUS, "B35TL4P", false);
public static readonly CeoPlate TYRUS_TREX = new CeoPlate(CeoModel.TYRUS, "TR3X", false);
public static readonly CeoPlate T_TWENTY_DEVIL = new CeoPlate(CeoModel.T_TWENTY, "D3V1L", true);
public static readonly CeoPlate T_TWENTY_CARAMEL = new CeoPlate(CeoModel.T_TWENTY, "CAR4M3L", false);
public static readonly CeoPlate T_TWENTY_TOPSPEED = new CeoPlate(CeoModel.T_TWENTY, "T0PSP33D", false);
public static readonly CeoPlate ROOSEVELT_VALOR_OLDTIMER = new CeoPlate(CeoModel.ROOSEVELT_VALOR, "0LDT1M3R", true);
public static readonly CeoPlate ROOSEVELT_VALOR_LAWLESS = new CeoPlate(CeoModel.ROOSEVELT_VALOR, "L4WLE55", false);
public static readonly CeoPlate ROOSEVELT_VALOR_VALOR = new CeoPlate(CeoModel.ROOSEVELT_VALOR, "V4L0R", false);*/
private readonly CeoModel model;
private readonly string plate;
private readonly bool collection;
private CeoCollection(CeoModel model, string plate, bool collection)
{
this.model = model;
this.plate = plate;
this.collection = collection;
}
public CeoModel GetModel()
{
return model;
}
public string GetPlate()
{
return plate;
}
public bool IsCollection()
{
return collection;
}
public override bool Equals(object obj)
{
return ReferenceEquals(this, obj);
}
public override int GetHashCode()
{
int hashCode = 17;
hashCode = 31 * hashCode + model.GetHashCode();
hashCode = 31 * hashCode + plate.GetHashCode();
hashCode = 31 * hashCode + collection.GetHashCode();
return hashCode;
}
}
}

+ 78
- 0
GTAOnlineCasinoHelper/Classes/CeoModel.cs View File

@ -0,0 +1,78 @@
using GTAOnlineCasinoHelper.Extensions;
using System;
using System.Collections.Generic;
using System.Globalization;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace GTAOnlineCasinoHelper.Classes
{
public class CeoModel
{
private static readonly CultureInfo EN_US = CultureInfo.CreateSpecificCulture("en-US");
private static readonly List<CeoModel> CEO_MODELS = new List<CeoModel>();
#region Standard Range
#endregion
#region Mid Range
public static readonly CeoModel COQUETTE_CLASSIC = new CeoModel("Coquette Classic", CeoRange.MID);
public static readonly CeoModel VERLIERER = new CeoModel("Verlierer", CeoRange.MID);
public static readonly CeoModel ZENTORNO = new CeoModel("Zentorno", CeoRange.MID);
public static readonly CeoModel TROPOS_RALLYE = new CeoModel("Tropos Rallye", CeoRange.MID);
public static readonly CeoModel SULTAN_RS = new CeoModel("Sultan RS", CeoRange.MID);
public static readonly CeoModel CHEETAH = new CeoModel("Cheetah", CeoRange.MID);
public static readonly CeoModel SEVEN_SEVENTY = new CeoModel("Seven-70", CeoRange.MID);
public static readonly CeoModel OMNIS = new CeoModel("Omnis", CeoRange.MID);
public static readonly CeoModel ENTITY_XF = new CeoModel("Entity XF", CeoRange.MID);
public static readonly CeoModel COQUETTE_BLACKFIN = new CeoModel("Coquette BlackFin", CeoRange.MID);
#endregion
#region Top Range
public static readonly CeoModel Z_TYPE = new CeoModel("Z-Type", CeoRange.TOP);
public static readonly CeoModel ETR_ONE = new CeoModel("ETR1", CeoRange.TOP);
public static readonly CeoModel EIGHT_ELEVEN = new CeoModel("811", CeoRange.TOP);
public static readonly CeoModel OSIRIS = new CeoModel("Osiris", CeoRange.TOP);
public static readonly CeoModel REAPER = new CeoModel("Reaper", CeoRange.TOP);
public static readonly CeoModel MAMBA = new CeoModel("Mamba", CeoRange.TOP);
public static readonly CeoModel FMJ = new CeoModel("FMJ", CeoRange.TOP);
public static readonly CeoModel STIRLING_GT = new CeoModel("Stirling GT", CeoRange.TOP);
public static readonly CeoModel X_EIGHTY_PROTO = new CeoModel("X80 Proto", CeoRange.TOP);
public static readonly CeoModel TYRUS = new CeoModel("Tyrus", CeoRange.TOP);
public static readonly CeoModel T_TWENTY = new CeoModel("T20", CeoRange.TOP);
public static readonly CeoModel ROOSEVELT_VALOR = new CeoModel("Roosevelt Valor", CeoRange.TOP);
#endregion
public string Name { get; }
public CeoRange Range { get; }
private CeoModel(string name, CeoRange range)
{
Name = name;
Range = range;
CEO_MODELS.Add(this);
}
public static List<CeoModel> GetCeoModels()
{
return CEO_MODELS;
}
public override string ToString()
{
return $"{Name}";
}
public override bool Equals(object obj)
{
return ReferenceEquals(this, obj);
}
public override int GetHashCode()
{
int hashCode = 17;
hashCode = 31 * hashCode + Name.GetHashCode();
hashCode = 31 * hashCode + Range.GetHashCode();
return hashCode;
}
}
}

+ 133
- 0
GTAOnlineCasinoHelper/Classes/CeoPlate.cs View File

@ -0,0 +1,133 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace GTAOnlineCasinoHelper.Classes
{
public class CeoPlate
{
private static readonly Dictionary<string, CeoPlate> PLATE_OBJECT_MAP = new Dictionary<string, CeoPlate>();
#region Mid Range
public static readonly CeoPlate COQUETTE_CLASSIC_TOPLESS = new CeoPlate(CeoModel.COQUETTE_CLASSIC, "T0PL3SS", true);
public static readonly CeoPlate COQUETTE_CLASSIC_TOFFEE = new CeoPlate(CeoModel.COQUETTE_CLASSIC, "T0FF33", false);
public static readonly CeoPlate COQUETTE_CLASSIC_CLASSY = new CeoPlate(CeoModel.COQUETTE_CLASSIC, "CL45SY", false);
public static readonly CeoPlate VERLIERER_PRECIOUS = new CeoPlate(CeoModel.VERLIERER, "PR3C1OUS", true);
public static readonly CeoPlate VERLIERER_OUTFRONT = new CeoPlate(CeoModel.VERLIERER, "0UTFR0NT", false);
public static readonly CeoPlate VERLIERER_CURVES = new CeoPlate(CeoModel.VERLIERER, "CURV35", false);
public static readonly CeoPlate ZENTORNO_WINNING = new CeoPlate(CeoModel.ZENTORNO, "W1NN1NG", true);
public static readonly CeoPlate ZENTORNO_OLDNEWS = new CeoPlate(CeoModel.ZENTORNO, "0LDN3W5", false);
public static readonly CeoPlate ZENTORNO_HERO = new CeoPlate(CeoModel.ZENTORNO, "H3R0", false);
public static readonly CeoPlate TROPOS_RALLYE_1985 = new CeoPlate(CeoModel.TROPOS_RALLYE, "1985", true);
public static readonly CeoPlate TROPOS_RALLYE_IMSORAD = new CeoPlate(CeoModel.TROPOS_RALLYE, "1MS0RAD", false);
public static readonly CeoPlate TROPOS_RALLYE_EIGHTIES = new CeoPlate(CeoModel.TROPOS_RALLYE, "31GHT135", false);
public static readonly CeoPlate SULTAN_RS_SNOWFLKE = new CeoPlate(CeoModel.SULTAN_RS, "SN0WFLK3", true);
public static readonly CeoPlate SULTAN_RS_FIDELITY = new CeoPlate(CeoModel.SULTAN_RS, "F1D3L1TY", false);
public static readonly CeoPlate SULTAN_RS_SHOWOFF = new CeoPlate(CeoModel.SULTAN_RS, "5H0W0FF", false);
public static readonly CeoPlate CHEETAH_BUZZED = new CeoPlate(CeoModel.CHEETAH, "BUZZ3D", true);
public static readonly CeoPlate CHEETAH_MIDNIGHT = new CeoPlate(CeoModel.CHEETAH, "M1DN1GHT", false);
public static readonly CeoPlate CHEETAH_BIGCAT = new CeoPlate(CeoModel.CHEETAH, "B1GC4T", false);
public static readonly CeoPlate SEVEN_SEVENTY_ALLOYS = new CeoPlate(CeoModel.SEVEN_SEVENTY, "4LL0Y5", true);
public static readonly CeoPlate SEVEN_SEVENTY_FRUITY = new CeoPlate(CeoModel.SEVEN_SEVENTY, "FRU1TY", false);
public static readonly CeoPlate SEVEN_SEVENTY_SPEEDY = new CeoPlate(CeoModel.SEVEN_SEVENTY, "SP33DY", false);
public static readonly CeoPlate OMNIS_WIDEBOD = new CeoPlate(CeoModel.OMNIS, "W1D3B0D", true);
public static readonly CeoPlate OMNIS_OBEYME = new CeoPlate(CeoModel.OMNIS, "0BEYM3", false);
public static readonly CeoPlate OMNIS_DIRTY = new CeoPlate(CeoModel.OMNIS, "D1RTY", false);
public static readonly CeoPlate ENTITY_XF_OVERFLOD = new CeoPlate(CeoModel.ENTITY_XF, "0V3RFL0D", true);
public static readonly CeoPlate ENTITY_XF_IMLATE = new CeoPlate(CeoModel.ENTITY_XF, "IML4TE", false);
public static readonly CeoPlate ENTITY_XF_WIDEBOY = new CeoPlate(CeoModel.ENTITY_XF, "W1DEB0Y", false);
public static readonly CeoPlate COQUETTE_BLACKFIN_VINTAGE = new CeoPlate(CeoModel.COQUETTE_BLACKFIN, "V1NT4G3", true);
public static readonly CeoPlate COQUETTE_BLACKFIN_WIPEOUT = new CeoPlate(CeoModel.COQUETTE_BLACKFIN, "W1P3OUT", false);
public static readonly CeoPlate COQUETTE_BLACKFIN_BLKFIN = new CeoPlate(CeoModel.COQUETTE_BLACKFIN, "BLKF1N", false);
#endregion
#region Top Range
public static readonly CeoPlate Z_TYPE_BIGMONEY = new CeoPlate(CeoModel.Z_TYPE, "B1GMON3Y", true);
public static readonly CeoPlate Z_TYPE_KINGPIN = new CeoPlate(CeoModel.Z_TYPE, "K1NGP1N", false);
public static readonly CeoPlate Z_TYPE_CEO = new CeoPlate(CeoModel.Z_TYPE, "CE0", false);
public static readonly CeoPlate ETR_ONE_PRETTY = new CeoPlate(CeoModel.ETR_ONE, "PR3TTY", true);
public static readonly CeoPlate ETR_ONE_BIGBOY = new CeoPlate(CeoModel.ETR_ONE, "B1GB0Y", false);
public static readonly CeoPlate ETR_ONE_MONARCH = new CeoPlate(CeoModel.ETR_ONE, "M0N4RCH", false);
public static readonly CeoPlate EIGHT_ELEVEN_SLICK = new CeoPlate(CeoModel.EIGHT_ELEVEN, "SL1CK", true);
public static readonly CeoPlate EIGHT_ELEVEN_MIDLIFE = new CeoPlate(CeoModel.EIGHT_ELEVEN, "M1DL1F3", false);
public static readonly CeoPlate EIGHT_ELEVEN_REGAL = new CeoPlate(CeoModel.EIGHT_ELEVEN, "R3G4L", false);
public static readonly CeoPlate OSIRIS_SLEEK = new CeoPlate(CeoModel.OSIRIS, "SL33K", true);
public static readonly CeoPlate OSIRIS_OHELLO = new CeoPlate(CeoModel.OSIRIS, "OH3LL0", false);
public static readonly CeoPlate OSIRIS_PHARAOH = new CeoPlate(CeoModel.OSIRIS, "PH4R40H", false);
public static readonly CeoPlate REAPER_DEATH4U = new CeoPlate(CeoModel.REAPER, "D34TH4U", true);
public static readonly CeoPlate REAPER_2FAST4U = new CeoPlate(CeoModel.REAPER, "2FA5T4U", false);
public static readonly CeoPlate REAPER_GRIM = new CeoPlate(CeoModel.REAPER, "GR1M", false);
public static readonly CeoPlate MAMBA_BLKMAMBA = new CeoPlate(CeoModel.MAMBA, "BLKM4MB4", true);
public static readonly CeoPlate MAMBA_OLDBLUE = new CeoPlate(CeoModel.MAMBA, "0LDBLU3", false);
public static readonly CeoPlate MAMBA_VIP = new CeoPlate(CeoModel.MAMBA, "V1P", false);
public static readonly CeoPlate FMJ_CATCHME = new CeoPlate(CeoModel.FMJ, "C4TCHM3", true);
public static readonly CeoPlate FMJ_JOKER = new CeoPlate(CeoModel.FMJ, "J0K3R", false);
public static readonly CeoPlate FMJ_HOT4U = new CeoPlate(CeoModel.FMJ, "H0T4U", false);
public static readonly CeoPlate STIRLING_GT_RALLY = new CeoPlate(CeoModel.STIRLING_GT, "R4LLY", true);
public static readonly CeoPlate STIRLING_GT_MAJESTIC = new CeoPlate(CeoModel.STIRLING_GT, "M4J3ST1C", false);
public static readonly CeoPlate STIRLING_GT_TOURER = new CeoPlate(CeoModel.STIRLING_GT, "T0UR3R", false);
public static readonly CeoPlate X_EIGHTY_PROTO_MAKEBANK = new CeoPlate(CeoModel.X_EIGHTY_PROTO, "M4K3B4NK", true);
public static readonly CeoPlate X_EIGHTY_PROTO_FUTURE = new CeoPlate(CeoModel.X_EIGHTY_PROTO, "FUTUR3", false);
public static readonly CeoPlate X_EIGHTY_PROTO_TURBO = new CeoPlate(CeoModel.X_EIGHTY_PROTO, "TURB0", false);
public static readonly CeoPlate TYRUS_CITRUS = new CeoPlate(CeoModel.TYRUS, "C1TRUS", true);
public static readonly CeoPlate TYRUS_BESTLAP = new CeoPlate(CeoModel.TYRUS, "B35TL4P", false);
public static readonly CeoPlate TYRUS_TREX = new CeoPlate(CeoModel.TYRUS, "TR3X", false);
public static readonly CeoPlate T_TWENTY_DEVIL = new CeoPlate(CeoModel.T_TWENTY, "D3V1L", true);
public static readonly CeoPlate T_TWENTY_CARAMEL = new CeoPlate(CeoModel.T_TWENTY, "CAR4M3L", false);
public static readonly CeoPlate T_TWENTY_TOPSPEED = new CeoPlate(CeoModel.T_TWENTY, "T0PSP33D", false);
public static readonly CeoPlate ROOSEVELT_VALOR_OLDTIMER = new CeoPlate(CeoModel.ROOSEVELT_VALOR, "0LDT1M3R", true);
public static readonly CeoPlate ROOSEVELT_VALOR_LAWLESS = new CeoPlate(CeoModel.ROOSEVELT_VALOR, "L4WLE55", false);
public static readonly CeoPlate ROOSEVELT_VALOR_VALOR = new CeoPlate(CeoModel.ROOSEVELT_VALOR, "V4L0R", false);
#endregion
public CeoModel Model { get; }
public string Plate { get; }
public bool IsCollection { get; }
public string FormattedPlate
{
get
{
return $"{Plate}{(IsCollection ? "*" : "")}";
}
}
private CeoPlate(CeoModel model, string plate, bool collection)
{
Model = model;
Plate = plate;
IsCollection = collection;
PLATE_OBJECT_MAP[plate.ToLower()] = this;
}
public override string ToString()
{
return $"{Plate}{(IsCollection ? "*" : "")} ({Model.ToString()})";
}
public override bool Equals(object obj)
{
return ReferenceEquals(this, obj);
}
public override int GetHashCode()
{
int hashCode = 17;
hashCode = 31 * hashCode + Model.GetHashCode();
hashCode = 31 * hashCode + Plate.GetHashCode();
hashCode = 31 * hashCode + IsCollection.GetHashCode();
return hashCode;
}
public static bool TryFind(string plate, out CeoPlate ceoPlate)
{
if (plate.EndsWith("*"))
{
plate = plate.Substring(0, plate.Length - 1);
}
return PLATE_OBJECT_MAP.TryGetValue(plate.ToLower(), out ceoPlate);
}
}
}

+ 15
- 0
GTAOnlineCasinoHelper/Classes/CeoRange.cs View File

@ -0,0 +1,15 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace GTAOnlineCasinoHelper.Classes
{
public enum CeoRange
{
STANDARD,
MID,
TOP
}
}

+ 29
- 0
GTAOnlineCasinoHelper/Extensions/CeoExtensions.cs View File

@ -0,0 +1,29 @@
using GTAOnlineCasinoHelper.Classes;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace GTAOnlineCasinoHelper.Extensions
{
public static class CeoExtensions
{
public static string GetRangeName(this CeoRange range)
{
switch (range)
{
case CeoRange.STANDARD:
return "Standard Range";
case CeoRange.MID:
return "Mid Range";
case CeoRange.TOP:
return "Top Range";
default:
return null;
}
}
}
}

+ 20
- 1
GTAOnlineCasinoHelper/GTAOnlineCasinoHelper.csproj View File

@ -8,7 +8,7 @@
<ProjectGuid>{F73D2AD0-DCCF-41C5-8903-1ED848F2269D}</ProjectGuid>
<OutputType>WinExe</OutputType>
<RootNamespace>GTAOnlineCasinoHelper</RootNamespace>
<AssemblyName>GTAOnlineCasinoHelper</AssemblyName>
<AssemblyName>GTAOnlineHelper</AssemblyName>
<TargetFrameworkVersion>v4.6.1</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<ProjectTypeGuids>{60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
@ -82,7 +82,18 @@
<Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType>
</ApplicationDefinition>
<Compile Include="Classes\CeoCollection.cs" />
<Compile Include="Classes\CeoPlate.cs" />
<Compile Include="Classes\CeoModel.cs" />
<Compile Include="Classes\CeoRange.cs" />
<Compile Include="Extensions\CeoExtensions.cs" />
<Compile Include="Extensions\ImageExtension.cs" />
<Compile Include="Views\CeoVehicle\CeoVehicleInventory.xaml.cs">
<DependentUpon>CeoVehicleInventory.xaml</DependentUpon>
</Compile>
<Compile Include="Views\CeoVehicle\CeoVehicleSource.xaml.cs">
<DependentUpon>CeoVehicleSource.xaml</DependentUpon>
</Compile>
<Compile Include="Views\Settings\ThemeView.xaml.cs">
<DependentUpon>ThemeView.xaml</DependentUpon>
</Compile>
@ -107,6 +118,14 @@
<DependentUpon>MainWindow.xaml</DependentUpon>
<SubType>Code</SubType>
</Compile>
<Page Include="Views\CeoVehicle\CeoVehicleInventory.xaml">
<Generator>MSBuild:UpdateDesignTimeXaml</Generator>
<SubType>Designer</SubType>
</Page>
<Page Include="Views\CeoVehicle\CeoVehicleSource.xaml">
<Generator>MSBuild:UpdateDesignTimeXaml</Generator>
<SubType>Designer</SubType>
</Page>
<Page Include="Views\Settings\ThemeView.xaml">
<Generator>MSBuild:UpdateDesignTimeXaml</Generator>
</Page>


+ 34
- 3
GTAOnlineCasinoHelper/MainWindow.xaml View File

@ -8,7 +8,7 @@
xmlns:local="clr-namespace:GTAOnlineCasinoHelper"
xmlns:Views="clr-namespace:GTAOnlineCasinoHelper.Views"
mc:Ignorable="d"
Title="GTA Online Casino Helper"
Title="GTA Online Helper"
GlowBrush="{DynamicResource MahApps.Brushes.Accent}"
Height="450"
Width="800">
@ -30,20 +30,51 @@
</Grid.RowDefinitions>
<Controls:MetroAnimatedSingleRowTabControl x:Name="MainTabControl" Grid.Row="0">
<TabItem Header="LuckyWheel">
<TabItem Header="Lucky Wheel">
<ScrollViewer Margin="2"
HorizontalScrollBarVisibility="Auto"
VerticalScrollBarVisibility="Auto">
<Views:LuckyWheel />
</ScrollViewer>
</TabItem>
<TabItem Header="AutoLobby">
<TabItem Header="Auto Lobby">
<ScrollViewer Margin="2"
HorizontalScrollBarVisibility="Auto"
VerticalScrollBarVisibility="Auto">
<Views:AutoLobby />
</ScrollViewer>
</TabItem>
<TabItem Header="CEO Vehicle">
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="Auto" />
</Grid.RowDefinitions>
<Controls:MetroAnimatedSingleRowTabControl x:Name="CeoTabControl" Grid.Row="0">
<TabItem Header="Source">
<ScrollViewer Margin="2"
HorizontalScrollBarVisibility="Auto"
VerticalScrollBarVisibility="Auto">
<Views:CeoVehicleSource />
</ScrollViewer>
</TabItem>
<TabItem Header="Inventory">
<ScrollViewer Margin="2"
HorizontalScrollBarVisibility="Auto"
VerticalScrollBarVisibility="Auto">
<Views:CeoVehicleInventory />
</ScrollViewer>
</TabItem>
<TabItem Header="Sell">
<ScrollViewer Margin="2"
HorizontalScrollBarVisibility="Auto"
VerticalScrollBarVisibility="Auto">
<Views:CeoVehicleSource />
</ScrollViewer>
</TabItem>
</Controls:MetroAnimatedSingleRowTabControl>
</Grid>
</TabItem>
<!--<TabItem Header="TestTwo">
<ScrollViewer Margin="2"
HorizontalScrollBarVisibility="Auto"


+ 2
- 0
GTAOnlineCasinoHelper/MainWindow.xaml.cs View File

@ -1,4 +1,5 @@
using GTAOnlineCasinoHelper.Extensions;
using GTAOnlineCasinoHelper.Views;
using GTAOnlineCasinoHelper.Windows;
using MahApps.Metro;
using MahApps.Metro.Controls;
@ -29,6 +30,7 @@ namespace GTAOnlineCasinoHelper
public partial class MainWindow : MetroWindow
{
public static MainWindow Instance { get; set; }
public static CeoVehicleInventory CeoVehicleInventory { get; set; }
public MainWindow()
{


+ 5
- 5
GTAOnlineCasinoHelper/Properties/AssemblyInfo.cs View File

@ -7,11 +7,11 @@ using System.Windows;
// General Information about an assembly is controlled through the following
// set of attributes. Change these attribute values to modify the information
// associated with an assembly.
[assembly: AssemblyTitle("GTAOnlineCasinoHelper")]
[assembly: AssemblyDescription("GTA Online - Diamond Casino & Resort Helper")]
[assembly: AssemblyTitle("GTA Online Helper")]
[assembly: AssemblyDescription("GTA Online Helper")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("oskar3123")]
[assembly: AssemblyProduct("GTAOnlineCasinoHelper")]
[assembly: AssemblyProduct("GTA Online Helper")]
[assembly: AssemblyCopyright("Copyright © 2019 oskar3123")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
@ -51,5 +51,5 @@ using System.Windows;
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.1.1.0")]
[assembly: AssemblyFileVersion("1.1.1.0")]
[assembly: AssemblyVersion("1.2.0.0")]
[assembly: AssemblyFileVersion("1.2.0.0")]

+ 11
- 0
GTAOnlineCasinoHelper/Properties/Settings.Designer.cs View File

@ -58,5 +58,16 @@ namespace GTAOnlineCasinoHelper.Properties {
this["ThemeColorScheme"] = value;
}
}
[global::System.Configuration.UserScopedSettingAttribute()]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
public global::System.Collections.ArrayList Test {
get {
return ((global::System.Collections.ArrayList)(this["Test"]));
}
set {
this["Test"] = value;
}
}
}
}

+ 3
- 0
GTAOnlineCasinoHelper/Properties/Settings.settings View File

@ -11,5 +11,8 @@
<Setting Name="ThemeColorScheme" Type="System.String" Scope="User">
<Value Profile="(Default)" />
</Setting>
<Setting Name="Test" Type="System.Collections.ArrayList" Scope="User">
<Value Profile="(Default)" />
</Setting>
</Settings>
</SettingsFile>

+ 505
- 0
GTAOnlineCasinoHelper/Views/CeoVehicle/CeoVehicleInventory.xaml View File

@ -0,0 +1,505 @@
<?xml version="1.0" encoding="UTF-8"?>
<UserControl x:Class="GTAOnlineCasinoHelper.Views.CeoVehicleInventory"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:iconPacks="http://metro.mahapps.com/winfx/xaml/iconpacks"
xmlns:Controls="http://metro.mahapps.com/winfx/xaml/controls"
xmlns:GTAOnlineCasinoHelper="clr-namespace:GTAOnlineCasinoHelper">
<UserControl.Resources>
<Thickness x:Key="ControlMargin">5</Thickness>
</UserControl.Resources>
<Grid Margin="5 0 5 0">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*" />
<ColumnDefinition Width="*" />
<ColumnDefinition Width="*" />
<ColumnDefinition Width="*" />
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition Height="*" />
<RowDefinition Height="*" />
<RowDefinition Height="*" />
</Grid.RowDefinitions>
<Grid Grid.Column="0"
Grid.Row="0">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*" />
<ColumnDefinition Width="*" />
<ColumnDefinition Width="*" />
<ColumnDefinition Width="*" />
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition Height="*" />
<RowDefinition Height="*" />
<RowDefinition Height="*" />
<RowDefinition Height="*" />
</Grid.RowDefinitions>
<StackPanel Grid.Column="0"
Grid.ColumnSpan="4"
Grid.Row="0"
HorizontalAlignment="Center"
VerticalAlignment="Bottom">
<TextBlock Text="Z-Type"
FontSize="16" />
</StackPanel>
<!--#region plate0-->
<TextBlock Grid.Column="0"
Grid.Row="1"
HorizontalAlignment="Right"
VerticalAlignment="Center"
Text="{Binding TopPlates[0][0][0].FormattedPlate}" />
<Button DataContext="{Binding TopPlates[0][0][0]}"
Grid.Column="1"
Grid.Row="1"
HorizontalAlignment="Center"
Content="-"
Margin="2"
MinWidth="25"
Click="Button_Remove_Click" />
<TextBlock Grid.Column="2"
Grid.Row="1"
HorizontalAlignment="Center"
VerticalAlignment="Center"
Text="{Binding TopPlateInventory[0][0][0]}" />
<Button DataContext="{Binding TopPlates[0][0][0]}"
Grid.Column="3"
Grid.Row="1"
HorizontalAlignment="Center"
Content="+"
Margin="2"
MinWidth="25"
Click="Button_Add_Click" />
<!--#endregion-->
<!--#region plate1-->
<TextBlock Grid.Column="0"
Grid.Row="2"
HorizontalAlignment="Right"
VerticalAlignment="Center"
Text="{Binding TopPlates[0][0][1].FormattedPlate}" />
<Button DataContext="{Binding TopPlates[0][0][1]}"
Grid.Column="1"
Grid.Row="2"
HorizontalAlignment="Center"
Content="-"
Margin="2"
MinWidth="25"
Click="Button_Remove_Click" />
<TextBlock Grid.Column="2"
Grid.Row="2"
HorizontalAlignment="Center"
VerticalAlignment="Center"
Text="{Binding TopPlateInventory[0][0][1]}" />
<Button DataContext="{Binding TopPlates[0][0][1]}"
Grid.Column="3"
Grid.Row="2"
HorizontalAlignment="Center"
Content="+"
Margin="2"
MinWidth="25"
Click="Button_Add_Click" />
<!--#endregion-->
<!--#region plate2-->
<TextBlock Grid.Column="0"
Grid.Row="3"
HorizontalAlignment="Right"
VerticalAlignment="Center"
Text="{Binding TopPlates[0][0][2].FormattedPlate}" />
<Button DataContext="{Binding TopPlates[0][0][2]}"
Grid.Column="1"
Grid.Row="3"
HorizontalAlignment="Center"
Content="-"
Margin="2"
MinWidth="25"
Click="Button_Remove_Click" />
<TextBlock Grid.Column="2"
Grid.Row="3"
HorizontalAlignment="Center"
VerticalAlignment="Center"
Text="{Binding TopPlateInventory[0][0][2]}" />
<Button DataContext="{Binding TopPlates[0][0][2]}"
Grid.Column="3"
Grid.Row="3"
HorizontalAlignment="Center"
Content="+"
Margin="2"
MinWidth="25"
Click="Button_Add_Click" />
<!--#endregion-->
</Grid>
<Grid Grid.Column="1"
Grid.Row="0">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*" />
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition Height="*" />
<RowDefinition Height="*" />
</Grid.RowDefinitions>
<StackPanel Grid.Column="0"
Grid.Row="0"
HorizontalAlignment="Center"
VerticalAlignment="Bottom">
<TextBlock Text="ETR1"
FontSize="16" />
</StackPanel>
<StackPanel Grid.Column="0"
Grid.Row="1"
HorizontalAlignment="Center"
VerticalAlignment="Top"
Orientation="Horizontal">
<Button Content="PR3TTY"
Margin="2" />
<Button Content="B1GB0Y"
Margin="2" />
<Button Content="M0N4RCH"
Margin="2" />
</StackPanel>
</Grid>
<Grid Grid.Column="2"
Grid.Row="0">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*" />
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition Height="*" />
<RowDefinition Height="*" />
</Grid.RowDefinitions>
<StackPanel Grid.Column="0"
Grid.Row="0"
HorizontalAlignment="Center"
VerticalAlignment="Bottom">
<TextBlock Text="811"
FontSize="16" />
</StackPanel>
<StackPanel Grid.Column="0"
Grid.Row="1"
HorizontalAlignment="Center"
VerticalAlignment="Top"
Orientation="Horizontal">
<Button Content="SL1CK"
Margin="2" />
<Button Content="M1DL1F3"
Margin="2" />
<Button Content="R3G4L"
Margin="2" />
</StackPanel>
</Grid>
<Grid Grid.Column="3"
Grid.Row="0">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*" />
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition Height="*" />
<RowDefinition Height="*" />
</Grid.RowDefinitions>
<StackPanel Grid.Column="0"
Grid.Row="0"
HorizontalAlignment="Center"
VerticalAlignment="Bottom">
<TextBlock Text="Osiris"
FontSize="16" />
</StackPanel>
<StackPanel Grid.Column="0"
Grid.Row="1"
HorizontalAlignment="Center"
VerticalAlignment="Top"
Orientation="Horizontal">
<Button Content="SL33K"
Margin="2"
BorderBrush="#FF66CC66"
Foreground="#FF66CC66"
Controls:ControlsHelper.FocusBorderBrush="#FF66CC66" />
<Button Content="OH3LL0"
Margin="2"
BorderBrush="#FFCC6666"
Foreground="#FFCC6666"
Controls:ControlsHelper.FocusBorderBrush="#FFCC6666" />
<Button Content="PH4R40H"
Margin="2"
BorderBrush="#FFCC6666"
Foreground="#FFCC6666"
Controls:ControlsHelper.FocusBorderBrush="#FFCC6666" />
</StackPanel>
</Grid>
<Grid Grid.Column="0"
Grid.Row="1">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*" />
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition Height="*" />
<RowDefinition Height="*" />
</Grid.RowDefinitions>
<StackPanel Grid.Column="0"
Grid.Row="0"
HorizontalAlignment="Center"
VerticalAlignment="Bottom">
<TextBlock Text="Reaper"
FontSize="16" />
</StackPanel>
<StackPanel Grid.Column="0"
Grid.Row="1"
HorizontalAlignment="Center"
VerticalAlignment="Top"
Orientation="Horizontal">
<Button Content="D34TH4U"
Margin="2" />
<Button Content="2FA5T4U"
Margin="2" />
<Button Content="GR1M"
Margin="2" />
</StackPanel>
</Grid>
<Grid Grid.Column="1"
Grid.Row="1">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*" />
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition Height="*" />
<RowDefinition Height="*" />
</Grid.RowDefinitions>
<StackPanel Grid.Column="0"
Grid.Row="0"
HorizontalAlignment="Center"
VerticalAlignment="Bottom">
<TextBlock Text="Mamba"
FontSize="16" />
</StackPanel>
<StackPanel Grid.Column="0"
Grid.Row="1"
HorizontalAlignment="Center"
VerticalAlignment="Top"
Orientation="Horizontal">
<Button Content="BLKM4MB4"
Margin="2" />
<Button Content="0LDBLU3"
Margin="2" />
<Button Content="V1P"
Margin="2" />
</StackPanel>
</Grid>
<Grid Grid.Column="2"
Grid.Row="1">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*" />
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition Height="*" />
<RowDefinition Height="*" />
</Grid.RowDefinitions>
<StackPanel Grid.Column="0"
Grid.Row="0"
HorizontalAlignment="Center"
VerticalAlignment="Bottom">
<TextBlock Text="FMJ"
FontSize="16" />
</StackPanel>
<StackPanel Grid.Column="0"
Grid.Row="1"
HorizontalAlignment="Center"
VerticalAlignment="Top"
Orientation="Horizontal">
<Button Content="C4TCHM3"
Margin="2" />
<Button Content="J0K3R"
Margin="2" />
<Button Content="H0T4U"
Margin="2" />
</StackPanel>
</Grid>
<Grid Grid.Column="3"
Grid.Row="1">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*" />
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition Height="*" />
<RowDefinition Height="*" />
</Grid.RowDefinitions>
<StackPanel Grid.Column="0"
Grid.Row="0"
HorizontalAlignment="Center"
VerticalAlignment="Bottom">
<TextBlock Text="Stirling GT"
FontSize="16" />
</StackPanel>
<StackPanel Grid.Column="0"
Grid.Row="1"
HorizontalAlignment="Center"
VerticalAlignment="Top"
Orientation="Horizontal">
<Button Content="R4LLY"
Margin="2" />
<Button Content="M4J3ST1C"
Margin="2" />
<Button Content="T0UR3R"
Margin="2" />
</StackPanel>
</Grid>
<Grid Grid.Column="0"
Grid.Row="2">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*" />
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition Height="*" />
<RowDefinition Height="*" />
</Grid.RowDefinitions>
<StackPanel Grid.Column="0"
Grid.Row="0"
HorizontalAlignment="Center"
VerticalAlignment="Bottom">
<TextBlock Text="X80 Proto"
FontSize="16" />
</StackPanel>
<StackPanel Grid.Column="0"
Grid.Row="1"
HorizontalAlignment="Center"
VerticalAlignment="Top"
Orientation="Horizontal">
<Button Content="M4K3B4NK"
Margin="2"
BorderBrush="#FF66CC66"
Foreground="#FF66CC66"
Controls:ControlsHelper.FocusBorderBrush="#FF66CC66" />
<Button Content="FUTUR3"
Margin="2"
BorderBrush="#FFCC6666"
Foreground="#FFCC6666"
Controls:ControlsHelper.FocusBorderBrush="#FFCC6666" />
<Button Content="TURB0"
Margin="2"
BorderBrush="#FFCC6666"
Foreground="#FFCC6666"
Controls:ControlsHelper.FocusBorderBrush="#FFCC6666" />
</StackPanel>
</Grid>
<Grid Grid.Column="1"
Grid.Row="2">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*" />
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition Height="*" />
<RowDefinition Height="*" />
</Grid.RowDefinitions>
<StackPanel Grid.Column="0"
Grid.Row="0"
HorizontalAlignment="Center"
VerticalAlignment="Bottom">
<TextBlock Text="Tyrus"
FontSize="16" />
</StackPanel>
<StackPanel Grid.Column="0"
Grid.Row="1"
HorizontalAlignment="Center"
VerticalAlignment="Top"
Orientation="Horizontal">
<Button Content="C1TRUS"
Margin="2" />
<Button Content="B35TL4P"
Margin="2" />
<Button Content="TR3X"
Margin="2" />
</StackPanel>
</Grid>
<Grid Grid.Column="2"
Grid.Row="2">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*" />
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition Height="*" />
<RowDefinition Height="*" />
</Grid.RowDefinitions>
<StackPanel Grid.Column="0"
Grid.Row="0"
HorizontalAlignment="Center"
VerticalAlignment="Bottom">
<TextBlock Text="T20"
FontSize="16" />
</StackPanel>
<StackPanel Grid.Column="0"
Grid.Row="1"
HorizontalAlignment="Center"
VerticalAlignment="Top"
Orientation="Horizontal">
<Button Content="D3V1L"
Margin="2"
BorderBrush="#FF66CC66"
Foreground="#FF66CC66"
Controls:ControlsHelper.FocusBorderBrush="#FF66CC66" />
<Button Content="CAR4M3L"
Margin="2"
BorderBrush="#FFCC6666"
Foreground="#FFCC6666"
Controls:ControlsHelper.FocusBorderBrush="#FFCC6666" />
<Button Content="T0PSP33D"
Margin="2"
BorderBrush="#FFCC6666"
Foreground="#FFCC6666"
Controls:ControlsHelper.FocusBorderBrush="#FFCC6666" />
</StackPanel>
</Grid>
<Grid Grid.Column="3"
Grid.Row="2">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*" />
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition Height="*" />
<RowDefinition Height="*" />
</Grid.RowDefinitions>
<StackPanel Grid.Column="0"
Grid.Row="0"
HorizontalAlignment="Center"
VerticalAlignment="Bottom">
<TextBlock Text="Roosevelt Valor"
FontSize="16" />
</StackPanel>
<StackPanel Grid.Column="0"
Grid.Row="1"
HorizontalAlignment="Center"
VerticalAlignment="Top"
Orientation="Horizontal">
<Button Content="0LDT1M3R"
Margin="2"
BorderBrush="#FF66CC66"
Foreground="#FF66CC66"
Controls:ControlsHelper.FocusBorderBrush="#FF66CC66" />
<Button Content="L4WLE55"
Margin="2"
BorderBrush="#FFCC6666"
Foreground="#FFCC6666"
Controls:ControlsHelper.FocusBorderBrush="#FFCC6666" />
<Button Content="V4L0R"
Margin="2"
BorderBrush="#FFCC6666"
Foreground="#FFCC6666"
Controls:ControlsHelper.FocusBorderBrush="#FFCC6666" />
</StackPanel>
</Grid>
</Grid>
</UserControl>
<!--<ContentView xmlns="http://xamarin.com/schemas/2014/forms"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
x:Class="GTAOnlineCasinoHelper.Views.LuckyWheel">
<ContentView.Content>
<StackLayout>
<Label Text="Hello Xamarin.Forms!" />
</StackLayout>
</ContentView.Content>
</ContentView>-->

+ 327
- 0
GTAOnlineCasinoHelper/Views/CeoVehicle/CeoVehicleInventory.xaml.cs View File

@ -0,0 +1,327 @@
using GTAOnlineCasinoHelper.Classes;
using MahApps.Metro.Controls;
using MahApps.Metro.Controls.Dialogs;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Diagnostics;
using System.Linq;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
using System.Text;
using System.Threading;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Controls;
namespace GTAOnlineCasinoHelper.Views
{
public partial class CeoVehicleInventory : UserControl, INotifyPropertyChanged
{
private Dictionary<int, Dictionary<int, int[]>> topPlateInventory = new Dictionary<int, Dictionary<int, int[]>>()
{
[0] = new Dictionary<int, int[]>()
{
[0] = new int[] { 0, 0, 0 },
[1] = new int[] { 0, 0, 0 },
[2] = new int[] { 0, 0, 0 }
},
[1] = new Dictionary<int, int[]>()
{
[0] = new int[] { 0, 0, 0 },
[1] = new int[] { 0, 0, 0 },
[2] = new int[] { 0, 0, 0 }
},
[2] = new Dictionary<int, int[]>()
{
[0] = new int[] { 0, 0, 0 },
[1] = new int[] { 0, 0, 0 },
[2] = new int[] { 0, 0, 0 }
},
[3] = new Dictionary<int, int[]>()
{
[0] = new int[] { 0, 0, 0 },
[1] = new int[] { 0, 0, 0 },
[2] = new int[] { 0, 0, 0 }
}
};
public Dictionary<int, Dictionary<int, int[]>> TopPlateInventory
{
get
{
return topPlateInventory;
}
private set
{
topPlateInventory = value;
OnPropertyChanged("TopPlateInventory");
}
}
private Dictionary<int, Dictionary<int, CeoPlate[]>> midPlates = new Dictionary<int, Dictionary<int, CeoPlate[]>>()
{
[0] = new Dictionary<int, CeoPlate[]>()
{
[0] = new CeoPlate[]
{
CeoPlate.COQUETTE_CLASSIC_TOPLESS,
CeoPlate.COQUETTE_CLASSIC_TOFFEE,
CeoPlate.COQUETTE_CLASSIC_CLASSY
},
[1] = new CeoPlate[]
{
CeoPlate.SULTAN_RS_SNOWFLKE,
CeoPlate.SULTAN_RS_FIDELITY,
CeoPlate.SULTAN_RS_SHOWOFF
}
},
[1] = new Dictionary<int, CeoPlate[]>()
{
[0] = new CeoPlate[]
{
CeoPlate.VERLIERER_PRECIOUS,
CeoPlate.VERLIERER_OUTFRONT,
CeoPlate.VERLIERER_CURVES
},
[1] = new CeoPlate[]
{
CeoPlate.CHEETAH_BUZZED,
CeoPlate.CHEETAH_MIDNIGHT,
CeoPlate.CHEETAH_BIGCAT
},
[2] = new CeoPlate[]
{
CeoPlate.ENTITY_XF_OVERFLOD,
CeoPlate.ENTITY_XF_IMLATE,
CeoPlate.ENTITY_XF_WIDEBOY
}
},
[2] = new Dictionary<int, CeoPlate[]>()
{
[0] = new CeoPlate[]
{
CeoPlate.ZENTORNO_WINNING,
CeoPlate.ZENTORNO_OLDNEWS,
CeoPlate.ZENTORNO_HERO
},
[1] = new CeoPlate[]
{
CeoPlate.COQUETTE_BLACKFIN_VINTAGE,
CeoPlate.COQUETTE_BLACKFIN_WIPEOUT,
CeoPlate.COQUETTE_BLACKFIN_BLKFIN
},
[2] = new CeoPlate[]
{
CeoPlate.SULTAN_RS_SNOWFLKE,
CeoPlate.SULTAN_RS_FIDELITY,
CeoPlate.SULTAN_RS_SHOWOFF
}
},
[3] = new Dictionary<int, CeoPlate[]>()
{
[0] = new CeoPlate[]
{
CeoPlate.TROPOS_RALLYE_1985,
CeoPlate.TROPOS_RALLYE_IMSORAD,
CeoPlate.TROPOS_RALLYE_EIGHTIES
},
[1] = new CeoPlate[]
{
CeoPlate.OMNIS_WIDEBOD,
CeoPlate.OMNIS_OBEYME,
CeoPlate.OMNIS_DIRTY
}
}
};
public Dictionary<int, Dictionary<int, CeoPlate[]>> MidPlates
{
get
{
return midPlates;
}
set
{
midPlates = value;
OnPropertyChanged("MidPlates");
}
}
private Dictionary<int, Dictionary<int, CeoPlate[]>> topPlates = new Dictionary<int, Dictionary<int, CeoPlate[]>>()
{
[0] = new Dictionary<int, CeoPlate[]>()
{
[0] = new CeoPlate[]
{
CeoPlate.Z_TYPE_BIGMONEY,
CeoPlate.Z_TYPE_KINGPIN,
CeoPlate.Z_TYPE_CEO
},
[1] = new CeoPlate[]
{
CeoPlate.REAPER_DEATH4U,
CeoPlate.REAPER_2FAST4U,
CeoPlate.REAPER_GRIM
},
[2] = new CeoPlate[]
{
CeoPlate.X_EIGHTY_PROTO_MAKEBANK,
CeoPlate.X_EIGHTY_PROTO_FUTURE,
CeoPlate.X_EIGHTY_PROTO_TURBO
}
},
[1] = new Dictionary<int, CeoPlate[]>()
{
[0] = new CeoPlate[]
{
CeoPlate.ETR_ONE_PRETTY,
CeoPlate.ETR_ONE_BIGBOY,
CeoPlate.ETR_ONE_MONARCH
},
[1] = new CeoPlate[]
{
CeoPlate.MAMBA_BLKMAMBA,
CeoPlate.MAMBA_OLDBLUE,
CeoPlate.MAMBA_VIP
},
[2] = new CeoPlate[]
{
CeoPlate.TYRUS_CITRUS,
CeoPlate.TYRUS_BESTLAP,
CeoPlate.TYRUS_TREX
}
},
[2] = new Dictionary<int, CeoPlate[]>()
{
[0] = new CeoPlate[]
{
CeoPlate.EIGHT_ELEVEN_SLICK,
CeoPlate.EIGHT_ELEVEN_MIDLIFE,
CeoPlate.EIGHT_ELEVEN_REGAL
},
[1] = new CeoPlate[]
{
CeoPlate.FMJ_CATCHME,
CeoPlate.FMJ_JOKER,
CeoPlate.FMJ_HOT4U
},
[2] = new CeoPlate[]
{
CeoPlate.T_TWENTY_DEVIL,
CeoPlate.T_TWENTY_CARAMEL,
CeoPlate.T_TWENTY_TOPSPEED
}
},
[3] = new Dictionary<int, CeoPlate[]>()
{
[0] = new CeoPlate[]
{
CeoPlate.OSIRIS_SLEEK,
CeoPlate.OSIRIS_OHELLO,
CeoPlate.OSIRIS_PHARAOH
},
[1] = new CeoPlate[]
{
CeoPlate.STIRLING_GT_RALLY,
CeoPlate.STIRLING_GT_MAJESTIC,
CeoPlate.STIRLING_GT_TOURER
},
[2] = new CeoPlate[]
{
CeoPlate.ROOSEVELT_VALOR_OLDTIMER,
CeoPlate.ROOSEVELT_VALOR_LAWLESS,
CeoPlate.ROOSEVELT_VALOR_VALOR
}
}
};
public Dictionary<int, Dictionary<int, CeoPlate[]>> TopPlates
{
get
{
return topPlates;
}
set
{
topPlates = value;
OnPropertyChanged("TopPlates");
}
}
public CeoVehicleInventory()
{
this.InitializeComponent();
this.DataContext = this;
MainWindow.CeoVehicleInventory = this;
}
public event PropertyChangedEventHandler PropertyChanged;
protected virtual void OnPropertyChanged(string propertyName)
{
PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(propertyName));
}
private bool GetColRowIndex(object sender, out int col, out int row, out int index)
{
Button button = sender as Button;
if (!(button?.DataContext is CeoPlate plate) || !(button?.Parent is Grid grid))
{
col = 0;
row = 0;
index = 0;
return false;
}
col = Grid.GetColumn(grid);
row = Grid.GetRow(grid);
int tries = 3;
index = 0;
Dictionary<int, Dictionary<int, CeoPlate[]>> dictionary;
if (plate.Model.Range == CeoRange.STANDARD)
{
// TODO add standard range
dictionary = new Dictionary<int, Dictionary<int, CeoPlate[]>>();
}
else if (plate.Model.Range == CeoRange.MID)
{
dictionary = MidPlates;
}
else
{
dictionary = TopPlates;
}
while (tries > 0 && !dictionary[col][row][index].Equals(plate))
{
index++;
tries--;
}
return true;
}
private async void Button_Add_Click(object sender, RoutedEventArgs e)
{
if (!GetColRowIndex(sender, out int col, out int row, out int index))
{
await MainWindow.Instance.ShowMessageAsync("Failed to get plate or grid", "Failed to get plate or grid from button", MessageDialogStyle.Affirmative);
return;
}
TopPlateInventory[col][row][index]++;
OnPropertyChanged("TopPlateInventory");
}
private async void Button_Remove_Click(object sender, RoutedEventArgs e)
{
if (!GetColRowIndex(sender, out int col, out int row, out int index))
{
await MainWindow.Instance.ShowMessageAsync("Failed to get plate or grid", "Failed to get plate or grid from button", MessageDialogStyle.Affirmative);
return;
}
TopPlateInventory[col][row][index]--;
OnPropertyChanged("TopPlateInventory");
}
}
}

+ 831
- 0
GTAOnlineCasinoHelper/Views/CeoVehicle/CeoVehicleSource.xaml View File

@ -0,0 +1,831 @@
<?xml version="1.0" encoding="UTF-8"?>
<UserControl x:Class="GTAOnlineCasinoHelper.Views.CeoVehicleSource"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:iconPacks="http://metro.mahapps.com/winfx/xaml/iconpacks"
xmlns:Controls="http://metro.mahapps.com/winfx/xaml/controls"
xmlns:GTAOnlineCasinoHelper="clr-namespace:GTAOnlineCasinoHelper">
<UserControl.Resources>
<Thickness x:Key="ControlMargin">5</Thickness>
</UserControl.Resources>
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="Auto" />
</Grid.RowDefinitions>
<Controls:MetroAnimatedSingleRowTabControl Grid.Row="0"
SelectedIndex="1">
<TabItem Header="Mid">
<ScrollViewer HorizontalScrollBarVisibility="Auto"
VerticalScrollBarVisibility="Auto">
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*" />
<ColumnDefinition Width="*" />
<ColumnDefinition Width="*" />
<ColumnDefinition Width="*" />
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition Height="*" />
<RowDefinition Height="*" />
<RowDefinition Height="*" />
</Grid.RowDefinitions>
<Grid Grid.Column="0"
Grid.Row="0">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*" />
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition Height="*" />
<RowDefinition Height="*" />
</Grid.RowDefinitions>
<StackPanel Grid.Column="0"
Grid.Row="0"
HorizontalAlignment="Center"
VerticalAlignment="Bottom">
<TextBlock Text="{Binding MidPlates[0][0][0].Model}"
FontSize="16" />
</StackPanel>
<StackPanel Grid.Column="0"
Grid.Row="1"
HorizontalAlignment="Center"
VerticalAlignment="Top"
Orientation="Horizontal">
<Button Content="{Binding MidPlates[0][0][0].FormattedPlate}"
Margin="2"
Click="Button_Source_Click" />
<Button Content="{Binding MidPlates[0][0][1].FormattedPlate}"
Margin="2"
Click="Button_Source_Click" />
<Button Content="{Binding MidPlates[0][0][2].FormattedPlate}"
Margin="2"
Click="Button_Source_Click" />
</StackPanel>
</Grid>
<Grid Grid.Column="1"
Grid.Row="0">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*" />
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition Height="*" />
<RowDefinition Height="*" />
</Grid.RowDefinitions>
<StackPanel Grid.Column="0"
Grid.Row="0"
HorizontalAlignment="Center"
VerticalAlignment="Bottom">
<TextBlock Text="{Binding MidPlates[1][0][0].Model}"
FontSize="16" />
</StackPanel>
<StackPanel Grid.Column="0"
Grid.Row="1"
HorizontalAlignment="Center"
VerticalAlignment="Top"
Orientation="Horizontal">
<Button Content="{Binding MidPlates[1][0][0].FormattedPlate}"
Margin="2"
Click="Button_Source_Click" />
<Button Content="{Binding MidPlates[1][0][1].FormattedPlate}"
Margin="2"
Click="Button_Source_Click" />
<Button Content="{Binding MidPlates[1][0][2].FormattedPlate}"
Margin="2"
Click="Button_Source_Click" />
</StackPanel>
</Grid>
<Grid Grid.Column="2"
Grid.Row="0">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*" />
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition Height="*" />
<RowDefinition Height="*" />
</Grid.RowDefinitions>
<StackPanel Grid.Column="0"
Grid.Row="0"
HorizontalAlignment="Center"
VerticalAlignment="Bottom">
<TextBlock Text="{Binding MidPlates[2][0][0].Model}"
FontSize="16" />
</StackPanel>
<StackPanel Grid.Column="0"
Grid.Row="1"
HorizontalAlignment="Center"
VerticalAlignment="Top"
Orientation="Horizontal">
<Button Content="{Binding MidPlates[2][0][0].FormattedPlate}"
Margin="2"
Click="Button_Source_Click" />
<Button Content="{Binding MidPlates[2][0][1].FormattedPlate}"
Margin="2"
Click="Button_Source_Click" />
<Button Content="{Binding MidPlates[2][0][2].FormattedPlate}"
Margin="2"
Click="Button_Source_Click" />
</StackPanel>
</Grid>
<Grid Grid.Column="3"
Grid.Row="0">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*" />
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition Height="*" />
<RowDefinition Height="*" />
</Grid.RowDefinitions>
<StackPanel Grid.Column="0"
Grid.Row="0"
HorizontalAlignment="Center"
VerticalAlignment="Bottom">
<TextBlock Text="{Binding MidPlates[3][0][0].Model}"
FontSize="16" />
</StackPanel>
<StackPanel Grid.Column="0"
Grid.Row="1"
HorizontalAlignment="Center"
VerticalAlignment="Top"
Orientation="Horizontal">
<Button Content="{Binding MidPlates[3][0][0].FormattedPlate}"
Margin="2"
Click="Button_Source_Click" />
<Button Content="{Binding MidPlates[3][0][1].FormattedPlate}"
Margin="2"
Click="Button_Source_Click" />
<Button Content="{Binding MidPlates[3][0][2].FormattedPlate}"
Margin="2"
Click="Button_Source_Click" />
</StackPanel>
</Grid>
<Grid Grid.Column="0"
Grid.Row="1">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*" />
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition Height="*" />
<RowDefinition Height="*" />
</Grid.RowDefinitions>
<StackPanel Grid.Column="0"
Grid.Row="0"
HorizontalAlignment="Center"
VerticalAlignment="Bottom">
<TextBlock Text="{Binding MidPlates[0][1][0].Model}"
FontSize="16" />
</StackPanel>
<StackPanel Grid.Column="0"
Grid.Row="1"
HorizontalAlignment="Center"
VerticalAlignment="Top"
Orientation="Horizontal">
<Button Content="{Binding MidPlates[0][1][0].FormattedPlate}"
Margin="2"
Click="Button_Source_Click" />
<Button Content="{Binding MidPlates[0][1][1].FormattedPlate}"
Margin="2"
Click="Button_Source_Click" />
<Button Content="{Binding MidPlates[0][1][2].FormattedPlate}"
Margin="2"
Click="Button_Source_Click" />
</StackPanel>
</Grid>
<Grid Grid.Column="1"
Grid.Row="1">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*" />
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition Height="*" />
<RowDefinition Height="*" />
</Grid.RowDefinitions>
<StackPanel Grid.Column="0"
Grid.Row="0"
HorizontalAlignment="Center"
VerticalAlignment="Bottom">
<TextBlock Text="{Binding MidPlates[1][1][0].Model}"
FontSize="16" />
</StackPanel>
<StackPanel Grid.Column="0"
Grid.Row="1"
HorizontalAlignment="Center"
VerticalAlignment="Top"
Orientation="Horizontal">
<Button Content="{Binding MidPlates[1][1][0].FormattedPlate}"
Margin="2"
Click="Button_Source_Click" />
<Button Content="{Binding MidPlates[1][1][1].FormattedPlate}"
Margin="2"
Click="Button_Source_Click" />
<Button Content="{Binding MidPlates[1][1][2].FormattedPlate}"
Margin="2"
Click="Button_Source_Click" />
</StackPanel>
</Grid>
<Grid Grid.Column="2"
Grid.Row="1">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*" />
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition Height="*" />
<RowDefinition Height="*" />
</Grid.RowDefinitions>
<StackPanel Grid.Column="0"
Grid.Row="0"
HorizontalAlignment="Center"
VerticalAlignment="Bottom">
<TextBlock Text="{Binding MidPlates[2][1][0].Model}"
FontSize="16" />
</StackPanel>
<StackPanel Grid.Column="0"
Grid.Row="1"
HorizontalAlignment="Center"
VerticalAlignment="Top"
Orientation="Horizontal">
<Button Content="{Binding MidPlates[2][1][0].FormattedPlate}"
Margin="2"
Click="Button_Source_Click" />
<Button Content="{Binding MidPlates[2][1][1].FormattedPlate}"
Margin="2"
Click="Button_Source_Click" />
<Button Content="{Binding MidPlates[2][1][2].FormattedPlate}"
Margin="2"
Click="Button_Source_Click" />
</StackPanel>
</Grid>
<Grid Grid.Column="3"
Grid.Row="1">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*" />
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition Height="*" />
<RowDefinition Height="*" />
</Grid.RowDefinitions>
<StackPanel Grid.Column="0"
Grid.Row="0"
HorizontalAlignment="Center"
VerticalAlignment="Bottom">
<TextBlock Text="{Binding MidPlates[3][1][0].Model}"
FontSize="16" />
</StackPanel>
<StackPanel Grid.Column="0"
Grid.Row="1"
HorizontalAlignment="Center"
VerticalAlignment="Top"
Orientation="Horizontal">
<Button Content="{Binding MidPlates[3][1][0].FormattedPlate}"
Margin="2"
Click="Button_Source_Click" />
<Button Content="{Binding MidPlates[3][1][1].FormattedPlate}"
Margin="2"
Click="Button_Source_Click" />
<Button Content="{Binding MidPlates[3][1][2].FormattedPlate}"
Margin="2"
Click="Button_Source_Click" />
</StackPanel>
</Grid>
<Grid Grid.Column="1"
Grid.Row="2">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*" />
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition Height="*" />
<RowDefinition Height="*" />
</Grid.RowDefinitions>
<StackPanel Grid.Column="0"
Grid.Row="0"
HorizontalAlignment="Center"
VerticalAlignment="Bottom">
<TextBlock Text="{Binding MidPlates[1][2][0].Model}"
FontSize="16" />
</StackPanel>
<StackPanel Grid.Column="0"
Grid.Row="1"
HorizontalAlignment="Center"
VerticalAlignment="Top"
Orientation="Horizontal">
<Button Content="{Binding MidPlates[1][2][0].FormattedPlate}"
Margin="2"
Click="Button_Source_Click" />
<Button Content="{Binding MidPlates[1][2][1].FormattedPlate}"
Margin="2"
Click="Button_Source_Click" />
<Button Content="{Binding MidPlates[1][2][2].FormattedPlate}"
Margin="2"
Click="Button_Source_Click" />
</StackPanel>
</Grid>
<Grid Grid.Column="2"
Grid.Row="2">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*" />
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition Height="*" />
<RowDefinition Height="*" />
</Grid.RowDefinitions>
<StackPanel Grid.Column="0"
Grid.Row="0"
HorizontalAlignment="Center"
VerticalAlignment="Bottom">
<TextBlock Text="{Binding MidPlates[2][2][0].Model}"
FontSize="16" />
</StackPanel>
<StackPanel Grid.Column="0"
Grid.Row="1"
HorizontalAlignment="Center"
VerticalAlignment="Top"
Orientation="Horizontal">
<Button Content="{Binding MidPlates[2][2][0].FormattedPlate}"
Margin="2"
Click="Button_Source_Click" />
<Button Content="{Binding MidPlates[2][2][1].FormattedPlate}"
Margin="2"
Click="Button_Source_Click" />
<Button Content="{Binding MidPlates[2][2][2].FormattedPlate}"
Margin="2"
Click="Button_Source_Click" />
</StackPanel>
</Grid>
</Grid>
</ScrollViewer>
</TabItem>