티스토리 뷰
내용 정리는 나중에...
우선 코드만 아래에
///// Fomr1
public Form1 ( )
{
InitializeComponent ( );
dataGridView1.ColumnCount = 2;
dataGridView1.Columns [ 0 ].Name = "가수";
dataGridView1.Columns [ 1 ].Name = "노래";
comboBox1.Items.Add ( " - " );
comboBox1.Items.Add ( "-" );
comboBox1.Items.Add ( " ㅡ " );
comboBox1.Items.Add ( "ㅡ" );
comboBox1.SelectedIndex = 0 ;
}
private void button1_Click ( object sender, EventArgs e )
{
OpenFileDialog OFD = new OpenFileDialog();
OFD.ShowDialog();
if ( OFD != null )
{
StreamReader SR = new StreamReader( OFD.FileName );
string sLine = "";
string[] sResult = { "", "" };
string sSpliter = "";
while ( true )
{
sLine = SR.ReadLine ( );
if ( sLine == null )
{
break;
}
// to do
for ( int n = 0; n < comboBox1.Items.Count; n++ )
{
if ( sLine.Contains ( comboBox1.Items [ n ].ToString ( ) ) )
{
if ( sLine.Contains ( "가입" ) || sLine.Contains ( "추천:" ) )
{
continue;
}
sSpliter = comboBox1.Items [ n ].ToString ( ).Trim();
sResult = sLine.Split( sSpliter[0] );
dataGridView1.Rows.Add ( sResult[0], sResult[1] );
break;
}
}
}
}
}
private void button2_Click ( object sender, EventArgs e )
{
if ( dataGridView1.Rows.Count < 0 )
{
MessageBox.Show("Input부터");
return;
}
StreamWriter SW = new StreamWriter( @"C:\Result.txt" );
for ( int n = 0; n < dataGridView1.Rows.Count; n++ )
{
SW.Write( dataGridView1.Rows[n].Cells[0].Value + " - " + dataGridView1.Rows[n].Cells[1].Value + "\r\n");
}
SW.Close();
}
private void button3_Click ( object sender, EventArgs e )
{
if ( dataGridView1.CurrentCellAddress.Y < 0 )
{
MessageBox.Show ( "Input부터" );
return;
}
Form2 F2 = new Form2( dataGridView1.Rows[ dataGridView1.CurrentCellAddress.Y ].Cells[0].Value.ToString().Trim(),
dataGridView1.Rows[ dataGridView1.CurrentCellAddress.Y ].Cells[1].Value.ToString().Trim() );
F2.Show();
}
///////////////////////////Form2
public Form2 ( string sTemp1, string sTemp2 )
{
InitializeComponent ( );
Uri address = new Uri ( "http://www.google.co.kr/search?q=" + sTemp1 + "+" + sTemp2
+ "&oq=" + sTemp1 + "+" + sTemp2 + "&aqs=chrome..69i57.302j0j1&sourceid=chrome&ie=UTF-8" );
webBrowser1.Url = address;
}
'P rogramming > C # (13.05~)' 카테고리의 다른 글
| (150511) MRMR 프로그램 (0) | 2015.05.11 |
|---|---|
| C# ] For 오늘의 유머, 노래 정리 (0) | 2015.02.05 |
| C# 전체 폴더 압축 및 해제 (0) | 2014.12.17 |
| C# Thread 동작 시, 인수 전달 (0) | 2014.11.18 |
| C# DES 8bit를 이용한 복호화 및 암호화 코드 (0) | 2014.10.27 |
| C# 특정 이름으로 된 프로세스가 구동 중인지 확인 (0) | 2014.06.05 |
| C# Form의 위치를 원하는 곳으로 지정하기 (0) | 2014.05.12 |
| C# Form 2개,Thread, ProgressBar를 이용한 Work 및 진행 정도 Viewing (0) | 2014.05.08 |
- Total
- 331,919
- Today
- 0
- Yesterday
- 89
- 알프스목초지1-4
- Joseph Redmon
- 리눅스
- C# 패널
- 자신만의향
- PolyBridge1-4
- DaleEvans
- C# 패널 예제
- PolyBridge1-3
- 믿는다는것
- 알프스목초지1-3
- PolyBridge1-5
- PolyBridge하는법
- 인생의시간
- 알프스목초지1-2
- PolyBridge1-1
- OnlyICan
- 분할작업
- Nina Fedoroff
- 1Day1Sentence
- c#
- 알프스목초지1-1
- 사람의인생
- ted
- PolyBridge
- 좋은글귀
- 알프스목초지1-5
- PolyBridge1-2
- 폴리브릿지
- C# 판넬 예제
| 일 | 월 | 화 | 수 | 목 | 금 | 토 |
|---|---|---|---|---|---|---|
| 1 | 2 | 3 | 4 | 5 | 6 | |
| 7 | 8 | 9 | 10 | 11 | 12 | 13 |
| 14 | 15 | 16 | 17 | 18 | 19 | 20 |
| 21 | 22 | 23 | 24 | 25 | 26 | 27 |
| 28 | 29 | 30 |
- 2017/08 (4)

Check_title.exe