2013-04-05 57 views
-1

進出口新的在Xcode編碼和使用Objective C.但是我有一個從VB編寫的我結束一個項目的舊代碼想轉換成目標C.VB代碼,目標C

這裏是代碼:

Private Sub VitalityButton4_Click(sender As Object, e As EventArgs) Handles VitalityButton4.Click 
    If txtWebURL.Text <> Nothing Then 
     Try 
      Dim wc As New WebClient 
      wc.Proxy = Nothing 

      Dim ST As String = wc.DownloadString("http://isup.me/" & txtWebURL.Text) 
      If ST.ToLower.Contains("it's not just you!") Then 
       txtWebStatus.Text = "Down!" 
      Else 
       txtWebStatus.Text = "Up!" 
      End If 
     Catch ex As Exception 
      cse() 
     End Try 
    End If 
End Sub 

我正在製作Mac OS X應用程序,而不是iOS。

+1

那要一行一行地做什麼? – holex 2013-04-05 14:41:20

+0

'在錯誤恢復下一個' – Cyrille 2013-04-05 14:57:18

回答