forked from praydog/uevr-frontend
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Configs: Add warning prompt when DLL is detected in the ZIP file
- Loading branch information
Showing
6 changed files
with
156 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
<Window x:Class="UEVR.YesNoDialog" | ||
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:local="clr-namespace:UEVR" | ||
xmlns:materialDesign="http://materialdesigninxaml.net/winfx/xaml/themes" | ||
TextElement.Foreground="{DynamicResource MaterialDesignBody}" | ||
TextElement.FontWeight="Regular" | ||
TextElement.FontSize="13" | ||
TextOptions.TextFormattingMode="Ideal" | ||
TextOptions.TextRenderingMode="Auto" | ||
FontFamily="{DynamicResource MaterialDesignFont}" | ||
Background="#FF1A1B1C" | ||
SizeToContent="WidthAndHeight" ResizeMode="NoResize" Icon="/UEVR2.png" | ||
WindowStartupLocation="CenterScreen" | ||
WindowStyle="None" | ||
Title="Prompt" Height="200" Width="400"> | ||
<Border BorderBrush="#FF3D3D40" BorderThickness="2"> | ||
<StackPanel> | ||
<Border MouseLeftButtonDown="TitleBar_MouseLeftButtonDown" Background="#FF1A1B1C"> | ||
<Border.Style> | ||
<Style TargetType="{x:Type Border}"> | ||
<Setter Property="Cursor" Value="Hand"/> | ||
<Style.Triggers> | ||
<Trigger Property="IsMouseOver" Value="True"> | ||
<Setter Property="Cursor" Value="SizeAll"/> | ||
</Trigger> | ||
</Style.Triggers> | ||
</Style> | ||
</Border.Style> | ||
<DockPanel Height="30"> | ||
<TextBlock Text="{Binding Title, RelativeSource={RelativeSource FindAncestor, AncestorType=Window}}" | ||
VerticalAlignment="Center" | ||
Margin="25,0,0,0" | ||
FontWeight="Bold" | ||
Foreground="White" /> | ||
</DockPanel> | ||
</Border> | ||
<TextBlock x:Name="m_dialogText" Margin="10" /> | ||
<StackPanel Orientation="Horizontal" HorizontalAlignment="Right" Margin="10"> | ||
<Button x:Name="btnYes" Content="Yes" Width="75" Margin="5" Click="btnYes_Click" /> | ||
<Button x:Name="btnNo" Content="No" Width="75" Margin="5" Click="btnNo_Click" /> | ||
</StackPanel> | ||
</StackPanel> | ||
</Border> | ||
</Window> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
using System; | ||
using System.Collections.Generic; | ||
using System.Linq; | ||
using System.Text; | ||
using System.Threading.Tasks; | ||
using System.Windows; | ||
using System.Windows.Input; | ||
|
||
namespace UEVR { | ||
public partial class YesNoDialog : Window { | ||
public bool DialogResultYes { get; private set; } = false; | ||
|
||
public YesNoDialog(string windowTitle, string txt) { | ||
InitializeComponent(); | ||
m_dialogText.Text = txt; | ||
this.Title = windowTitle; | ||
} | ||
|
||
private void btnYes_Click(object sender, RoutedEventArgs e) { | ||
DialogResultYes = true; | ||
this.Close(); | ||
} | ||
|
||
private void btnNo_Click(object sender, RoutedEventArgs e) { | ||
DialogResultYes = false; | ||
this.Close(); | ||
} | ||
|
||
private void TitleBar_MouseLeftButtonDown(object sender, MouseButtonEventArgs e) { | ||
if (e.ChangedButton == MouseButton.Left) { | ||
this.DragMove(); | ||
} | ||
} | ||
} | ||
} |