Mini Kabibi Habibi
Imports Microsoft.VisualBasic
Imports System
Imports System.IO
Imports DevExpress.DemoData
Imports DevExpress.DemoData.Helpers
Imports DevExpress.Xpf.DemoBase
Namespace ReportWpfDemo
Public Class Program
<STAThread> _
Shared Sub Main(ByVal args() As String)
StartupBase.Run(Of Startup)(Nothing)
End Sub
End Class
Public Class Startup
Inherits DemoStartup
Public Shared Sub InitDemo()
Loader.DemoDataAssembly = GetType(DevExpress.DemoData.AssemblyMarker).Assembly
End Sub
Protected Overrides Function DoStartup() As Boolean
Try
#If (Not XBAP) Then
Dim path As String = DataFilesHelper.FindFile("nwind.mdb", DataFilesHelper.DataPath)
XtraReportsDemos.ConnectionHelper.ApplyDataDirectory(System.IO.Path.GetDirectoryName(path))
#End If
Return MyBase.DoStartup()
Catch e As Exception
ThrowException(e.Message + Constants.vbLf + e.StackTrace)
Throw e
End Try
End Function
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
Private Shared Sub ThrowException(ByVal message As String)
Dim writer As New StreamWriter("error_reports.log", True)
Dim defaultColor As ConsoleColor = Console.ForegroundColor
Console.ForegroundColor = ConsoleColor.Red
Console.WriteLine(message)
writer.WriteLine(message)
writer.Close()
Console.ForegroundColor = defaultColor
End Sub
End Class
End Namespace