mirror of
https://github.com/PredatH0r/ChanSort.git
synced 2026-01-13 02:42:03 +01:00
- Philips: support for FLASH/*.bin DVB-T/C and preset DVB-S lists (mgr_chan_s_pkg.db) - Toshiba: lists with chmgt_type001\\chmgt.bin can now be opened without zipping them - Toshiba: selecting the hotelopt_type001.bin will now also load the list (if the type is supported) - Alden: added support for "Alden" Android SmartTV channel list format (dvr_rtk_tv.db)
65 lines
2.3 KiB
C#
65 lines
2.3 KiB
C#
using System;
|
|
using System.Globalization;
|
|
using System.Threading;
|
|
using System.Windows.Forms;
|
|
using DevExpress.XtraBars;
|
|
using DevExpress.XtraEditors;
|
|
|
|
namespace ChanSort.Ui
|
|
{
|
|
static class Program
|
|
{
|
|
internal static bool ChangeLanguage;
|
|
|
|
[STAThread]
|
|
static void Main()
|
|
{
|
|
// if there is no valid locale set up in the Windows region settings, SharpZipLib will fail to open zip files.
|
|
if (Thread.CurrentThread.CurrentCulture.TextInfo.OEMCodePage <= 1)
|
|
Thread.CurrentThread.CurrentCulture = new CultureInfo("en-US");
|
|
if (Thread.CurrentThread.CurrentUICulture.TextInfo.OEMCodePage <= 1)
|
|
Thread.CurrentThread.CurrentUICulture = new CultureInfo("en-US");
|
|
|
|
AppDomain.CurrentDomain.UnhandledException += CurrentDomain_UnhandledException;
|
|
Application.ThreadException += Application_ThreadException;
|
|
Application.SetUnhandledExceptionMode(UnhandledExceptionMode.CatchException);
|
|
|
|
//WindowsFormsSettings.AllowDpiScale = true;
|
|
//WindowsFormsSettings.AllowAutoScale = DefaultBoolean.True;
|
|
WindowsFormsSettings.SetPerMonitorDpiAware();
|
|
//WindowsFormsSettings.ForceDirectXPaint();
|
|
WindowsFormsSettings.EnableFormSkins();
|
|
//WindowsFormsSettings.ForcePaintApiDiagnostics(PaintApiDiagnosticsLevel.Default);
|
|
BarAndDockingController.Default.PropertiesBar.ScaleIcons = false;
|
|
//WindowsFormsSettings.DefaultFont = new Font("Tahoma", 8.25f);
|
|
//DevExpress.Skins.SkinManager.EnableFormSkins();
|
|
|
|
Application.EnableVisualStyles();
|
|
Application.SetCompatibleTextRenderingDefault(false);
|
|
|
|
do
|
|
{
|
|
ChangeLanguage = false;
|
|
Application.Run(new MainForm());
|
|
} while (ChangeLanguage);
|
|
}
|
|
|
|
private static void Application_ThreadException(object sender, ThreadExceptionEventArgs e)
|
|
{
|
|
HandleException(e.Exception);
|
|
}
|
|
|
|
private static void CurrentDomain_UnhandledException(object sender, UnhandledExceptionEventArgs e)
|
|
{
|
|
HandleException(e.ExceptionObject as Exception);
|
|
}
|
|
|
|
private static void HandleException(Exception ex)
|
|
{
|
|
MessageBox.Show(
|
|
"Bei der Programmausführung trat folgender Fehler auf:\n" + (ex == null ? "(null)" : ex.ToString()),
|
|
"Fehler bei Programmausführung", MessageBoxButtons.OK, MessageBoxIcon.Error);
|
|
}
|
|
}
|
|
}
|