Exemplo n.º 1
0
        private void InitForm(ClassEditParams p)
        {
            try
            {
                //this.SuspendLayout();

                Host             = p.Host;
                Rows             = p.Rows;
                SourceDir        = SimplePath.GetFullPath(p.SourceDir);
                ShowStaticOnly   = p.ShowStaticOnly;
                ShowSelectButton = p.ShowSelectButton;

                tbSelect.Visible = ShowSelectButton;
                tbSave.Visible   = !ShowSelectButton;

                //dgBody.Visible = false;
                //dgResource.Visible = false;
                //panelResource.Visible = false;

                dgBody.Dock     = DockStyle.Fill;
                dgResource.Dock = DockStyle.Fill;

                panelResource.Dock = DockStyle.Fill;
                txtResource.Dock   = DockStyle.Fill;
                //pbResource.Dock = DockStyle.Fill;
                pbResource.Left = 0; pbResource.Top = 0;
                lvResource.Dock = DockStyle.Fill;
                hbResource.Dock = DockStyle.Fill;

                rtbText.Font      = Config.ClassEditorRichTextBoxFont;
                rtbILSpyText.Font = Config.ClassEditorRichTextBoxFont;

                LogHandler          = new ClassEditLogHandler(this);
                BodyGridHandler     = new ClassEditBodyGridHandler(this);
                VariableGridHandler = new ClassEditVariableGridHandler(this);
                ResourceHandler     = new ClassEditResourceHandler(this);
                SearchHandler       = new ClassEditSearchHandler(this);
                ReflectorHandler    = new ClassEditReflectorHandler(this);
                ILSpyHandler        = new ClassEditILSpyHandler(this);
                BookmarkHandler     = new ClassEditBookmarkHandler(this);
                TreeViewHandler     = new ClassEditTreeViewHandler(this);
                BinaryViewHandler   = new ClassEditBinaryViewHandler(this);
                TextViewHandler     = new ClassEditTextViewHandler(this);

                TreeViewHandler.ObjectType = p.ObjectType;
            }
            catch
            {
                throw;
            }
            finally
            {
                //this.ResumeLayout();
            }
        }
        private void InitForm(ClassEditParams p)
        {
            try
            {
                //this.SuspendLayout();

                Host = p.Host;
                Rows = p.Rows;
                SourceDir = SimplePath.GetFullPath(p.SourceDir);
                ShowStaticOnly = p.ShowStaticOnly;
                ShowSelectButton = p.ShowSelectButton;

                tbSelect.Visible = ShowSelectButton;
                tbSave.Visible = !ShowSelectButton;

                //dgBody.Visible = false;
                //dgResource.Visible = false;
                //panelResource.Visible = false;

                dgBody.Dock = DockStyle.Fill;
                dgResource.Dock = DockStyle.Fill;

                panelResource.Dock = DockStyle.Fill;
                txtResource.Dock = DockStyle.Fill;
                //pbResource.Dock = DockStyle.Fill;
                pbResource.Left = 0; pbResource.Top = 0;
                lvResource.Dock = DockStyle.Fill;
                hbResource.Dock = DockStyle.Fill;                

                rtbText.Font = Config.ClassEditorRichTextBoxFont;
                rtbILSpyText.Font = Config.ClassEditorRichTextBoxFont;

                LogHandler = new ClassEditLogHandler(this);
                BodyGridHandler = new ClassEditBodyGridHandler(this);
                VariableGridHandler = new ClassEditVariableGridHandler(this);
                ResourceHandler = new ClassEditResourceHandler(this);
                SearchHandler = new ClassEditSearchHandler(this);
                ReflectorHandler = new ClassEditReflectorHandler(this);
                ILSpyHandler = new ClassEditILSpyHandler(this);
                BookmarkHandler = new ClassEditBookmarkHandler(this);
                TreeViewHandler = new ClassEditTreeViewHandler(this);
                BinaryViewHandler = new ClassEditBinaryViewHandler(this);
                TextViewHandler = new ClassEditTextViewHandler(this);

                TreeViewHandler.ObjectType = p.ObjectType;
            }
            catch
            {
                throw;
            }
            finally
            {
                //this.ResumeLayout();
            }
        }