Advertisement
Latest WarCraft 3 VODs
Advertisement
Search
| Members \ vex- | |||||||||||||||
| |||||||||||||||
|
Created 23rd December 2008 11:40
I wanna b a game developer T.T!!!! ohh yeah everyone says this.... WHY? PLAY GAMES DONT MAKE EM. INT WINAPI WinMain( HINSTANCE hInst, HINSTANCE, LPTSTR szCmd, INT ) { // Parse command line to determine if user wants to use // the D3DM reference driver instead of the default system // driver if (0 == lstrcmp(szCmd, TEXT("-ref"))) g_bUseRef = true; //we don't support a rotated screen if (IsScreenRotated()) { return 0; } // Register the window class WNDCLASS wc = { 0L, MsgProc, 0L, 0L, hInst, NULL, NULL, NULL, NULL, TEXT("D3DM Tutorial") }; RegisterClass( &wc ); int iScreenWidth = GetSystemMetrics(SM_CXSCREEN); int iScreenHeight = GetSystemMetrics(SM_CYSCREEN); // Create the application's window HWND hWnd = CreateWindow( TEXT("D3DM Tutorial"), TEXT("D3DM Tutorial 02: Vertices"), WS_VISIBLE, 0, 0, iScreenWidth, iScreenHeight, NULL, NULL, wc.hInstance, NULL ); SHFullScreen(hWnd, SHFS_HIDESIPBUTTON | SHFS_HIDETASKBAR); // Initialize Direct3D Mobile if( SUCCEEDED( InitD3DM( hWnd ) ) ) { // Create the vertex buffer if( SUCCEEDED( InitVB() ) ) { // Show the window ShowWindow( hWnd, SW_SHOWNORMAL ); UpdateWindow( hWnd ); // Enter the message loop MSG msg; memset( &msg, 0, sizeof(msg) ); while( msg.message!=WM_QUIT ) { if( PeekMessage( &msg, NULL, 0U, 0U, PM_REMOVE ) ) { TranslateMessage( &msg ); DispatchMessage( &msg ); } else Render(); } } } return 0; } NUFF SAID? THIS DOES PRACTICALLY NOTHING!. MAKES A FUKKEN TRIANGLE ON THE SCREEN. A FUKKEN TRIANGLE! Who wants my fukken job, il gladly trade for ANYTHING. | |||||||||||||||
|
Created 13th November 2008 18:02
Private Sub checkForUpdates() Label2.Text = Microsoft.WindowsMobile.Status.SystemProperty.PhoneSignalStrength If Long.Parse(Label2.Text.ToString().Trim()) > 10 Then Dim lastUpd As String Dim svc As New ezHandHeldService.Service() Dim ds As DataSet Dim SqlCommand As New SqlCeCommand("select lastupdated from engineer_details where userid = '" & Me.TextBox1.Text & "'", sqlConn2) sqlConn2.Open() lastUpd = SqlCommand.ExecuteScalar().ToString() sqlConn2.Close() Dim sqlcommandtext As String ds = svc.GetAllUpdatedRowsFromFirsttblGroup(lastUpd) '*******Will be GetAllUpdatedRows when merge DB * ' convert(DateTime '2008/10/10' 102) If ds.Tables.Count > 0 Then 'check updates For Each dt As DataTable In ds.Tables() Dim tblname As String tblname = "Error" Select Case dt.Columns(0).ColumnName Case "SerRecID" tblname = "ServiceRecords" Case "SiteID" tblname = "AlarmSite" Case "SqlQry" tblname = "CreateTablesData" Case "CustID" tblname = "Customers" Case "DelID" tblname = "DelTable" Case "id" tblname = "ImagesTable" Case "ProductID" tblname = "Products" Case "PartID" tblname = "ServicePartsList" Case "CallType" tblname = "tblCallTypes" Case "ServiceID" tblname = "tblEmployeeTime" Case "DESCRIPT" tblname = "Zones" Case "StationID" tblname = "tblMonStations" Case "SiteContactID" tblname = "SiteContacts" Case "ItemID" tblname = "ServiceListItems" Case "System" tblname = "Systems" Case "Type" tblname = "tblContractTypes" Case "AreaCode" tblname = "tblAreaCodes" Case "EmployeeID" tblname = "Employees" Case "Category" tblname = "Categorys" Case "ProductID2" tblname = "DeviceDetails" Case "QuoteSpecificationID" tblname = "QuotesSpecifications" Case "QuoteDetailID" tblname = "QuoteDetails" End Select Dim cmdCols(0 To dt.Columns.Count) As String, currIndex As Integer = 0 Dim cmdRows(0 To dt.Columns.Count) As String For Each dc As DataColumn In dt.Columns() cmdCols(currIndex) = dc.ColumnName currIndex += 1 Next currIndex = 0 If dt.Rows.Count > 0 Then TestForm.BringToFront() TestForm.Show() TestForm.Label1.Text += " Updates available: " & tblname TestForm.Refresh() For Each dr As DataRow In dt.Rows() sqlcommandtext = "Update " & tblname & " set " If dr("Updated").ToString() = "" Then Else If Date.Compare(Date.Parse(lastUpd), Date.Parse(dr("Updated").ToString())) < 0 Then lastUpd = dr("Updated").ToString() End If End If For i As Integer = 0 To dt.Columns.Count - 1 If dt.Columns(i).DataType Is GetType(Integer) Then If dr(i).ToString().ToString().Replace("'", "") = "" Then cmdRows(i) = 0 Else cmdRows(i) = dr(i).ToString().Replace("'", "") End If Else cmdRows(i) = " '" & dr(i).ToString().Replace("'", "") & "' " End If sqlcommandtext += "[" & cmdCols(i) & "]" & " = " & cmdRows(i) If i = dt.Columns.Count - 1 Then Else sqlcommandtext += "," End If Next i If dt.Columns(0).DataType Is GetType(Integer) Then sqlcommandtext += "where " & dt.Columns(0).ColumnName & " = " & dr(0).ToString() & "; " Else sqlcommandtext += "where " & dt.Columns(0).ColumnName & " = '" & dr(0).ToString() & "'; " End If Try If dt.Columns(0).DataType Is GetType(Integer) Then Dim sqlcmndins As New SqlCeCommand("insert into " & tblname & " (" & dt.Columns(0).ColumnName & ") values (" & dr(0).ToString() & ")", sqlConn2) sqlConn2.Open() sqlcmndins.ExecuteNonQuery() sqlConn2.Close() Else Dim sqlcmndins As New SqlCeCommand("insert into " & tblname & " (" & dt.Columns(0).ColumnName & ") values ('" & dr(0).ToString() & "')", sqlConn2) sqlConn2.Open() sqlcmndins.ExecuteNonQuery() sqlConn2.Close() End If Catch ex As Exception Finally sqlConn2.Close() End Try Try Dim SqlCommand2 As New SqlCeCommand(sqlcommandtext, sqlConn2) ' add Updated = now() sqlConn2.Open() SqlCommand2.ExecuteNonQuery() sqlConn2.Close() Catch ex As Exception TestForm.Label1.Text += sqlcommandtext TestForm.BringToFront() TestForm.Refresh() TestForm.Show() Finally sqlConn2.Close() End Try Next Dim sqlcmndins2 As New SqlCeCommand("update engineer_details set lastupdated = '" & lastUpd & "'", sqlConn2) sqlConn2.Open() sqlcmndins2.ExecuteNonQuery() sqlConn2.Close() End If Next End If End If End Sub Public Sub firstBulkInsert() Dim svc As New ezHandHeldService.Service Dim ds As New DataSet ds = svc.GetBulkData2() Dim commandtext As String Dim commandtext2 As String commandtext2 = "" Dim count As Long count = 0 commandtext = "" For Each dt As DataTable In ds.Tables() commandtext2 = "" Dim tblname As String tblname = "Error" Select Case dt.Columns(0).ColumnName Case "SerRecID" tblname = "ServiceRecords" Case "SiteID" tblname = "AlarmSite" Case "SqlQry" tblname = "CreateTablesData" Case "CustID" tblname = "Customers" Case "DelID" tblname = "DelTable" Case "id" tblname = "ImagesTable" Case "ProductID" tblname = "Products" Case "PartID" tblname = "ServicePartsList" Case "CallType" tblname = "tblCallTypes" Case "ServiceID" tblname = "tblEmployeeTime" Case "DESCRIPT" tblname = "Zones" Case "StationID" tblname = "tblMonStations" Case "SiteContactID" tblname = "SiteContacts" Case "ItemID" tblname = "ServiceListItems" Case "System" tblname = "Systems" Case "Type" tblname = "tblContractTypes" Case "AreaCode" tblname = "tblAreaCodes" Case "EmployeeID" tblname = "Employees" Case "Category" tblname = "Categorys" Case "ProductID2" tblname = "DeviceDetails" Case "QuoteSpecificationID" tblname = "QuotesSpecifications" Case "QuoteDetailID" tblname = "QuoteDetails" End Select commandtext = " insert into " & tblname & " (" ' change count = 0 For Each dc As DataColumn In dt.Columns If count = 0 Then commandtext += "[" & dc.ColumnName & "]" Else commandtext += ", [" & dc.ColumnName & "]" End If count += 1 Next commandtext += ")" ' has all the columns -- insert into employeetable ( col1, col2 ) Dim commandtext3 As String = "" If dt.Rows.Count > 0 Then For Each dr As DataRow In dt.Rows commandtext2 += " VALUES (" Dim columncount As Long = dt.Columns.Count For i As Integer = 0 To columncount - 1 If i = columncount - 1 Then If dt.Columns(i).DataType Is GetType(Integer) Then '= System.Data.SqlDbType.Bit Then If dr(i).ToString().Replace("'", "").ToString().Replace(")", "").ToString().Replace("(", "").ToString() = "" Then commandtext2 += "0" Else commandtext2 += dr(i).ToString().Replace("'", "").ToString().Replace(")", "").ToString().Replace("(", "").ToString() End If Else commandtext2 += "'" & dr(i).ToString().Replace("'", "").ToString().Replace(")", "").ToString().Replace("(", "").ToString() & "'" End If Else ' insert into employeetable ( col1, col2 ) VLUES ( If dt.Columns(i).DataType Is GetType(Integer) Then '= System.Data.SqlDbType.Bit Then If dr(i).ToString().Replace("'", "").ToString().Replace(")", "").ToString().Replace("(", "").ToString() = "" Then commandtext2 += "0, " Else commandtext2 += dr(i).ToString().Replace("'", "").ToString().Replace(")", "").ToString().Replace("(", "").ToString() & ", " End If Else commandtext2 += "'" & dr(i).ToString().Replace("'", "").ToString().Replace(")", "").ToString().Replace("(", "").ToString() & "', " '*********** msg currecy End If End If ' insert into employeetable ( col1, col2 ) values(val1,val2) Next i commandtext2 += ")" ' commandtext = commandtext.Substring(0, Len(commandtext) - 2) ' commandtext.Substring(0, commandtext.Length - 2) commandtext3 = commandtext + commandtext2 Dim SqlCommand2 As New SqlCeCommand(commandtext3, sqlConn) '"Insert into Alarmsite (SiteID, SiteRef, Town, County, AreaCode, Telephone, CustID, Commissionedby, dateinstalled, InstalledYN, MonCompany, Discontinued, PanelLocation, EngCode, Note, Disconnected, NSAICertNo, Occupant, PremiseType, AlarmType, GardaURN) VALUES (" & dr(0).ToString() & ", '" & dr("SiteRef").ToString() & "', '" & dr("town").ToString() & "', '" & dr("County").ToString() & "', '" & dr("AreaCode").ToString() & "', '" & dr("Telephone").ToString() & "', " & dr("CustID").ToString() & ", '" & dr("Commissionedby").ToString() & "', '" & dr("DateInstalled").ToString().Replace("/", "-") & "', '" & dr("InstalledYN").ToString() & "', '" & dr("MonCompany").ToString() & "', '" & dr("Discontinued").ToString() & "', '" & dr("PanelLocation").ToString() & "', " & dr("EngCode").ToString() & ", '" & dr("Note").ToString() & "', '" & dr("Disconnected").ToString() & "', '" & dr("NSAICertNo").ToString() & "', '" & dr("Occupant").ToString() & "', '" & dr("PremiseType").ToString() & "', '" & dr("AlarmType").ToString() & "', '" & dr("GardaURN").ToString() & "')", sqlConn) '" & dr("DateInstalled").ToString().Replace("/", "-") & "' " & dr("CPanelProdID").ToString() & " '(SiteID, SiteRef, Address, Town, County, AreaCode, Telephone, CustID, Commissionedby, DateInstalled, InstalledYN, MonCompany, Discontinued, CPanelProdID, PanelLocation, EngCode, Note, Disconnected, NSAICertNo, Occupant, PremiseType, AlarmType, GardaURN, Installer, DigiNo, RenewalDate, MonFee, [Mon Commission], LastModified, ModifiedBy, SiteEnteredOn, SiteEnteredBy, OldNotes, CustomerType, RadioID, UserDefinedField1, UserDefinedField2, UserDefinedField3, UserDefinedField4, LabourRate, PercentRate, Password, UserCode, Letter, LastMaintDone, NextMaintDue, Pricing, Updated) commandtext2 = "" 'Try sqlConn.Open() SqlCommand2.ExecuteNonQuery() sqlConn.Close() 'Catch ex As Exception ' TestForm.Label1.Text += SqlCommand2.CommandText.ToString() ' TestForm.Refresh() ' TestForm.Show() 'End Try Next End If Next End Sub Public Sub CreateTables() Dim svc As New ezHandHeldService.Service Dim ds As New DataSet ds = svc.GetBulkData() Dim commandtext As String Dim commandtext2 As String commandtext2 = "" Dim count As Long commandtext = "" For Each dt As DataTable In ds.Tables() commandtext2 = "" Dim tblname As String tblname = "Error" Select Case dt.Columns(0).ColumnName Case "SerRecID" tblname = "ServiceRecords" Case "SiteID" tblname = "AlarmSite" Case "SqlQry" tblname = "CreateTablesData" Case "CustID" tblname = "Customers" Case "DelID" tblname = "DelTable" Case "id" tblname = "ImagesTable" Case "ProductID" tblname = "Products" Case "PartID" tblname = "ServicePartsList" Case "CallType" tblname = "tblCallTypes" Case "ServiceID" tblname = "tblEmployeeTime" Case "DESCRIPT" tblname = "Zones" Case "StationID" tblname = "tblMonStations" Case "SiteContactID" tblname = "SiteContacts" Case "ItemID" tblname = "ServiceListItems" Case "System" tblname = "Systems" Case "Type" tblname = "tblContractTypes" Case "AreaCode" tblname = "tblAreaCodes" Case "EmployeeID" tblname = "Employees" Case "Category" tblname = "Categorys" Case "ProductID2" tblname = "DeviceDetails" Case "QuoteSpecificationID" tblname = "QuotesSpecifications" Case "QuoteDetailID" tblname = "QuoteDetails" End Select count = 0 For Each dc As DataColumn In dt.Columns If count = 0 Then If dc.DataType Is GetType(Integer) Then '= System.Data.SqlDbType.Bit Then commandtext2 += "[" & dc.ColumnName.ToString() & "] int " Else commandtext2 += "[" & dc.ColumnName.ToString() & "] nVarchar(100)" End If Else If dc.DataType Is GetType(Integer) Then '= System.Data.SqlDbType.Bit Then commandtext2 += ", [" & dc.ColumnName.ToString() & "] int " Else commandtext2 += ", [" & dc.ColumnName.ToString() & "] nVarchar(100) " End If End If count += 1 Next Dim sqltext As String sqltext = "Create Table " & tblname & " (" & commandtext2 & ") " 'tblname Dim SqlCommand2 As New SqlCeCommand(sqltext, sqlConn) commandtext2 = "" 'TestForm.Label1.Text += SqlCommand2.CommandText.ToString() 'TestForm.Refresh() 'TestForm.Show() sqlConn.Open() SqlCommand2.ExecuteNonQuery() sqlConn.Close() tblname = "" sqltext = "" Next End Sub IT TOOK 3 DAYS jus gottta back it up till i get home | |||||||||||||||
Guestbook
hehe, im on 6th season of TNG ;DD
Lt. Data OWNS !!! xDD
Lt. Data OWNS !!! xDD
i wonder if he still comes around to check his guestbook --
O_o
O_o
VEXXXXXXXXX o,o <3
vexy sexy ftw











This account is permanently locked.
United States
Zerg



