Mini Kabibi Habibi
using System;
using System.IO;
using DevExpress.DemoData;
using DevExpress.DemoData.Helpers;
using DevExpress.Xpf.DemoBase;
namespace ReportWpfDemo {
public class Program {
[STAThread]
static void Main(string[] args) {
StartupBase.Run<Startup>(null);
}
}
public class Startup : DemoStartup {
public static void InitDemo() {
Loader.DemoDataAssembly = typeof(DevExpress.DemoData.AssemblyMarker).Assembly;
}
protected override bool DoStartup() {
try {
#if !XBAP
string path = DataFilesHelper.FindFile("nwind.mdb", DataFilesHelper.DataPath);
XtraReportsDemos.ConnectionHelper.ApplyDataDirectory(System.IO.Path.GetDirectoryName(path));
#endif
return base.DoStartup();
} catch(Exception e) {
ThrowException(e.Message + "\n" + e.StackTrace);
throw e;
}
}
protected override bool GetDebug() {
#if DEBUG
return true;
#else
return false;
#endif
}
protected override Type GetFixtureTypeForXBAPOrSLTesting() {
return null;
}
static void ThrowException(string message) {
StreamWriter writer = new StreamWriter("error_reports.log", true);
ConsoleColor defaultColor = Console.ForegroundColor;
Console.ForegroundColor = ConsoleColor.Red;
Console.WriteLine(message);
writer.WriteLine(message);
writer.Close();
Console.ForegroundColor = defaultColor;
}
}
}