本文整理汇总了C#中Multiverse.Tools.WorldEditor.WorldEditor.Start方法的典型用法代码示例。如果您正苦于以下问题:C# WorldEditor.Start方法的具体用法?C# WorldEditor.Start怎么用?C# WorldEditor.Start使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Multiverse.Tools.WorldEditor.WorldEditor
的用法示例。
在下文中一共展示了WorldEditor.Start方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Main
static void Main(string[] args)
{
try
{
String execDir = Application.ExecutablePath.Substring(0, Application.ExecutablePath.LastIndexOf(System.IO.Path.DirectorySeparatorChar));
Directory.SetCurrentDirectory(execDir);
// Changes the CurrentCulture of the current thread to the invariant culture.
Thread.CurrentThread.CurrentCulture = new CultureInfo("", false);
int processor = 1;
foreach (ProcessThread thread in Process.GetCurrentProcess().Threads)
{
thread.ProcessorAffinity = (IntPtr)processor;
}
if (!Directory.Exists(ConfigFolder))
Directory.CreateDirectory(ConfigFolder);
if (!Directory.Exists(LogFolder))
Directory.CreateDirectory(LogFolder);
LogUtil.InitializeLogging(Path.Combine(ConfigFolder, "LogConfig.xml"), "DefaultLogConfig.xml", FallbackLogfile);
WorldEditor worldEditor = new WorldEditor();
List<string> log = RepositoryClass.Instance.CheckForValidRepository();
if (log.Count != 0)
return;
if (worldEditor.Quit)
{
return;
}
if (args.Length > 0) {
ProcessArgs(args, worldEditor);
}
worldEditor.Show();
worldEditor.Start(args);
}
catch (Exception ex)
{
// try logging the error here first, before Root is disposed of
LogUtil.ExceptionLog.Error(ex.ToString());
throw;
}
}