Try this out for your client, and adjust it as you need it:
using Server;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Runtime.Remoting.Channels;
using System.Runtime.Remoting.Channels.Http;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
namespace Client
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
private void Form1_Load_1(object sender, EventArgs e)
{
HttpChannel channel = new HttpChannel();
ChannelServices.RegisterChannel(channel, false);
Huans huans = (Huans)Activator.GetObject(typeof(Huans), "http://localhost:8090/Object");
List<string> range = new List<string>();
MyImage[] imageList = huans.getImageList();
foreach (MyImage huan in imageList)
{
Console.WriteLine("pfad" + huan.name);
range.Add(huan.name);
}
comboBox1.DataSource = range;
Console.WriteLine(range.Count);
}
private void comboBox1_SelectedIndexChanged(object sender, EventArgs e)
{
Huans huans = (Huans)Activator.GetObject(typeof(Huans), "http://localhost:8090/Object");
byte[] imgBytes = huans.getImage(comboBox1.SelectedItem.ToString());
Console.WriteLine("Pfad" + imgBytes);
System.Drawing.ImageConverter converter = new System.Drawing.ImageConverter();
System.Drawing.Image img =(System.Drawing.Image)converter.
ConvertFrom(imgBytes);
pictureBox2.Image = img;
}
private void pictureBox2_Click(object sender, EventArgs e)
{
}
}
}