Skip to content

Commit

Permalink
[Removed] Feedback panel
Browse files Browse the repository at this point in the history
  • Loading branch information
nw520 committed Jun 13, 2018
1 parent ff6891b commit dbb9bc2
Show file tree
Hide file tree
Showing 6 changed files with 4 additions and 129 deletions.
1 change: 1 addition & 0 deletions .gitignore
Expand Up @@ -189,3 +189,4 @@ _Pvt_Extensions/
ModelManifest.xml

/.vs/osu!Sync/v15/sqlite3
/.vs/osu!Sync/v15/Server/sqlite3
25 changes: 0 additions & 25 deletions osu!Sync/Bundled/l10n/en_US.xaml
Expand Up @@ -243,8 +243,6 @@
<system:String x:Key="WindowAbout_copyright">osu!Sync is an open-source tool created by naseweis520.</system:String>
<!-- | E -->
<system:String x:Key="WindowAbout_email">eMail Contact</system:String>
<!-- | F -->
<system:String x:Key="WindowAbout_feedback">Feedback</system:String>
<!-- | G -->
<system:String x:Key="WindowAbout_github">Source Code on GitHub</system:String>
<!-- | L -->
Expand All @@ -261,8 +259,6 @@
<!-- |> Tooltip (tt) -->
<!-- |> E -->
<system:String x:Key="WindowAbout_tt_email">Questions? Just write us a mail and we'll answer. :)</system:String>
<!-- |> F -->
<system:String x:Key="WindowAbout_tt_feedback">Open feedback window.</system:String>
<!-- |> G -->
<system:String x:Key="WindowAbout_tt_github">Help us making osu!Sync better.</system:String>
<!-- |> O -->
Expand All @@ -283,9 +279,7 @@
<system:String x:Key="WindowSettings_autoimportDownloadedBeatmapsAfterXBeatmaps">Autoimport downloaded beatmaps after x beatmaps (Numeric)</system:String>
<!-- | B -->
<system:String x:Key="WindowSettings_beatmapPanelCall">Beatmap Panel call</system:String>
<system:String x:Key="WindowSettings_bug">Bug</system:String>
<!-- | C -->
<system:String x:Key="WindowSettings_category">Category</system:String>
<system:String x:Key="WindowSettings_checkFileAssociationsEverySync">Check file associations every sync (Only if elevated)</system:String>
<system:String x:Key="WindowSettings_checkForUpdates">Check for updates...</system:String>
<system:String x:Key="WindowSettings_configuration">Configuration</system:String>
Expand All @@ -302,13 +296,8 @@
<system:String x:Key="WindowSettings_enableNotifyIconInTrayArea">Enable notify icon in tray area...</system:String>
<system:String x:Key="WindowSettings_everyLaunch">Every launch.</system:String>
<system:String x:Key="WindowSettings_executableFiles">Executable Files</system:String>
<!-- | F -->
<system:String x:Key="WindowSettings_featureRequest">Feature Request</system:String>
<system:String x:Key="WindowSettings_feedback">Feedback</system:String>
<system:String x:Key="WindowSettings_furtherInformation">Further Information</system:String>
<!-- | G -->
<system:String x:Key="WindowSettings_general">General</system:String>
<system:String x:Key="WindowSettings_generalFeedback">General Feedback</system:String>
<!-- | I -->
<system:String x:Key="WindowSettings_importDownload">Import/Download</system:String>
<system:String x:Key="WindowSettings_importerAskOsu">Ask whether to start osu! after import process</system:String>
Expand All @@ -323,7 +312,6 @@
<system:String x:Key="WindowSettings_maximumOnceADay">Maximum once a day (Recommended).</system:String>
<system:String x:Key="WindowSettings_maximumOnceAMonth">Maximum once a week.</system:String>
<system:String x:Key="WindowSettings_maximumOnceAWeek">Maximum once a month (Not recommended).</system:String>
<system:String x:Key="WindowSettings_message">Message</system:String>
<system:String x:Key="WindowSettings_monitoring">Monitoring</system:String>
<!-- | N -->
<system:String x:Key="WindowSettings_never">Nevoar ヽ(≧Д≦)ノ (Not recommended).</system:String>
Expand All @@ -335,34 +323,27 @@
<system:String x:Key="WindowSettings_openApiLog">Open API log file</system:String>
<system:String x:Key="WindowSettings_openDataFolder">Open data folder</system:String>
<system:String x:Key="WindowSettings_openUpdateWhenNewVersionAvailable">Open updater when new version is available</system:String>
<system:String x:Key="WindowSettings_other">Other</system:String>
<!-- | P -->
<system:String x:Key="WindowSettings_pathToOsu">Path to osu!</system:String>
<system:String x:Key="WindowSettings_pathToSongsFolder">Path to songs folder</system:String>
<system:String x:Key="WindowSettings_pleaseOpenOsu">Please open the osu!.exe</system:String>
<system:String x:Key="WindowSettings_pleaseSelectDirectoryWhereToSaveUpdates">Please select the directory where to save updates</system:String>
<system:String x:Key="WindowSettings_pleaseSelectSongsFolder">Please select your songs folder</system:String>
<system:String x:Key="WindowSettings_pleaseTryAgainLaterOrContactUs">Please try again later or contact us directly: team@nw520.de .</system:String>
<!-- | Q -->
<system:String x:Key="WindowSettings_questionHelpRequest">Question/Help Request</system:String>
<!-- | R -->
<system:String x:Key="WindowSettings_requestElevationOnStartup">If it might be required, request elevation on startup instead of demand</system:String>
<system:String x:Key="WindowSettings_resetOsuSync">Reset osu!Sync (delete configuration, file associations, etc.)</system:String>
<system:String x:Key="WindowSettings_restartElevated">Restart osu!Sync elevated</system:String>
<!-- | S -->
<system:String x:Key="WindowSettings_serverSideAnswer">Server-side answer:</system:String>
<system:String x:Key="WindowSettings_showAlwaysDisableNotifyBalloons">Show always - Disable NotifyBalloons</system:String>
<system:String x:Key="WindowSettings_showAlwaysEnableNotifyBalloons">Show always - Enable NotifyBalloons</system:String>
<system:String x:Key="WindowSettings_showMessageWhenUpdateCheckFailed">Show message when update check failed</system:String>
<system:String x:Key="WindowSettings_showOnlyWhenOsuSyncIsHiddenDisableNotifyBalloons">Show only when window is hidden - Disable NotifyBalloons</system:String>
<system:String x:Key="WindowSettings_submitting">Submitting...</system:String>
<system:String x:Key="WindowSettings_sync">Sync</system:String>
<system:String x:Key="WindowSettings_syncOnStartup">Sync on application startup</system:String>
<!-- | T -->
<system:String x:Key="WindowSettings_theresAlreadyAShortcut">There's already a shortcut on your desktop.</system:String>
<!-- | U -->
<system:String x:Key="WindowSettings_unableToCreateShortcut">Unable to create shortcut!</system:String>
<system:String x:Key="WindowSettings_unableToSubmitFeedback">Unable to submit feedback!</system:String>
<system:String x:Key="WindowSettings_updater">Updater</system:String>
<system:String x:Key="WindowSettings_updateFileAssocations">Update/Reregister file associations</system:String>
<system:String x:Key="WindowSettings_useThisDownloadMirror">Use this osu! Download Mirror...</system:String>
Expand All @@ -374,12 +355,6 @@
<system:String x:Key="WindowSettings_warnNotElevated">Some options may be disabled because the application is currently not elevated.</system:String>
<system:String x:Key="WindowSettings_widthOfBeatmapDetailPanel">Width of beatmap detail panel (Numeric, between 5 and 95)</system:String>
<!-- | Y -->
<system:String x:Key="WindowSettings_yourEmail">Your eMail</system:String>
<system:String x:Key="WindowSettings_yourEmailInvalid">Your eMail seems to be invalid.</system:String>
<system:String x:Key="WindowSettings_youHaveToSelectACategory">You have to select a category.</system:String>
<system:String x:Key="WindowSettings_yourMessageSeemsToBeQuiteShort">Your message seems to be quite short. Please try to explain as detailed as possible.</system:String>
<system:String x:Key="WindowSettings_yourName">Your name/osu!Username</system:String>
<system:String x:Key="WindowSettings_yourNameIsTooShort">Your name/osu!Username is too short.</system:String>
<system:String x:Key="WindowSettings_youSelectedTheWrongFile">You selected the wrong file. -- Please select the "osu!.exe".</system:String>
<!-- |> Tooltip (tt) -->
<!-- | E -->
Expand Down
6 changes: 2 additions & 4 deletions osu!Sync/Window_About.xaml
Expand Up @@ -73,12 +73,10 @@
<ColumnDefinition />
<ColumnDefinition />
<ColumnDefinition />
<ColumnDefinition />
</Grid.ColumnDefinitions>
<TextBlock x:Name="TB_Contact" Cursor="Hand" FontSize="14" FontWeight="SemiBold" Foreground="#0088CC" MouseUp="TB_Contact_MouseUp" Text="{DynamicResource WindowAbout_email}" TextAlignment="Center" TextWrapping="Wrap" ToolTip="{DynamicResource WindowAbout_tt_email}" VerticalAlignment="Top" />
<TextBlock x:Name="TB_Feedback" Cursor="Hand" FontSize="14" FontWeight="SemiBold" Foreground="#0088CC" MouseUp="TB_Feedback_MouseUp" Text="{DynamicResource WindowAbout_feedback}" TextAlignment="Center" TextWrapping="Wrap" ToolTip="{DynamicResource WindowAbout_tt_feedback}" VerticalAlignment="Top" Grid.Column="1" />
<TextBlock x:Name="TB_osuForum" Cursor="Hand" FontSize="14" FontWeight="SemiBold" Foreground="#0088CC" MouseUp="TB_osuForum_MouseUp" Text="{DynamicResource WindowAbout_osuForum}" TextAlignment="Center" TextWrapping="Wrap" ToolTip="{DynamicResource WindowAbout_tt_osuForum}" VerticalAlignment="Top" Grid.Column="2" />
<TextBlock x:Name="TB_GitHub" Cursor="Hand" FontSize="14" FontWeight="SemiBold" Foreground="#0088CC" MouseUp="TB_GitHub_MouseUp" Text="{DynamicResource WindowAbout_github}" TextAlignment="Center" TextWrapping="Wrap" ToolTip="{DynamicResource WindowAbout_tt_github}" VerticalAlignment="Top" Grid.Column="3" />
<TextBlock x:Name="TB_osuForum" Cursor="Hand" FontSize="14" FontWeight="SemiBold" Foreground="#0088CC" MouseUp="TB_osuForum_MouseUp" Text="{DynamicResource WindowAbout_osuForum}" TextAlignment="Center" TextWrapping="Wrap" ToolTip="{DynamicResource WindowAbout_tt_osuForum}" VerticalAlignment="Top" Grid.Column="1" />
<TextBlock x:Name="TB_GitHub" Cursor="Hand" FontSize="14" FontWeight="SemiBold" Foreground="#0088CC" MouseUp="TB_GitHub_MouseUp" Text="{DynamicResource WindowAbout_github}" TextAlignment="Center" TextWrapping="Wrap" ToolTip="{DynamicResource WindowAbout_tt_github}" VerticalAlignment="Top" Grid.Column="2" />
</Grid>
<TextBlock FontSize="14" Foreground="#555" Margin="0,10,0,15" Text="{DynamicResource WindowAbout_copyright}" TextAlignment="Center" TextWrapping="Wrap" VerticalAlignment="Bottom" />
</StackPanel>
Expand Down
4 changes: 0 additions & 4 deletions osu!Sync/Window_About.xaml.cs
Expand Up @@ -15,10 +15,6 @@ public partial class Window_About {
Process.Start("mailto:team@nw520.de?subject=Contact%20|%20osu!Sync");
}

