示例#1
0
        public MainForm(MainFormController controller)
        {
            InitializeComponent();

            this.elementHost.Child = new DiagramViewer();

            mainController = controller;
            mainController.Initialize(this);
            AssemblyTree = new DTreeNode<DTreeItem>();
        }
示例#2
0
        private static void RunConsole(MainFormController controller, CommandLineArguments args)
        {
            if (args == null)
            {
                throw new ArgumentNullException("args");
            }

            AppDomain.CurrentDomain.UnhandledException += CurrentDomainOnUnhandledException;

            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);
            Application.Run(new ConsoleView(controller, args));
        }
示例#3
0
        public ConsoleView(MainFormController controller, CommandLineArguments args)
        {
            this.InitializeComponent();
            this.Visible = false;

            this.Controller = controller;
            this._assemblyName = args.AssemblyName;
            this.TypeName = args.TypeName;
            this.DestinationPath = args.DestinationPath;

            // Override config settings.
            Settings.OutputType = args.OutputType;
            Settings.IncludeAssemblyReferences = args.IncludeReferenceAssemblies;

            this.Controller.Initialize(this);
        }
示例#4
0
        private static void Run(string[] args)
        {
            var controller = new MainFormController();
            bool consoleOnly = false;

            if (args.Length > 0)
            {
                CommandLineArguments cla = CommandLineArguments.ParseArguments(args);
                if (cla != null)
                {
                    RunConsole(controller, cla);
                }

                consoleOnly = CommandLineArguments.ConsoleOnly;
            }

            if (!consoleOnly)
            {
                RunGUI(controller);
            }
        }
示例#5
0
 private static void RunGUI(MainFormController controller)
 {
     Application.EnableVisualStyles();
     Application.SetCompatibleTextRenderingDefault(false);
     Application.Run(new MainForm(controller));
 }