Here are the examples of the csharp api System.Windows.Forms.Application.Run(System.Windows.Forms.ApplicationContext) taken from open source projects. By voting up you can indicate which examples are most useful and appropriate.
1331 Examples
19
View Source File : Program.cs
License : GNU General Public License v3.0
Project Creator : 00000vish
License : GNU General Public License v3.0
Project Creator : 00000vish
[STAThread]
static void Main()
{
Application.EnableVisualStyles();
Application.SetCompatibleTextRenderingDefault(false);
Application.Run(new Form1());
}
19
View Source File : Program.cs
License : GNU General Public License v3.0
Project Creator : 0x00000FF
License : GNU General Public License v3.0
Project Creator : 0x00000FF
[STAThread]
static void Main()
{
Application.EnableVisualStyles();
Application.SetCompatibleTextRenderingDefault(false);
Application.Run(new frmMain());
}
19
View Source File : Program.cs
License : MIT License
Project Creator : 0xLaileb
License : MIT License
Project Creator : 0xLaileb
[STAThread]
private static void Main()
{
Application.EnableVisualStyles();
Application.SetCompatibleTextRenderingDefault(false);
Application.Run(new Demo());
}
19
View Source File : cMain.cs
License : MIT License
Project Creator : 0xPh0enix
License : MIT License
Project Creator : 0xPh0enix
[STAThread]
static void Main()
{
Application.EnableVisualStyles();
Application.SetCompatibleTextRenderingDefault(false);
Application.Run(new fMain());
}
19
View Source File : Program.cs
License : MIT License
Project Creator : 1-EXON
License : MIT License
Project Creator : 1-EXON
[STAThread]
static void Main()
{
Application.EnableVisualStyles();
Application.SetCompatibleTextRenderingDefault(false);
Application.Run(new DiscordWebhook());
}
19
View Source File : Program.cs
License : MIT License
Project Creator : 20chan
License : MIT License
Project Creator : 20chan
[STAThread]
static void Main() {
Application.EnableVisualStyles();
Application.SetCompatibleTextRenderingDefault(false);
Application.Run(new Form1());
}
19
View Source File : Program.cs
License : MIT License
Project Creator : 2401dem
License : MIT License
Project Creator : 2401dem
[STAThread]
static void Main()
{
Application.EnableVisualStyles();
Application.SetCompatibleTextRenderingDefault(false);
form1 = new Form1();
Application.Run(form1);
}
19
View Source File : Program.cs
License : Apache License 2.0
Project Creator : 214175590
License : Apache License 2.0
Project Creator : 214175590
[STAThread]
static void Main(string[] args)
{
if (null != args && args.Length > 3)
{
initUser = new SshUser();
initUser.Host = args[0];
initUser.UserName = args[1];
initUser.Preplacedword = args[2];
initUser.Port = Convert.ToInt32(args[3]);
}
/*AllocConsole();
windowHandle = FindWindow(null, Process.GetCurrentProcess().MainModule.FileName);
IntPtr closeMenu = GetSystemMenu(windowHandle, IntPtr.Zero);
uint SC_CLOSE = 0xF060;
RemoveMenu(closeMenu, SC_CLOSE, 0x0);
SetConsolereplacedle("调试信息");*/
try
{
//处理未捕获的异常
Application.SetUnhandledExceptionMode(UnhandledExceptionMode.CatchException);
//处理UI线程异常
Application.ThreadException += new System.Threading.ThreadExceptionEventHandler(Application_ThreadException);
//处理非UI线程异常
AppDomain.CurrentDomain.UnhandledException += new UnhandledExceptionEventHandler(CurrentDomain_UnhandledException);
Application.EnableVisualStyles();
Application.SetCompatibleTextRenderingDefault(false);
MAIN = new MainForm();
Application.Run(MAIN);
//Application.Run(new SftpForm(initUser));
}
catch (Exception ex)
{
string str = GetExceptionMsg(ex, string.Empty);
MessageBox.Show(str, "系统错误", MessageBoxButtons.OK, MessageBoxIcon.Error);
}
//FreeConsole();
}
19
View Source File : Program.cs
License : MIT License
Project Creator : 2881099
License : MIT License
Project Creator : 2881099
[STAThread]
static void Main()
{
Application.EnableVisualStyles();
Application.SetCompatibleTextRenderingDefault(false);
MiniblinkPInvoke.Resourcereplacedemblys.Add("FreeSqlTools", System.Reflection.replacedembly.GetExecutingreplacedembly());
MiniblinkPInvoke.PageNameSpace = "FreeSqlTools.Pages";
Curd.InitFreeSql();
Application.Run(new FrWebMain());
}
19
View Source File : Program.cs
License : MIT License
Project Creator : 2881099
License : MIT License
Project Creator : 2881099
[STAThread]
static void Main()
{
Application.EnableVisualStyles();
Application.SetCompatibleTextRenderingDefault(false);
ApplicationEventHandlerClreplaced AppEvents = new ApplicationEventHandlerClreplaced();
Application.ThreadException += new ThreadExceptionEventHandler(AppEvents.OnThreadException);
Application.Run(new Form1());
}
19
View Source File : Program.cs
License : GNU General Public License v3.0
Project Creator : 2dust
License : GNU General Public License v3.0
Project Creator : 2dust
[STAThread]
static void Main()
{
if (Environment.OSVersion.Version.Major >= 6)
{
SetProcessDPIAware();
}
Application.SetUnhandledExceptionMode(UnhandledExceptionMode.CatchException);
Application.ThreadException += new ThreadExceptionEventHandler(Application_ThreadException);
AppDomain.CurrentDomain.UnhandledException += new UnhandledExceptionEventHandler(CurrentDomain_UnhandledException);
//AppDomain.CurrentDomain.replacedemblyResolve += CurrentDomain_replacedemblyResolve;
if (!IsDuplicateInstance())
{
Utils.SaveLog($"v2rayN start up | {Utils.GetVersion()} | {Utils.GetExePath()}");
//设置语言环境
string lang = Utils.RegReadValue(Global.MyRegPath, Global.MyRegKeyLanguage, "zh-Hans");
Thread.CurrentThread.CurrentUICulture = new System.Globalization.CultureInfo(lang);
Application.EnableVisualStyles();
Application.SetCompatibleTextRenderingDefault(false);
Application.Run(new MainForm());
}
else
{
UI.ShowWarning($"v2rayN is already running(v2rayN已经运行)");
}
}
19
View Source File : Program.cs
License : GNU General Public License v3.0
Project Creator : 2dust
License : GNU General Public License v3.0
Project Creator : 2dust
[STAThread]
static void Main(string[] args)
{
Application.EnableVisualStyles();
Application.SetCompatibleTextRenderingDefault(false);
Application.Run(new MainForm(args));
}
19
View Source File : Program.cs
License : MIT License
Project Creator : 86Box
License : MIT License
Project Creator : 86Box
[STAThread]
static void Main()
{
if (Environment.OSVersion.Version.Major >= 6)
SetProcessDPIAware();
SetCurrentProcessExplicitAppUserModelID(AppID);
const string name = "86Box Manager";
//Use a mutex to check if this is the first instance of Manager
mutex = new Mutex(true, name, out bool firstInstance);
//If it's not, we need to restore and focus the existing window, as well as preplaced on any potential command line arguments
if (!firstInstance)
{
//Finds the existing window, unhides it, restores it and sets focus to it
IntPtr hWnd = FindWindow(null, "86Box Manager");
ShowWindow(hWnd, ShowWindowEnum.Show);
ShowWindow(hWnd, ShowWindowEnum.Restore);
SetForegroundWindow(hWnd);
//If this second instance comes from a VM shortcut, we need to preplaced on the command line arguments so the VM will start
//in the existing instance.
//NOTE: This code will have to be modified in case more command line arguments are added in the future.
if (args.Length == 3 && args[1] == "-S" && args[2] != null)
{
string message = args[2];
COPYDATASTRUCT cds;
cds.dwData = IntPtr.Zero;
cds.lpData = Marshal.StringToHGlobalAnsi(message);
cds.cbData = message.Length;
SendMessage(hWnd, WM_COPYDATA, IntPtr.Zero, ref cds);
}
return;
}
else
{
//Then check if any instances of 86Box are already running and warn the user
Process[] pname = Process.GetProcessesByName("86box");
if (pname.Length > 0)
{
DialogResult result = MessageBox.Show("At least one instance of 86Box.exe is already running. It's not recommended that you run 86Box.exe directly outside of Manager. Do you want to continue at your own risk?", "Warning", MessageBoxButtons.YesNo, MessageBoxIcon.Warning);
if (result == DialogResult.No)
{
return;
}
}
Application.EnableVisualStyles();
Application.SetCompatibleTextRenderingDefault(false);
Application.Run(new frmMain());
}
}
19
View Source File : Program.cs
License : GNU General Public License v3.0
Project Creator : 9vult
License : GNU General Public License v3.0
Project Creator : 9vult
[STAThread]
static void Main()
{
Application.EnableVisualStyles();
Application.SetCompatibleTextRenderingDefault(false);
Application.Run(new FrmStartPage());
}
19
View Source File : Program.cs
License : GNU General Public License v3.0
Project Creator : 9vult
License : GNU General Public License v3.0
Project Creator : 9vult
[STAThread]
static void Main()
{
Application.EnableVisualStyles();
Application.SetCompatibleTextRenderingDefault(false);
// Initialize the Client
WFClient.Initialize();
Application.Run(new FrmLauncher());
}
19
View Source File : Program.cs
License : MIT License
Project Creator : a11s
License : MIT License
Project Creator : a11s
[STAThread]
static void Main()
{
Application.EnableVisualStyles();
Application.SetCompatibleTextRenderingDefault(false);
Form form=null;
Console.WriteLine("All test:");
Console.WriteLine("1 PureUdp test");
Console.WriteLine("2 PureKcp test");
Console.WriteLine("3 Udp+Kcp mix test");
Console.WriteLine("4 PureKcp withflush minrto mix test");
Console.WriteLine("other: exit");
string input = "";
Console.WriteLine("input 1~4:");
input = Console.ReadLine();
switch (input.Trim())
{
case "0":
form = new ClientForm1();
break;
case "1":
form = new ClientUdp();
break;
case "2":
form = new ClientKcp();
break;
case "3":
form = new ClientMix();
break;
case "4":
KcpSetting.Default.RTO = 1;
KcpSetting.Default.NoDelay = 1;
KcpSetting.Default.NoDelayInterval = 1;
KcpSetting.Default.NoDelayResend = 10;
KcpSetting.Default.NoDelayNC = 1;
KcpSetting.Default.SndWindowSize = 2048;
KcpSetting.Default.RecWindowSize = 2048;
KcpSetting.Default.MTU = Utilities.PackSettings.MAX_DATA_LEN;
form = new ClientKcp();
break;
default:
return;
break;
}
Application.Run(form);
}
19
View Source File : Program.cs
License : MIT License
Project Creator : a11s
License : MIT License
Project Creator : a11s
[STAThread]
static void Main()
{
//sw.Start();
//lasttime = DateTime.Now;
//System.Threading.SpinWait wait = new System.Threading.SpinWait();
//for (int i = 0; i < 100000; i++)
//{
// if (DateTime.Now.Subtract(lasttime).TotalMilliseconds > 1000)
// {
// lasttime = DateTime.Now;
// Console.WriteLine($"{sw.ElapsedMilliseconds}\t {counter - counter2}\t {counter}");
// counter2 = counter;
// }
// wait.SpinOnce();
// counter++;
//}
Console.WriteLine("All test:");
Console.WriteLine("1 PureUdp test");
Console.WriteLine("2 PureKcp test");
Console.WriteLine("3 Udp+Kcp mix test");
Console.WriteLine("4 PureKcp withflush minrto test");
Console.WriteLine("other: exit");
string input = "";
Console.WriteLine("input 1~4:");
input = Console.ReadLine();
switch (input.Trim())
{
case "0":
StartServer = StartServer0;
break;
case "1":
StartServer = StartServer1;
break;
case "2":
StartServer = StartServer2;
break;
case "3":
StartServer = StartServer3;
break;
case "4":
StartServer = StartServer4;
break;
default:
return;
break;
}
Application.EnableVisualStyles();
Application.SetCompatibleTextRenderingDefault(false);
Application.Run(new ServerForm1());
var servertype = Server.GetType().Name;
var t = Server.AsyncClose(TimeSpan.FromSeconds(10));
Console.WriteLine("closing..");
t.Wait();
Console.WriteLine($"Server {servertype} Closed. Press any to to exit");
Console.ReadKey();
}
19
View Source File : Program.cs
License : MIT License
Project Creator : a11s
License : MIT License
Project Creator : a11s
[STAThread]
static void Main()
{
Console.WriteLine("All test:");
Console.WriteLine("1 PureUdp test");
Console.WriteLine("2 PureKcp test");
Console.WriteLine("3 Udp+Kcp mix test");
Console.WriteLine("4 PureKcp withflush minrto mix test");
Console.WriteLine("other: exit");
string input = "";
Console.WriteLine("input 1~3:");
input = Console.ReadLine();
switch (input.Trim())
{
case "0":
StartServer = StartServer0;
break;
case "1":
StartServer = StartServer1;
break;
case "2":
StartServer = StartServer2;
break;
case "3":
StartServer = StartServer3;
break;
case "4":
StartServer = StartServer4;
break;
default:
return;
break;
}
Application.EnableVisualStyles();
Application.SetCompatibleTextRenderingDefault(false);
Application.Run(new Form1());
var servertype = Server.GetType().Name;
Server?.Close(TimeSpan.FromSeconds(10));
Console.WriteLine("closing..");
Console.WriteLine($"Server {servertype} Closed. Press any to to exit");
Console.ReadKey();
}
19
View Source File : Program.cs
License : MIT License
Project Creator : a2633063
License : MIT License
Project Creator : a2633063
[STAThread]
static void Main()
{
Application.EnableVisualStyles();
Application.SetCompatibleTextRenderingDefault(false);
Application.Run(new ZUART());
}
19
View Source File : Program.cs
License : MIT License
Project Creator : a1xd
License : MIT License
Project Creator : a1xd
[STAThread]
static void Main()
{
var mutex = new System.Threading.Mutex(true, "RawAccelGrapher", out bool result);
if (!result)
{
MessageBox.Show("Another instance of the Raw Accel Grapher is already running.");
return;
}
CultureInfo.DefaultThreadCurrentCulture = CultureInfo.InvariantCulture;
CultureInfo.DefaultThreadCurrentUICulture = CultureInfo.InvariantCulture;
AppDomain.CurrentDomain.UnhandledException += GlobalUnhandledExceptionHandler;
Application.EnableVisualStyles();
Application.SetCompatibleTextRenderingDefault(false);
Application.Run(new RawAcceleration());
GC.KeepAlive(mutex);
}
19
View Source File : Program.cs
License : GNU General Public License v3.0
Project Creator : a4004
License : GNU General Public License v3.0
Project Creator : a4004
[STAThread]
static void Main(string[] argv)
{
if (argv.Any(o => o.Contains("--debug") || o.Contains("-d")))
{
NativeMethods.AllocConsole();
Default = Console.ForegroundColor;
DebugMode = true;
Console.replacedle = "Espressif Flash Manager - Debugging Console";
}
AllowFileDebugging = -1;
Debug("Application init.");
if (argv.Any(o => o.Contains("--fixdriver") || o.Contains("-fd")))
{
Debug("Program executed with --fixdriver flag. Device picker will be disabled and esptool will autodetect" +
" in order to mitigate access denied error messages.");
Settings.PortFix = true;
}
Application.EnableVisualStyles();
Application.SetCompatibleTextRenderingDefault(false);
Application.SetUnhandledExceptionMode(UnhandledExceptionMode.CatchException);
if (argv.Any(o => o.Contains("--portable") || o.Contains("-p")))
{
Portable = true;
Debug("Program executed with the --portable flag which removes the need for Python and the esptool module" +
" and instead uses a precompiled (outdated) copy of the esptool.", Event.Warning);
Debug("You are warned that using untrusted executables not provided by N2D22 exposes your computer system" +
" to security risks. It's recommended that you do not use this mode and instead use the Python utility.", Event.Warning);
if (!File.Exists("esptool.exe"))
{
Debug("Could not find a matching file for esptool.exe in the current working directory.", Event.Critical);
OpenFileDialog fileDialog = new OpenFileDialog()
{
Multiselect = false,
SupportMultiDottedExtensions = true,
Filter = "Executable files (*.exe)|*.exe|All files (*.*)|*.*",
replacedle = "Browse for esptool binary",
};
if (fileDialog.ShowDialog() == DialogResult.OK)
Settings.EsptoolExe = fileDialog.FileName;
else
Terminate();
}
else
Settings.EsptoolExe = "esptool.exe";
}
Application.ThreadException += (s, e) =>
{
Debug("threadexception", e.Exception.ToString(), Event.Critical);
MainWindow.Instance.Invoke(new Action(() =>
{
MessageBox.Show($"{e.Exception.Message}\nThe application will terminate immediately.", "Unexpected Error",
MessageBoxButtons.OK, MessageBoxIcon.Error);
Terminate();
}));
};
AppDomain.CurrentDomain.UnhandledException += (s, e) =>
{
Debug("appdomain", e.ExceptionObject.ToString(), Event.Critical);
MainWindow.Instance.Invoke(new Action(() =>
{
MessageBox.Show($"{(e.ExceptionObject as Exception).Message}\nThe application will terminate immediately.", "Unexpected Error",
MessageBoxButtons.OK, MessageBoxIcon.Error);
Terminate();
}));
};
if (!argv.Any(o => o.Contains("--debugyes") || o.Contains("-dyes")) && DebugMode)
{
Debug("[WARN] Do not close this debugging window, doing so will prevent logging " +
"to the disk and may cause unintended behaviour.", Event.Critical);
Debug("If you wish to hide this window, please run N2D22 without the --debug flag.", Event.Warning);
string conf = string.Empty;
do
{
Console.Write("Please type \"understood\" without the quotes to continue: ");
conf = Console.ReadLine();
}
while (conf != "understood");
Debug("To debug faster, simply append 'yes' to the --debug flag i.e. \"--debugyes\" to skip the confirmation.", Event.Success);
Console.Write("Press any key to continue . . .");
Console.ReadKey();
}
Debug("Creating MainWindow");
Application.Run(new MainWindow());
Debug("Window destroyed. Exiting", Event.Critical);
if (argv.Any(o => o.Contains("--debug") || o.Contains("-d")))
NativeMethods.FreeConsole();
Terminate();
}
19
View Source File : Program.cs
License : MIT License
Project Creator : aaaddress1
License : MIT License
Project Creator : aaaddress1
[STAThread]
static void Main(string[] args)
{
Application.EnableVisualStyles();
Application.SetCompatibleTextRenderingDefault(false);
mainUi = new UI();
if (args.Length > 0)
mainUi.srcPath = args[0];
Application.Run(mainUi);
}
19
View Source File : WaitMessage.cs
License : MIT License
Project Creator : aabiryukov
License : MIT License
Project Creator : aabiryukov
[System.Diagnostics.Codereplacedysis.SuppressMessage("Microsoft.Reliability", "CA2000:Dispose objects before losing scope")]
private void FormThreadMethod()
{
// Wait 1 sec before show window
for(var i = 0; i < 10; ++i)
{
Thread.Sleep(100);
if (m_closing)
return;
}
lock (m_formLock)
{
if (m_closing)
return;
m_form = new WaitMessageForm(m_onCancel)
{
Message = m_text,
TopLevel = true
};
if (!m_form.IsHandleCreated)
{
// This call forces creation of the control's handle.
var handle = m_form.Handle;
System.Diagnostics.Trace.WriteLine("WaitMessageForm.Handle=" + handle);
}
}
try
{
Application.Run(m_form);
}
finally
{
lock (m_formLock)
{
m_form.Dispose();
m_form = null;
}
}
}
19
View Source File : Program.cs
License : MIT License
Project Creator : aabiryukov
License : MIT License
Project Creator : aabiryukov
[STAThread]
static void Main()
{
Application.EnableVisualStyles();
Application.SetCompatibleTextRenderingDefault(false);
Application.Run(new MainForm());
}
19
View Source File : Program.cs
License : MIT License
Project Creator : AbdisamadMoh
License : MIT License
Project Creator : AbdisamadMoh
[STAThread]
static void Main()
{
Application.EnableVisualStyles();
Application.SetCompatibleTextRenderingDefault(false);
Application.Run(new Form1());
}
19
View Source File : Program.cs
License : MIT License
Project Creator : ABN-SFLookupTechnicalSupport
License : MIT License
Project Creator : ABN-SFLookupTechnicalSupport
[STAThread]
static void Main() {
Application.EnableVisualStyles();
Application.SetCompatibleTextRenderingDefault(false);
Application.Run(new FormAbnLookup());
}
19
View Source File : Program.cs
License : MIT License
Project Creator : Abneed
License : MIT License
Project Creator : Abneed
[STAThread]
static void Main()
{
Application.EnableVisualStyles();
Application.SetCompatibleTextRenderingDefault(false);
Application.Run(new FormMain());
}
19
View Source File : Program.cs
License : MIT License
Project Creator : ABTSoftware
License : MIT License
Project Creator : ABTSoftware
[STAThread]
static void Main()
{
// TODO SET YOUR LICENSE KEY HERE
SciChartSurface.SetRuntimeLicenseKey(@"TODO SET KEY HERE");
Application.EnableVisualStyles();
Application.SetCompatibleTextRenderingDefault(false);
Application.Run(new Form1());
}
19
View Source File : Program.cs
License : MIT License
Project Creator : ACBrNet
License : MIT License
Project Creator : ACBrNet
[STAThread]
static void Main()
{
Application.EnableVisualStyles();
Application.SetCompatibleTextRenderingDefault(false);
Application.Run(new FrmMain());
}
19
View Source File : Program.cs
License : Microsoft Public License
Project Creator : achimismaili
License : Microsoft Public License
Project Creator : achimismaili
[STAThread]
static void Main()
{
if (SPFarm.Local == null)
{
string msg = "Cannot find local SharePoint Farm. "
+ "Either this account has not enough access to the SharePoint config db"
+ " (dbReader is not sufficient, dbOwner is recommended)"
+ " or SharePoint " + spver.SharePointVersion
+ " is not installed on this machine. "
+ " FeatureAdmin will close now.";
MessageBox.Show(msg);
return;
}
// We could also check SPFarm.Local.CurrentUserIsAdministrator(true)
// but it seems that non-farm admins are already trapped by SPFarm.Local == null
Application.EnableVisualStyles();
Application.SetCompatibleTextRenderingDefault(false);
Application.Run(new FrmMain());
}
19
View Source File : Program.cs
License : BSD 3-Clause "New" or "Revised" License
Project Creator : ActuarialIntelligence
License : BSD 3-Clause "New" or "Revised" License
Project Creator : ActuarialIntelligence
[STAThread]
static void Main()
{
Application.EnableVisualStyles();
Application.SetCompatibleTextRenderingDefault(false);
Application.Run(new Main());
}
19
View Source File : Program.cs
License : GNU General Public License v3.0
Project Creator : AdamWhiteHat
License : GNU General Public License v3.0
Project Creator : AdamWhiteHat
[STAThread]
static void Main()
{
Application.EnableVisualStyles();
Application.SetCompatibleTextRenderingDefault(false);
Application.ThreadException += Application_ThreadException;
Application.SetUnhandledExceptionMode(UnhandledExceptionMode.CatchException);
AppDomain.CurrentDomain.UnhandledException += CurrentDomain_UnhandledException;
Application.Run(new MainForm());
}
19
View Source File : Program.cs
License : The Unlicense
Project Creator : ADeltaX
License : The Unlicense
Project Creator : ADeltaX
[STAThread]
static void Main()
{
Application.EnableVisualStyles();
Application.SetCompatibleTextRenderingDefault(false);
var form = new Form1();
form.Width = 609;
form.Height = 639;
Application.Run(form);
}
19
View Source File : Program.cs
License : GNU General Public License v3.0
Project Creator : Aekras1a
License : GNU General Public License v3.0
Project Creator : Aekras1a
[STAThread]
private static void Main(string[] args)
{
KoiInfo.Init();
Application.EnableVisualStyles();
Application.SetCompatibleTextRenderingDefault(false);
Application.Run(new ConfigWindow());
}
19
View Source File : Program.cs
License : MIT License
Project Creator : Aemony
License : MIT License
Project Creator : Aemony
[STAThread]
static void Main()
{
Application.EnableVisualStyles();
Application.SetCompatibleTextRenderingDefault(false);
Application.Run(new FormSteamID64Editor());
}
19
View Source File : Program.cs
License : MIT License
Project Creator : Aeroblast
License : MIT License
Project Creator : Aeroblast
static void ReadBook(string bookPath)
{
try
{
epub = new EpubFile(bookPath);
}
catch (System.IO.IOException)
{
MessageBox.Show("该文件无法打开,可能已被其他程序打开:" + bookPath);
return;
}
catch (EreplacedrrorException e)
{
MessageBox.Show("读取EPUB时发生错误:" + bookPath + "\n" + e.Message);
return;
}
try
{
TocManage.Parse();
}
catch (EreplacedrrorException e)
{
Console.WriteLine(e.Message);
}
UserSettings.ReadSettings();
var settings = new CefSettings();
if (epub.language != "")
settings.Locale = Util.TrimLanguageCode(epub.language);
settings.RegisterScheme(new CefCustomScheme
{
SchemeName = "aeroepub",
SchemeHandlerFactory = new AeroEpubSchemeHandlerFactory()
});
settings.CachePath = cachePath;
Cef.Initialize(settings);
Cef.EnableHighDPISupport();
Application.Run(new EpubViewer());
}
19
View Source File : Program.cs
License : GNU General Public License v3.0
Project Creator : aerdogan
License : GNU General Public License v3.0
Project Creator : aerdogan
[STAThread]
static void Main()
{
Application.EnableVisualStyles();
Application.SetCompatibleTextRenderingDefault(false);
Application.Run(new FrmMain());
}
19
View Source File : Program.cs
License : GNU General Public License v3.0
Project Creator : aerdogan
License : GNU General Public License v3.0
Project Creator : aerdogan
[STAThread]
static void Main()
{
Application.EnableVisualStyles();
Application.SetCompatibleTextRenderingDefault(false);
Application.Run(new FrmRedis());
}
19
View Source File : Program.cs
License : Apache License 2.0
Project Creator : aequabit
License : Apache License 2.0
Project Creator : aequabit
[STAThread]
static void Main()
{
/**
* Check if the loader is already running.
*/
bool result;
var mutex = new System.Threading.Mutex(true, "tcp-moe-client", out result);
if (!result)
{
UI.MsgBox.Show("Only one instance of tcp-moe can be running at a time.", "Only one instance", MessageBoxIcon.Error);
return;
}
/**
* Load the embedded replacedemblies.
*/
AppDomain.CurrentDomain.replacedemblyResolve += new ResolveEventHandler(CurrentDomain_replacedemblyResolve);
Embeddedreplacedembly.Load("tcp_moe_client.replacedemblies.Newtonsoft.Json.dll", "Newtonsoft.Json.dll");
Application.EnableVisualStyles();
Application.SetCompatibleTextRenderingDefault(false);
var worker = new Clreplacedes.Worker();
Application.Run(worker.Satisfy());
}
19
View Source File : Program.cs
License : GNU General Public License v3.0
Project Creator : AgentRev
License : GNU General Public License v3.0
Project Creator : AgentRev
[STAThread]
static void Main()
{
#if !DEBUG
try
{
#endif
Application.EnableVisualStyles();
Application.SetCompatibleTextRenderingDefault(false);
Application.Run(new MainForm());
#if !DEBUG
}
catch (Exception e)
{
MessageBox.Show(e.ToString() + "\n\n\nPlease take a screenshot of this error and send it to [email protected]\n\nThe application will now close.", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
}
#endif
}
19
View Source File : Program.cs
License : GNU General Public License v3.0
Project Creator : AgentRev
License : GNU General Public License v3.0
Project Creator : AgentRev
[STAThread]
static void Main()
{
try
{
Application.EnableVisualStyles();
Application.SetCompatibleTextRenderingDefault(false);
Application.Run(new MainForm());
}
catch (Exception e)
{
MessageBox.Show(e.ToString() + "\n\n\nThe application will now close.", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
}
}
19
View Source File : Program.cs
License : GNU General Public License v3.0
Project Creator : AgentRev
License : GNU General Public License v3.0
Project Creator : AgentRev
[STAThread]
static void Main()
{
try
{
Application.EnableVisualStyles();
Application.SetCompatibleTextRenderingDefault(false);
Application.Run(new MainForm());
}
catch (Exception e)
{
MessageBox.Show(e.ToString() + "\n\n\nPlease take a screenshot of this error and send it to [email protected]\n\nThe application will now close.", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
}
}
19
View Source File : Program.cs
License : GNU General Public License v3.0
Project Creator : aglab2
License : GNU General Public License v3.0
Project Creator : aglab2
[STAThread]
static void Main()
{
AppDomain.CurrentDomain.replacedemblyResolve += CurrentDomain_replacedemblyResolve;
Application.EnableVisualStyles();
Application.SetCompatibleTextRenderingDefault(false);
Application.Run(new Form1());
}
19
View Source File : Program.cs
License : GNU General Public License v3.0
Project Creator : aglab2
License : GNU General Public License v3.0
Project Creator : aglab2
[STAThread]
static void Main()
{
Application.EnableVisualStyles();
Application.SetCompatibleTextRenderingDefault(false);
Application.ThreadException += new ThreadExceptionEventHandler(Form1_UIThreadException);
Application.SetUnhandledExceptionMode(UnhandledExceptionMode.CatchException);
AppDomain.CurrentDomain.UnhandledException += new UnhandledExceptionEventHandler(CurrentDomain_UnhandledException);
AppDomain.CurrentDomain.replacedemblyResolve += CurrentDomain_replacedemblyResolve;
Application.Run(new MainWindow());
Environment.Exit(Environment.ExitCode);
}
19
View Source File : Mappalachia.cs
License : GNU General Public License v3.0
Project Creator : AHeroicLlama
License : GNU General Public License v3.0
Project Creator : AHeroicLlama
[STAThread]
static void Main()
{
try
{
Application.EnableVisualStyles();
Application.SetCompatibleTextRenderingDefault(false);
Application.Run(new FormMaster());
}
catch (Exception e)
{
Notify.Error("Mappalachia encountered an unexpected error and must close.\n" +
IOManager.genericExceptionHelpText +
e);
IOManager.Cleanup();
// Choosing to not save settings, since we just crashed it's likely safer to not keep them.
}
}
19
View Source File : Program.cs
License : GNU General Public License v3.0
Project Creator : ahmed605
License : GNU General Public License v3.0
Project Creator : ahmed605
[STAThread]
static void Main(string[] args)
{
Application.EnableVisualStyles();
Application.SetCompatibleTextRenderingDefault(false);
/*
Version envVer = Environment.Version;
if (envVer.Major <= 2 && envVer.Revision < 1435) // 2.0 SP1 (http://en.wikipedia.org/wiki/.NET_Framework_version_list)
{
MessageBox.Show("It appears that you are not running the latest version of the .NET Framework.\n\n" +
"SparkIV requires that you atleast have both .NET Framework 2.0 SP1 and 3.0 installed. " +
"Alternatively an install of .NET Framework 3.5 will install both these components.",
"Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
return;
}
*/
Application.Run(new MainForm());
}
19
View Source File : Program.cs
License : MIT License
Project Creator : ahm3tcelik
License : MIT License
Project Creator : ahm3tcelik
[STAThread]
static void Main()
{
Application.EnableVisualStyles();
Application.SetCompatibleTextRenderingDefault(false);
Application.Run(new frmLogin());
}
19
View Source File : Program.cs
License : GNU General Public License v3.0
Project Creator : AHosseinRnj
License : GNU General Public License v3.0
Project Creator : AHosseinRnj
[STAThread]
static void Main()
{
Application.EnableVisualStyles();
Application.SetCompatibleTextRenderingDefault(false);
Application.Run(new Dashboard());
}
19
View Source File : Program.cs
License : GNU General Public License v3.0
Project Creator : aiportal
License : GNU General Public License v3.0
Project Creator : aiportal
[STAThread]
static void Main(string[] args)
{
//DebugFunc();
bool single = false;
using (var mutex = new System.Threading.Mutex(true, "RecordAgent", out single))
{
if (!single)
return;
}
Application.ThreadException += (o, ev) => { bfbd.TraceLogger.Instance.WriteException(ev.Exception); };
AppDomain.CurrentDomain.UnhandledException += (o, ev) => { bfbd.TraceLogger.Instance.WriteException(ev.ExceptionObject as Exception); };
string sessionId = args.Length > 0 ? args[0] : null;
Application.EnableVisualStyles();
Application.SetCompatibleTextRenderingDefault(false);
Application.Run(new bfbd.UltraRecord.Core.RawInputApp() { SessionId = sessionId });
}
19
View Source File : Program.cs
License : MIT License
Project Creator : ajohns6
License : MIT License
Project Creator : ajohns6
[STAThread]
static void Main()
{
Application.EnableVisualStyles();
Application.SetCompatibleTextRenderingDefault(false);
Application.Run(new mainForm());
}
See More Examples