public override void Load() { m_form = new FormWidget("Compass"); m_form.ClientSize = new System.Drawing.Size(200, 200); m_form.Location = new System.Drawing.Point(0, 100); m_form.BackgroundColor = World.Settings.WidgetBackgroundColor; m_form.AutoHideHeader = true; m_form.VerticalScrollbarEnabled = false; m_form.HorizontalScrollbarEnabled = false; m_form.BorderEnabled = false; m_form.OnResizeEvent += new FormWidget.ResizeHandler(m_form_OnResizeEvent); m_form.OnVisibleChanged += new VisibleChangedHandler(m_form_OnVisibleChanged); m_compass = new Compass3DWidget(); m_compass.Location = new System.Drawing.Point(5, 0); m_compass.Font = new System.Drawing.Font("Ariel", 10.0f, System.Drawing.FontStyle.Bold); m_compass.ParentWidget = m_form; m_form_OnResizeEvent(m_form, m_form.WidgetSize); m_form.ChildWidgets.Add(m_compass); m_form.Visible = World.Settings.ShowCompass; DrawArgs.NewRootWidget.ChildWidgets.Add(m_form); base.Load(); }
public override void Load() { m_form = new FormWidget("Scale Bar Legend"); m_form.Location = new System.Drawing.Point(DrawArgs.ParentControl.Width - 300, DrawArgs.ParentControl.Height - 70); m_form.ClientSize = new System.Drawing.Size(150, 60); m_form.Text = "Scale Bar Legend"; m_form.BackgroundColor = World.Settings.WidgetBackgroundColor; m_form.ParentWidget = DrawArgs.NewRootWidget; m_form.AutoHideHeader = true; m_form.VerticalScrollbarEnabled = false; m_form.HorizontalScrollbarEnabled = false; m_form.OnResizeEvent += new FormWidget.ResizeHandler(m_form_OnResizeEvent); m_form.OnVisibleChanged += new VisibleChangedHandler(m_form_OnVisibleChanged); m_form.BorderEnabled = false; m_scaleBar = new ScaleBarWidget(); m_scaleBar.Location = new System.Drawing.Point(5, 0); m_form_OnResizeEvent(m_form, m_form.WidgetSize); m_scaleBar.ParentWidget = m_form; m_form.ChildWidgets.Add(m_scaleBar); bool visibility = false; m_menuItem = new System.Windows.Forms.MenuItem("Scale Bar Legend"); m_menuItem.Click += new EventHandler(m_menuItem_Click); m_menuItem.Checked = visibility; m_form.Visible = visibility; ParentApplication.ToolsMenu.MenuItems.Add(m_menuItem); DrawArgs.NewRootWidget.ChildWidgets.Add(m_form); base.Load(); }
public void UpdateHookForm() { // update hook form if (m_hookForm != null) { if (m_hookForm.Enabled) { m_hookForm.Text = this.DMS(); m_hookGeneralLabel.Text = this.GeneralInfo(); m_hookDetailLabel.Text = this.DetailedInfo(); m_hookDescLabel.Text = this.DescriptionInfo(); } else { m_hookForm.Dispose(); m_hookTreeNode = null; m_hookGeneralTreeNode = null; m_hookDetailTreeNode = null; m_hookDescTreeNode = null; m_hookGeneralLabel = null; m_hookDetailLabel = null; m_hookDescLabel = null; m_hookForm = null; IsHooked = false; } } }
public override void Load() { try { m_layerManagerForm = new FormWidget("Layer Manager"); m_layerManagerForm.Location = new System.Drawing.Point(150, 150); SimpleTreeNodeWidget tnw = new SimpleTreeNodeWidget("Layer Manager"); tnw.Expanded = true; tnw.ParentWidget = m_layerManagerForm; m_activeLayersNode = new SimpleTreeNodeWidget("Active Layers"); m_activeLayersNode.ParentWidget = tnw; m_allLayersNode = new SimpleTreeNodeWidget("All Layers"); m_allLayersNode.ParentWidget = tnw; tnw.ChildWidgets.Add(m_activeLayersNode); tnw.ChildWidgets.Add(m_allLayersNode); m_layerManagerForm.ChildWidgets.Add(tnw); //m_layerManagerForm.ChildWidgets.Add(m_activeLayersNode); //m_layerManagerForm.ChildWidgets.Add(m_allLayersNode); DrawArgs.NewRootWidget.ChildWidgets.Add(m_layerManagerForm); m_updateTimer = new System.Timers.Timer(100); m_updateTimer.Elapsed += new System.Timers.ElapsedEventHandler(m_updateTimer_Elapsed); m_updateTimer.Start(); } catch (Exception ex) { Utility.Log.Write(ex); } base.Load(); }
public override void Unload() { if (this.m_window != null) { DrawArgs.NewRootWidget.ChildWidgets.Remove(this.m_window); this.m_window.Dispose(); this.m_window = null; } base.Unload(); }
public override void Unload() { if (this.m_window != null) { DrawArgs.NewRootWidget.ChildWidgets.Remove(this.m_window); this.m_window.Dispose(); this.m_window = null; } this.ParentApplication.ToolsMenu.MenuItems.Remove(this.m_menuItem); base.Unload(); }
public override void Unload() { if (m_form != null) { DrawArgs.NewRootWidget.ChildWidgets.Remove(m_form); m_form.Dispose(); m_form = null; } base.Unload(); }
private PictureBox CreatePictureBox(string imageUri, int x, int y, FormWidget parentForm) { PictureBox pictureBox = new PictureBox(); pictureBox.Location = new System.Drawing.Point(x, y); pictureBox.ImageUri = imageUri; pictureBox.ParentWidget = parentForm; parentForm.ChildWidgets.Add(pictureBox); return(pictureBox); }
public override void Unload() { if (m_form != null) { DrawArgs.NewRootWidget.ChildWidgets.Remove(m_form); m_form.Dispose(); m_form = null; } ParentApplication.ToolsMenu.MenuItems.Remove(m_menuItem); base.Unload(); }
public Widget Visit(FormStatement statement, GuiEnvironment environment) { var controls = new List <Widget>(statement.Statements.Count()); foreach (var s in statement.Statements) { var control = s.Accept(this, environment); controls.Add(control); } var form = new FormWidget(statement, environment, controls); return(form); }
public void RunApplication(FormWidget form) { var window = new Window(); var view = new ListView(); foreach (var control in form.Controls.Values) { view.Items.Add(control); } window.Content = view; var application = new Application(); application.Run(window); }
/// <summary> /// Load embedded script /// </summary> /// <param name="formId"></param> /// <returns></returns> public string LoadEmbeddedScript(int formId) { var form = GetById(formId); if (form != null) { var formRenderModel = new FormWidget(form); var formBuilderSetting = _siteSettingService.LoadSetting <FormBuilderSetting>(); var cacheName = SettingNames.FormBuilderSetting.GetTemplateCacheName(formBuilderSetting.EmbeddedTemplate); return(RazorEngineHelper.CompileAndRun(formBuilderSetting.EmbeddedTemplate, formRenderModel, null, cacheName)); } return(HtmlUtilities.BuildScript(ScriptAction.Alert, T("Form_Message_InvalidFormId"))); }
/// <summary> /// Render widget /// </summary> /// <param name="parameters"></param> /// <returns></returns> public override string Render(string[] parameters) { ParseParams(parameters); var form = _formService.GetById(FormId); if (form == null) { return(_localizedResourceService.T("Widget_Form_Message_InvalidFormId")); } var formRenderModel = new FormWidget(form); var formBuilderSetting = _siteSettingService.LoadSetting <FormBuilderSetting>(); var cacheName = SettingNames.FormBuilderSetting.GetTemplateCacheName(formBuilderSetting.EmbeddedTemplate); return(RazorEngineHelper.CompileAndRun(formBuilderSetting.EmbeddedTemplate, formRenderModel, null, cacheName)); }
public override void Unload() { if (m_form != null) { DrawArgs.NewRootWidget.ChildWidgets.Remove(m_form); m_form.Dispose(); m_form = null; } ParentApplication.ToolsMenu.MenuItems.Remove(m_menuItem); if (m_toolbarItem != null) { ParentApplication.WorldWindow.MenuBar.RemoveToolsMenuButton(m_toolbarItem); m_toolbarItem.Dispose(); m_toolbarItem = null; } base.Unload(); }
public override void Load() { m_menuItem = new System.Windows.Forms.MenuItem("Compass"); m_menuItem.Click += new EventHandler(m_menuItem_Click); m_menuItem.Checked = World.Settings.ShowCompass; ParentApplication.ToolsMenu.MenuItems.Add(m_menuItem); m_form = new FormWidget("Compass"); m_form.ClientSize = new System.Drawing.Size(200, 200); m_form.Location = new System.Drawing.Point(0, 400); m_form.BackgroundColor = World.Settings.WidgetBackgroundColor; m_form.AutoHideHeader = true; m_form.VerticalScrollbarEnabled = false; m_form.HorizontalScrollbarEnabled = false; m_form.BorderEnabled = false; m_form.OnResizeEvent += new FormWidget.ResizeHandler(m_form_OnResizeEvent); m_form.OnVisibleChanged += new VisibleChangedHandler(m_form_OnVisibleChanged); m_compass = new Compass3DWidget(); m_compass.Location = new System.Drawing.Point(5, 0); m_compass.Font = new System.Drawing.Font("Ariel", 10.0f, System.Drawing.FontStyle.Bold); m_compass.ParentWidget = m_form; m_form_OnResizeEvent(m_form, m_form.WidgetSize); m_form.ChildWidgets.Add(m_compass); m_form.Visible = World.Settings.ShowCompass; DrawArgs.NewRootWidget.ChildWidgets.Add(m_form); m_toolbarItem = new WorldWind.NewWidgets.WidgetMenuButton( "Compass 3D", basePath + "\\Data\\Icons\\Interface\\compass2.png", m_form); ParentApplication.WorldWindow.MenuBar.AddToolsMenuButton(m_toolbarItem); base.Load(); }
public override void Load() { this.basePath = this.PluginDirectory; this.m_menuItem = new MenuItem("NavigationPanel"); this.m_menuItem.Click += new EventHandler(this.m_menuItem_Click); this.m_menuItem.Checked = World.Settings.ShowCompass; this.m_window = new FormWidget("NavigationPanel"); this.m_window.Name = "NavigationPanel"; this.m_window.ClientSize = new Size(0xac, 240); int y = 0; int num2 = 0; if (World.Settings.ShowToolbar) { y += 0x2d; } this.m_window.Anchor = WidgetEnums.AnchorStyles.Right | WidgetEnums.AnchorStyles.Top; this.m_window.ParentWidget = DrawArgs.NewRootWidget; this.m_window.Location = new Point((DrawArgs.NewRootWidget.ClientSize.Width - this.m_window.ClientSize.Width) - num2, y); this.m_window.Text = "Double Click to Re-Open"; this.m_window.AutoHideHeader = true; this.m_window.BackgroundColor = Color.FromArgb(0, 0, 0, 0); this.m_window.HeaderEnabled = false; this.m_window.Visible = true; this.m_window.BorderEnabled = false; this.m_window.VerticalScrollbarEnabled = false; this.m_window.HorizontalScrollbarEnabled = false; this.m_window.VerticalResizeEnabled = false; this.m_window.HorizontalResizeEnabled = false; this.m_window.Enabled = true; this.slider = new Slider(SliderType.Horizontal); this.slider.Name = "Tilt Slider"; this.slider.HandleUri = this.basePath + @"\img\handle.vertical.png"; this.slider.HighImageUri = this.basePath + @"\img\highimage.png"; this.slider.LowImageUri = this.basePath + @"\img\lowimage.png"; this.slider.HandleSize = new Size(10, 0x15); this.slider.LowImageSize = new Size(0x13, 0x12); this.slider.HighImageSize = new Size(0x13, 0x12); this.slider.ForeColor = Color.FromArgb(0x80, 0xff, 0xff, 0xff); this.slider.StickBackgroundColor = Color.FromArgb(40, 0, 0, 0); this.slider.Visible = true; this.slider.ClientLocation = new Point(0, 0); this.slider.ClientSize = new Size(0x8e, 30); this.slider.MaximumValue = 6M; this.slider.MinimumValue = -6M; this.slider.ParentWidget = this.m_window; this.slider.OnMouseEnterEvent += new EventHandler(this.slider_OnMouseEnterEvent); this.slider.OnMouseLeaveEvent += new EventHandler(this.slider_OnMouseLeaveEvent); this.slider.low_OnMouseDownEvent += new MouseEventHandler(this.low_OnMouseDown); this.slider.high_OnMouseDownEvent += new MouseEventHandler(this.high_OnMouseDown); this.slider.CountHeight = false; this.slider.CountWidth = true; this.m_window.ChildWidgets.Add(this.slider); this.sliderZoom = new Slider(SliderType.Vertical); this.sliderZoom.Name = "Zoom Slider"; this.sliderZoom.HandleUri = this.basePath + @"\img\handle.horizontal.png"; this.sliderZoom.HighImageUri = this.basePath + @"\img\zoom.in.png"; this.sliderZoom.LowImageUri = this.basePath + @"\img\zoom.out.png"; this.sliderZoom.HandleSize = new Size(0x15, 10); this.sliderZoom.LowImageSize = new Size(0x13, 0x12); this.sliderZoom.HighImageSize = new Size(0x13, 0x12); this.sliderZoom.ForeColor = Color.FromArgb(0x80, 0xff, 0xff, 0xff); this.sliderZoom.StickBackgroundColor = Color.FromArgb(40, 0, 0, 0); this.sliderZoom.Visible = true; this.sliderZoom.ClientLocation = new Point(this.m_window.ClientSize.Width - 30, 0x23); this.sliderZoom.ClientSize = new Size(30, 0x8e); this.sliderZoom.MaximumValue = 1M; this.sliderZoom.MinimumValue = -1M; this.sliderZoom.ParentWidget = this.m_window; this.sliderZoom.OnMouseEnterEvent += new EventHandler(this.slider_OnMouseEnterEvent); this.sliderZoom.OnMouseLeaveEvent += new EventHandler(this.slider_OnMouseLeaveEvent); this.sliderZoom.low_OnMouseDownEvent += new MouseEventHandler(this.zoomhigh_OnMouseDown); this.sliderZoom.high_OnMouseDownEvent += new MouseEventHandler(this.zoomlow_OnMouseDown); this.sliderZoom.CountHeight = false; this.sliderZoom.CountWidth = true; this.m_window.ChildWidgets.Add(this.sliderZoom); this.m_compass = new Compass(); this.m_compass.Name = "Tilt Slider"; this.m_compass.CompassUri = this.basePath + @"\img\Newman_compass.png"; this.m_compass.ForeColor = Color.FromArgb(0x80, 0xff, 0xff, 0xff); this.m_compass.Visible = true; this.m_compass.ClientLocation = new Point(5, 0x23); this.m_compass.ClientSize = new Size(0x80, 0x80); this.m_compass.ParentWidget = this.m_window; this.m_compass.CountHeight = false; this.m_compass.CountWidth = true; this.m_window.ChildWidgets.Add(this.m_compass); DrawArgs.NewRootWidget.ChildWidgets.Add(this.m_window); this.m_UpdateTilt.Elapsed += new ElapsedEventHandler(this.m_UpdateTilt_Elapsed); base.Load(); }
private void InitializeCiaForm() { m_ciaForm = new FormWidget("CIA World Fact Book"); m_ciaForm.Anchor = WorldWind.NewWidgets.WidgetEnums.AnchorStyles.Right; m_ciaForm.ClientSize = new System.Drawing.Size(512, 384); // make it right aligned m_ciaForm.Location = new System.Drawing.Point( DrawArgs.ParentControl.Width - m_ciaForm.ClientSize.Width, DrawArgs.ParentControl.Height / 2 - m_ciaForm.ClientSize.Height / 2); m_ciaForm.BackgroundColor = System.Drawing.Color.FromArgb(0, 0, 0, 0); m_ciaForm.HeaderHeight = 0; m_ciaForm.HorizontalResizeEnabled = false; m_ciaForm.VerticalResizeEnabled = false; m_ciaForm.BorderEnabled = false; m_ciaForm.HorizontalScrollbarEnabled = false; m_ciaForm.VerticalScrollbarEnabled = false; m_bg_top = CreatePictureBox("Data\\Icons\\Interface\\bg-top.png", 0, 0, m_ciaForm); m_bg_middle = CreatePictureBox("Data\\Icons\\Interface\\bg-middle-extra.png", 0, 64, m_ciaForm); m_bg_bottom = CreatePictureBox("Data\\Icons\\Interface\\bg-bottom.png", 0, 320, m_ciaForm); int navOffset = 15; int navY = 329; m_nav_bar_up = CreatePictureBox("Data\\Icons\\Interface\\nav-bar-up.png", 0 * 32 + navOffset, navY, m_ciaForm); m_nav_bar_down = CreatePictureBox("Data\\Icons\\Interface\\nav-bar-down.png", 1 * 32 + navOffset, navY, m_ciaForm); m_nav_flag_up = CreatePictureBox("Data\\Icons\\Interface\\nav-flag-up.png", 2 * 32 + navOffset, navY, m_ciaForm); m_nav_flag_down = CreatePictureBox("Data\\Icons\\Interface\\nav-flag-down.png", 3 * 32 + navOffset, navY, m_ciaForm); int categoryOffset = 4 * 32 + navOffset + 32; m_category_introduction = CreatePictureBox("Data\\Icons\\Interface\\catagory-introduction.png", 0 * 32 + categoryOffset, navY, m_ciaForm); m_category_introduction.OnMouseUpEvent += new System.Windows.Forms.MouseEventHandler(m_category_introduction_OnMouseUpEvent); m_category_geography = CreatePictureBox("Data\\Icons\\Interface\\catagory-geography.png", 1 * 32 + categoryOffset, navY, m_ciaForm); m_category_geography.OnMouseUpEvent += new System.Windows.Forms.MouseEventHandler(m_category_geography_OnMouseUpEvent); m_category_people = CreatePictureBox("Data\\Icons\\Interface\\catagory-people.png", 2 * 32 + categoryOffset, navY, m_ciaForm); m_category_people.OnMouseUpEvent += new System.Windows.Forms.MouseEventHandler(m_category_people_OnMouseUpEvent); m_category_economy = CreatePictureBox("Data\\Icons\\Interface\\catagory-economy.png", 3 * 32 + categoryOffset, navY, m_ciaForm); m_category_economy.OnMouseUpEvent += new System.Windows.Forms.MouseEventHandler(m_category_economy_OnMouseUpEvent); m_category_communications = CreatePictureBox("Data\\Icons\\Interface\\catagory-communications.png", 4 * 32 + categoryOffset, navY, m_ciaForm); m_category_communications.OnMouseUpEvent += new System.Windows.Forms.MouseEventHandler(m_category_communications_OnMouseUpEvent); m_category_transportation = CreatePictureBox("Data\\Icons\\Interface\\catagory-transportation.png", 5 * 32 + categoryOffset, navY, m_ciaForm); m_category_transportation.OnMouseUpEvent += new System.Windows.Forms.MouseEventHandler(m_category_transportation_OnMouseUpEvent); m_category_military = CreatePictureBox("Data\\Icons\\Interface\\catagory-military.png", 6 * 32 + categoryOffset, navY, m_ciaForm); m_category_military.OnMouseUpEvent += new System.Windows.Forms.MouseEventHandler(m_category_military_OnMouseUpEvent); m_nav_left = CreatePictureBox("Data\\Icons\\Interface\\nav-left.png", 8 * 32 + categoryOffset, navY, m_ciaForm); m_nav_left.OnMouseUpEvent += new System.Windows.Forms.MouseEventHandler(m_nav_left_OnMouseUpEvent); m_nav_right = CreatePictureBox("Data\\Icons\\Interface\\nav-right.png", 9 * 32 + categoryOffset, navY, m_ciaForm); m_nav_right.OnMouseUpEvent += new System.Windows.Forms.MouseEventHandler(m_nav_right_OnMouseUpEvent); m_nav_close = CreatePictureBox("Data\\Icons\\Interface\\close.png", 16, 16, m_ciaForm); m_nav_close.OnMouseUpEvent += new System.Windows.Forms.MouseEventHandler(m_nav_close_OnMouseUpEvent); m_countryNameLabel = new TextLabel(); m_countryNameLabel.Name = "CountryName"; m_countryNameLabel.Text = "Country Name"; m_countryNameLabel.ForeColor = System.Drawing.Color.FromArgb(37, 64, 71); // dark forest green m_countryNameLabel.Location = new System.Drawing.Point(75, 65); m_countryNameLabel.ClientSize = new System.Drawing.Size(m_ciaForm.ClientSize.Width - 100, 100); m_countryNameLabel.Font = new System.Drawing.Font("Ariel", 16.0f, System.Drawing.FontStyle.Bold); m_countryNameLabel.Alignment = Alignment.Right; m_currentCategoryLabel = new TextLabel(); m_currentCategoryLabel.Name = "CurrentCategory"; m_currentCategoryLabel.Text = ""; m_currentCategoryLabel.ForeColor = System.Drawing.Color.FromArgb(37, 64, 71); // dark forest green m_currentCategoryLabel.Location = new System.Drawing.Point(75, 90); m_currentCategoryLabel.ClientSize = new System.Drawing.Size(m_ciaForm.ClientSize.Width - 100, 100); m_currentCategoryLabel.Font = new System.Drawing.Font("Ariel", 14.0f, System.Drawing.FontStyle.Regular); m_currentCategoryLabel.Alignment = Alignment.Right; m_currentBodyText = new TextLabel(); m_currentBodyText.Name = "CurrentBodyText"; m_currentBodyText.Text = ""; m_currentBodyText.ForeColor = System.Drawing.Color.FromArgb(37, 64, 71); // dark forest green m_currentBodyText.Location = new System.Drawing.Point(25, 110); m_currentBodyText.ClientSize = new System.Drawing.Size(m_ciaForm.ClientSize.Width - 40, 220); m_currentBodyText.Font = new System.Drawing.Font("Ariel", 8.0f, System.Drawing.FontStyle.Regular); m_currentBodyText.WordBreak = true; int offsetY = m_currentBodyText.Location.Y + 5; m_listLabels = new TextLabel[10]; for (int i = 0; i < m_listLabels.Length; i++) { m_listLabels[i] = new TextLabel(); m_listLabels[i].ClientSize = new System.Drawing.Size(250, 14); m_listLabels[i].Location = new System.Drawing.Point(m_currentBodyText.Location.X, offsetY + i * m_listLabels[i].ClientSize.Height); m_listLabels[i].ForeColor = System.Drawing.Color.FromArgb(37, 64, 71); m_listLabels[i].Font = new System.Drawing.Font("Ariel", 10.0f, System.Drawing.FontStyle.Regular); m_listLabels[i].Visible = false; m_ciaForm.ChildWidgets.Add(m_listLabels[i]); } m_scrollbars = new Scrollbar[10]; for (int i = 0; i < m_scrollbars.Length; i++) { m_scrollbars[i] = new Scrollbar(); m_scrollbars[i].ClientSize = new System.Drawing.Size(150, 7); m_scrollbars[i].Location = new System.Drawing.Point(m_currentBodyText.Location.X + 265, m_listLabels[i].Location.Y + 2); m_scrollbars[i].ForeColor = System.Drawing.Color.DarkOrange; m_scrollbars[i].Value = 0.0f; m_scrollbars[i].Visible = false; m_ciaForm.ChildWidgets.Add(m_scrollbars[i]); } m_ciaForm.ChildWidgets.Add(m_countryNameLabel); m_ciaForm.ChildWidgets.Add(m_currentCategoryLabel); m_ciaForm.ChildWidgets.Add(m_currentBodyText); m_ciaForm.Visible = false; DrawArgs.NewRootWidget.ChildWidgets.Add(m_ciaForm); DrawArgs.ParentControl.Resize += new EventHandler(ParentControl_Resize); }
void IconHookMenuItem_Click(object sender, EventArgs s) { if (m_hookForm == null) { m_hookForm = new FormWidget(" " + this.Name); m_hookForm.WidgetSize = new System.Drawing.Size(200, 250); m_hookForm.Location = new System.Drawing.Point(200, 120); m_hookForm.DestroyOnClose = true; m_hookTreeNode = new SimpleTreeNodeWidget("Info"); m_hookTreeNode.IsRadioButton = true; m_hookTreeNode.Expanded = true; m_hookTreeNode.EnableCheck = false; m_hookGeneralLabel = new LabelWidget(""); m_hookGeneralLabel.ClearOnRender = true; m_hookGeneralLabel.Format = DrawTextFormat.WordBreak; m_hookGeneralLabel.Location = new System.Drawing.Point(0, 0); m_hookGeneralLabel.AutoSize = true; m_hookGeneralLabel.UseParentWidth = false; m_hookGeneralTreeNode = new SimpleTreeNodeWidget("General"); m_hookGeneralTreeNode.IsRadioButton = true; m_hookGeneralTreeNode.Expanded = true; m_hookGeneralTreeNode.EnableCheck = false; m_hookGeneralTreeNode.Add(m_hookGeneralLabel); m_hookTreeNode.Add(m_hookGeneralTreeNode); m_hookDetailLabel = new LabelWidget(""); m_hookDetailLabel.ClearOnRender = true; m_hookDetailLabel.Format = DrawTextFormat.WordBreak; m_hookDetailLabel.Location = new System.Drawing.Point(0, 0); m_hookDetailLabel.AutoSize = true; m_hookDetailLabel.UseParentWidth = false; m_hookDetailTreeNode = new SimpleTreeNodeWidget("Detail"); m_hookDetailTreeNode.IsRadioButton = true; m_hookDetailTreeNode.Expanded = true; m_hookDetailTreeNode.EnableCheck = false; m_hookDetailTreeNode.Add(m_hookDetailLabel); m_hookTreeNode.Add(m_hookDetailTreeNode); m_hookDescTreeNode = new SimpleTreeNodeWidget("Description"); m_hookDescTreeNode.IsRadioButton = true; m_hookDescTreeNode.Expanded = true; m_hookDescTreeNode.EnableCheck = false; m_hookDescLabel = new LabelWidget(""); m_hookDescLabel.ClearOnRender = true; m_hookDescLabel.Format = DrawTextFormat.WordBreak; m_hookDescLabel.Location = new System.Drawing.Point(0, 0); m_hookDescLabel.AutoSize = true; m_hookDescLabel.UseParentWidth = true; m_hookDescTreeNode.Add(m_hookDescLabel); m_hookTreeNode.Add(m_hookDescTreeNode); m_hookForm.Add(m_hookTreeNode); DrawArgs.NewRootWidget.ChildWidgets.Add(m_hookForm); } UpdateHookForm(); m_hookForm.Enabled = true; m_hookForm.Visible = true; IsHooked = true; }