예제 #1
0
        private static int Init(IList<string> args)
        {
            string layout = null;
            var p = new OptionSet() {
                { "-l|layout=", v => layout = v },
            };

            Driver d = new Driver ();

            try {

                List<string> extra = p.Parse(args);

                if (extra.Count < 1)
                {
                    Console.WriteLine("manos [--layout=<LayoutName>] --init <AppName>");
                    Console.WriteLine("This will initialize a new application with the supplied name.");
                }

                if (layout == null)
                    layout = "default";
                string appname = extra[0];

                Console.WriteLine("initing: {0} with layout {1}", appname, layout);

                InitCommand initer = new InitCommand(Environment, appname);
                initer.Layout = layout;

                initer.Run();
            }
            catch (Exception e)
            {
                Console.WriteLine ("error while initializing application:");
                Console.WriteLine (e);
                return 1;
            }

            return 0;
        }
예제 #2
0
파일: Driver.cs 프로젝트: JoergEg/manos
        public void Init(string name)
        {
            InitCommand initer = new InitCommand (Environment, name);

            initer.Run ();
        }
예제 #3
0
        public void Init(string name)
        {
            InitCommand initer = new InitCommand(Environment, name);

            initer.Run();
        }