Ejemplo n.º 1
0
        public Control CreateControl()
        {
            var uiPrefsSvc = services.RequireService<IUiPreferencesService>();

            this.codeView = new CodeView();
            this.codeView.Dock = DockStyle.Fill;
            this.TextView.Font = uiPrefsSvc.DisassemblerFont ?? new Font("Lucida Console", 10F);
            this.TextView.BackColor = SystemColors.Window;

            this.TextView.ContextMenu = services.RequireService<IDecompilerShellUiService>().GetContextMenu(MenuIds.CtxCodeView);

            this.TextView.Styles.Add("kw", new EditorStyle
            {
                Foreground = new SolidBrush(Color.Blue),
            });
            this.TextView.Styles.Add("link", new EditorStyle
            {
                Foreground = new SolidBrush(Color.FromArgb(0x00, 0x80, 0x80)),
                Cursor = Cursors.Hand,
            });
            this.TextView.Styles.Add("cmt", new EditorStyle
            {
                Foreground = new SolidBrush(Color.FromArgb(0x00, 0x80, 0x00)),
            });
            this.TextView.Styles.Add("type", new EditorStyle
            {
                Foreground = new SolidBrush(Color.FromArgb(0x00, 0x60, 0x60)),
            });

            this.TextView.Navigate += textView_Navigate;
            return this.codeView;
        }
Ejemplo n.º 2
0
        public Control CreateControl()
        {
            var uiPrefsSvc = services.RequireService<IUiPreferencesService>();

            this.codeView = new CodeView();
            this.codeView.Dock = DockStyle.Fill;
            this.TextView.Font = new Font("Lucida Console", 10F);
            this.TextView.BackColor = SystemColors.Window;

            this.TextView.ContextMenu = services.RequireService<IDecompilerShellUiService>().GetContextMenu(MenuIds.CtxCodeView);

            this.TextView.Navigate += textView_Navigate;
            return this.codeView;
        }
Ejemplo n.º 3
0
        public Control CreateControl()
        {
            var uiPrefsSvc = services.RequireService<IUiPreferencesService>();

            this.codeView = new CodeView();
            this.codeView.Dock = DockStyle.Fill;
            this.codeView.CurrentAddressChanged += codeView_CurrentAddressChanged;
            this.codeView.ProcedureDeclaration.TextChanged += ProcedureDeclaration_TextChanged;

            this.TextView.Font = new Font("Lucida Console", 10F);
            // ###@@@###
            this.TextView.BackColor = SystemColors.Window;
            this.TextView.Services = services;
            this.TextView.StyleClass = UiStyles.CodeWindow;

            this.TextView.ContextMenu = services.RequireService<IDecompilerShellUiService>().GetContextMenu(MenuIds.CtxCodeView);

            this.navInteractor = new NavigationInteractor<Procedure>();
            this.navInteractor.Attach(codeView);
            this.TextView.Navigate += textView_Navigate;
            return this.codeView;
        }
Ejemplo n.º 4
0
 public void Close()
 {
     if (codeView!=null)
         ((Control)codeView).Dispose();
     codeView = null;
 }