示例#1
0
        public static void Main(string[] args)
        {
            Option = new GUIOPtion(args);

            // RootDirが定義されていればカレントディレクトリを設定
            if (string.IsNullOrEmpty(Option.RootDir) == false &&
                Directory.Exists(Option.RootDir))
            {
                Directory.SetCurrentDirectory(Option.RootDir);
            }

            // ログパスを設定
            log4net.GlobalContext.Properties["Root"] = Directory.GetCurrentDirectory();
            log4net.Config.XmlConfigurator.Configure(
                new FileInfo($"{AppContext.BaseDirectory}Log4net.Config.xml"));

            Amatsukaze.App app = new Amatsukaze.App();

            if (Option.LaunchType == LaunchType.Server || Option.LaunchType == LaunchType.Debug)
            {
                app.StartupUri = new Uri("Views\\ServerWindow.xaml", UriKind.Relative);
            }
            else if (Option.LaunchType == LaunchType.Logo)
            {
                app.StartupUri = new Uri("Views\\LogoAnalyzeWindow.xaml", UriKind.Relative);
            }
            else
            {
                app.StartupUri = new Uri("Views\\MainWindow.xaml", UriKind.Relative);
            }

            app.InitializeComponent();
            app.Run();
        }
示例#2
0
        public static void Main(string[] args)
        {
            Option = new GUIOPtion(args);

            Amatsukaze.App app = new Amatsukaze.App();

            if (Option.LaunchType == LaunchType.Server || Option.LaunchType == LaunchType.Debug)
            {
                app.StartupUri = new Uri("Views\\ServerWindow.xaml", UriKind.Relative);
            }
            else
            {
                app.StartupUri = new Uri("Views\\MainWindow.xaml", UriKind.Relative);
            }

            app.InitializeComponent();
            app.Run();
        }