Skip to content

Commit

Permalink
add about
Browse files Browse the repository at this point in the history
  • Loading branch information
ExtraConcentratedJuice committed Aug 13, 2020
1 parent b7efafb commit 5cbbfda
Show file tree
Hide file tree
Showing 5 changed files with 56 additions and 1 deletion.
18 changes: 18 additions & 0 deletions MuteMyMic/About.xaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
<Window x:Class="MuteMyMic.About"
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:MuteMyMic"
mc:Ignorable="d"
Title="About" Height="170" Width="300" Background="#2D2D30" ResizeMode="NoResize"
WindowStyle="None">
<Grid>
<Label Content="MuteMyMic" HorizontalAlignment="Left" Margin="10,10,0,0" VerticalAlignment="Top" Foreground="White"/>
<Label Content="Author: ExtraConcentratedJuice" HorizontalAlignment="Left" Margin="10,36,0,0" VerticalAlignment="Top" Width="176" Foreground="White"/>
<Label Content="Released under the MIT License." HorizontalAlignment="Left" Margin="10,62,0,0" VerticalAlignment="Top" Foreground="White"/>
<Label Content="If you paid for this software, demand a refund." HorizontalAlignment="Left" Margin="10,88,0,0" VerticalAlignment="Top" Foreground="White" Width="259"/>
<Button Content="Done" HorizontalAlignment="Left" Margin="237,128,0,0" VerticalAlignment="Top" Height="28" Width="53" Click="OnDoneButtonClicked"/>

</Grid>
</Window>
31 changes: 31 additions & 0 deletions MuteMyMic/About.xaml.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
using System;
using System.Collections.Generic;
using System.Text;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Shapes;

namespace MuteMyMic
{
/// <summary>
/// Interaction logic for About.xaml
/// </summary>
public partial class About : Window
{
public About()
{
InitializeComponent();
MouseDown += (_, e) => { if (e.ChangedButton == MouseButton.Left) DragMove(); };
}

public void OnDoneButtonClicked(object _, EventArgs e)
{
Close();
}
}
}
1 change: 1 addition & 0 deletions MuteMyMic/MainWindow.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
</ItemsPanelTemplate>
</Menu.ItemsPanel>
<MenuItem Header="File" Height="25">
<MenuItem Click="OnAboutButtonClick" Foreground="#000000" Header="About" Height="25"/>
<MenuItem Click="OnExitButtonClick" Foreground="#000000" Header="Exit" Height="25"/>
</MenuItem>
<MenuItem Header="Settings" Height="25">
Expand Down
5 changes: 5 additions & 0 deletions MuteMyMic/MainWindow.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,11 @@ private void OnKeyUp(int key)
}
}

private void OnAboutButtonClick(object _, EventArgs e)
{
new About().ShowDialog();
}

private void OnSetHotkeyButtonClicked(object _, EventArgs e)
{
var dialog = new HotkeySelector(keyCombo, hotkeys =>
Expand Down
2 changes: 1 addition & 1 deletion MuteMyMic/MuteMyMic.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<ApplicationIcon>MuteMyMic.ico</ApplicationIcon>
<Authors>ExtraConcentratedJuice</Authors>
<Company>ExtraConcentratedJuice</Company>
<Description>An application for muting your mic globally until you press a button (push-to-talk).</Description>
<Description>An application for muting your microphone until a set combination of keys is held (push-to-talk).</Description>
<PackageLicenseExpression></PackageLicenseExpression>
<PackageLicenseFile>LICENSE.md</PackageLicenseFile>
</PropertyGroup>
Expand Down

0 comments on commit 5cbbfda

Please sign in to comment.