Search Results

Search found 4 results on 1 pages for 'ywe'.

Page 1/1 | 1 

  • Google Maps API DirectionsRendererOptions not working?

    - by YWE
    I am trying to use DirectionsRenderer to display a DirectionsResult without the route list. According to the API version 3 documentation, there is a "hideRouteList" property of the DirectionsRendererOptions object that when set to true should hide the route list. I cannot get it to work. Is this a bug or am I just not coding this correctly? Following is my code. <html> <head> <title>Driving Directions</title> <script type="text/javascript" src="http://maps.google.com/maps/api/js?sensor=false"> </script> <script type="text/javascript"> <!-- function initialize() { var dirService = new google.maps.DirectionsService(); var dirRequest = { origin: "350 5th Ave, New York, NY, 10118", destination: "1 Wall St, New York, NY", travelMode: google.maps.DirectionsTravelMode.DRIVING, unitSystem: google.maps.DirectionsUnitSystem.IMPERIAL, provideTripAlternatives: true }; dirService.route(dirRequest, showDirections); } function showDirections(dirResult, dirStatus) { if (dirStatus != google.maps.DirectionsStatus.OK) { alert('Directions failed: ' + dirStatus); return; } var rendererOptions = { hideRouteList: true }; var dirRenderer = new google.maps.DirectionsRenderer(rendererOptions); dirRenderer.setPanel(document.getElementById('dir-container')); dirRenderer.setDirections(dirResult); } --> </script> </head> <body onLoad="initialize();"> <div id="dir-container"></div> </body> </html>

    Read the article

  • Is there a difference SMO ServerConnection transaction methods versus using the SqlConnectionObject

    - by YWE
    I am using SMO to create databases and tables on a SQL Server. I want to do so in a transaction. Are both of these methods of doing so valid and equivalent: First method: Server server; //... server.ConnectionContext.BeginTransaction(); //... server.ConnectionContext.CommitTransaction(); Second method: Server server; // ... SqlConnection conn = server.ConnectionContext.SqlConnectionObject; SqlTransaction trans = conn.BeginTransaction(); // ... trans.Commit();

    Read the article

  • Is arithmetic overflow/underflow generally checked in .Net framework methods?

    - by YWE
    For example, let's use the Add method of the ArrayList class. If I am using the default compiler settings in Visual Studio C# project in which arithmetic overflow is not checked, would ArrayList.Add() throw an OverflowException if I added too many items? Would surrounding the method call with checked or unchecked make any difference? BTW, I would write a test program to determine the answer to this question if I had Visual Studio available to me right now.

    Read the article

  • In C# or .NET, is there a way to prevent other threads from invoking methods on a particular thread?

    - by YWE
    I have a Windows Forms application with a BackgroundWorker. In a method on the main form, a MessageBox is shown and the user must click the OK button to continue. Meanwhile, while the messagebox is being displayed, the BackgroundWorker finishes executing and calls the RunWorkerCompleted event. In the method I have assigned to that event, which runs on the UI thread, the Close method is called on the form. Even though the method that shows the message box is still running, the UI thread is not blocking other threads from invoking methods on it. So the Close method gets called on the form. What I want is for the UI thread to block other threads' invokes until the method with the message box has finished. Is there an easy way to do that?

    Read the article

1