본문 바로가기

전체 글

(302)
[C#] Object Binding Sample Project using System.Windows.Forms; namespace BindingSample { public partial class Form1 : Form { public Form1() { InitializeComponent(); InitializeMyComponent(); } private void InitializeMyComponent() { this.label1.DataBindings.Add("Text", this.textBox1, "Text"); this.textBoxLeft.DataBindings.Add("Text", this.textBoxRight, "Text"); } } }
[C#] ADO.NET XML and DataGridView Binding Sample Project using System; using System.Data; using System.Windows.Forms; namespace GridSample { public partial class Form1 : Form { private DataSet ourDataSet; private DataTable myDataTable; private BindingSource ourBindingSource; public Form1() { InitializeComponent(); InitializeMyComponent(); } private void InitializeMyComponent() { ourDataSet = new DataSet(); myDataTable = new DataTable("Person"); ourBin..
[C/C++] Dialog Test Sample Project VC++ 6.0 Project #include #include "resource.h" BOOL CALLBACK MainDlgProc(HWND hDlg, UINT iMessage, WPARAM wParam, LPARAM lParam); HWND hDlgMain; int APIENTRY WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpszCmdParam, int nCmdShow) { DialogBox(hInstance, MAKEINTRESOURCE(IDD_DIALOG1), HWND_DESKTOP, MainDlgProc); return 0; } BOOL CALLBACK MainDlgProc(HWND hDlg, UINT iMessage, WPARAM..
[PerlNET] Regex (Perl C# Mix) Regex.pmpackage MixPerl::Regex;use strict;use namespace "System";use PerlNET qw(AUTOCALL); #Constructor=for interface [interface: pure] static Regex();=cut #Methods=for interface static string Replace(str SourceString, str FindPattern, str ReplacePattern); static string Replaceg(str SourceString, str FindPattern, str ReplacePattern); static string Replacegi(str SourceString, str FindPattern, str..
[Perl] Cocoa (pl pm sample) Cocoa.plpackage MixPerl::Cocoa; =for interface [interface: pure] public static Cocoa Cocoa(); public static string Drink();=cut require Cocoa; Cocoa.pmpackage Cocoa;use strict; sub new { my $class = shift; my $self = bless {}, $class; return $self;} sub Drink { my $line = "Drink Cocoa"; return $line;} 1; testCocoa.pl#!/usr/bin/perl -wuse strict; push (@INC, 'pwd');use Cocoa; my $cup = new Cocoa;..
[PerlNET] CIty (Mix Perl & C#) Program.cs using System; using MixPerl; namespace CityClient { class Program { static void Main(string[] args) { City myCity1 = new City("SmallVille", 4); City myCity2 = new City("Crowdedburg", 40); myCity1.PrintCityInfo(true); myCity2.Population = 500000; myCity2.PrintCityInfo(false); } } } City.pm package MixPerl::City; use strict; use namespace "System"; use PerlNET qw(AUTOCALL ); #Consturct..
[Perl] BeeConverter (Convert HTML Entity to Unicode Character) use warnings; print "+----------------------+\r\n"; print "| BeeConverter 1.0.0.3 |\r\n"; print "| by Wing4Bee |\r\n"; print "| http://wing4bee.com |\r\n"; print "+----------------------+\r\n"; my ($source, $result) = @ARGV; open(FILE_GET, ":utf8", $result); my %c2dHash = ( quot => 34, amp => 38, apos => 39, lt => 60, gt => 62, nbsp => 160, iexcl => 161, cent => 162, pound => 163, curren => 164,..
[C/C++] Dely #include #include int _tmain(int argc, TCHAR *argv[]) { DWORD sleepTime = (DWORD)(_ttoi(argv[1]) * 1000); Sleep(sleepTime); }