예제 #1
0
 // Login
 private void button1_Click( object sender, EventArgs e )
 {
     MainWindow = Owner as MainForm;
     int iResult = MainWindow.PeerNetwork.Connect( IPADR, Port );
     if( 0 == iResult )
         DialogResult = DialogResult.OK;
     else
     {
         string szMsg = Properties.Resources.LoginForm_MessageBox_String1 + " ErrorCode:" + iResult;
         MessageBox.Show( this, szMsg );
     }
 }
예제 #2
0
        static void Main()
        {
            MainForm MainWidnow = null;

            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault( false );

            MainWidnow = new MainForm();
            if( null == MainWidnow )
            {
                System.Diagnostics.Debug.WriteLine( "Failed to create the MainForm type object." );
                return;
            }

            Application.Run( MainWidnow );
        }