Yorick Rommers пре 10 година
родитељ
комит
f643ff2967

+ 3 - 3
MusicPlayer/MusicPlayer/Form1.cs

@@ -7,7 +7,7 @@ using System.Linq;
 using System.Text;
 using System.Threading.Tasks;
 using System.Windows.Forms;
-using WindowsFormsApplication2;
+
 
 namespace MusicPlayer
 {
@@ -16,8 +16,8 @@ namespace MusicPlayer
         public Form1()
         {
             InitializeComponent();
-            NetworkHandler nw = new NetworkHandler("83.128.250.123");
-            
+            APIHandler api = new APIHandler();
+            NetworkHandler nw = new NetworkHandler("83.128.250.123", api);
 
         }
     }

+ 10 - 0
MusicPlayer/MusicPlayer/MusicPlayer.csproj

@@ -33,6 +33,10 @@
     <WarningLevel>4</WarningLevel>
   </PropertyGroup>
   <ItemGroup>
+    <Reference Include="Newtonsoft.Json, Version=7.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
+      <HintPath>..\packages\Newtonsoft.Json.7.0.1\lib\net45\Newtonsoft.Json.dll</HintPath>
+      <Private>True</Private>
+    </Reference>
     <Reference Include="System" />
     <Reference Include="System.Core" />
     <Reference Include="System.Xml.Linq" />
@@ -46,7 +50,9 @@
     <Reference Include="System.Xml" />
   </ItemGroup>
   <ItemGroup>
+    <Compile Include="Album.cs" />
     <Compile Include="APIHandler.cs" />
+    <Compile Include="Artist.cs" />
     <Compile Include="Form1.cs">
       <SubType>Form</SubType>
     </Compile>
@@ -56,6 +62,9 @@
     <Compile Include="NetworkHandler.cs" />
     <Compile Include="Program.cs" />
     <Compile Include="Properties\AssemblyInfo.cs" />
+    <EmbeddedResource Include="Form1.resx">
+      <DependentUpon>Form1.cs</DependentUpon>
+    </EmbeddedResource>
     <EmbeddedResource Include="Properties\Resources.resx">
       <Generator>ResXFileCodeGenerator</Generator>
       <LastGenOutput>Resources.Designer.cs</LastGenOutput>
@@ -65,6 +74,7 @@
       <AutoGen>True</AutoGen>
       <DependentUpon>Resources.resx</DependentUpon>
     </Compile>
+    <None Include="packages.config" />
     <None Include="Properties\Settings.settings">
       <Generator>SettingsSingleFileGenerator</Generator>
       <LastGenOutput>Settings.Designer.cs</LastGenOutput>

+ 2 - 0
MusicPlayer/MusicPlayer/NetworkHandler.cs

@@ -1,6 +1,7 @@
 using System;
 using System.Text;
 using System.Net.Sockets;
+using System.Threading;
 
 namespace MusicPlayer
 {
@@ -15,6 +16,7 @@ namespace MusicPlayer
             s = new Socket(AddressFamily.InterNetwork, SocketType.Stream, ProtocolType.Tcp);
             s.Connect(ip, port);
             api = apihandler;
+            SendString("GET");
         }
 
         public void SendString(string m)

+ 0 - 2
MusicPlayer/MusicPlayer/Program.cs

@@ -17,8 +17,6 @@ namespace MusicPlayer
             Application.EnableVisualStyles();
             Application.SetCompatibleTextRenderingDefault(false);
             Application.Run(new Form1());
-            APIHandler a = new APIHandler;
-            NetworkHandler nw = new NetworkHandler("imegumii.nl", a);
         }
     }
 }