Пример #1
0
        private void DrawHeader()
        {
            int position = 0;

            ConsoleBasicDraw.DrawFlatText(this.FrameTitle, position,
                                          ConsoleColor.DarkMagenta, ConsoleColor.White);
        }
Пример #2
0
        public override bool Manager()
        {
            ConsoleBasicDraw.DrawFlatText("Write path to DLL/EXE: ", Console.CursorTop, ConsoleColor.DarkGray,
                                          ConsoleColor.Black);

            string path = null;

            while (String.IsNullOrEmpty(path) || !File.Exists(path))
            {
                path = Console.ReadLine();

                if (!File.Exists(path))
                {
                    ConsoleBasicDraw.DrawFlatText("File not found, try again: ", Console.CursorTop, ConsoleColor.DarkGray,
                                                  ConsoleColor.DarkGray);
                }
            }

            Assembly assembly = Assembly.LoadFrom(path);

            if (assembly != null)
            {
                BaseFrame childFrame = new AssemblyFrame(assembly);
                childFrame.Run();
            }

            return(true);
        }
Пример #3
0
        public override void DrawContent()
        {
            ConsoleBasicDraw.DrawFlatText(MainFrame.GetCurrentAssemblyInfo(), 0, ConsoleColor.White, ConsoleColor.Black);
            string helpText = "Yeaaaaah.";

            ConsoleBasicDraw.DrawFlatText(helpText, 1, ConsoleColor.White, ConsoleColor.Black);
        }
Пример #4
0
        private void DrawListBox(string header, string[] values)
        {
            ConsoleBasicDraw.DrawFlatText(header, Console.CursorTop, ConsoleColor.DarkMagenta,
                                          ConsoleColor.White);
            ConsoleListBox listBox = new ConsoleListBox(values, Console.CursorTop + 1,
                                                        ConsoleColor.White, ConsoleColor.DarkBlue);

            listBox.DrawElements();
        }
Пример #5
0
        public override bool Manager()
        {
            ConsoleBasicDraw.DrawFlatText("Types", Console.CursorTop, ConsoleColor.DarkMagenta,
                                          ConsoleColor.White);

            string[] types   = MetaExplorer.GetTypes(this.module);
            var      listBox = ConsoleListBox.FirstBreakItemFactory(
                types, Console.CursorTop + 1,
                ConsoleColor.White, ConsoleColor.DarkBlue);

            listBox.MakeUserChoose();
            if (listBox.SelectedIndex > 0)
            {
                this.RunNext(listBox.SelectedIndex - 1);
                return(true);
            }

            return(false);
        }
Пример #6
0
        public override bool Manager()
        {
            string[] constructors = MetaExplorer.GetConstructors(this.type);
            this.DrawListBox("Constructors", constructors);
            string[] fields = MetaExplorer.GetFields(this.type);
            this.DrawListBox("Fields", fields);
            string[] properties = MetaExplorer.GetProperties(this.type);
            this.DrawListBox("Properties", properties);
            string[] methods = MetaExplorer.GetMethods(this.type);
            this.DrawListBox("Methods", methods);
            string[] events = MetaExplorer.GetEvents(this.type);
            this.DrawListBox("Events", events);

            ConsoleBasicDraw.DrawFlatBox(Console.CursorTop, 2, ConsoleColor.White);
            ConsoleBasicDraw.DrawFlatText("Press any key to go back.", Console.CursorTop, ConsoleColor.Blue,
                                          ConsoleColor.White);

            Console.ReadKey();
            return(false);
        }
Пример #7
0
        public override bool Manager()
        {
            ConsoleBasicDraw.DrawFlatText("Modules:", Console.CursorTop, ConsoleColor.DarkMagenta,
                                          ConsoleColor.White);

            string[] modules = MetaExplorer.GetModules(this.assembly);
            var      listBox = ConsoleListBox.FirstBreakItemFactory(
                modules, Console.CursorTop + 1,
                ConsoleColor.White, ConsoleColor.DarkBlue);

            listBox.MakeUserChoose();
            if (listBox.SelectedIndex != 0)
            {
                Module    module     = assembly.GetModule(listBox.Selected);
                BaseFrame childFrame = new ModuleFrame(module);
                childFrame.Run();
                return(true);
            }

            return(false);
        }