Mini Kabibi Habibi
Imports Microsoft.VisualBasic
Imports System
Imports System.ServiceModel
Imports System.Windows
Imports DevExpress.DemoData
Imports DevExpress.DemoData.Helpers
Imports DevExpress.Xpf.DemoBase
Imports DevExpress.Xpf.DemoBase.Helpers
Imports SilverlightReportViewer.DemoService
Namespace SilverlightReportViewer
Public Class App
Inherits Application
Private Shared client_Renamed As DemoServiceClient
Private Shared reportServiceUrl_Renamed As String = "../DemoReportService.svc"
Private Shared demoServiceUrl_Renamed As String = "../DemoService.svc"
Friend Shared ReadOnly Property ReportServiceUrl() As String
Get
Return reportServiceUrl_Renamed
End Get
End Property
Friend Shared ReadOnly Property DemoServiceUrl() As String
Get
Return demoServiceUrl_Renamed
End Get
End Property
Friend Shared ReadOnly Property Client() As DemoServiceClient
Get
If client_Renamed Is Nothing Then
Dim serviceAddress = New EndpointAddress(DemoServiceUrl)
Dim securityMode = If(serviceAddress.Uri.Scheme.ToLower() = "https", BasicHttpSecurityMode.Transport, BasicHttpSecurityMode.None)
client_Renamed = New DemoServiceClient(New BasicHttpBinding(securityMode), serviceAddress)
End If
Return client_Renamed
End Get
End Property
Public Sub New()
StartupBase.Run(Of Startup)(Me)
End Sub
End Class
Public Class Startup
Inherits DemoStartup
Public Shared Sub InitDemo()
#If (Not EXTMAP) Then
Loader.DemoDataAssembly = GetType(DevExpress.DemoData.AssemblyMarker).Assembly
#End If
End Sub
Protected Overrides Function GetDebug() As Boolean
#If DEBUG Then
Return True
#Else
Return False
#End If
End Function
Protected Overrides Function GetFixtureTypeForXBAPOrSLTesting() As Type
Return Nothing
End Function
Protected Overrides Function DoStartup() As Boolean
If String.Compare("file", Application.Host.Source.Scheme, StringComparison.InvariantCultureIgnoreCase) = 0 Then
Const message As String = "Please make sure that the Web project of this solution is the starting project."
MessageBox.Show(message)
Return False
End If
Return MyBase.DoStartup()
End Function
End Class
End Namespace