public ClassEditBookmarkHandler(frmClassEdit form) { _form = form; cboBookmark = _form.BookmarkComboBox; InitBookmarks(); }
public void cmClassEditor_Click(object sender, EventArgs e) { if (dgvData.SelectedRows.Count < 1) { SimpleMessage.ShowInfo("Please select assembly to edit."); return; } try { frmClassEdit frm = new frmClassEdit( new ClassEditParams() { Host = this, Rows = PathUtils.GetFullFileNames(dgvData.SelectedRows, treeView1.SelectedNode.FullPath), SourceDir = treeView1.SelectedNode.FullPath, ObjectType = ObjectTypes.All, ShowStaticOnly = false, ShowSelectButton = false } ); frm.Show(); } catch (Exception ex) { SimpleMessage.ShowException(ex); } }
public ClassEditTreeViewHandler(frmClassEdit form) { _form = form; treeView1 = _form.TreeView; InitTreeView(); }
private void btnSelectCalledMethod_Click(object sender, EventArgs e) { frmClassEdit f = new frmClassEdit( new ClassEditParams() { Host = _host, Rows = new string[0], SourceDir = _sourceDir, ObjectType = ObjectTypes.Method, ShowStaticOnly = true, ShowSelectButton = true }); f.ShowDialog(); if (f.SelectedMethod != null) { txtCalledMethod.Text = f.SelectedPath; _selectedCalledMethod = f.SelectedMethod; } else { txtCalledMethod.Text = String.Empty; _selectedCalledMethod = null; } }
//Reflector.CodeModel.IAssembly public ClassEditReflectorHandler(frmClassEdit form) : base("Reflector", form) { cboLanguage = _form.LanguageComboBox; cboOptimization = _form.OptimizationComboBox; rtbText = _form.ReflectorTextBox; tabPage = _form.ReflectorTabPage; }
public ClassEditDecompilerHandler(string name, frmClassEdit form) { _form = form; _name = name; Initializing = false; Unloading = false; }
public ClassEditBinaryViewHandler(frmClassEdit form) { _form = form; _hexBox = form.ResourceBinary; _hexBox.ByteProviderChanged += _hexBox_ByteProviderChanged; //seems the context menu shortcut not always working if the context menu never shown? _hexBox.KeyUp += _hexBox_KeyUp; }
public ClassEditSearchHandler(frmClassEdit form) { _form = form; cboSearchType = _form.SearchTypeComboBox; cboSearch = _form.SearchTextComboBox; cboSearch.Text = Config.ClassEditorLastSearch; InitSearchTypes(); }
public ClassEditBodyGridHandler(frmClassEdit form) { _form = form; dgBody = _form.BodyDataGrid; dgGeneral = _form.GeneralDataGrid; dgVariable = _form.VariableDataGrid; tabDetails = _form.DetailsTabPage; Utils.LoadILHelp(); CreateDataTable(); _markBlocks = Config.MarkBlocks; }
public ClassEditResourceHandler(frmClassEdit form) { _form = form; detailsTabPage = _form.DetailsTabPage; txtResource = _form.ResourceText; pbResource = _form.ResourceImage; hbResource = _form.ResourceBinary; lvResource = _form.ResourceListView; panelResource = _form.ResourcePanel; dgBody = _form.BodyDataGrid; dgResource = _form.ResourceDataGrid; CreateDataTable(); }
private void btnSelectMethod_Click(object sender, EventArgs e) { if (_frmClassView == null) { _frmClassView = new frmClassEdit( new ClassEditParams() { Host = _mainForm.Host, Rows = _mainForm.Rows, SourceDir = _mainForm.SourceDir, ObjectType = ObjectTypes.Method, ShowStaticOnly = false, ShowSelectButton = true }); } _frmClassView.ShowDialog(); if (_frmClassView.SelectedMethod != null) { MethodDefinition md = _frmClassView.SelectedMethod; MethodReference mr; if (md.DeclaringType.Module.FullyQualifiedName == _method.DeclaringType.Module.FullyQualifiedName) { mr = md; } else { mr = _method.DeclaringType.Module.Import(md); } if (!cboOperand.Items.Contains(mr)) { cboOperand.Items.Add(mr); } if (!_mainForm.SelectedMethodHistory.Contains(mr)) { _mainForm.SelectedMethodHistory.Add(mr); } cboOperand.SelectedItem = mr; } }
private void btnSelectMethod_Click(object sender, EventArgs e) { if (_frmClassView == null) { _frmClassView = new frmClassEdit( new ClassEditParams() { Host = _host, Rows = _rows, SourceDir = _sourceDir, ObjectType = ObjectTypes.Method, ShowStaticOnly = true, ShowSelectButton = true }); } _frmClassView.ShowDialog(); if (_frmClassView.SelectedMethod != null) { txtMethod.Text = _frmClassView.SelectedPath; _parameters.Clear(); MethodDefinition md = _frmClassView.SelectedMethod; for (int i = 0; i < md.Parameters.Count; i++) { ParameterDefinition pd = md.Parameters[i]; DataRow dr = _parameters.NewRow(); dr["name"] = pd.Name; dr["type"] = pd.ParameterType.FullName; dr["value"] = String.Empty; _parameters.Rows.Add(dr); } dgvParams.DataSource = _parameters; } else { txtMethod.Text = String.Empty; dgvParams.DataSource = null; } }
private MethodDefinition SelectMethodFromAssembly() { frmClassEdit f = new frmClassEdit( new ClassEditParams() { Host = _form.Host, Rows = new string[0], SourceDir = _form.SourceDir, ObjectType = ObjectTypes.Method, ShowStaticOnly = false, ShowSelectButton = true }); f.ShowDialog(); return f.SelectedMethod; }
private void btnSelectCalledMethod_Click(object sender, EventArgs e) { frmClassEdit f = new frmClassEdit(_host, new string[0], _sourceDir, ClassEditTreeViewHandler.ObjectTypes.Method, true, true); f.ShowDialog(); if (f.SelectedMethod != null) { txtCalledMethod.Text = f.SelectedPath; _selectedCalledMethod = f.SelectedMethod; } else { txtCalledMethod.Text = String.Empty; _selectedCalledMethod = null; } }
private void btnSelectMethod_Click(object sender, EventArgs e) { if (_frmClassView == null) _frmClassView = new frmClassEdit(_mainForm.Host, _mainForm.Rows, _mainForm.SourceDir, ClassEditTreeViewHandler.ObjectTypes.Method, false, true); _frmClassView.ShowDialog(); if (_frmClassView.SelectedMethod != null) { MethodDefinition md = _frmClassView.SelectedMethod; MethodReference mr; if(md.DeclaringType.Module.FullyQualifiedName == _method.DeclaringType.Module.FullyQualifiedName) mr = md; else mr = _method.DeclaringType.Module.Import(md); if(!cboOperand.Items.Contains(mr)) cboOperand.Items.Add(mr); if (!_mainForm.SelectedMethodHistory.Contains(mr)) _mainForm.SelectedMethodHistory.Add(mr); cboOperand.SelectedItem = mr; } }
public void InitForm(frmClassEdit mainForm, MethodDefinition md, int insIndex, EditModes mode) { if (_method == md && _insIndex == insIndex) return; _mainForm = mainForm; _method = md; _ilp = md.Body.GetILProcessor(); _insIndex = insIndex; _mode = mode; Collection<Instruction> ic = _method.Body.Instructions; switch (mode) { case EditModes.Edit: _ins = ic[_insIndex]; if (_ins.Previous == null) { txtPrevIns.Text = String.Empty; } else { txtPrevIns.Text = InsUtils.GetInstructionText(ic, ic.IndexOf(_ins.Previous)); } if (_ins.Next == null) { txtNextIns.Text = String.Empty; } else { txtNextIns.Text = InsUtils.GetInstructionText(ic, ic.IndexOf(_ins.Next)); } break; case EditModes.InsertAfter: _ins = _ilp.Create(OpCodes.Nop); txtPrevIns.Text = InsUtils.GetInstructionText(ic, _insIndex); if (ic[_insIndex].Next == null) { txtNextIns.Text = String.Empty; } else { txtNextIns.Text = InsUtils.GetInstructionText(ic, ic.IndexOf(ic[_insIndex].Next)); } break; case EditModes.InsertBefore: _ins = _ilp.Create(OpCodes.Nop); txtNextIns.Text = InsUtils.GetInstructionText(ic, _insIndex); if (ic[_insIndex].Previous == null) { txtPrevIns.Text = String.Empty; } else { txtPrevIns.Text = InsUtils.GetInstructionText(ic, ic.IndexOf(ic[_insIndex].Previous)); } break; } InitOpCodes(cboOpCode); }
public frmClassEditInstruction(frmClassEdit mainForm, MethodDefinition md, int insIndex, EditModes mode) { InitializeComponent(); InitForm(mainForm, md, insIndex, mode); }
public void cmClassEditor_Click(object sender, EventArgs e) { if (dgvData.SelectedRows.Count < 1) { SimpleMessage.ShowInfo("Please select assembly to edit."); return; } try { frmClassEdit frm = new frmClassEdit(this, PathUtils.GetFullFileNames(dgvData.SelectedRows, treeView1.SelectedNode.FullPath), treeView1.SelectedNode.FullPath); frm.Show(); } catch (Exception ex) { SimpleMessage.ShowException(ex); } }
public ClassEditLogHandler(frmClassEdit form) { _form = form; txtLog = _form.LogText; }
private void btnSelectMethod_Click(object sender, EventArgs e) { var type = (SAE.de4dot.de4dotOptions.StringDecrypterTypes)cboStringDecrypter.SelectedItem; bool showStaticOnly = (type == de4dotOptions.StringDecrypterTypes.Default || type == de4dotOptions.StringDecrypterTypes.Static); frmClassEdit f = new frmClassEdit(_host, _rows, _sourceDir, ClassEditTreeViewHandler.ObjectTypes.Method, showStaticOnly, true); f.ShowDialog(); if (f.SelectedMethod != null) { txtStringDecrypterMethod.Text = TokenUtils.GetFullMetadataTokenString(f.SelectedMethod.MetadataToken); } else { txtStringDecrypterMethod.Text = String.Empty; } }
public ClassEditVariableGridHandler(frmClassEdit form) { _form = form; dgVariable = _form.VariableDataGrid; cmVariable = _form.VariableContextMenuStrip; }
private void btnSelectMethod_Click(object sender, EventArgs e) { if(_frmClassView==null) _frmClassView = new frmClassEdit(_host, _rows, _sourceDir, ClassEditTreeViewHandler.ObjectTypes.Method, true, true); _frmClassView.ShowDialog(); if (_frmClassView.SelectedMethod != null) { txtMethod.Text = _frmClassView.SelectedPath; _parameters.Clear(); MethodDefinition md = _frmClassView.SelectedMethod; for (int i = 0; i < md.Parameters.Count; i++) { ParameterDefinition pd = md.Parameters[i]; DataRow dr = _parameters.NewRow(); dr["name"] = pd.Name; dr["type"] = pd.ParameterType.FullName; dr["value"] = String.Empty; _parameters.Rows.Add(dr); } dgvParams.DataSource = _parameters; } else { txtMethod.Text = String.Empty; dgvParams.DataSource = null; } }
public ClassEditTextViewHandler(frmClassEdit form) { _form = form; _textbox = form.ResourceText; _textbox.KeyUp += _textbox_KeyUp; }
private void btnSelectMethod_Click(object sender, EventArgs e) { if (_frmClassView == null) _frmClassView = new frmClassEdit( new ClassEditParams() { Host = _mainForm.Host, Rows = _mainForm.Rows, SourceDir = _mainForm.SourceDir, ObjectType = ObjectTypes.Method, ShowStaticOnly = false, ShowSelectButton = true }); _frmClassView.ShowDialog(); if (_frmClassView.SelectedMethod != null) { MethodDefinition md = _frmClassView.SelectedMethod; MethodReference mr; if(md.DeclaringType.Module.FullyQualifiedName == _method.DeclaringType.Module.FullyQualifiedName) mr = md; else mr = _method.DeclaringType.Module.Import(md); if(!cboOperand.Items.Contains(mr)) cboOperand.Items.Add(mr); if (!_mainForm.SelectedMethodHistory.Contains(mr)) _mainForm.SelectedMethodHistory.Add(mr); cboOperand.SelectedItem = mr; } }
public void InitForm(frmClassEdit mainForm, MethodDefinition md, int insIndex, EditModes mode) { if (_method == md && _insIndex == insIndex) { return; } _mainForm = mainForm; _method = md; _ilp = md.Body.GetILProcessor(); _insIndex = insIndex; _mode = mode; Collection <Instruction> ic = _method.Body.Instructions; switch (mode) { case EditModes.Edit: _ins = ic[_insIndex]; if (_ins.Previous == null) { txtPrevIns.Text = String.Empty; } else { txtPrevIns.Text = InsUtils.GetInstructionText(ic, ic.IndexOf(_ins.Previous)); } if (_ins.Next == null) { txtNextIns.Text = String.Empty; } else { txtNextIns.Text = InsUtils.GetInstructionText(ic, ic.IndexOf(_ins.Next)); } break; case EditModes.InsertAfter: _ins = _ilp.Create(OpCodes.Nop); txtPrevIns.Text = InsUtils.GetInstructionText(ic, _insIndex); if (ic[_insIndex].Next == null) { txtNextIns.Text = String.Empty; } else { txtNextIns.Text = InsUtils.GetInstructionText(ic, ic.IndexOf(ic[_insIndex].Next)); } break; case EditModes.InsertBefore: _ins = _ilp.Create(OpCodes.Nop); txtNextIns.Text = InsUtils.GetInstructionText(ic, _insIndex); if (ic[_insIndex].Previous == null) { txtPrevIns.Text = String.Empty; } else { txtPrevIns.Text = InsUtils.GetInstructionText(ic, ic.IndexOf(ic[_insIndex].Previous)); } break; } InitOpCodes(cboOpCode); }
public ClassEditILSpyHandler(frmClassEdit form) : base("ILSpy", form) { cboLanguage = _form.ILSpyLanguageComboBox; rtbText = _form.ILSpyTextBox; tabPage = _form.ILSpyTabPage; }
private MethodDefinition SelectMethodFromAssembly() { frmClassEdit f = new frmClassEdit(_form.Host, new string[0], _form.SourceDir, ClassEditTreeViewHandler.ObjectTypes.Method, false, true); f.ShowDialog(); return f.SelectedMethod; }