Ejemplo n.º 1
0
        public Color get_color_address(string colorLocation, string addr_type, Color def)
        {
            Color found = Color.FromName(
                config.load <Color>(
                    string.Format("gui.output.{0}.{1}", colorLocation, addr_type), "pink")
                );

            if (found == Color.FromName("pink"))
            {
                return(def);
            }
            return(found);
        }
Ejemplo n.º 2
0
 private void UpdateGUI(string args = null)
 {
     updating_gui        = true;
     tabcontrol          = tabControl1;
     Left                = int.Parse(rconfig.load <int>("gui.left"));
     Top                 = int.Parse(rconfig.load <int>("gui.top"));
     Width               = int.Parse(rconfig.load <int>("gui.width"));
     Height              = int.Parse(rconfig.load <int>("gui.height"));
     txtOutput.BackColor = Color.FromName(rconfig.load <string>("gui.output.bg", "blue"));
     txtOutput.ForeColor = Color.FromName(rconfig.load <string>("gui.output.fg", "white"));
     listView1.BackColor = txtOutput.BackColor;
     listView1.ForeColor = txtOutput.ForeColor;
     splitContainer1.Panel1.BackColor = txtOutput.BackColor;
     splitContainer1.SplitterDistance = int.Parse(rconfig.load <int>("gui.splitter_1.dist"));
     splitContainer2.SplitterDistance = int.Parse(rconfig.load <int>("gui.splitter_2.dist"));
     updating_gui = false;
     Refresh();
 }
Ejemplo n.º 3
0
        public themeManager(RConfig config)
        {
            this.config = config;
            string themeName = config.load <string>("gui.theme_name");

            if (themeName != null)
            {
                set_theme(themeName);
            }
        }
Ejemplo n.º 4
0
 // r2pipe gui commands wrapper
 public R2PIPE_WRAPPER(RConfig rconfig, Form1 frm)
 {
     this.rconfig          = rconfig;
     this.guicontrol       = frm;
     this.tabcontrol       = ((Form1)frm).tabcontrol;
     this.theme_manager    = new themeManager(rconfig);
     this.controls         = new Dictionary <string, object>();
     this.decorators_cb    = new Dictionary <string, Func <string> >();
     this.decorators_names = new Dictionary <string, List <string> >();
     this.shellopts_cb     = new Dictionary <string, Func <string> >();
     this.cached_results   = new Dictionary <string, string>();
     this.current_shell    =
         rconfig.load <string>("gui.current_shell", "radare");
     //new Hotkeys();
 }
Ejemplo n.º 5
0
        public void UpdateGUI(string args = null)
        {
            Color backColor;
            Color foreColor;

            updating_gui                     = true;
            tabcontrol                       = tabControl1;
            currentShell                     = rconfig.load <string>("gui.current_shell", "radare2");
            themeName                        = rconfig.load <string>("gui.theme_name", "default");
            backColor                        = Color.FromName(rconfig.load <string>("gui.output.bg", "blue"));
            foreColor                        = Color.FromName(rconfig.load <string>("gui.output.fg", "white"));
            Left                             = int.Parse(rconfig.load <int>("gui.left", Left));
            Top                              = int.Parse(rconfig.load <int>("gui.top", Top));
            Width                            = int.Parse(rconfig.load <int>("gui.width", Width));
            Height                           = int.Parse(rconfig.load <int>("gui.height", Height));
            BackColor                        = backColor;
            mainMenu.BackColor               = backColor;
            mainMenu.ForeColor               = foreColor;
            tabControl1.BackColor            = backColor;
            tabControl1.ForeColor            = foreColor;
            statusStrip1.BackColor           = backColor;
            statusStrip1.ForeColor           = foreColor;
            cmbCmdline.BackColor             = backColor;
            cmbCmdline.ForeColor             = foreColor;
            txtOutput.BackColor              = backColor;
            txtOutput.ForeColor              = foreColor;
            listView1.BackColor              = backColor;
            listView1.ForeColor              = foreColor;
            lstStrings.BackColor             = backColor;
            lstStrings.ForeColor             = foreColor;
            lstImports.BackColor             = BackColor;
            lstImports.ForeColor             = foreColor;
            lstSections.BackColor            = backColor;
            lstSections.ForeColor            = foreColor;
            splitContainer1.Panel1.BackColor = backColor;
            splitContainer1.SplitterDistance = int.Parse(rconfig.load <int>("gui.splitter_1.dist", splitContainer1.SplitterDistance));
            splitContainer2.SplitterDistance = int.Parse(rconfig.load <int>("gui.splitter_2.dist", splitContainer2.SplitterDistance));
            slabelTheme.Text                 = themeName + " theme";
            button1.Text                     = currentShell;
            Refresh();
            updating_gui = false;
        }