public static void PerformReset(System.Windows.Forms.MouseEventArgs e) { DrawArgs drawArgs = JHU_Globals.getInstance().WorldWindow.DrawArgs; double lat = drawArgs.WorldCamera.Latitude.Degrees; double lon = drawArgs.WorldCamera.Longitude.Degrees; double alt = drawArgs.WorldCamera.Altitude; double fov = drawArgs.WorldCamera.ViewRange.Degrees; JHU_Globals.getInstance().WorldWindow.GotoLatLon(lat, lon, 0, alt, fov, 0); JHU_Log.Write(1, "NAV", drawArgs.WorldCamera.Latitude.Degrees, drawArgs.WorldCamera.Longitude.Degrees, drawArgs.WorldCamera.Altitude, "", "Reset Button Pressed"); }
public static void PerformZoomIn(System.Windows.Forms.MouseEventArgs e) { DrawArgs drawArgs = JHU_Globals.getInstance().WorldWindow.DrawArgs; double alt = System.Math.Round(drawArgs.WorldCamera.Altitude); alt = alt * 0.8; if (alt <= 0) { return; } drawArgs.WorldCamera.Altitude = alt; JHU_Log.Write(1, "NAV", drawArgs.WorldCamera.Latitude.Degrees, drawArgs.WorldCamera.Longitude.Degrees, alt, "", "Zoom In Button Pressed"); }
void IconURLMenuItem_Click(object sender, EventArgs s) { try { JHU_Log.Write(1, "ICON", this.Latitude, this.Longitude, this.Altitude, this.Name, "Icon URL called for icon " + this.Name + ". URL = " + m_url); if ((m_url != null) && (m_url.Length > 0)) { Process.Start(m_url); } } catch { } }
/// <summary> /// Default implementation of left click. /// </summary> /// <param name="e">Mouse event parameters</param> public void PerformLMBAction(System.Windows.Forms.MouseEventArgs e) { double lon = (e.X - this.AbsoluteLocation.X) * 2 - 180; double lat = (e.Y - this.AbsoluteLocation.Y) * 2 - 90; if (lat > 0) { lat = -lat; } else { lat = System.Math.Abs(lat); } JHU_Globals.getInstance().WorldWindow.GotoLatLon(lat, lon); JHU_Log.Write(1, "NAV", lat, lon, 0, this.Name, "Control Widget Goto Point Called."); }
public static void PerformBuildingZoom(System.Windows.Forms.MouseEventArgs e) { JHU_Globals.getInstance().WorldWindow.DrawArgs.WorldCamera.Altitude = 1000; JHU_Log.Write(1, "NAV", JHU_Globals.getInstance().WorldWindow.DrawArgs.WorldCamera.Latitude.Degrees, JHU_Globals.getInstance().WorldWindow.DrawArgs.WorldCamera.Longitude.Degrees, JHU_Globals.getInstance().WorldWindow.DrawArgs.WorldCamera.Altitude, "", "Building Zoom Button Pressed"); }
void IconHookMenuItem_Click(object sender, EventArgs s) { JHU_Log.Write(1, "ICON", this.Latitude, this.Longitude, this.Altitude, this.Name, "Icon Hook called for icon " + this.Name); if (m_hookForm == null) { m_hookForm = new jhuapl.util.JHU_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 JHU_SimpleTreeNodeWidget("Info"); m_hookTreeNode.IsRadioButton = true; m_hookTreeNode.Expanded = true; m_hookTreeNode.EnableCheck = false; m_hookGeneralLabel = new JHU_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 JHU_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 JHU_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 JHU_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 JHU_SimpleTreeNodeWidget("Description"); m_hookDescTreeNode.IsRadioButton = true; m_hookDescTreeNode.Expanded = false; m_hookDescTreeNode.EnableCheck = false; m_hookDescLabel = new JHU_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); m_globals.RootWidget.Add(m_hookForm); } UpdateHookForm(); m_hookForm.Enabled = true; m_hookForm.Visible = true; }
void IconGotoMenuItem_Click(object sender, EventArgs s) { JHU_Log.Write(1, "NAV", this.Latitude, this.Longitude, this.Altitude, this.Name, "Icon Goto called for icon " + this.Name); this.GoTo(); }