示例#1
0
文件: Main.cs 项目: ox1111/HexEditor
        private void NOTMenuItem_Click(object sender, EventArgs e)
        {
            HexView  Current  = (HexView)this.Tabs.SelectedTab.Tag;
            Document Document = Current.Document;

            this.Workspace.OpenDocument(Document.Name + " >  NOT", new NOTDataSource(Document.DataSource));
        }
示例#2
0
文件: Main.cs 项目: ox1111/HexEditor
        private void Workspace_DocumentAdded(Workspace Workspace, Document Document)
        {
            this.Tabs.TabPages.Add(Document.Name);
            this.Tabs.SelectedIndex = this.Tabs.TabCount - 1;

            TabPage Tab  = this.Tabs.TabPages[this.Tabs.TabCount - 1];
            HexView View = new HexView(Document);

            View.Visible = false;
            View.Anchor  = AnchorStyles.Left | AnchorStyles.Right | AnchorStyles.Top | AnchorStyles.Bottom;
            View.Dock    = DockStyle.Fill;
            View.Parent  = Tab;
            View.Visible = true;
            Tab.Tag      = View;

            View.SelectionChanged += delegate(HexView HexView)
            {
                this.DataInterpreterView.Items.Clear();
                foreach (IDataInterpreter DataInterpreter in this.DataInterpreters)
                {
                    try
                    {
                        this.DataInterpreterView.Items.Add(DataInterpreter.Name).SubItems.Add(DataInterpreter.Interpret(HexView.Document.DataSource, (ulong)HexView.SelectionEnd));
                    }
                    catch
                    {
                        this.DataInterpreterView.Items.Add(DataInterpreter.Name).SubItems.Add("<error>");
                    }
                }

                long Address = HexView.SelectionEnd;
                this.AddressStatusPanel.Text = "Address: " + Address.ToString("x") + " (" + Address.ToString() + ")";
            };
        }
示例#3
0
文件: Main.cs 项目: ox1111/HexEditor
        private void SubstringMenuItem_Click(object sender, EventArgs e)
        {
            HexView  Current  = (HexView)this.Tabs.SelectedTab.Tag;
            Document Document = Current.Document;

            this.Workspace.OpenDocument(Document.Name + " > sub", new SubstringDataSource(Document.DataSource, Current.SelectionEnd));
        }