public void TB_Feedback_MouseUp(object sender, MouseButtonEventArgs e) {
MainWindow.UI_ShowSettingsWindow(4);
}

public void TB_GitHub_MouseUp(object sender, MouseButtonEventArgs e) {
Process.Start("https://github.com/naseweis520/osu-Sync");
}
Expand Down
37 changes: 1 addition & 36 deletions osu!Sync/Window_Settings.xaml
Expand Up @@ -17,7 +17,7 @@
<RowDefinition Height="Auto" />
</Grid.RowDefinitions>
<TextBlock FontSize="48" FontWeight="Light" Foreground="#27AE60" Text="{DynamicResource MainWindow_settings}" VerticalAlignment="Top" />
<TabControl x:Name="TC_Main" Margin="0,64,0,0" SelectionChanged="TC_Main_SelectionChanged">
<TabControl x:Name="TC_Main" Margin="0,64,0,0">
<TabItem Header="{DynamicResource WindowSettings_general}">
<ScrollViewer Background="#E5E5E5">
<StackPanel Margin="5">
Expand Down Expand Up @@ -162,41 +162,6 @@
</StackPanel>
</ScrollViewer>
</TabItem>
<TabItem Header="{DynamicResource WindowSettings_feedback}">
<ScrollViewer Background="#E5E5E5">
<Grid Margin="5">
<StackPanel x:Name="StackPanel_Feedback" IsEnabled="False" Margin="0,10,0,0" Visibility="Collapsed">
<TextBlock Text="{DynamicResource WindowSettings_yourName}" />
<TextBox x:Name="TB_FeedbackUsername"/>
<TextBlock Margin="0,5,0,0" Text="{DynamicResource WindowSettings_yourEmail}" />
<TextBox x:Name="TB_FeedbackeMail"/>
<TextBlock Margin="0,5,0,0" Text="{DynamicResource WindowSettings_category}" />
<ComboBox x:Name="CB_FeedbackCategory">
<ComboBoxItem Content="{DynamicResource WindowSettings_bug}" Tag="Bug" />
<ComboBoxItem Content="{DynamicResource WindowSettings_featureRequest}" Tag="Feature Request" />
<ComboBoxItem Content="{DynamicResource WindowSettings_generalFeedback}" Tag="General Feedback" />
<ComboBoxItem Content="{DynamicResource WindowSettings_questionHelpRequest}" Tag="Question/Help Request" />
<Separator/>
<ComboBoxItem Content="{DynamicResource WindowSettings_other}" Tag="Other" />
</ComboBox>
<TextBlock Margin="0,5,0,0" Text="{DynamicResource WindowSettings_message}" />
<RichTextBox x:Name="RTB_FeedbackMessage" Height="75" />
<TextBlock Margin="0,5,0,0" Text="{DynamicResource WindowSettings_furtherInformation}" />
<RichTextBox IsReadOnly="True">
<FlowDocument>
<Paragraph>
<Run x:Name="Ru_FeedbackInfo" />
</Paragraph>
</FlowDocument>
</RichTextBox>
<Button x:Name="Bu_FeedbackSubmit" Click="Bu_FeedbackSubmit_Click" Content="{DynamicResource Global_buttons_submit}" Height="40" Margin="0,5,0,0" />
</StackPanel>
<Grid x:Name="Gr_FeedbackOverlay" Background="#CC27AE60" Visibility="Hidden">
<TextBlock FontSize="48" Foreground="White" HorizontalAlignment="Center" Text="{DynamicResource WindowSettings_submitting}" VerticalAlignment="Center" />
</Grid>
</Grid>
</ScrollViewer>
</TabItem>
</TabControl>
<Grid Margin="0,10" VerticalAlignment="Bottom" Grid.Row="1">
<Grid.ColumnDefinitions>
Expand Down
60 changes: 0 additions & 60 deletions osu!Sync/Window_Settings.xaml.cs
Expand Up @@ -8,7 +8,6 @@
using System.Net;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Documents;

