2016-12-25 21:43:22 +03:00
|
|
|
|
using System;
|
|
|
|
|
using System.Collections.Generic;
|
|
|
|
|
using System.Linq;
|
2017-01-26 23:40:46 +03:00
|
|
|
|
using System.Threading;
|
|
|
|
|
using System.Threading.Tasks;
|
2016-12-25 21:43:22 +03:00
|
|
|
|
using System.Windows.Forms;
|
2017-01-26 23:40:46 +03:00
|
|
|
|
using System.IO;
|
|
|
|
|
using System.Reflection;
|
2016-12-25 21:43:22 +03:00
|
|
|
|
using System.Globalization;
|
2017-01-26 23:40:46 +03:00
|
|
|
|
|
2017-04-17 19:06:29 +03:00
|
|
|
|
using NAudio.Wave;
|
2016-12-25 21:43:22 +03:00
|
|
|
|
|
|
|
|
|
namespace CsbBuilder
|
|
|
|
|
{
|
2017-01-26 23:40:46 +03:00
|
|
|
|
static class Program
|
2016-12-25 21:43:22 +03:00
|
|
|
|
{
|
2017-01-26 23:40:46 +03:00
|
|
|
|
public static string ProjectsPath
|
2016-12-25 21:43:22 +03:00
|
|
|
|
{
|
2017-01-26 23:40:46 +03:00
|
|
|
|
get
|
2016-12-25 21:43:22 +03:00
|
|
|
|
{
|
2017-01-26 23:40:46 +03:00
|
|
|
|
return Path.Combine(Path.GetDirectoryName(Application.ExecutablePath), "Projects");
|
2016-12-25 21:43:22 +03:00
|
|
|
|
}
|
2017-01-26 23:40:46 +03:00
|
|
|
|
}
|
2016-12-25 21:43:22 +03:00
|
|
|
|
|
2017-04-23 19:22:25 +03:00
|
|
|
|
public static string ApplicationTitle
|
2017-01-26 23:40:46 +03:00
|
|
|
|
{
|
|
|
|
|
get
|
2016-12-25 21:43:22 +03:00
|
|
|
|
{
|
2017-01-26 23:40:46 +03:00
|
|
|
|
AssemblyName assemblyName = Assembly.GetEntryAssembly().GetName();
|
2017-04-23 19:22:25 +03:00
|
|
|
|
return $"CSB Builder {assemblyName.Version.ToString()}";
|
2016-12-25 21:43:22 +03:00
|
|
|
|
}
|
2017-01-26 23:40:46 +03:00
|
|
|
|
}
|
2016-12-25 21:43:22 +03:00
|
|
|
|
|
2017-01-26 23:40:46 +03:00
|
|
|
|
/// <summary>
|
|
|
|
|
/// The main entry point for the application.
|
|
|
|
|
/// </summary>
|
|
|
|
|
[STAThread]
|
|
|
|
|
static void Main(string[] args)
|
|
|
|
|
{
|
|
|
|
|
Thread.CurrentThread.CurrentUICulture = CultureInfo.GetCultureInfo("en-US");
|
|
|
|
|
Application.ThreadException += OnException;
|
|
|
|
|
Application.EnableVisualStyles();
|
|
|
|
|
Application.SetCompatibleTextRenderingDefault(false);
|
|
|
|
|
Application.Run(new MainForm());
|
2016-12-25 21:43:22 +03:00
|
|
|
|
}
|
|
|
|
|
|
2017-01-26 23:40:46 +03:00
|
|
|
|
private static void OnException(object sender, ThreadExceptionEventArgs e)
|
2016-12-25 21:43:22 +03:00
|
|
|
|
{
|
2017-01-26 23:40:46 +03:00
|
|
|
|
new ExceptionForm(e.Exception).ShowDialog();
|
2017-09-17 13:02:44 +03:00
|
|
|
|
|
|
|
|
|
if (MessageBox.Show("Do you want to continue?", "CSB Builder", MessageBoxButtons.YesNo, MessageBoxIcon.Question) != DialogResult.OK)
|
|
|
|
|
{
|
|
|
|
|
Application.Exit();
|
|
|
|
|
}
|
2016-12-25 21:43:22 +03:00
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|