mirror of
https://git.tonybark.com/tonytins/CyberBits.git
synced 2026-06-28 04:03:37 -04:00
Compare commits
2 commits
cf5866ef3f
...
247b738ecc
| Author | SHA1 | Date | |
|---|---|---|---|
| 247b738ecc | |||
| 15cdb3f3d3 |
17 changed files with 319 additions and 101 deletions
|
|
@ -43,6 +43,20 @@ dotnet_naming_rule.consts_must_be_all_caps.severity = warning
|
||||||
dotnet_naming_rule.consts_must_be_all_caps.symbols = const_fields
|
dotnet_naming_rule.consts_must_be_all_caps.symbols = const_fields
|
||||||
dotnet_naming_rule.consts_must_be_all_caps.style = all_caps
|
dotnet_naming_rule.consts_must_be_all_caps.style = all_caps
|
||||||
|
|
||||||
|
|
||||||
|
# Turn off the naming style that enforces an underscore prefix for private fields
|
||||||
|
dotnet_naming_style.underscore_prefix_style.capitalization = camel_case
|
||||||
|
dotnet_naming_style.underscore_prefix_style.required_prefix = _
|
||||||
|
|
||||||
|
# Remove the rule that ties the naming style to private fields
|
||||||
|
dotnet_naming_rule.private_fields_underscore_rule.severity = none
|
||||||
|
dotnet_naming_rule.private_fields_underscore_rule.symbols = private_fields
|
||||||
|
dotnet_naming_rule.private_fields_underscore_rule.style = underscore_prefix_style
|
||||||
|
|
||||||
|
# Symbol group for private fields (so the rule can be disabled)
|
||||||
|
dotnet_naming_symbols.private_fields.applicable_kinds = field
|
||||||
|
dotnet_naming_symbols.private_fields.applicable_accessibilities = private
|
||||||
|
|
||||||
# Formatting
|
# Formatting
|
||||||
csharp_new_line_before_open_brace = all
|
csharp_new_line_before_open_brace = all
|
||||||
csharp_indent_case_contents = true
|
csharp_indent_case_contents = true
|
||||||
|
|
|
||||||
BIN
CyberBits/Assets/game_die.png
Normal file
BIN
CyberBits/Assets/game_die.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 9.1 KiB |
|
|
@ -1,17 +0,0 @@
|
||||||
namespace CyberBits;
|
|
||||||
|
|
||||||
public record Bits(
|
|
||||||
[property: JsonPropertyName("image")]
|
|
||||||
string Image,
|
|
||||||
[property: JsonPropertyName("feat")]
|
|
||||||
string Feat,
|
|
||||||
[property: JsonPropertyName("model")]
|
|
||||||
string[] Model,
|
|
||||||
[property: JsonPropertyName("style")]
|
|
||||||
string[] Style
|
|
||||||
);
|
|
||||||
|
|
||||||
public record Addon(
|
|
||||||
[property: JsonPropertyName("cyberware")]
|
|
||||||
string[] Cyberware
|
|
||||||
);
|
|
||||||
|
|
@ -3,14 +3,21 @@
|
||||||
<OutputType>WinExe</OutputType>
|
<OutputType>WinExe</OutputType>
|
||||||
<TargetFramework>net10.0</TargetFramework>
|
<TargetFramework>net10.0</TargetFramework>
|
||||||
<Nullable>enable</Nullable>
|
<Nullable>enable</Nullable>
|
||||||
|
<RollForward>LatestMajor</RollForward>
|
||||||
<ApplicationManifest>app.manifest</ApplicationManifest>
|
<ApplicationManifest>app.manifest</ApplicationManifest>
|
||||||
<AvaloniaUseCompiledBindingsByDefault>true</AvaloniaUseCompiledBindingsByDefault>
|
<AvaloniaUseCompiledBindingsByDefault>true</AvaloniaUseCompiledBindingsByDefault>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<AvaloniaResource Include="Resources\addons.json" />
|
<None Include="Data\universal.json">
|
||||||
<AvaloniaResource Include="Resources\cock.json" />
|
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||||
<AvaloniaResource Include="Resources\pussy.json" />
|
</None>
|
||||||
|
<None Include="Data\cock.json">
|
||||||
|
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||||
|
</None>
|
||||||
|
<None Include="Data\pussy.json">
|
||||||
|
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||||
|
</None>
|
||||||
<Folder Include="Models\"/>
|
<Folder Include="Models\"/>
|
||||||
<AvaloniaResource Include="Assets\**"/>
|
<AvaloniaResource Include="Assets\**"/>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
|
||||||
21
CyberBits/Data/cock.json
Normal file
21
CyberBits/Data/cock.json
Normal file
|
|
@ -0,0 +1,21 @@
|
||||||
|
{
|
||||||
|
"image": "avares://CyberBits/Assets/cock.jpg",
|
||||||
|
"feat": "Aim Piss",
|
||||||
|
"model": [
|
||||||
|
"Au Natural",
|
||||||
|
"Les Americaines",
|
||||||
|
"La Grand Chungus",
|
||||||
|
"Veini Vici",
|
||||||
|
"Das Banane",
|
||||||
|
"The Ace Custom"
|
||||||
|
],
|
||||||
|
"extra": [
|
||||||
|
"Hairy",
|
||||||
|
"Dangly",
|
||||||
|
"Asymmetrical",
|
||||||
|
"Bulbous",
|
||||||
|
"Doubled",
|
||||||
|
"Wrinkly",
|
||||||
|
"Cyber"
|
||||||
|
]
|
||||||
|
}
|
||||||
20
CyberBits/Data/pussy.json
Normal file
20
CyberBits/Data/pussy.json
Normal file
|
|
@ -0,0 +1,20 @@
|
||||||
|
{
|
||||||
|
"image": "avares://CyberBits/Assets/pussy.jpg",
|
||||||
|
"feat": "Boom of the Mother Godness",
|
||||||
|
"model": [
|
||||||
|
"The Shy Sharon",
|
||||||
|
"The Proud Priscilla",
|
||||||
|
"The Matronly Miriam",
|
||||||
|
"The Stretchy Sandra",
|
||||||
|
"The Outer Olivia"
|
||||||
|
],
|
||||||
|
"extra": [
|
||||||
|
"Huge",
|
||||||
|
"Hooded",
|
||||||
|
"Bright",
|
||||||
|
"Shifted",
|
||||||
|
"Hard",
|
||||||
|
"Expansive",
|
||||||
|
"Cyber"
|
||||||
|
]
|
||||||
|
}
|
||||||
39
CyberBits/Data/universal.json
Normal file
39
CyberBits/Data/universal.json
Normal file
|
|
@ -0,0 +1,39 @@
|
||||||
|
{
|
||||||
|
"aesthetic": [
|
||||||
|
"Bioware",
|
||||||
|
"Cyberware",
|
||||||
|
"Roboware",
|
||||||
|
"Holoware"
|
||||||
|
],
|
||||||
|
"cyberware": [
|
||||||
|
"Piercings",
|
||||||
|
"Datajack",
|
||||||
|
"Censor Field",
|
||||||
|
"Laser Sight",
|
||||||
|
"AI-Controlled Booster Module",
|
||||||
|
"Second Bladder",
|
||||||
|
"Map Hack",
|
||||||
|
"Monowire Blade",
|
||||||
|
"Projectile Launcher"
|
||||||
|
],
|
||||||
|
"pubes": [
|
||||||
|
"The Baldie",
|
||||||
|
"The Peach",
|
||||||
|
"The Landing Strip",
|
||||||
|
"The Peek-a-Boo",
|
||||||
|
"The Rectangle",
|
||||||
|
"The Bar Code",
|
||||||
|
"The Heart",
|
||||||
|
"The Lighting Bolt",
|
||||||
|
"The Neat Triangle",
|
||||||
|
"The Forest",
|
||||||
|
"The Jungle",
|
||||||
|
"The Breath of the Wild"
|
||||||
|
],
|
||||||
|
"butt":
|
||||||
|
[
|
||||||
|
"Big",
|
||||||
|
"Round",
|
||||||
|
"Firm"
|
||||||
|
]
|
||||||
|
}
|
||||||
8
CyberBits/DataFiles.cs
Normal file
8
CyberBits/DataFiles.cs
Normal file
|
|
@ -0,0 +1,8 @@
|
||||||
|
namespace CyberBits;
|
||||||
|
|
||||||
|
public struct DataFiles
|
||||||
|
{
|
||||||
|
public const string COCK_JSON = "/Data/cock.json";
|
||||||
|
public const string PUSSY_JSON = "Data/pussy.json";
|
||||||
|
public const string UNIVERSAL_JSON = "Data/universal.json";
|
||||||
|
}
|
||||||
33
CyberBits/Genitals.cs
Normal file
33
CyberBits/Genitals.cs
Normal file
|
|
@ -0,0 +1,33 @@
|
||||||
|
using CommunityToolkit.Mvvm.ComponentModel;
|
||||||
|
|
||||||
|
namespace CyberBits;
|
||||||
|
|
||||||
|
public enum Genitals
|
||||||
|
{
|
||||||
|
COCK,
|
||||||
|
PUSSY
|
||||||
|
}
|
||||||
|
|
||||||
|
public record GenitalModel(
|
||||||
|
[property: JsonPropertyName("image")]
|
||||||
|
string Image,
|
||||||
|
[property: JsonPropertyName("feat")]
|
||||||
|
string Feat,
|
||||||
|
[property: JsonPropertyName("model")]
|
||||||
|
string[] Model,
|
||||||
|
[property: JsonPropertyName("aesthetic")]
|
||||||
|
string[] Aesthetic,
|
||||||
|
[property: JsonPropertyName("extra")]
|
||||||
|
string[] Extra // Balls or Clits
|
||||||
|
);
|
||||||
|
|
||||||
|
public record UniversalModel(
|
||||||
|
[property: JsonPropertyName("aesthetic")]
|
||||||
|
string[] Aesthetic,
|
||||||
|
[property: JsonPropertyName("cyberware")]
|
||||||
|
string[] Cyberware,
|
||||||
|
[property: JsonPropertyName("pubes")]
|
||||||
|
string[] Pubes,
|
||||||
|
[property: JsonPropertyName("butt")]
|
||||||
|
string[] Butt
|
||||||
|
);
|
||||||
|
|
@ -16,7 +16,7 @@ public static class ImageHelper
|
||||||
return new Bitmap(AssetLoader.Open(resourceUri));
|
return new Bitmap(AssetLoader.Open(resourceUri));
|
||||||
}
|
}
|
||||||
|
|
||||||
public static async Task<Bitmap?> LoadFromWeb(Uri url)
|
public static async Task<Bitmap?> LoadFromWebAsync(Uri url)
|
||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -1,8 +0,0 @@
|
||||||
namespace CyberBits;
|
|
||||||
|
|
||||||
public struct ResourceFiles
|
|
||||||
{
|
|
||||||
public const string COCK_JSON = "Resources/cock.json";
|
|
||||||
public const string PUSSY_JSON = "Resources/pussy.json";
|
|
||||||
public const string ADDONS_JSON = "Resources/addons.json";
|
|
||||||
}
|
|
||||||
|
|
@ -1,6 +0,0 @@
|
||||||
{
|
|
||||||
"cyberware": [
|
|
||||||
"Piercings",
|
|
||||||
"Datajack"
|
|
||||||
]
|
|
||||||
}
|
|
||||||
|
|
@ -1,16 +0,0 @@
|
||||||
{
|
|
||||||
"image": "avares://CyberBits/Assets/cock.jpg",
|
|
||||||
"feat": "Aim Piss",
|
|
||||||
"model": [
|
|
||||||
"Au Natural",
|
|
||||||
"Les Americaines"
|
|
||||||
],
|
|
||||||
"style": [
|
|
||||||
"Bioware",
|
|
||||||
"Cyberware"
|
|
||||||
],
|
|
||||||
"cyberware": [
|
|
||||||
"Piercings",
|
|
||||||
"Datajack"
|
|
||||||
]
|
|
||||||
}
|
|
||||||
|
|
@ -1,12 +0,0 @@
|
||||||
{
|
|
||||||
"image": "avares://CyberBits/Assets/pussy.jpg",
|
|
||||||
"feat": "Boom of the Mother Godness",
|
|
||||||
"model": [
|
|
||||||
"Au Natural",
|
|
||||||
"Les Americaines"
|
|
||||||
],
|
|
||||||
"style": [
|
|
||||||
"Bioware",
|
|
||||||
"Cyberware"
|
|
||||||
]
|
|
||||||
}
|
|
||||||
|
|
@ -1,35 +1,89 @@
|
||||||
using System.Collections.ObjectModel;
|
using System;
|
||||||
|
using System.Collections.ObjectModel;
|
||||||
using CommunityToolkit.Mvvm.ComponentModel;
|
using CommunityToolkit.Mvvm.ComponentModel;
|
||||||
|
|
||||||
namespace CyberBits.ViewModels;
|
namespace CyberBits.ViewModels;
|
||||||
|
|
||||||
public partial class ViewModelBase : ObservableObject
|
public partial class ViewModelBase : ObservableObject
|
||||||
{
|
{
|
||||||
public ObservableCollection<string> Genitals { get; } = ["Cock", "Pussy"];
|
public Genitals[] GenitalOptions { get; } = Enum.GetValues<Genitals>();
|
||||||
|
|
||||||
public ObservableCollection<string> Models { get; } =
|
public ObservableCollection<string> ModelsList { get; } =
|
||||||
[
|
[
|
||||||
"Au Natural",
|
"Au Natural",
|
||||||
"Les Americaines"
|
"Les Americaines",
|
||||||
|
"La Grand Chungus",
|
||||||
|
"Veini Vici",
|
||||||
|
"Das Banane",
|
||||||
|
"The Ace Custom"
|
||||||
];
|
];
|
||||||
|
|
||||||
public ObservableCollection<string> Styles { get; } =
|
public ObservableCollection<string> AestheticsList { get; } =
|
||||||
[
|
[
|
||||||
"Bioware",
|
"Bioware",
|
||||||
"Cyberware"
|
"Cyberware",
|
||||||
|
"Roboware",
|
||||||
|
"Holoware"
|
||||||
];
|
];
|
||||||
|
|
||||||
public ObservableCollection<string> Cyberware { get; } =
|
public ObservableCollection<string> CyberwareList { get; } =
|
||||||
[
|
[
|
||||||
"Piercings",
|
"Piercings",
|
||||||
"Datajack"
|
"Datajack",
|
||||||
|
"Censor Field",
|
||||||
|
"Laser Sight",
|
||||||
|
"AI-Controlled Booster Module",
|
||||||
|
"Second Bladder",
|
||||||
|
"Map Hack",
|
||||||
|
"Monowire Blade",
|
||||||
|
"Projectile Launcher"
|
||||||
];
|
];
|
||||||
|
|
||||||
[ObservableProperty] private string? _selectedBits;
|
public ObservableCollection<string> PubesList { get; } =
|
||||||
|
[
|
||||||
|
"The Baldie",
|
||||||
|
"The Peach",
|
||||||
|
"The Landing Strip",
|
||||||
|
"The Peek-a-Boo",
|
||||||
|
"The Rectangle",
|
||||||
|
"The Bar Code",
|
||||||
|
"The Heart",
|
||||||
|
"The Lighting Bolt",
|
||||||
|
"The Neat Triangle",
|
||||||
|
"The Forest",
|
||||||
|
"The Jungle",
|
||||||
|
"The Breath of the Wild"
|
||||||
|
];
|
||||||
|
|
||||||
|
public ObservableCollection<string> ExtrasList { get; } =
|
||||||
|
[
|
||||||
|
"Hairy",
|
||||||
|
"Dangly",
|
||||||
|
"Asymmetrical",
|
||||||
|
"Bulbous",
|
||||||
|
"Doubled",
|
||||||
|
"Wrinkly",
|
||||||
|
"Cyber"
|
||||||
|
];
|
||||||
|
|
||||||
|
public ObservableCollection<string> ButtsList { get; } =
|
||||||
|
[
|
||||||
|
"Big",
|
||||||
|
"Round",
|
||||||
|
"Firm"
|
||||||
|
];
|
||||||
|
|
||||||
|
[ObservableProperty] private Genitals _selectedBits = Genitals.COCK;
|
||||||
|
|
||||||
[ObservableProperty] private string? _selectedModels;
|
[ObservableProperty] private string? _selectedModels;
|
||||||
|
|
||||||
[ObservableProperty] private string? _selectedStyles;
|
[ObservableProperty] private string? _selectedAesthetics;
|
||||||
|
|
||||||
[ObservableProperty] private string? _selectedCyberware;
|
[ObservableProperty] private string? _selectedCyberware;
|
||||||
|
|
||||||
|
[ObservableProperty] private string? _selectedPubes;
|
||||||
|
|
||||||
|
[ObservableProperty] private string? _selectedExtras;
|
||||||
|
|
||||||
|
[ObservableProperty] private string? _selectedButt;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -3,8 +3,8 @@
|
||||||
xmlns:vm="using:CyberBits.ViewModels"
|
xmlns:vm="using:CyberBits.ViewModels"
|
||||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||||
mc:Ignorable="d" d:DesignWidth="720" d:DesignHeight="430"
|
mc:Ignorable="d" d:DesignWidth="700" d:DesignHeight="520"
|
||||||
Width="720" Height="430" CanResize="False"
|
Width="700" Height="520" CanResize="False"
|
||||||
ExtendClientAreaToDecorationsHint="True"
|
ExtendClientAreaToDecorationsHint="True"
|
||||||
x:Class="CyberBits.Views.MainWindow"
|
x:Class="CyberBits.Views.MainWindow"
|
||||||
x:DataType="vm:MainWindowViewModel"
|
x:DataType="vm:MainWindowViewModel"
|
||||||
|
|
@ -25,39 +25,72 @@
|
||||||
Text="CyberBits" >
|
Text="CyberBits" >
|
||||||
</TextBlock>
|
</TextBlock>
|
||||||
</Border>
|
</Border>
|
||||||
<Grid ColumnDefinitions="*,*">
|
<Grid ColumnDefinitions="*,*" HorizontalAlignment="Center">
|
||||||
<Image x:Name="BitsImage" Grid.Column="0" Source="avares://CyberBits/Assets/cock.jpg" />
|
<Image x:Name="BitsImage" Grid.Column="0" Source="avares://CyberBits/Assets/cock.jpg" />
|
||||||
<GridSplitter Grid.Column="1" ResizeDirection="Columns"/>
|
<GridSplitter Grid.Column="1" ResizeDirection="Columns"/>
|
||||||
<StackPanel Grid.Column="1">
|
<StackPanel Grid.Column="1">
|
||||||
<Grid ColumnDefinitions="*,*">
|
<Grid ColumnDefinitions="160,160">
|
||||||
<GridSplitter ResizeDirection="Columns"/>
|
<GridSplitter ResizeDirection="Columns"/>
|
||||||
<StackPanel Grid.Column="0" >
|
<StackPanel Grid.Column="0" >
|
||||||
<TextBlock Margin="2" Text="Feat: Aim Piss" />
|
<ComboBox ItemsSource="{Binding GenitalOptions}"
|
||||||
<Border Margin="3" />
|
|
||||||
<ComboBox ItemsSource="{Binding Genitals}"
|
|
||||||
SelectedItem="{Binding SelectedBits}"
|
SelectedItem="{Binding SelectedBits}"
|
||||||
PlaceholderText="Select your bits"
|
PlaceholderText="Genitals"
|
||||||
|
Width="120"
|
||||||
|
HorizontalContentAlignment="Center"
|
||||||
SelectedValue="0"
|
SelectedValue="0"
|
||||||
x:Name="BitSelection"
|
x:Name="BitSelection"
|
||||||
|
HorizontalAlignment="Center"
|
||||||
SelectionChanged="SelectedBitsControl_OnSelectionChanged"
|
SelectionChanged="SelectedBitsControl_OnSelectionChanged"
|
||||||
Margin="5"/>
|
Margin="5"/>
|
||||||
<ComboBox ItemsSource="{Binding Models}"
|
<ListBox ItemsSource="{Binding ModelsList}"
|
||||||
SelectedItem="{Binding SelectedModels}"
|
SelectedItem="{Binding SelectedModels}"
|
||||||
PlaceholderText="Select your model"
|
Name="ModelItems"
|
||||||
Margin="5"/>
|
Margin="5"
|
||||||
|
Height="110"/>
|
||||||
|
<Border Height="10" />
|
||||||
|
<TextBlock Text="Pubes" HorizontalAlignment="Center" />
|
||||||
|
<ListBox ItemsSource="{Binding PubesList}"
|
||||||
|
SelectedItem="{Binding SelectedPubes}"
|
||||||
|
Name="PubesItems"
|
||||||
|
Margin="5"
|
||||||
|
Height="110"/>
|
||||||
|
<TextBlock Name="ExtrasText" Text="Balls" HorizontalAlignment="Center" />
|
||||||
|
<ListBox
|
||||||
|
ItemsSource="{Binding ExtrasList}"
|
||||||
|
SelectedItem="{Binding SelectedExtras}"
|
||||||
|
Name="ExtraItems"
|
||||||
|
Margin="5"
|
||||||
|
Height="110"
|
||||||
|
/>
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
<GridSplitter Grid.Column="1" ResizeDirection="Columns"/>
|
<GridSplitter Grid.Column="1" ResizeDirection="Columns"/>
|
||||||
<StackPanel Grid.Column="1">
|
<StackPanel Grid.Column="1">
|
||||||
<TextBlock Margin="2" Text="Bio-Essence: 10" />
|
<Button Background="Transparent"
|
||||||
<Border Margin="3" />
|
HorizontalAlignment="Right"
|
||||||
<ComboBox ItemsSource="{Binding Styles}"
|
Width="100"
|
||||||
SelectedItem="{Binding SelectedStyles}"
|
Height="40">
|
||||||
PlaceholderText="Select your style"
|
<Image Source="avares://CyberBits/Assets/game_die.png" />
|
||||||
Margin="5"/>
|
</Button>
|
||||||
<!-- <ComboBox ItemsSource="{Binding Cyberware}"
|
<TextBlock Text="Aesthetics" HorizontalAlignment="Center" />
|
||||||
|
<ListBox ItemsSource="{Binding AestheticsList}"
|
||||||
|
SelectedItem="{Binding SelectedAesthetics}"
|
||||||
|
Name="AestheticsItems"
|
||||||
|
Margin="5"
|
||||||
|
Height="110"/>
|
||||||
|
<Border Height="10" />
|
||||||
|
<TextBlock Text="Cyberware" HorizontalAlignment="Center" />
|
||||||
|
<ListBox ItemsSource="{Binding CyberwareList}"
|
||||||
SelectedItem="{Binding SelectedCyberware}"
|
SelectedItem="{Binding SelectedCyberware}"
|
||||||
PlaceholderText="Select your Cyberware"
|
Name="CyberwareItems"
|
||||||
Margin="5"/> -->
|
Margin="5"
|
||||||
|
Height="110" />
|
||||||
|
<TextBlock Text="Butt" HorizontalAlignment="Center" />
|
||||||
|
<ListBox ItemsSource="{Binding ButtsList}"
|
||||||
|
SelectedItem="{Binding SelectedButt}"
|
||||||
|
Name="ButtOptions"
|
||||||
|
Margin="5"
|
||||||
|
Height="110"
|
||||||
|
/>
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
</Grid>
|
</Grid>
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
|
|
|
||||||
|
|
@ -1,29 +1,77 @@
|
||||||
using System;
|
using System;
|
||||||
|
using System.IO;
|
||||||
|
using System.Reflection;
|
||||||
|
using System.Text.Json;
|
||||||
using Avalonia.Controls;
|
using Avalonia.Controls;
|
||||||
|
|
||||||
namespace CyberBits.Views;
|
namespace CyberBits.Views;
|
||||||
|
|
||||||
public partial class MainWindow : Window
|
public partial class MainWindow : Window
|
||||||
{
|
{
|
||||||
|
string? AppPath => Path.GetDirectoryName(Assembly.GetAssembly(typeof(MainWindow))?.Location);
|
||||||
|
|
||||||
public MainWindow()
|
public MainWindow()
|
||||||
{
|
{
|
||||||
InitializeComponent();
|
InitializeComponent();
|
||||||
|
|
||||||
VersionBox.Text = $"v{AppConsts.VERSION}";
|
try
|
||||||
|
{
|
||||||
|
var univieralFile = File.ReadAllText($"{AppPath}//{DataFiles.UNIVERSAL_JSON}");
|
||||||
|
var univieralData = JsonSerializer.Deserialize<UniversalModel>(univieralFile);
|
||||||
|
|
||||||
|
PubesItems.ItemsSource = univieralData?.Pubes;
|
||||||
|
CyberwareItems.ItemsSource = univieralData?.Cyberware;
|
||||||
|
AestheticsItems.ItemsSource = univieralData?.Aesthetic;
|
||||||
|
ButtOptions.ItemsSource = univieralData?.Butt;
|
||||||
|
}
|
||||||
|
catch (Exception e)
|
||||||
|
{
|
||||||
|
Console.WriteLine(e);
|
||||||
|
throw;
|
||||||
|
}
|
||||||
|
|
||||||
|
#if DEBUG
|
||||||
|
VersionBox.Text = $"{AppConsts.VERSION}-{ThisAssembly.Git.Commit}";
|
||||||
|
#else
|
||||||
|
VersionBox.Text = AppConsts.VERSION;
|
||||||
|
#endif
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
void GenitalSwap(string image, string data)
|
||||||
|
{
|
||||||
|
|
||||||
|
try
|
||||||
|
{
|
||||||
|
var genitalFile = File.ReadAllText($"{AppPath}//{data}");
|
||||||
|
var genitalData = JsonSerializer.Deserialize<GenitalModel>(genitalFile);
|
||||||
|
var genitalImage = ImageHelper.LoadFromResource(new Uri(image));
|
||||||
|
|
||||||
|
BitsImage.Source = genitalImage;
|
||||||
|
ModelItems.ItemsSource = genitalData?.Model;
|
||||||
|
ExtraItems.ItemsSource = genitalData?.Extra;
|
||||||
|
}
|
||||||
|
catch (Exception e)
|
||||||
|
{
|
||||||
|
Console.WriteLine(e);
|
||||||
|
throw;
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private void SelectedBitsControl_OnSelectionChanged(object? sender, SelectionChangedEventArgs e)
|
private void SelectedBitsControl_OnSelectionChanged(object? sender, SelectionChangedEventArgs e)
|
||||||
{
|
{
|
||||||
|
var appPath = Path.GetDirectoryName(Assembly.GetAssembly(typeof(MainWindow))?.Location);
|
||||||
|
|
||||||
switch (BitSelection.SelectionBoxItem)
|
switch (BitSelection.SelectionBoxItem)
|
||||||
{
|
{
|
||||||
case "Pussy":
|
case Genitals.PUSSY:
|
||||||
var pussy = ImageHelper.LoadFromResource(new Uri("avares://CyberBits/Assets/pussy.jpg"));
|
GenitalSwap("avares://CyberBits/Assets/pussy.jpg", DataFiles.PUSSY_JSON);
|
||||||
BitsImage.Source = pussy;
|
ExtrasText.Text = "Clits";
|
||||||
break;
|
break;
|
||||||
case "Cock":
|
case Genitals.COCK:
|
||||||
var cock = ImageHelper.LoadFromResource(new Uri("avares://CyberBits/Assets/cock.jpg"));
|
GenitalSwap("avares://CyberBits/Assets/cock.jpg", DataFiles.COCK_JSON);
|
||||||
BitsImage.Source = cock;
|
ExtrasText.Text = "Balls";
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue