반응형
using System;
using System.Windows.Forms;
using SharpPcap;
namespace WindowsFormsApp3
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
private void Form1_Load(object sender, EventArgs e)
{
}
private void button1_Click(object sender, EventArgs e)
{
//MessageBox.Show(SharpPcap.Version.VersionString);
CaptureDeviceList NicList = CaptureDeviceList.Instance; //장치 목록을 가져와라!
MessageBox.Show(NicList.Count.ToString());
string NicListResult = "";
foreach (var item in NicList)
{
NicListResult = NicListResult + (item+"\n");
MessageBox.Show(NicListResult);
}
}
}
}
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
using System.IO;
namespace WindowsFormsApp2
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
productBindingSource.Add(new Product() { Name = "고메", Price = 1000 });
productBindingSource.Add(new Product() { Name = "군고메", Price = 1300 });
productBindingSource.Add(new Product() { Name = "찐고메", Price = 1200 });
productBindingSource.Add(new Product() { Name = "짠고메", Price = 1600 });
productBindingSource.Add(new Product() { Name = "맛탕", Price = 1900 });
}
private void Form1_Load(object sender, EventArgs e)
{
}
private void dataGridView1_CellContentClick(object sender, DataGridViewCellEventArgs e)
{
}
}
}
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace WindowsFormsApp2
{
class Product
{
public string Name { get; set; }
public int Price { get; set; }
}
}
sourceforge.net/projects/sharppcap/
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
using SharpPcap;
namespace WindowsFormsApp3
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
private void Form1_Load(object sender, EventArgs e)
{
}
private void button1_Click(object sender, EventArgs e)
{
//MessageBox.Show(SharpPcap.Version.VersionString);
CaptureDeviceList NicList = CaptureDeviceList.Instance; //장치 목록을 가져와라!
MessageBox.Show(NicList.Count.ToString());
}
}
}
using System;
using System.Windows.Forms;
using SharpPcap;
namespace WindowsFormsApp3
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
private void Form1_Load(object sender, EventArgs e)
{
}
private void button1_Click(object sender, EventArgs e)
{
//MessageBox.Show(SharpPcap.Version.VersionString);
CaptureDeviceList NicList = CaptureDeviceList.Instance; //장치 목록을 가져와라!
MessageBox.Show(NicList.Count.ToString());
string NicListResult = "";
foreach (var item in NicList)
{
string Temp2 = item.ToString().Substring(item.ToString().IndexOf("FriendlyName") + "FriendlyName".Length, 10);
NicListResult = NicListResult + (Temp2 + "\n");
MessageBox.Show(NicListResult);
}
}
}
주수홍강사, [25.08.20 17:31]
arrTemp[1]
주수홍강사, [25.08.20 17:31]
arrTemp[1].Substring
주수홍강사, [25.08.20 17:32]
arrTemp[1].Substring(
주수홍강사, [25.08.20 17:33]
arrTemp[1].Substring("FriendlyName: ".Length
주수홍강사, [25.08.20 17:33]
arrTemp[1].Substring("FriendlyName: ".Length)
주수홍강사, [25.08.20 17:33]
NicListResult += (arrTemp[1].Substring("FriendlyName: ".Length) + "\n");
반응형