namespace osuSync {

Expand Down Expand Up @@ -122,47 +121,6 @@ public partial class Window_Settings {
Close();
}

public void Bu_FeedbackSubmit_Click(object sender, RoutedEventArgs e) {
TextRange RTB_FeedbackMessage_TextRange = new TextRange(RTB_FeedbackMessage.Document.ContentStart, RTB_FeedbackMessage.Document.ContentEnd);

if(TB_FeedbackUsername.Text.Length <= 1) {
MessageBox.Show(GlobalVar._e("WindowSettings_yourNameIsTooShort"), GlobalVar.appName, MessageBoxButton.OK, MessageBoxImage.Warning);
} else if(!ValidateEmail(TB_FeedbackeMail.Text)) {
MessageBox.Show(GlobalVar._e("WindowSettings_yourEmailInvalid"), GlobalVar.appName, MessageBoxButton.OK, MessageBoxImage.Warning);
} else if(CB_FeedbackCategory.SelectedIndex == -1) {
MessageBox.Show(GlobalVar._e("WindowSettings_youHaveToSelectACategory"), GlobalVar.appName, MessageBoxButton.OK, MessageBoxImage.Warning);
} else if(RTB_FeedbackMessage_TextRange.Text.Length < 30) {
MessageBox.Show(GlobalVar._e("WindowSettings_yourMessageSeemsToBeQuiteShort"), GlobalVar.appName, MessageBoxButton.OK, MessageBoxImage.Warning);
} else {
StackPanel_Feedback.IsEnabled = false;
Gr_FeedbackOverlay.Visibility = Visibility.Visible;

using(WebClient submitClient = new WebClient()) {
System.Collections.Specialized.NameValueCollection reqParam = new System.Collections.Specialized.NameValueCollection {
{ "category", CB_FeedbackCategory.Tag.ToString() },
{ "debugData", Ru_FeedbackInfo.Text },
{ "email", TB_FeedbackeMail.Text },
{ "message", RTB_FeedbackMessage_TextRange.Text },
{ "username", TB_FeedbackUsername.Text },
{ "version", GlobalVar.AppVersion.ToString() }
};
var responseBytes = submitClient.UploadValues(GlobalVar.webNw520ApiRoot + "app/feedback.submitReport.php", "POST", reqParam);
var responseBody = (new System.Text.UTF8Encoding()).GetString(responseBytes);

try {
MessageBox.Show(GlobalVar._e("WindowSettings_serverSideAnswer") + "\n"
+ responseBody, GlobalVar.appName, MessageBoxButton.OK, MessageBoxImage.Information);
} catch(Exception) {
MessageBox.Show(GlobalVar._e("WindowSettings_unableToSubmitFeedback") + "\n"
+ "> " + GlobalVar._e("MainWindow_cantConnectToServer") + "\n\n"
+ GlobalVar._e("WindowSettings_pleaseTryAgainLaterOrContactUs"), GlobalVar.appName, MessageBoxButton.OK, MessageBoxImage.Error);
return;
}
Gr_FeedbackOverlay.Visibility = Visibility.Collapsed;
}
}
}

public void Bu_osuSongPathDefault_Click(object sender, RoutedEventArgs e) {
TB_osu_SongsPath.Text = TB_osu_Path.Text + "/Songs".Replace('/', Path.DirectorySeparatorChar);
}
Expand Down Expand Up @@ -355,24 +313,6 @@ public partial class Window_Settings {
}
#endregion

public void TC_Main_SelectionChanged(object sender, SelectionChangedEventArgs e) {
switch(TC_Main.SelectedIndex) {
case 4:
// Prepare Feedback form
Ru_FeedbackInfo.Text = JsonConvert.SerializeObject(GlobalVar.ProgramInfoJsonGet(), Formatting.None);
StackPanel_Feedback.IsEnabled = true;
StackPanel_Feedback.Margin = new Thickness(0, 0, 0, 0);
StackPanel_Feedback.Visibility = Visibility.Visible;
break;
}
}

public bool ValidateEmail(string email) {
System.Text.RegularExpressions.Regex emailRegex = new System.Text.RegularExpressions.Regex("^(?<user>[^@]+)@(?<host>.+)$");
System.Text.RegularExpressions.Match emailMatch = emailRegex.Match(email);
return emailMatch.Success;
}

public void WindowSettings_Loaded(object sender, RoutedEventArgs e) {
if(GlobalVar.tool_isElevated) {
Bu_ToolRestartElevated.IsEnabled = false;
Expand Down

1 comment on commit dbb9bc2

@muekoeff
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Removed since Feedback panel wasn't GDPR compliant and had little usage anyways.

Please sign in to comment.