当前位置: 首页>>代码示例>>C#>>正文


C# HexBox类代码示例

本文整理汇总了C#中HexBox的典型用法代码示例。如果您正苦于以下问题:C# HexBox类的具体用法?C# HexBox怎么用?C# HexBox使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


HexBox类属于命名空间,在下文中一共展示了HexBox类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: BinaryViewer

        /// <summary>
        /// Implements a Binary viewer (More Hex-Editor) using the Be.HexBox control
        /// </summary>
        public BinaryViewer(string title, byte[] content)
        {
            InitializeComponent();

            this.Text = title;
            
            HexBox hb = new HexBox();
            hb.Dock = DockStyle.Fill;
            hb.ByteProvider = new MemoryByteProvider(content);
            hb.VScrollBarVisible = true;
            hb.UseFixedBytesPerLine = true;
            hb.StringViewVisible = true;
            this.Controls.Add(hb);
        }
开发者ID:anirnet,项目名称:raf-manager,代码行数:17,代码来源:BinaryViewer.cs

示例2: EditHexEditor

 public EditHexEditor()
 {
     InitializeComponent();
     hexBox = new HexBox();
     hexBox.UseFixedBytesPerLine = true;
     hexBox.LineInfoVisible = true;
     hexBox.VScrollBarVisible = true;
     hexBox.Size = this.ClientSize;
     /*hexBox.GroupSeparatorVisible = true;
     hexBox.GroupSize = 4;*/
     hexBox.Paint += new PaintEventHandler(hexBox_Paint);
     this.Controls.Add(hexBox);
     hexBox.ByteProvider = new DynamicByteProvider(Globals.romdata);
 }
开发者ID:ghostdogtm,项目名称:CadEditor,代码行数:14,代码来源:EditHexEditor.cs

示例3: InsertUsingEncoding

        private void InsertUsingEncoding(Encoding encoding, HexBox _hexbox, bool Multiline)
        {
            PromptBox prompt = new PromptBox(Multiline);

            if (prompt.ShowDialog() == DialogResult.OK)
            {
                byte[] bytes = new byte[prompt.Value.Length * encoding.GetByteCount("A")];

                encoding.GetBytes(prompt.Value, 0, prompt.Value.Length, bytes, 0);

                _hexbox.ByteProvider.DeleteBytes(_hexbox.SelectionStart, _hexbox.SelectionLength);
                _hexbox.ByteProvider.InsertBytes(_hexbox.SelectionStart, bytes);
                _hexbox.Select(_hexbox.SelectionStart, bytes.Length);
            }
        }
开发者ID:andyvand,项目名称:ProcessHacker,代码行数:15,代码来源:UtilitiesButton.cs

示例4: GetControl

 public Control GetControl()
 {
     var provider = new DynamicFileByteProvider(_fileName, true);
     var control = new HexBox
         {
             ByteProvider = provider,
             Dock = DockStyle.Fill,
             GroupSeparatorVisible = false,
             ColumnInfoVisible = true,
             LineInfoVisible = true,
             StringViewVisible = true,
             UseFixedBytesPerLine = true,
             VScrollBarVisible = true,
         };
     return control;
 }
开发者ID:bsimser,项目名称:goldbox,代码行数:16,代码来源:HexFileViewer.cs

示例5: GetControl

 public Control GetControl()
 {
     // TODO can't display GLB files yet so just return the hex viewer for now
     var provider = new DynamicFileByteProvider(_args.Filename, true);
     var control = new HexBox
     {
         ByteProvider = provider,
         Dock = DockStyle.Fill,
         GroupSeparatorVisible = false,
         ColumnInfoVisible = true,
         LineInfoVisible = true,
         StringViewVisible = true,
         UseFixedBytesPerLine = true,
         VScrollBarVisible = true,
     };
     return control;
 }
开发者ID:bsimser,项目名称:goldbox,代码行数:17,代码来源:FruaGlbFileViewer.cs

示例6: InsertNumber

        private void InsertNumber(HexBox _hexbox, int byteCount, bool BigEndian)
        {
            PromptBox prompt = new PromptBox();

            if (prompt.ShowDialog() == DialogResult.OK)
            {
                byte[] bytes = new byte[byteCount];
                long number = (long)BaseConverter.ToNumberParse(prompt.Value);

                for (int i = 0; i < bytes.Length; i++)
                {
                    bytes[BigEndian ? (bytes.Length - i - 1) : i] = (byte)((number >> (i * 8)) & 0xff);
                }

                _hexbox.ByteProvider.DeleteBytes(_hexbox.SelectionStart, _hexbox.SelectionLength);
                _hexbox.ByteProvider.InsertBytes(_hexbox.SelectionStart, bytes);
                _hexbox.Select(_hexbox.SelectionStart, bytes.Length);
            }
        }
