Skip to content

Commit

Permalink
Mix Fix
Browse files Browse the repository at this point in the history
  • Loading branch information
MaKrotos committed Oct 21, 2024
1 parent 4b4e5cb commit 97b382c
Show file tree
Hide file tree
Showing 12 changed files with 79 additions and 50 deletions.
2 changes: 1 addition & 1 deletion VK UI3 (Package)/Package.appxmanifest
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
<Identity
Name="FDW.VKM"
Publisher="CN=FDW"
Version="0.2.0.8" />
Version="0.2.0.9" />

<mp:PhoneIdentity PhoneProductId="b7c1f34e-9025-4935-9d7a-7d0a632a368d" PhonePublisherId="00000000-0000-0000-0000-000000000000"/>

Expand Down
4 changes: 2 additions & 2 deletions VK UI3 (Package)/VK UI3 (Package).wapproj
Original file line number Diff line number Diff line change
Expand Up @@ -141,10 +141,10 @@
</ProjectReference>
</ItemGroup>
<ItemGroup>
<PackageReference Include="Microsoft.WindowsAppSDK" Version="1.6.240829007">
<PackageReference Include="Microsoft.WindowsAppSDK" Version="1.6.240923002">
<IncludeAssets>build</IncludeAssets>
</PackageReference>
<PackageReference Include="Microsoft.Windows.SDK.BuildTools" Version="10.0.26100.1">
<PackageReference Include="Microsoft.Windows.SDK.BuildTools" Version="10.0.26100.1742">
<IncludeAssets>build</IncludeAssets>
</PackageReference>
</ItemGroup>
Expand Down
20 changes: 18 additions & 2 deletions VK UI3/App.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
using VkNet.AudioBypassService.Extensions;
using VkNet.AudioBypassService.Models.Auth;
using VkNet.Extensions.DependencyInjection;
using Windows.ApplicationModel;
using Windows.Win32;

// To learn more about WinUI, the WinUI project structure,
Expand Down Expand Up @@ -183,9 +184,24 @@ private async Task statSlyRun()
}

{
EventParams eventParams = new EventParams("userID", UserUniqID);
var packageVersion = Package.Current.Id.Version;
var version = $"{packageVersion.Major}.{packageVersion.Minor}.{packageVersion.Build}.{packageVersion.Revision}";


var listParams = new List<EventParams>
{
new EventParams("userID", UserUniqID),
new EventParams("versionAPP", version)
};


Event @event = new Event("Run App", DateTime.Now, eventParams: listParams);






Event @event = new Event("Run App", DateTime.Now, eventParams: new List<EventParams>() { eventParams });

_ = StatSlyLib.StatSLY.SendEvent(@event);
}
Expand Down
2 changes: 1 addition & 1 deletion VK UI3/Controls/Blocks/MixControl.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@
Click="settingBTN_Click"
CornerRadius="5"
OriginalHeight="30"
OriginalMargin="5,5,5,5"
OriginalMargin="0"
OriginalWidth="200">

<Grid
Expand Down
19 changes: 15 additions & 4 deletions VK UI3/Controls/Blocks/MixControl.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -228,17 +228,28 @@ private async void settingBTN_Click(object sender, RoutedEventArgs e)
SetOptions(a.mixCategories);
dialog.Hide();

new MixAudio(
new MixOptions("common", Options: _options)
, this.DispatcherQueue);
a.ResetCommand = null;
a.ApplyCommand = null;
});


a.ResetCommand = new AsyncCommand(async () =>
{
_options = null;
dialog.Hide();


new MixAudio(
new MixOptions("common", Options: _options)
, this.DispatcherQueue);
a.ResetCommand = null;
a.ApplyCommand = null;
});
new MixAudio(
new MixOptions("common", Options: _options)
, this.DispatcherQueue);



dialog.ShowAsync();
}
catch (Exception xe) { }
Expand Down
2 changes: 1 addition & 1 deletion VK UI3/Helpers/Staggered/ActivityFeedLayout.cs
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,7 @@ protected override Size MeasureOverride(VirtualizingLayoutContext context, Size

// Calculate and return the size of all the content (realized or not) by figuring out
// what the bottom/right position of the last item would be.
var extentHeight = ((int)(context.ItemCount / 3) - 1) * (this.MinItemSize.Height + this.RowSpacing) + this.MinItemSize.Height;
var extentHeight = Math.Max(0,((int)(context.ItemCount / 3) - 1) * (this.MinItemSize.Height + this.RowSpacing) + this.MinItemSize.Height);

// Report this as the desired size for the layout
return new Size(desiredItemWidth * 4 + this.ColumnSpacing * 2, extentHeight);
Expand Down
25 changes: 16 additions & 9 deletions VK UI3/Views/ModalsPages/MixControls/BTNSControl.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,31 +11,38 @@
xmlns:muxc="using:Microsoft.UI.Xaml.Controls"
mc:Ignorable="d">

<Grid
<StackPanel
Margin="0,10,0,0"
x:Name="MainGrid"

HorizontalAlignment="Stretch"
VerticalAlignment="Center">
<TextBlock Margin="0,0,0,4" FontSize="20" FontFamily="{ThemeResource VKSansBold}" x:Name="TitleText"></TextBlock>

<ScrollViewer>




<muxc:ItemsRepeater x:Name="StaggeredRepeater" ItemsSource="{x:Bind mixOptions, Mode=OneWay}">
<muxc:ItemsRepeater x:Name="StaggeredRepeater" ItemsSource="{x:Bind mixOptions, Mode=OneWay}">
<muxc:ItemsRepeater.Layout>
<WinUIGallery:ActivityFeedLayout ColumnSpacing="8" MinItemSize="100,30" />
<WinUIGallery:ActivityFeedLayout ColumnSpacing="8" RowSpacing="8" MinItemSize="120,30" />
</muxc:ItemsRepeater.Layout>
<muxc:ItemsRepeater.ItemTemplate>
<DataTemplate>
<ToggleButton
HorizontalAlignment="Stretch"
VerticalAlignment="Stretch"
Content="{Binding Title}"
IsChecked="{Binding Selected}" />
<Grid >
<ToggleButton

HorizontalAlignment="Stretch"
VerticalAlignment="Stretch"
Content="{Binding Title}"
IsChecked="{Binding Selected, Mode=TwoWay}" />
</Grid>
</DataTemplate>
</muxc:ItemsRepeater.ItemTemplate>

</muxc:ItemsRepeater>
</ScrollViewer>

</Grid>
</StackPanel>
</UserControl>
3 changes: 2 additions & 1 deletion VK UI3/Views/ModalsPages/MixControls/BTNSControl.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -37,14 +37,15 @@ private void BTNSControl_Unloaded(object sender, RoutedEventArgs e)
}


