Implemented Advanced Search interface
This commit is contained in:
+177
@@ -0,0 +1,177 @@
|
|||||||
|
using System.Windows.Forms;
|
||||||
|
|
||||||
|
namespace MusicPlayer
|
||||||
|
{
|
||||||
|
partial class AdvancedSearch
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Required designer variable.
|
||||||
|
/// </summary>
|
||||||
|
private System.ComponentModel.IContainer components = null;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Clean up any resources being used.
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
|
||||||
|
protected override void Dispose(bool disposing)
|
||||||
|
{
|
||||||
|
if (disposing && (components != null))
|
||||||
|
{
|
||||||
|
components.Dispose();
|
||||||
|
}
|
||||||
|
base.Dispose(disposing);
|
||||||
|
}
|
||||||
|
|
||||||
|
#region Windows Form Designer generated code
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Required method for Designer support - do not modify
|
||||||
|
/// the contents of this method with the code editor.
|
||||||
|
/// </summary>
|
||||||
|
private void InitializeComponent()
|
||||||
|
{
|
||||||
|
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(AdvancedSearch));
|
||||||
|
this.SearchTermTextBox = new System.Windows.Forms.TextBox();
|
||||||
|
this.label1 = new System.Windows.Forms.Label();
|
||||||
|
this.label2 = new System.Windows.Forms.Label();
|
||||||
|
this.AlbumTextBox = new System.Windows.Forms.TextBox();
|
||||||
|
this.label3 = new System.Windows.Forms.Label();
|
||||||
|
this.ArtistTextBox = new System.Windows.Forms.TextBox();
|
||||||
|
this.GenreTextBox = new System.Windows.Forms.TextBox();
|
||||||
|
this.label4 = new System.Windows.Forms.Label();
|
||||||
|
this.SearchButton = new System.Windows.Forms.Button();
|
||||||
|
this.SuspendLayout();
|
||||||
|
//
|
||||||
|
// SearchTermTextBox
|
||||||
|
//
|
||||||
|
this.SearchTermTextBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
|
||||||
|
| System.Windows.Forms.AnchorStyles.Right)));
|
||||||
|
this.SearchTermTextBox.Location = new System.Drawing.Point(12, 29);
|
||||||
|
this.SearchTermTextBox.Name = "SearchTermTextBox";
|
||||||
|
this.SearchTermTextBox.Size = new System.Drawing.Size(210, 20);
|
||||||
|
this.SearchTermTextBox.TabIndex = 0;
|
||||||
|
this.SearchTermTextBox.KeyDown += TextBox_KeyDown;
|
||||||
|
//
|
||||||
|
// label1
|
||||||
|
//
|
||||||
|
this.label1.AutoSize = true;
|
||||||
|
this.label1.Location = new System.Drawing.Point(12, 13);
|
||||||
|
this.label1.Name = "label1";
|
||||||
|
this.label1.Size = new System.Drawing.Size(68, 13);
|
||||||
|
this.label1.TabIndex = 1;
|
||||||
|
this.label1.Text = "Search Term";
|
||||||
|
//
|
||||||
|
// label2
|
||||||
|
//
|
||||||
|
this.label2.AutoSize = true;
|
||||||
|
this.label2.Location = new System.Drawing.Point(12, 70);
|
||||||
|
this.label2.Name = "label2";
|
||||||
|
this.label2.Size = new System.Drawing.Size(36, 13);
|
||||||
|
this.label2.TabIndex = 2;
|
||||||
|
this.label2.Text = "Album";
|
||||||
|
//
|
||||||
|
// AlbumTextBox
|
||||||
|
//
|
||||||
|
this.AlbumTextBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
|
||||||
|
| System.Windows.Forms.AnchorStyles.Right)));
|
||||||
|
this.AlbumTextBox.Location = new System.Drawing.Point(12, 86);
|
||||||
|
this.AlbumTextBox.Name = "AlbumTextBox";
|
||||||
|
this.AlbumTextBox.Size = new System.Drawing.Size(210, 20);
|
||||||
|
this.AlbumTextBox.TabIndex = 3;
|
||||||
|
this.AlbumTextBox.KeyDown += TextBox_KeyDown;
|
||||||
|
//
|
||||||
|
// label3
|
||||||
|
//
|
||||||
|
this.label3.AutoSize = true;
|
||||||
|
this.label3.Location = new System.Drawing.Point(12, 119);
|
||||||
|
this.label3.Name = "label3";
|
||||||
|
this.label3.Size = new System.Drawing.Size(30, 13);
|
||||||
|
this.label3.TabIndex = 4;
|
||||||
|
this.label3.Text = "Artist";
|
||||||
|
//
|
||||||
|
// ArtistTextBox
|
||||||
|
//
|
||||||
|
this.ArtistTextBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
|
||||||
|
| System.Windows.Forms.AnchorStyles.Right)));
|
||||||
|
this.ArtistTextBox.Location = new System.Drawing.Point(12, 135);
|
||||||
|
this.ArtistTextBox.Name = "ArtistTextBox";
|
||||||
|
this.ArtistTextBox.Size = new System.Drawing.Size(210, 20);
|
||||||
|
this.ArtistTextBox.TabIndex = 5;
|
||||||
|
this.ArtistTextBox.KeyDown += TextBox_KeyDown;
|
||||||
|
//
|
||||||
|
// GenreTextBox
|
||||||
|
//
|
||||||
|
this.GenreTextBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
|
||||||
|
| System.Windows.Forms.AnchorStyles.Right)));
|
||||||
|
this.GenreTextBox.Location = new System.Drawing.Point(12, 187);
|
||||||
|
this.GenreTextBox.Name = "GenreTextBox";
|
||||||
|
this.GenreTextBox.Size = new System.Drawing.Size(210, 20);
|
||||||
|
this.GenreTextBox.TabIndex = 6;
|
||||||
|
this.GenreTextBox.KeyDown += TextBox_KeyDown;
|
||||||
|
//
|
||||||
|
// label4
|
||||||
|
//
|
||||||
|
this.label4.AutoSize = true;
|
||||||
|
this.label4.Location = new System.Drawing.Point(13, 168);
|
||||||
|
this.label4.Name = "label4";
|
||||||
|
this.label4.Size = new System.Drawing.Size(36, 13);
|
||||||
|
this.label4.TabIndex = 7;
|
||||||
|
this.label4.Text = "Genre";
|
||||||
|
//
|
||||||
|
// SearchButton
|
||||||
|
//
|
||||||
|
this.SearchButton.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)
|
||||||
|
| System.Windows.Forms.AnchorStyles.Right)));
|
||||||
|
this.SearchButton.Location = new System.Drawing.Point(12, 226);
|
||||||
|
this.SearchButton.Name = "SearchButton";
|
||||||
|
this.SearchButton.Size = new System.Drawing.Size(210, 23);
|
||||||
|
this.SearchButton.TabIndex = 8;
|
||||||
|
this.SearchButton.Text = "Search";
|
||||||
|
this.SearchButton.UseVisualStyleBackColor = true;
|
||||||
|
this.SearchButton.Click += new System.EventHandler(this.SearchButton_Click);
|
||||||
|
//
|
||||||
|
// AdvancedSearch
|
||||||
|
//
|
||||||
|
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
||||||
|
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||||
|
this.ClientSize = new System.Drawing.Size(234, 261);
|
||||||
|
this.Controls.Add(this.SearchButton);
|
||||||
|
this.Controls.Add(this.label4);
|
||||||
|
this.Controls.Add(this.GenreTextBox);
|
||||||
|
this.Controls.Add(this.ArtistTextBox);
|
||||||
|
this.Controls.Add(this.label3);
|
||||||
|
this.Controls.Add(this.AlbumTextBox);
|
||||||
|
this.Controls.Add(this.label2);
|
||||||
|
this.Controls.Add(this.label1);
|
||||||
|
this.Controls.Add(this.SearchTermTextBox);
|
||||||
|
this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
|
||||||
|
this.MaximumSize = new System.Drawing.Size(450, 300);
|
||||||
|
this.MinimumSize = new System.Drawing.Size(250, 300);
|
||||||
|
this.Name = "AdvancedSearch";
|
||||||
|
this.Text = "Advanced Search";
|
||||||
|
this.ResumeLayout(false);
|
||||||
|
this.PerformLayout();
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
private void TextBox_KeyDown(object sender, KeyEventArgs e)
|
||||||
|
{
|
||||||
|
if(e.KeyCode == Keys.Enter)
|
||||||
|
{
|
||||||
|
SearchButton_Click(sender, new System.EventArgs());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
private TextBox SearchTermTextBox;
|
||||||
|
private Label label1;
|
||||||
|
private Label label2;
|
||||||
|
private TextBox AlbumTextBox;
|
||||||
|
private Label label3;
|
||||||
|
private TextBox ArtistTextBox;
|
||||||
|
private TextBox GenreTextBox;
|
||||||
|
private Label label4;
|
||||||
|
private Button SearchButton;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,38 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.ComponentModel;
|
||||||
|
using System.Data;
|
||||||
|
using System.Drawing;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
using System.Windows.Forms;
|
||||||
|
|
||||||
|
namespace MusicPlayer
|
||||||
|
{
|
||||||
|
public partial class AdvancedSearch : Form
|
||||||
|
{
|
||||||
|
private Main main;
|
||||||
|
|
||||||
|
public AdvancedSearch(Main main)
|
||||||
|
{
|
||||||
|
this.main = main;
|
||||||
|
InitializeComponent();
|
||||||
|
}
|
||||||
|
|
||||||
|
private void SearchButton_Click(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
if(SearchTermTextBox.Text.Length > 3)
|
||||||
|
{
|
||||||
|
SearchTermTextBox.ForeColor = Color.Black;
|
||||||
|
main.AdvancedSearchFilter(SearchTermTextBox.Text, AlbumTextBox.Text, ArtistTextBox.Text, GenreTextBox.Text);
|
||||||
|
this.Close();
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
SearchTermTextBox.ForeColor = Color.Red;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
File diff suppressed because it is too large
Load Diff
@@ -61,7 +61,7 @@ namespace MusicPlayer
|
|||||||
|
|
||||||
CurrentSong = null;
|
CurrentSong = null;
|
||||||
|
|
||||||
Thread.Sleep(11);
|
Thread.Sleep(10);
|
||||||
|
|
||||||
ms = new MemoryStream();
|
ms = new MemoryStream();
|
||||||
|
|
||||||
@@ -127,7 +127,6 @@ namespace MusicPlayer
|
|||||||
}
|
}
|
||||||
catch(Exception e)
|
catch(Exception e)
|
||||||
{
|
{
|
||||||
Console.WriteLine(e.StackTrace);
|
|
||||||
AState = AudioState.STOPPED;
|
AState = AudioState.STOPPED;
|
||||||
main.form.SongFinished();
|
main.form.SongFinished();
|
||||||
return;
|
return;
|
||||||
@@ -230,7 +229,6 @@ namespace MusicPlayer
|
|||||||
}
|
}
|
||||||
catch(Exception e)
|
catch(Exception e)
|
||||||
{
|
{
|
||||||
Console.WriteLine(e.StackTrace);
|
|
||||||
BState = BufferState.EMPTY;
|
BState = BufferState.EMPTY;
|
||||||
AState = AudioState.STOPPED;
|
AState = AudioState.STOPPED;
|
||||||
main.form.SongFinished();
|
main.form.SongFinished();
|
||||||
@@ -242,7 +240,7 @@ namespace MusicPlayer
|
|||||||
LengthBuffer = response.ContentLength;
|
LengthBuffer = response.ContentLength;
|
||||||
using (var stream = response.GetResponseStream())
|
using (var stream = response.GetResponseStream())
|
||||||
{
|
{
|
||||||
byte[] buffer = new byte[65536]; // 32KB chunks
|
byte[] buffer = new byte[65536]; // 64KB chunks
|
||||||
|
|
||||||
int read;
|
int read;
|
||||||
BState = BufferState.BUFFERING;
|
BState = BufferState.BUFFERING;
|
||||||
|
|||||||
@@ -85,7 +85,6 @@ namespace MusicPlayer
|
|||||||
foreach (ListViewItem item in form.AlbumListView.Items)
|
foreach (ListViewItem item in form.AlbumListView.Items)
|
||||||
{
|
{
|
||||||
templist.Add(item.Text);
|
templist.Add(item.Text);
|
||||||
Console.WriteLine(item.Text);
|
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
form.Invoke(action);
|
form.Invoke(action);
|
||||||
@@ -137,6 +136,11 @@ namespace MusicPlayer
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void AdvancedSearchFilter(string search, string album, string artist, string genre)
|
||||||
|
{
|
||||||
|
throw new NotImplementedException();
|
||||||
|
}
|
||||||
|
|
||||||
public void FilterCurrentPlaying()
|
public void FilterCurrentPlaying()
|
||||||
{
|
{
|
||||||
table.Clear();
|
table.Clear();
|
||||||
|
|||||||
+40
-22
@@ -68,6 +68,9 @@ namespace MusicPlayer
|
|||||||
this.SearchArtistToolStripLabel = new System.Windows.Forms.ToolStripMenuItem();
|
this.SearchArtistToolStripLabel = new System.Windows.Forms.ToolStripMenuItem();
|
||||||
this.SearchArtistsTextBox = new System.Windows.Forms.ToolStripTextBox();
|
this.SearchArtistsTextBox = new System.Windows.Forms.ToolStripTextBox();
|
||||||
this.ClearArtistSearchButton = new System.Windows.Forms.ToolStripMenuItem();
|
this.ClearArtistSearchButton = new System.Windows.Forms.ToolStripMenuItem();
|
||||||
|
this.songsToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||||
|
this.SearchSongsTextBox = new System.Windows.Forms.ToolStripTextBox();
|
||||||
|
this.SearchSongsButton = new System.Windows.Forms.ToolStripMenuItem();
|
||||||
this.serverToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
this.serverToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||||
this.SelectServerJancoButton = new System.Windows.Forms.ToolStripMenuItem();
|
this.SelectServerJancoButton = new System.Windows.Forms.ToolStripMenuItem();
|
||||||
this.SelectServerYorickButton = new System.Windows.Forms.ToolStripMenuItem();
|
this.SelectServerYorickButton = new System.Windows.Forms.ToolStripMenuItem();
|
||||||
@@ -104,9 +107,8 @@ namespace MusicPlayer
|
|||||||
this.toolStripSeparator3 = new System.Windows.Forms.ToolStripSeparator();
|
this.toolStripSeparator3 = new System.Windows.Forms.ToolStripSeparator();
|
||||||
this.NotifyMenuStripNextButton = new System.Windows.Forms.ToolStripMenuItem();
|
this.NotifyMenuStripNextButton = new System.Windows.Forms.ToolStripMenuItem();
|
||||||
this.NotifyMenuStripPreviousButton = new System.Windows.Forms.ToolStripMenuItem();
|
this.NotifyMenuStripPreviousButton = new System.Windows.Forms.ToolStripMenuItem();
|
||||||
this.songsToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
this.AdvancedSearchButton = new System.Windows.Forms.ToolStripMenuItem();
|
||||||
this.SearchSongsTextBox = new System.Windows.Forms.ToolStripTextBox();
|
this.toolStripSeparator7 = new System.Windows.Forms.ToolStripSeparator();
|
||||||
this.SearchSongsButton = new System.Windows.Forms.ToolStripMenuItem();
|
|
||||||
((System.ComponentModel.ISupportInitialize)(this.SongsTableView)).BeginInit();
|
((System.ComponentModel.ISupportInitialize)(this.SongsTableView)).BeginInit();
|
||||||
this.MainPanel.SuspendLayout();
|
this.MainPanel.SuspendLayout();
|
||||||
((System.ComponentModel.ISupportInitialize)(this.SplitContainer)).BeginInit();
|
((System.ComponentModel.ISupportInitialize)(this.SplitContainer)).BeginInit();
|
||||||
@@ -427,7 +429,9 @@ namespace MusicPlayer
|
|||||||
this.searchToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
|
this.searchToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
|
||||||
this.SearchGenresToolStripLabel,
|
this.SearchGenresToolStripLabel,
|
||||||
this.SearchArtistToolStripLabel,
|
this.SearchArtistToolStripLabel,
|
||||||
this.songsToolStripMenuItem});
|
this.songsToolStripMenuItem,
|
||||||
|
this.toolStripSeparator7,
|
||||||
|
this.AdvancedSearchButton});
|
||||||
this.searchToolStripMenuItem.Name = "searchToolStripMenuItem";
|
this.searchToolStripMenuItem.Name = "searchToolStripMenuItem";
|
||||||
this.searchToolStripMenuItem.Size = new System.Drawing.Size(54, 20);
|
this.searchToolStripMenuItem.Size = new System.Drawing.Size(54, 20);
|
||||||
this.searchToolStripMenuItem.Text = "Search";
|
this.searchToolStripMenuItem.Text = "Search";
|
||||||
@@ -478,6 +482,28 @@ namespace MusicPlayer
|
|||||||
this.ClearArtistSearchButton.Text = "Clear Search";
|
this.ClearArtistSearchButton.Text = "Clear Search";
|
||||||
this.ClearArtistSearchButton.Click += new System.EventHandler(this.ClearArtistSearchButton_Click);
|
this.ClearArtistSearchButton.Click += new System.EventHandler(this.ClearArtistSearchButton_Click);
|
||||||
//
|
//
|
||||||
|
// songsToolStripMenuItem
|
||||||
|
//
|
||||||
|
this.songsToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
|
||||||
|
this.SearchSongsTextBox,
|
||||||
|
this.SearchSongsButton});
|
||||||
|
this.songsToolStripMenuItem.Name = "songsToolStripMenuItem";
|
||||||
|
this.songsToolStripMenuItem.Size = new System.Drawing.Size(152, 22);
|
||||||
|
this.songsToolStripMenuItem.Text = "Songs";
|
||||||
|
//
|
||||||
|
// SearchSongsTextBox
|
||||||
|
//
|
||||||
|
this.SearchSongsTextBox.Name = "SearchSongsTextBox";
|
||||||
|
this.SearchSongsTextBox.Size = new System.Drawing.Size(100, 23);
|
||||||
|
//
|
||||||
|
// SearchSongsButton
|
||||||
|
//
|
||||||
|
this.SearchSongsButton.Enabled = false;
|
||||||
|
this.SearchSongsButton.Name = "SearchSongsButton";
|
||||||
|
this.SearchSongsButton.Size = new System.Drawing.Size(160, 22);
|
||||||
|
this.SearchSongsButton.Text = "Search";
|
||||||
|
this.SearchSongsButton.Click += new System.EventHandler(this.SearchSongsButton_Click);
|
||||||
|
//
|
||||||
// serverToolStripMenuItem
|
// serverToolStripMenuItem
|
||||||
//
|
//
|
||||||
this.serverToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
|
this.serverToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
|
||||||
@@ -790,27 +816,17 @@ namespace MusicPlayer
|
|||||||
this.NotifyMenuStripPreviousButton.Text = "Previous";
|
this.NotifyMenuStripPreviousButton.Text = "Previous";
|
||||||
this.NotifyMenuStripPreviousButton.Click += new System.EventHandler(this.NotifyMenuStripPreviousButton_Click);
|
this.NotifyMenuStripPreviousButton.Click += new System.EventHandler(this.NotifyMenuStripPreviousButton_Click);
|
||||||
//
|
//
|
||||||
// songsToolStripMenuItem
|
// AdvancedSearchButton
|
||||||
//
|
//
|
||||||
this.songsToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
|
this.AdvancedSearchButton.Name = "AdvancedSearchButton";
|
||||||
this.SearchSongsTextBox,
|
this.AdvancedSearchButton.Size = new System.Drawing.Size(152, 22);
|
||||||
this.SearchSongsButton});
|
this.AdvancedSearchButton.Text = "Advanced";
|
||||||
this.songsToolStripMenuItem.Name = "songsToolStripMenuItem";
|
this.AdvancedSearchButton.Click += new System.EventHandler(this.AdvancedSearchButton_Click);
|
||||||
this.songsToolStripMenuItem.Size = new System.Drawing.Size(152, 22);
|
|
||||||
this.songsToolStripMenuItem.Text = "Songs";
|
|
||||||
//
|
//
|
||||||
// SearchSongsTextBox
|
// toolStripSeparator7
|
||||||
//
|
//
|
||||||
this.SearchSongsTextBox.Name = "SearchSongsTextBox";
|
this.toolStripSeparator7.Name = "toolStripSeparator7";
|
||||||
this.SearchSongsTextBox.Size = new System.Drawing.Size(100, 23);
|
this.toolStripSeparator7.Size = new System.Drawing.Size(149, 6);
|
||||||
//
|
|
||||||
// SearchSongsButton
|
|
||||||
//
|
|
||||||
this.SearchSongsButton.Enabled = false;
|
|
||||||
this.SearchSongsButton.Name = "SearchSongsButton";
|
|
||||||
this.SearchSongsButton.Size = new System.Drawing.Size(160, 22);
|
|
||||||
this.SearchSongsButton.Text = "Search";
|
|
||||||
this.SearchSongsButton.Click += new System.EventHandler(this.SearchSongsButton_Click);
|
|
||||||
//
|
//
|
||||||
// MainForm
|
// MainForm
|
||||||
//
|
//
|
||||||
@@ -921,6 +937,8 @@ namespace MusicPlayer
|
|||||||
private System.Windows.Forms.ToolStripMenuItem songsToolStripMenuItem;
|
private System.Windows.Forms.ToolStripMenuItem songsToolStripMenuItem;
|
||||||
private System.Windows.Forms.ToolStripTextBox SearchSongsTextBox;
|
private System.Windows.Forms.ToolStripTextBox SearchSongsTextBox;
|
||||||
private System.Windows.Forms.ToolStripMenuItem SearchSongsButton;
|
private System.Windows.Forms.ToolStripMenuItem SearchSongsButton;
|
||||||
|
private System.Windows.Forms.ToolStripSeparator toolStripSeparator7;
|
||||||
|
private System.Windows.Forms.ToolStripMenuItem AdvancedSearchButton;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -584,5 +584,11 @@ namespace MusicPlayer
|
|||||||
SearchSongsTextBox.Text = "";
|
SearchSongsTextBox.Text = "";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void AdvancedSearchButton_Click(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
AdvancedSearch av = new AdvancedSearch(main);
|
||||||
|
av.ShowDialog();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -77,6 +77,12 @@
|
|||||||
<Compile Include="NetworkHandler.cs" />
|
<Compile Include="NetworkHandler.cs" />
|
||||||
<Compile Include="Playlist.cs" />
|
<Compile Include="Playlist.cs" />
|
||||||
<Compile Include="PlaylistHandler.cs" />
|
<Compile Include="PlaylistHandler.cs" />
|
||||||
|
<Compile Include="AdvancedSearch.cs">
|
||||||
|
<SubType>Form</SubType>
|
||||||
|
</Compile>
|
||||||
|
<Compile Include="AdvancedSearch.Designer.cs">
|
||||||
|
<DependentUpon>AdvancedSearch.cs</DependentUpon>
|
||||||
|
</Compile>
|
||||||
<Compile Include="PlaylistMaker.cs">
|
<Compile Include="PlaylistMaker.cs">
|
||||||
<SubType>Form</SubType>
|
<SubType>Form</SubType>
|
||||||
</Compile>
|
</Compile>
|
||||||
@@ -94,6 +100,9 @@
|
|||||||
<EmbeddedResource Include="MainForm.resx">
|
<EmbeddedResource Include="MainForm.resx">
|
||||||
<DependentUpon>MainForm.cs</DependentUpon>
|
<DependentUpon>MainForm.cs</DependentUpon>
|
||||||
</EmbeddedResource>
|
</EmbeddedResource>
|
||||||
|
<EmbeddedResource Include="AdvancedSearch.resx">
|
||||||
|
<DependentUpon>AdvancedSearch.cs</DependentUpon>
|
||||||
|
</EmbeddedResource>
|
||||||
<EmbeddedResource Include="PlaylistMaker.resx">
|
<EmbeddedResource Include="PlaylistMaker.resx">
|
||||||
<DependentUpon>PlaylistMaker.cs</DependentUpon>
|
<DependentUpon>PlaylistMaker.cs</DependentUpon>
|
||||||
</EmbeddedResource>
|
</EmbeddedResource>
|
||||||
|
|||||||
@@ -24,7 +24,6 @@ namespace MusicPlayer
|
|||||||
public JObject SendString(string m)
|
public JObject SendString(string m)
|
||||||
{
|
{
|
||||||
string encodedstring = Microsoft.Security.Application.Encoder.HtmlEncode(m);
|
string encodedstring = Microsoft.Security.Application.Encoder.HtmlEncode(m);
|
||||||
Console.WriteLine(encodedstring);
|
|
||||||
HttpWebRequest server = (HttpWebRequest)WebRequest.Create(ip+":"+port+"/"+encodedstring);
|
HttpWebRequest server = (HttpWebRequest)WebRequest.Create(ip+":"+port+"/"+encodedstring);
|
||||||
server.KeepAlive = false;
|
server.KeepAlive = false;
|
||||||
try {
|
try {
|
||||||
@@ -63,7 +62,9 @@ namespace MusicPlayer
|
|||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
WebRequest req = WebRequest.Create((ip + "/music/.artwork/"+album).Replace(" ", "%20"));
|
string encodedstring = Microsoft.Security.Application.Encoder.HtmlEncode(ip + "/music/.artwork/" + album);
|
||||||
|
WebRequest req = WebRequest.Create(encodedstring);
|
||||||
|
//WebRequest req = WebRequest.Create((ip + "/music/.artwork/" + album).Replace(" ","%20"));
|
||||||
WebResponse response = req.GetResponse();
|
WebResponse response = req.GetResponse();
|
||||||
Stream stream = response.GetResponseStream();
|
Stream stream = response.GetResponseStream();
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user