开发者ID:andyvand,项目名称:ProcessHacker,代码行数:19,代码来源:UtilitiesButton.cs

示例7: MysteryBox

        public MysteryBox(byte[] data)
        {
            this.data = data;

            tbbExport = new ToolStripButton();
            tbbExport.Text = "Export";
            tbbExport.Click += new EventHandler(tbbExport_Click);

            tsToolbar = new ToolStrip();
            tsToolbar.Dock = DockStyle.Top;
            tsToolbar.Items.Add(tbbExport);

            hbData = new HexBox();
            hbData.Dock = DockStyle.Fill;
            hbData.Data = data;

            Controls.Add(hbData);
            Controls.Add(tsToolbar);
        }
开发者ID:CryZENx,项目名称:CrashEdit,代码行数:19,代码来源:MysteryBox.cs

示例8: ResourceControl

        public ResourceControl()
        {
            SplitContainer mainContainer = new SplitContainer()
            {
                Dock = DockStyle.Fill,
            };
            SplitContainer treeSplitter = new SplitContainer()
            {
                Dock = DockStyle.Fill,
                Orientation = Orientation.Horizontal,
                SplitterDistance = 400,
            };
            resourcesTree = new TreeView()
            {
                Dock = DockStyle.Fill,
            };
            propertyGrid = new PropertyGrid()
            {
                Dock = DockStyle.Fill,
                HelpVisible = false,

            };
            hexBox = new HexBox()
            {
                Dock = DockStyle.Fill,
                StringViewVisible = true,
                LineInfoVisible = true,
                LineInfoForeColor = Color.Blue,
                UseFixedBytesPerLine = true,
                BytesPerLine = 16,
                VScrollBarVisible = true,
            };
            resourcesTree.AfterSelect += resourcesTree_AfterSelect;

            treeSplitter.Panel1.Controls.Add(resourcesTree);
            treeSplitter.Panel2.Controls.Add(propertyGrid);
            mainContainer.Panel1.Controls.Add(treeSplitter);
            mainContainer.Panel2.Controls.Add(hexBox);
            this.Controls.Add(mainContainer);
        }
开发者ID:ntfox,项目名称:AsmResolver,代码行数:40,代码来源:ResourceControl.cs

