1
0
mirror of https://github.com/lidgren/lidgren-network-gen3.git synced 2026-05-16 07:06:30 +09:00

ImageSample sample added

This commit is contained in:
lidgren
2010-10-30 21:29:10 +00:00
parent f589208841
commit e866600c98
24 changed files with 1818 additions and 0 deletions

View File

@@ -0,0 +1,46 @@
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using SamplesCommon;
namespace ImageServer
{
public partial class Form1 : Form
{
private NetPeerSettingsWindow m_settingsWindow;
public Form1()
{
InitializeComponent();
}
private void button1_Click(object sender, EventArgs e)
{
if (m_settingsWindow == null)
{
m_settingsWindow = new NetPeerSettingsWindow("Image server settings", Program.Server);
m_settingsWindow.Show();
}
else
{
m_settingsWindow.Close();
m_settingsWindow = null;
}
}
private void button2_Click(object sender, EventArgs e)
{
OpenFileDialog dlg = new OpenFileDialog();
dlg.Filter = "Image files|*.png;*.jpg;*.jpeg";
DialogResult res = dlg.ShowDialog();
if (res != DialogResult.OK)
return;
Program.Start(dlg.FileName);
}
}
}