mirror of
https://git.tonybark.com/tonytins/CyberBits.git
synced 2026-06-28 12:13:36 -04:00
Compare commits
No commits in common. "247b738eccad4595cf7a14ee72902f88bcb3fa5d" and "cf5866ef3f8d3220bf50de15fd8b94e85f6d331f" have entirely different histories.
247b738ecc
...
cf5866ef3f
17 changed files with 101 additions and 319 deletions
|
|
@ -43,20 +43,6 @@ 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
|
||||||
|
|
|
||||||
Binary file not shown.
|
Before Width: | Height: | Size: 9.1 KiB |
17
CyberBits/Bits.cs
Normal file
17
CyberBits/Bits.cs
Normal file
|
|
@ -0,0 +1,17 @@
|
||||||
|
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,21 +3,14 @@
|
||||||
<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>
|
||||||
<None Include="Data\universal.json">
|
<AvaloniaResource Include="Resources\addons.json" />
|
||||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
<AvaloniaResource Include="Resources\cock.json" />
|
||||||
</None>
|
<AvaloniaResource Include="Resources\pussy.json" />
|
||||||
<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>
|
||||||
|
|
|
||||||
|
|
@ -1,21 +0,0 @@
|
||||||
{
|
|
||||||
"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"
|
|
||||||
]
|
|
||||||
}
|
|
||||||
|
|
@ -1,20 +0,0 @@
|
||||||
{
|
|
||||||
"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"
|
|
||||||
]
|
|
||||||
}
|
|
||||||
|
|
@ -1,39 +0,0 @@
|
||||||
{
|
|
||||||
"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"
|
|
||||||
]
|
|
||||||
}
|
|
||||||
|
|
@ -1,8 +0,0 @@
|
||||||
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";
|
|
||||||
}
|
|
||||||
|
|
@ -1,33 +0,0 @@
|
||||||
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?> LoadFromWebAsync(Uri url)
|
public static async Task<Bitmap?> LoadFromWeb(Uri url)
|
||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
|
|
|
||||||
8
CyberBits/ResourceFiles.cs
Normal file
8
CyberBits/ResourceFiles.cs
Normal file
|
|
@ -0,0 +1,8 @@
|
||||||
|
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";
|
||||||
|
}
|
||||||
6
CyberBits/Resources/addons.json
Normal file
6
CyberBits/Resources/addons.json
Normal file
|
|
@ -0,0 +1,6 @@
|
||||||
|
{
|
||||||
|
"cyberware": [
|
||||||
|
"Piercings",
|
||||||
|
"Datajack"
|
||||||
|
]
|
||||||
|
}
|
||||||
16
CyberBits/Resources/cock.json
Normal file
16
CyberBits/Resources/cock.json
Normal file
|
|
@ -0,0 +1,16 @@
|
||||||
|
{
|
||||||
|
"image": "avares://CyberBits/Assets/cock.jpg",
|
||||||
|
"feat": "Aim Piss",
|
||||||
|
"model": [
|
||||||
|
"Au Natural",
|
||||||
|
"Les Americaines"
|
||||||
|
],
|
||||||
|
"style": [
|
||||||
|
"Bioware",
|
||||||
|
"Cyberware"
|
||||||
|
],
|
||||||
|
"cyberware": [
|
||||||
|
"Piercings",
|
||||||
|
"Datajack"
|
||||||
|
]
|
||||||
|
}
|
||||||
12
CyberBits/Resources/pussy.json
Normal file
12
CyberBits/Resources/pussy.json
Normal file
|
|
@ -0,0 +1,12 @@
|
||||||
|
{
|
||||||
|
"image": "avares://CyberBits/Assets/pussy.jpg",
|
||||||
|
"feat": "Boom of the Mother Godness",
|
||||||
|
"model": [
|
||||||
|
"Au Natural",
|
||||||
|
"Les Americaines"
|
||||||
|
],
|
||||||
|
"style": [
|
||||||
|
"Bioware",
|
||||||
|
"Cyberware"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
|
@ -1,89 +1,35 @@
|
||||||
using System;
|
using System.Collections.ObjectModel;
|
||||||
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 Genitals[] GenitalOptions { get; } = Enum.GetValues<Genitals>();
|
public ObservableCollection<string> Genitals { get; } = ["Cock", "Pussy"];
|
||||||
|
|
||||||
public ObservableCollection<string> ModelsList { get; } =
|
public ObservableCollection<string> Models { get; } =
|
||||||
[
|
[
|
||||||
"Au Natural",
|
"Au Natural",
|
||||||
"Les Americaines",
|
"Les Americaines"
|
||||||
"La Grand Chungus",
|
|
||||||
"Veini Vici",
|
|
||||||
"Das Banane",
|
|
||||||
"The Ace Custom"
|
|
||||||
];
|
];
|
||||||
|
|
||||||
public ObservableCollection<string> AestheticsList { get; } =
|
public ObservableCollection<string> Styles { get; } =
|
||||||
[
|
[
|
||||||
"Bioware",
|
"Bioware",
|
||||||
"Cyberware",
|
"Cyberware"
|
||||||
"Roboware",
|
|
||||||
"Holoware"
|
|
||||||
];
|
];
|
||||||
|
|
||||||
public ObservableCollection<string> CyberwareList { get; } =
|
public ObservableCollection<string> Cyberware { get; } =
|
||||||
[
|
[
|
||||||
"Piercings",
|
"Piercings",
|
||||||
"Datajack",
|
"Datajack"
|
||||||
"Censor Field",
|
|
||||||
"Laser Sight",
|
|
||||||
"AI-Controlled Booster Module",
|
|
||||||
"Second Bladder",
|
|
||||||
"Map Hack",
|
|
||||||
"Monowire Blade",
|
|
||||||
"Projectile Launcher"
|
|
||||||
];
|
];
|
||||||
|
|
||||||
public ObservableCollection<string> PubesList { get; } =
|
[ObservableProperty] private string? _selectedBits;
|
||||||
[
|
|
||||||
"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? _selectedAesthetics;
|
[ObservableProperty] private string? _selectedStyles;
|
||||||
|
|
||||||
[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="700" d:DesignHeight="520"
|
mc:Ignorable="d" d:DesignWidth="720" d:DesignHeight="430"
|
||||||
Width="700" Height="520" CanResize="False"
|
Width="720" Height="430" 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,72 +25,39 @@
|
||||||
Text="CyberBits" >
|
Text="CyberBits" >
|
||||||
</TextBlock>
|
</TextBlock>
|
||||||
</Border>
|
</Border>
|
||||||
<Grid ColumnDefinitions="*,*" HorizontalAlignment="Center">
|
<Grid ColumnDefinitions="*,*">
|
||||||
<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="160,160">
|
<Grid ColumnDefinitions="*,*">
|
||||||
<GridSplitter ResizeDirection="Columns"/>
|
<GridSplitter ResizeDirection="Columns"/>
|
||||||
<StackPanel Grid.Column="0" >
|
<StackPanel Grid.Column="0" >
|
||||||
<ComboBox ItemsSource="{Binding GenitalOptions}"
|
<TextBlock Margin="2" Text="Feat: Aim Piss" />
|
||||||
|
<Border Margin="3" />
|
||||||
|
<ComboBox ItemsSource="{Binding Genitals}"
|
||||||
SelectedItem="{Binding SelectedBits}"
|
SelectedItem="{Binding SelectedBits}"
|
||||||
PlaceholderText="Genitals"
|
PlaceholderText="Select your bits"
|
||||||
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"/>
|
||||||
<ListBox ItemsSource="{Binding ModelsList}"
|
<ComboBox ItemsSource="{Binding Models}"
|
||||||
SelectedItem="{Binding SelectedModels}"
|
SelectedItem="{Binding SelectedModels}"
|
||||||
Name="ModelItems"
|
PlaceholderText="Select your model"
|
||||||
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">
|
||||||
<Button Background="Transparent"
|
<TextBlock Margin="2" Text="Bio-Essence: 10" />
|
||||||
HorizontalAlignment="Right"
|
<Border Margin="3" />
|
||||||
Width="100"
|
<ComboBox ItemsSource="{Binding Styles}"
|
||||||
Height="40">
|
SelectedItem="{Binding SelectedStyles}"
|
||||||
<Image Source="avares://CyberBits/Assets/game_die.png" />
|
PlaceholderText="Select your style"
|
||||||
</Button>
|
Margin="5"/>
|
||||||
<TextBlock Text="Aesthetics" HorizontalAlignment="Center" />
|
<!-- <ComboBox ItemsSource="{Binding Cyberware}"
|
||||||
<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}"
|
||||||
Name="CyberwareItems"
|
PlaceholderText="Select your Cyberware"
|
||||||
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,77 +1,29 @@
|
||||||
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();
|
||||||
|
|
||||||
try
|
VersionBox.Text = $"v{AppConsts.VERSION}";
|
||||||
{
|
|
||||||
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 Genitals.PUSSY:
|
case "Pussy":
|
||||||
GenitalSwap("avares://CyberBits/Assets/pussy.jpg", DataFiles.PUSSY_JSON);
|
var pussy = ImageHelper.LoadFromResource(new Uri("avares://CyberBits/Assets/pussy.jpg"));
|
||||||
ExtrasText.Text = "Clits";
|
BitsImage.Source = pussy;
|
||||||
break;
|
break;
|
||||||
case Genitals.COCK:
|
case "Cock":
|
||||||
GenitalSwap("avares://CyberBits/Assets/cock.jpg", DataFiles.COCK_JSON);
|
var cock = ImageHelper.LoadFromResource(new Uri("avares://CyberBits/Assets/cock.jpg"));
|
||||||
ExtrasText.Text = "Balls";
|
BitsImage.Source = cock;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue