Skip to content

Commit

Permalink
Revert "Implement different fody weavers to make development easier"
Browse files Browse the repository at this point in the history
This reverts commit 32034af.
  • Loading branch information
CarbonNeuron committed Jan 20, 2021
1 parent 23a5fab commit 1d4f40e
Show file tree
Hide file tree
Showing 11 changed files with 124 additions and 141 deletions.
9 changes: 0 additions & 9 deletions AUCapture-WPF/AUCapture-WPF.csproj
Expand Up @@ -45,10 +45,6 @@
<ItemGroup>
<None Remove="Resources\Hats\103-1.png" />
<None Remove="Resources\Hats\94-1.png" />
<None Remove="Resources\Misc\map-1.png" />
<None Remove="Resources\Misc\room_cafeteria.png" />
<None Remove="Resources\Misc\simsong.png" />
<None Remove="Resources\Misc\Stars.png" />
<None Remove="Resources\Misc\status-connected.png" />
<None Remove="Resources\Misc\status-disconnected.png" />
<None Remove="Resources\Misc\voteCancel.png" />
Expand All @@ -74,7 +70,6 @@
</ItemGroup>

<ItemGroup>
<PackageReference Include="Bindables.Fody" Version="6.0.0" />
<PackageReference Include="Config.Net" Version="4.15.0" />
<PackageReference Include="Config.Net.Json" Version="4.15.0" />
<PackageReference Include="Humanizer.Core" Version="2.8.26" />
Expand All @@ -84,7 +79,6 @@
<PackageReference Include="MahApps.Metro.IconPacks.Unicons" Version="4.8.0" />
<PackageReference Include="NLog" Version="4.7.6" />
<PackageReference Include="Octokit" Version="0.48.0" />
<PackageReference Include="PropertyChanged.Fody" Version="3.3.1" />
<PackageReference Include="SharedMemory" Version="2.2.3" />
<PackageReference Include="WpfScreenHelper" Version="1.0.0" />
</ItemGroup>
Expand Down Expand Up @@ -201,9 +195,6 @@
<Resource Include="Resources\Hats\92-1.png" />
<Resource Include="Resources\Hats\93-1.png" />
<Resource Include="Resources\Hats\94-1.png" />
<Resource Include="Resources\Misc\map-1.png" />
<Resource Include="Resources\Misc\simsong.png" />
<Resource Include="Resources\Misc\Stars.png" />
<Resource Include="Resources\Misc\status-connected.png" />
<Resource Include="Resources\Misc\status-disconnected.png" />
<Resource Include="Resources\Pants\0.png" />
Expand Down
1 change: 1 addition & 0 deletions AUCapture-WPF/Controls/PlayerControl.xaml
Expand Up @@ -14,6 +14,7 @@
<converters1:HatToImage x:Key="HatToImage" />
<converters1:HatToZ x:Key="HatToZ" />
<converters1:PetToImageConverter x:Key="PetToIm" />
<BooleanToVisibilityConverter x:Key="BooleanToVisibilityConverter" />

</UserControl.Resources>
<Viewbox Stretch="Uniform" VerticalAlignment="Center" Margin="0,0,0,0">
Expand Down
68 changes: 60 additions & 8 deletions AUCapture-WPF/Controls/PlayerControl.xaml.cs
Expand Up @@ -2,22 +2,74 @@
using System.Windows;
using System.Windows.Controls;
using AmongUsCapture;
using Bindables;

namespace AUCapture_WPF.Controls
{
/// <summary>
/// Interaction logic for PlayerControl.xaml
/// </summary>
[DependencyProperty]
public partial class PlayerControl : UserControl
{
public bool AliveStatus { get; set; }
public uint PlayerHatID { get; set; }
public uint PlayerPetID { get; set; }
public uint PlayerPantsID { get; set; }
public string PlayerName { get;set; }
public PlayerColor Color { get; set; }
public static readonly DependencyProperty AliveProperty =
DependencyProperty.Register("AliveStatus",
typeof(bool), typeof(PlayerControl));

public static readonly DependencyProperty PlayerNameProperty =
DependencyProperty.Register("PlayerName",
typeof(string), typeof(PlayerControl));

public static readonly DependencyProperty PlayerHatDependencyProperty =
DependencyProperty.Register("PlayerHatID",
typeof(uint), typeof(PlayerControl));

public static readonly DependencyProperty PlayerPetDependencyProperty =
DependencyProperty.Register("PlayerPetID",
typeof(uint), typeof(PlayerControl));

public static readonly DependencyProperty PlayerPantsDependencyProperty =
DependencyProperty.Register("PlayerPantsID",
typeof(uint), typeof(PlayerControl));

public static readonly DependencyProperty ColorProperty =
DependencyProperty.Register("Color",
typeof(PlayerColor), typeof(PlayerControl));

private static void PropertyChangedCallback(DependencyObject d, DependencyPropertyChangedEventArgs e)
{
Console.WriteLine("Prop changed");
}

public bool AliveStatus
{
get => (bool)GetValue(AliveProperty);
set => SetValue(AliveProperty, value);
}
public uint PlayerHatID
{
get => (uint)GetValue(PlayerHatDependencyProperty);
set => SetValue(PlayerHatDependencyProperty, value);
}

public uint PlayerPetID
{
get => (uint)GetValue(PlayerHatDependencyProperty);
set => SetValue(PlayerHatDependencyProperty, value);
}
public uint PlayerPantsID
{
get => (uint)GetValue(PlayerPantsDependencyProperty);
set => SetValue(PlayerPantsDependencyProperty, value);
}
public string PlayerName
{
get => (string)GetValue(PlayerNameProperty);
set => SetValue(PlayerNameProperty, value);
}
public PlayerColor Color
{
get => (PlayerColor)GetValue(ColorProperty);
set => SetValue(ColorProperty, value);
}
public PlayerControl()
{
InitializeComponent();
Expand Down
34 changes: 0 additions & 34 deletions AUCapture-WPF/Converters/GameStateToVisability.cs

This file was deleted.

4 changes: 0 additions & 4 deletions AUCapture-WPF/FodyWeavers.xml

This file was deleted.

75 changes: 0 additions & 75 deletions AUCapture-WPF/FodyWeavers.xsd

This file was deleted.

1 change: 0 additions & 1 deletion AUCapture-WPF/MainWindow.xaml.cs
Expand Up @@ -599,7 +599,6 @@ private void GameStateChangedHandler(object sender, GameStateChangedEventArgs e)
Dispatcher.Invoke((Action) (() =>
{
context.GameState = e.NewState;
context.GameMap = null;
foreach (var player in context.Players)
{
player.Alive = true;
Expand Down
Binary file removed AUCapture-WPF/Resources/Misc/Stars.png
Binary file not shown.
Binary file removed AUCapture-WPF/Resources/Misc/map-1.png
Binary file not shown.
Binary file removed AUCapture-WPF/Resources/Misc/simsong.png
Binary file not shown.
73 changes: 63 additions & 10 deletions AUCapture-WPF/UserDataContext.cs
Expand Up @@ -35,7 +35,16 @@ public class UserDataContext : INotifyPropertyChanged
private ICommand textBoxButtonHelpCmd;
private ICommand openAmongUsCMD;
public List<AccentColorMenuData> AccentColors { get; set; }
public bool? Connected { get; set; } = false;
private bool? _connected = false;
public bool? Connected
{
get => _connected;
set
{
_connected = value;
OnPropertyChanged();
}
}
public class AccentColorMenuData
{
public string Name { get; set; }
Expand Down Expand Up @@ -140,19 +149,60 @@ protected virtual void DoChangeTheme(object sender)
}
}
};
private ObservableCollection<Player> _players = new ObservableCollection<Player>();
public ObservableCollection<Player> Players
{
get => _players;
set
{
_players = value;
OnPropertyChanged();
}
}

public ObservableCollection<Player> Players { get; set; } = new ObservableCollection<Player>();

public ObservableCollection<ConnectionStatus> ConnectionStatuses { get; set; } = new ObservableCollection<ConnectionStatus>();
private ObservableCollection<ConnectionStatus> _connectionStatuses = new ObservableCollection<ConnectionStatus>();
public ObservableCollection<ConnectionStatus> ConnectionStatuses
{
get => _connectionStatuses;
set
{
_connectionStatuses = value;
OnPropertyChanged();
}
}

public PlayMap? GameMap { get; set; }
private PlayMap? _gameMap;
public PlayMap? GameMap
{
get => _gameMap;
set
{
_gameMap = value;
OnPropertyChanged();
}
}

public string GameCode { get; set; }

private string _gameCode;
public string GameCode
{
get => _gameCode;
set
{
_gameCode = value;
OnPropertyChanged();
}
}


public GameState? GameState { get; set; }

private GameState? _gameState;
public GameState? GameState
{
get => _gameState;
set
{
_gameState = value;
OnPropertyChanged();
}
}

private static void Shuffle<T>(List<T> list)
{
Expand Down Expand Up @@ -212,6 +262,9 @@ public UserDataContext(IDialogCoordinator dialogCoordinator, IAppSettings settin
Console.WriteLine(e);
LatestVersion = "ERROR";
}
OnPropertyChanged(nameof(LatestVersion));
OnPropertyChanged(nameof(Version));
OnPropertyChanged(nameof(AccentColors));



Expand Down

0 comments on commit 1d4f40e

Please sign in to comment.