MixCategory mixCategory;
public MixCategory mixCategory;

private void SImpleStack_DataContextChanged(FrameworkElement sender, DataContextChangedEventArgs args)
{
if (DataContext is MixCategory mixcat)
{
if (mixCategory == mixcat) return;
mixOptions.Clear();
TitleText.Text = mixcat.Title;
mixCategory = mixcat;
foreach (var opt in mixcat.Options)
{
Expand Down
2 changes: 1 addition & 1 deletion VK UI3/Views/ModalsPages/MixControls/PicturedButton.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
Unchecked="ToggleButton_Unchecked"
Width="80"
Height="80"
IsChecked="{Binding Selected}">
IsChecked="{Binding Selected, Mode=TwoWay}">

<Grid
Padding="0"
Expand Down
43 changes: 17 additions & 26 deletions VK UI3/Views/ModalsPages/MixControls/PicturedControl.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,50 +8,41 @@
xmlns:local="using:VK_UI3.Views.ModalsPages.MixControls"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:muxc="using:Microsoft.UI.Xaml.Controls"

mc:Ignorable="d">
<UserControl.Resources>


<DataTemplate x:Key="StringTemplate">
<local:PicturedButton />
</DataTemplate>
<DataTemplate x:Key="DefaultTemplate">
<local:SimpleButtons />
</DataTemplate>



</UserControl.Resources>

<Grid
<StackPanel
x:Name="MainGrid"
Margin="0,10,0,0"
HorizontalAlignment="Stretch"
VerticalAlignment="Stretch"
Background="Red">
VerticalAlignment="Center">
<TextBlock Margin="0,0,0,4" FontSize="20" HorizontalAlignment="Center" FontFamily="{ThemeResource VKSansBold}" x:Name="TitleText" />





<muxc:ItemsRepeater
x:Name="StaggeredRepeater"
Width="auto"
HorizontalAlignment="Stretch"
HorizontalAlignment="Center"
VerticalAlignment="Stretch"
ItemsSource="{x:Bind mixOptions, Mode=OneWay}">
<muxc:ItemsRepeater.Layout>
<controls:StaggeredLayout
ColumnSpacing="10"
DesiredColumnWidth="85"
RowSpacing="10" />

</muxc:ItemsRepeater.Layout>
<ItemsRepeater.Layout>
<StackLayout Orientation="Horizontal" />
</ItemsRepeater.Layout>
<muxc:ItemsRepeater.ItemTemplate>
<DataTemplate>
<local:PicturedButton />
<Border HorizontalAlignment="Center" VerticalAlignment="Center">

<local:PicturedButton />

</Border>
</DataTemplate>
</muxc:ItemsRepeater.ItemTemplate>

</muxc:ItemsRepeater>


</Grid>
</StackPanel>
</UserControl>
2 changes: 2 additions & 0 deletions VK UI3/Views/ModalsPages/MixControls/PicturedControl.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,8 @@ private void SImpleStack_DataContextChanged(FrameworkElement sender, DataContext
{
if (mixCategory == mixcat) return;
mixOptions.Clear();
TitleText.Text = mixcat.Title;

mixCategory = mixcat;
foreach (var opt in mixcat.Options)
{
Expand Down
5 changes: 3 additions & 2 deletions VK UI3/Views/ModalsPages/MixControls/SimpleButtons.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,11 @@
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
mc:Ignorable="d">
<Grid HorizontalAlignment="Center" Background="Aqua" >
<Grid HorizontalAlignment="Stretch" VerticalAlignment="Stretch" >
<ToggleButton
HorizontalAlignment="Stretch" VerticalAlignment="Stretch"
Content="{Binding Title}"
IsChecked="{Binding Selected}" />

IsChecked="{Binding Selected, Mode=TwoWay}" />
</Grid>
</UserControl>

0 comments on commit 97b382c

Please sign in to comment.