示例9: InitializeComponent

		/// <summary>
		/// Required method for Designer support - do not modify
		/// the contents of this method with the code editor.
		/// </summary>
		private void InitializeComponent()
		{
			this._hexBox = new Be.Windows.Forms.HexBox();
			this._txtString = new System.Windows.Forms.TextBox();
			this._rbString = new System.Windows.Forms.RadioButton();
			this._rbHex = new System.Windows.Forms.RadioButton();
			this._btnOk = new System.Windows.Forms.Button();
			this._btnCancel = new System.Windows.Forms.Button();
			this.SuspendLayout();
			// 
			// hexBox
			// 
			this._hexBox.Anchor =
				((System.Windows.Forms.AnchorStyles)
					((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
					   | System.Windows.Forms.AnchorStyles.Left)
					  | System.Windows.Forms.AnchorStyles.Right)));
			// 
			// 
			// 
			this._hexBox.BuiltInContextMenu.CopyMenuItemImage = global::Reflexil.Properties.Resources.CopyHS;
			this._hexBox.BuiltInContextMenu.CutMenuItemImage = global::Reflexil.Properties.Resources.CutHS;
			this._hexBox.BuiltInContextMenu.PasteMenuItemImage = global::Reflexil.Properties.Resources.PasteHS;
			this._hexBox.Enabled = false;
			this._hexBox.Font = new System.Drawing.Font("Courier New", 9F);
			this._hexBox.HexCasing = Be.Windows.Forms.HexCasing.Lower;
			this._hexBox.LineInfoForeColor = System.Drawing.Color.Empty;
			this._hexBox.Location = new System.Drawing.Point(12, 76);
			this._hexBox.Name = "_hexBox";
			this._hexBox.ShadowSelectionColor = System.Drawing.Color.FromArgb(((int) (((byte) (100)))), ((int) (((byte) (60)))),
				((int) (((byte) (188)))), ((int) (((byte) (255)))));
			this._hexBox.Size = new System.Drawing.Size(304, 126);
			this._hexBox.TabIndex = 3;
			// 
			// txtString
			// 
			this._txtString.Anchor =
				((System.Windows.Forms.AnchorStyles)
					(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
					  | System.Windows.Forms.AnchorStyles.Right)));
			this._txtString.Location = new System.Drawing.Point(12, 28);
			this._txtString.Name = "_txtString";
			this._txtString.Size = new System.Drawing.Size(304, 21);
			this._txtString.TabIndex = 1;
			// 
			// rbString
			// 
			this._rbString.Checked = true;
			this._rbString.ImeMode = System.Windows.Forms.ImeMode.NoControl;
			this._rbString.Location = new System.Drawing.Point(12, 12);
			this._rbString.Name = "_rbString";
			this._rbString.Size = new System.Drawing.Size(104, 16);
			this._rbString.TabIndex = 0;
			this._rbString.TabStop = true;
			this._rbString.Text = "Text";
			// 
			// rbHex
			// 
			this._rbHex.ImeMode = System.Windows.Forms.ImeMode.NoControl;
			this._rbHex.Location = new System.Drawing.Point(12, 60);
			this._rbHex.Name = "_rbHex";
			this._rbHex.Size = new System.Drawing.Size(104, 16);
			this._rbHex.TabIndex = 2;
			this._rbHex.Text = "Hex";
			// 
			// btnOK
			// 
			this._btnOk.Anchor =
				((System.Windows.Forms.AnchorStyles)
					((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
			this._btnOk.DialogResult = System.Windows.Forms.DialogResult.Cancel;
			this._btnOk.Location = new System.Drawing.Point(160, 211);
			this._btnOk.Name = "_btnOk";
			this._btnOk.Size = new System.Drawing.Size(75, 23);
			this._btnOk.TabIndex = 4;
			this._btnOk.Text = "Find next";
			this._btnOk.Click += new System.EventHandler(this.btnOK_Click);
			// 
			// btnCancel
			// 
			this._btnCancel.Anchor =
				((System.Windows.Forms.AnchorStyles)
					((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
			this._btnCancel.DialogResult = System.Windows.Forms.DialogResult.Cancel;
			this._btnCancel.Location = new System.Drawing.Point(241, 211);
			this._btnCancel.Name = "_btnCancel";
			this._btnCancel.Size = new System.Drawing.Size(75, 23);
			this._btnCancel.TabIndex = 5;
			this._btnCancel.Text = "Cancel";
			this._btnCancel.Click += new System.EventHandler(this.btnCancel_Click);
			// 
			// HexFindForm
			// 
			this.AcceptButton = this._btnOk;
			this.AutoScaleBaseSize = new System.Drawing.Size(5, 14);
			this.BackColor = System.Drawing.SystemColors.Control;
//.........这里部分代码省略.........
开发者ID:XQuantumForceX,项目名称:Reflexil,代码行数:101,代码来源:HexFindForm.cs

示例10: UpdateValues_workingMemory

 public virtual void UpdateValues_workingMemory(HexBox hb)
 {
     hb.ByteProvider = new DynamicByteProvider(machine.workingMemory.bank);
 }
开发者ID:erin100280,项目名称:Emunator,代码行数:4,代码来源:DebuggerModule_Base.cs

示例11: UpdateValues_programMemory

 public override void UpdateValues_programMemory(HexBox hb)
 {
 }
开发者ID:erin100280,项目名称:Emunator,代码行数:3,代码来源:DebuggerModule_Chip8.cs

示例12: UpdateValues_videoMemory

 public virtual void UpdateValues_videoMemory(HexBox hb)
 {
 }
开发者ID:erin100280,项目名称:Emunator,代码行数:3,代码来源:DebuggerModule_Base.cs

示例13: EmptyKeyInterpreter

 public EmptyKeyInterpreter(HexBox hexBox)
 {
     _hexBox = hexBox;
 }
开发者ID:rxantos,项目名称:tesv-snip,代码行数:4,代码来源:HexBox.cs

示例14: SetHexBox

 public void SetHexBox(HexBox hexBox)
 {
     _hexBox = hexBox;
 }
开发者ID:Blackfrosch,项目名称:VAGEDCSuite,代码行数:4,代码来源:FormFindCancel.cs

示例15: EntityHexViewer_Validating

 private void EntityHexViewer_Validating(HexBox hexbox, Entity.EntityType type)
 {
     if (PGMEBackend.Program.glEntityEditor.currentEntities != null && PGMEBackend.Program.glEntityEditor.currentEntities[0].GetEnum() == type && !loadingEntityView)
     {
         Entity currentEnt = PGMEBackend.Program.glEntityEditor.currentEntities[0];
         byte[] oldValue = currentEnt.rawData;
         currentEnt.rawData = (hexbox.ByteProvider as DynamicByteProvider).Bytes.ToArray();
         if (!currentEnt.rawData.SequenceEqual(oldValue))
         {
             PGMEBackend.Program.isEdited = true;
             currentEnt.LoadDataFromRaw();
             LoadEntityView(currentEnt);
         }
     }
 }
开发者ID:Diegoisawesome,项目名称:AwesomeMapEditor-old,代码行数:15,代码来源:MainWindow.cs


注:本文中的HexBox类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。