Skip to content

Commit

Permalink
Merge branch 'hotfix/Improve_Release_Notes'
Browse files Browse the repository at this point in the history
  • Loading branch information
PatrickHollweck committed Apr 28, 2017
2 parents cc1f9fd + 3594439 commit 2652a4b
Show file tree
Hide file tree
Showing 4 changed files with 125 additions and 94 deletions.
5 changes: 0 additions & 5 deletions public/versions/changelog.txt

This file was deleted.

36 changes: 36 additions & 0 deletions public/versions/releaseNotes.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
<html>

<head>
<link rel="stylesheet" href="https://bootswatch.com/cosmo/bootstrap.min.css" crossorigin="anonymous">
</head>

<body style="background-color: #F0F0F0">
<div style="margin: 10px">
<!-- VERSION 1 -->
<div style="background-color: black" class="panel panel-primary">
<div style="background-color: #3f51B5; color: white;" class="panel-heading">
<h3 class="panel-title">v1</h3>
</div>
<div style="background-color: #303f9F" class="panel-body">
<ul style="color: white">
<li>Reworked Settings</li>
<li>Added Crash Reporting</li>
<li>Code Cleanup and Bug Fixes</li>
</ul>
</div>
</div>
<!-- VERSION 0.9.0 -->
<div style="background-color: black" class="panel panel-primary">
<div style="background-color: #3f51B5; color: white;" class="panel-heading">
<h3 class="panel-title">v0.9.0-beta</h3>
</div>
<div style="background-color: #303f9F" class="panel-body">
<ul style="color: white">
<li>Initial Release</li>
</ul>
</div>
</div>
</div>
</body>

</html>
2 changes: 1 addition & 1 deletion public/versions/updaterInfo.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@
<item>
<version>0.9.0</version>
<url>https://github.com/FetzenRndy/AstroSoundboard/raw/master/public/versions/AstroKittySoundBoard.zip</url>
<changelog>https://github.com/FetzenRndy/AstroSoundboard/releases</changelog>
<changelog></changelog>
</item>
176 changes: 88 additions & 88 deletions src/AstroSoundBoard/WPF/Windows/MainWindow.xaml.cs
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
// ****************************** Module Header ****************************** //
//
//
// Last Modified: 25:04:2017 / 18:53
// Creation: 25:04:2017
// Last Modified: 28:04:2017 / 22:58
// Creation: 28:04:2017
// Project: AstroSoundBoard
//
//
Expand All @@ -26,125 +26,125 @@ namespace AstroSoundBoard.WPF.Windows
using log4net;

public partial class MainWindow : Window
{
private static readonly ILog Log = LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType);
{
private static readonly ILog Log = LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType);

public MainWindow()
{
AutoUpdater.CurrentCulture = CultureInfo.CreateSpecificCulture("en");
AutoUpdater.Start("https://raw.githubusercontent.com/FetzenRndy/AstroSoundboard/master/public/versions/updaterInfo.xml");
public MainWindow()
{
AutoUpdater.CurrentCulture = CultureInfo.CreateSpecificCulture("en");
AutoUpdater.Start("http://127.0.0.1:8887/updaterInfo.xml");

ViewChanger.MainWindowInstance = this;
ViewChanger.MainWindowInstance = this;

InitializeComponent();
InitializeComponent();

ViewChanger.ChangeViewTo(ViewChanger.Page.Board);
ViewChanger.ChangeViewTo(ViewChanger.Page.Board);

VolumeSlider_ValueChanged(new object(), new RoutedPropertyChangedEventArgs<double>(0, 50));
VolumeSlider.Value = 50;
}
VolumeSlider_ValueChanged(new object(), new RoutedPropertyChangedEventArgs<double>(0, 50));
VolumeSlider.Value = 50;
}

#region Helpers
#region Helpers

private bool CanSearchItemsExecute()
{
if (ViewChanger.MainWindowInstance.DataContext is BoardView)
{
SearchBox.IsEnabled = true;
FavoriteButton.IsEnabled = true;
return true;
}
else
{
SearchBox.IsEnabled = false;
FavoriteButton.IsEnabled = false;
return false;
}
}
private bool CanSearchItemsExecute()
{
if (ViewChanger.MainWindowInstance.DataContext is BoardView)
{
SearchBox.IsEnabled = true;
FavoriteButton.IsEnabled = true;
return true;
}
else
{
SearchBox.IsEnabled = false;
FavoriteButton.IsEnabled = false;
return false;
}
}

#endregion Helpers
#endregion Helpers

#region Search
#region Search

public void SearchForItem(object sender, TextChangedEventArgs e)
{
BoardView.BoadViewInstance?.SearchForElement(SearchBox.Text, onlyFavoritesActive);
}
public void SearchForItem(object sender, TextChangedEventArgs e)
{
BoardView.BoadViewInstance?.SearchForElement(SearchBox.Text, onlyFavoritesActive);
}

#endregion Search
#endregion Search

#region Favorites
#region Favorites

private bool onlyFavoritesActive;
private bool onlyFavoritesActive;

public void ToogleFavorites()
{
Log.Debug("Toggling Favorites!");
public void ToogleFavorites()
{
Log.Debug("Toggling Favorites!");

if (!CanSearchItemsExecute())
{
return;
}
if (!CanSearchItemsExecute())
{
return;
}

if (onlyFavoritesActive)
{
onlyFavoritesActive = false;
BoardView.BoadViewInstance?.OnlyShowFavorites(onlyFavoritesActive);
}
else
{
onlyFavoritesActive = true;
BoardView.BoadViewInstance?.OnlyShowFavorites(onlyFavoritesActive);
}
}
if (onlyFavoritesActive)
{
onlyFavoritesActive = false;
BoardView.BoadViewInstance?.OnlyShowFavorites(onlyFavoritesActive);
}
else
{
onlyFavoritesActive = true;
BoardView.BoadViewInstance?.OnlyShowFavorites(onlyFavoritesActive);
}
}

private void FavoriteButton_Click(object sender, RoutedEventArgs e)
{
ToogleFavorites();
}
private void FavoriteButton_Click(object sender, RoutedEventArgs e)
{
ToogleFavorites();
}

private void ContentControl_DataContextChanged(object sender, DependencyPropertyChangedEventArgs e)
{
CanSearchItemsExecute();
}
private void ContentControl_DataContextChanged(object sender, DependencyPropertyChangedEventArgs e)
{
CanSearchItemsExecute();
}

#endregion Favorites
#endregion Favorites

#region VolumeSlider
#region VolumeSlider

[DllImport("winmm.dll")]
private static extern int waveOutSetVolume(IntPtr hwo, uint dwVolume);
[DllImport("winmm.dll")]
private static extern int waveOutSetVolume(IntPtr hwo, uint dwVolume);

private void VolumeSlider_ValueChanged(object sender, RoutedPropertyChangedEventArgs<double> e)
{
int newVolume = ushort.MaxValue / 100 * (int)e.NewValue;
uint newVolumeAllChannels = ((uint)newVolume & 0x0000ffff) | ((uint)newVolume << 16);
private void VolumeSlider_ValueChanged(object sender, RoutedPropertyChangedEventArgs<double> e)
{
int newVolume = ushort.MaxValue / 100 * (int)e.NewValue;
uint newVolumeAllChannels = ((uint)newVolume & 0x0000ffff) | ((uint)newVolume << 16);

waveOutSetVolume(IntPtr.Zero, newVolumeAllChannels);
}
waveOutSetVolume(IntPtr.Zero, newVolumeAllChannels);
}

#endregion VolumeSlider
#endregion VolumeSlider

#region UI Events
#region UI Events

private void ShowHome_Click(object sender, RoutedEventArgs e) => ViewChanger.ChangeViewTo(ViewChanger.Page.Board);
private void ShowHome_Click(object sender, RoutedEventArgs e) => ViewChanger.ChangeViewTo(ViewChanger.Page.Board);

private void ShowSettings_Click(object sender, RoutedEventArgs e) => ViewChanger.ChangeViewTo(ViewChanger.Page.Settings);
private void ShowSettings_Click(object sender, RoutedEventArgs e) => ViewChanger.ChangeViewTo(ViewChanger.Page.Settings);

private void BrowserFaceBook_Click(object sender, RoutedEventArgs e) => Process.Start("https://www.facebook.com/TheAstronautKitty");
private void BrowserFaceBook_Click(object sender, RoutedEventArgs e) => Process.Start("https://www.facebook.com/TheAstronautKitty");

private void BrowserTwitter_Click(object sender, RoutedEventArgs e) => Process.Start("https://twitter.com/AstroShitty");
private void BrowserTwitter_Click(object sender, RoutedEventArgs e) => Process.Start("https://twitter.com/AstroShitty");

private void BrowserYoutube_Click(object sender, RoutedEventArgs e) => Process.Start("https://www.youtube.com/user/TheAstronautKitty");
private void BrowserYoutube_Click(object sender, RoutedEventArgs e) => Process.Start("https://www.youtube.com/user/TheAstronautKitty");

private void BrowserRequestFeature_Click(object sender, RoutedEventArgs e) => Process.Start("https://docs.google.com/forms/d/e/1FAIpQLSc9JnTYAgQ2fbaSujj9-F3DsI6_BOXJGG7jsXNLD6Dqf11X9g/viewform?usp=sf_link");
private void BrowserRequestFeature_Click(object sender, RoutedEventArgs e) => Process.Start("https://docs.google.com/forms/d/e/1FAIpQLSc9JnTYAgQ2fbaSujj9-F3DsI6_BOXJGG7jsXNLD6Dqf11X9g/viewform?usp=sf_link");

private void BrowserRequestSound_Click(object sender, RoutedEventArgs e) => Process.Start("https://docs.google.com/forms/d/e/1FAIpQLSfVT7Jx-5n80LYFskIcjLsL3fb2RmI7XOXAS_2rtUFIuyYp8Q/viewform?usp=sf_link");
private void BrowserRequestSound_Click(object sender, RoutedEventArgs e) => Process.Start("https://docs.google.com/forms/d/e/1FAIpQLSfVT7Jx-5n80LYFskIcjLsL3fb2RmI7XOXAS_2rtUFIuyYp8Q/viewform?usp=sf_link");

private void BrowserReportIssue_Click(object sender, RoutedEventArgs e) => Process.Start("https://docs.google.com/forms/d/e/1FAIpQLSdrhFCCVeKrbA56kiLpOqA5H1nszwA4gWimV1V6YOjXr5mC-A/viewform?usp=sf_link");
private void BrowserReportIssue_Click(object sender, RoutedEventArgs e) => Process.Start("https://docs.google.com/forms/d/e/1FAIpQLSdrhFCCVeKrbA56kiLpOqA5H1nszwA4gWimV1V6YOjXr5mC-A/viewform?usp=sf_link");

private void BrowserGitHub_Click(object sender, RoutedEventArgs e) => Process.Start("https://github.com/FetzenRndy/AstroSoundboard");
private void BrowserGitHub_Click(object sender, RoutedEventArgs e) => Process.Start("https://github.com/FetzenRndy/AstroSoundboard");

#endregion UI Events
}
#endregion UI Events
}
}

0 comments on commit 2652a4b

Please sign in to comment.