Early alpha version of a GUI tool to configure and start OpenSim. Currently can start an already configured Grid server.

afrisby
Tedd Hansen 2007-09-12 13:03:21 +00:00
parent 26eebf6b32
commit dcaab9103c
12 changed files with 1176 additions and 0 deletions

View File

@ -0,0 +1,88 @@
using System;
using System.Collections.Generic;
using System.Text;
using System.Windows.Forms;
namespace OpenSim.GUI
{
class InputTextBoxControl:System.Windows.Forms.TextBox
{
public InputTextBoxControl()
{
this.KeyDown += new System.Windows.Forms.KeyEventHandler(TextInputControl_KeyDown);
}
private List<string> CommandHistory = new List<string>();
private bool InHistory = false;
private int HistoryPosition = -1;
void TextInputControl_KeyDown(object sender, System.Windows.Forms.KeyEventArgs e)
{
if (e.KeyCode == Keys.Enter && InHistory == false)
{
CommandHistory.Add(this.Text);
}
if (e.KeyCode == Keys.Up || e.KeyCode == Keys.Down)
{
// if not inside buffer, enter
// InBuffer = true
//Console.WriteLine("History: Check");
if (InHistory == false)
{
if (this.Text != "")
{
//Console.WriteLine("History: Add");
CommandHistory.Add(this.Text);
HistoryPosition = CommandHistory.Count;
}
else
{
//HistoryPosition = CommandHistory.Count + 1;
}
//Console.WriteLine("History: InHistory");
InHistory = true;
}
if (e.KeyCode == Keys.Up)
HistoryPosition -= 1;
if (e.KeyCode == Keys.Down)
HistoryPosition += 1;
if (HistoryPosition > CommandHistory.Count - 1)
HistoryPosition = -1;
if (HistoryPosition < -1)
HistoryPosition = CommandHistory.Count - 1;
//Console.WriteLine("History: Pos: " + HistoryPosition);
//Console.WriteLine("History: HaveInHistCount: " + CommandHistory.Count);
if (CommandHistory.Count != 0)
{
if (HistoryPosition != -1)
{
//Console.WriteLine("History: Getting");
//this.Text = CommandHistory.Item(HistoryPosition);
this.Text = CommandHistory[HistoryPosition];
this.SelectionStart = this.Text.Length;
this.SelectionLength = 0;
}
else
{
//Console.WriteLine("History: Nothing");
this.Text = "";
}
}
e.Handled = true;
} else {
InHistory = false;
HistoryPosition = -1;
}
}
}
}

348
OpenSim/Tools/OpenSim.GUI/Main.Designer.cs generated Normal file
View File

@ -0,0 +1,348 @@
namespace OpenSim.GUI
{
partial class Main
{
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.IContainer components = null;
/// <summary>
/// Clean up any resources being used.
/// </summary>
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}
#region Windows Form Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
this.tabLogs = new System.Windows.Forms.TabControl();
this.tabMainLog = new System.Windows.Forms.TabPage();
this.txtMainLog = new System.Windows.Forms.TextBox();
this.tabRegionServer = new System.Windows.Forms.TabPage();
this.label1 = new System.Windows.Forms.Label();
this.txtInputRegionServer = new OpenSim.GUI.InputTextBoxControl();
this.txtOpenSim = new System.Windows.Forms.TextBox();
this.tabUserServer = new System.Windows.Forms.TabPage();
this.label2 = new System.Windows.Forms.Label();
this.txtInputUserServer = new OpenSim.GUI.InputTextBoxControl();
this.txtUserServer = new System.Windows.Forms.TextBox();
this.tabAssetServer = new System.Windows.Forms.TabPage();
this.label3 = new System.Windows.Forms.Label();
this.txtInputAssetServer = new OpenSim.GUI.InputTextBoxControl();
this.txtAssetServer = new System.Windows.Forms.TextBox();
this.tabGridServer = new System.Windows.Forms.TabPage();
this.label4 = new System.Windows.Forms.Label();
this.txtInputGridServer = new OpenSim.GUI.InputTextBoxControl();
this.txtGridServer = new System.Windows.Forms.TextBox();
this.gbLog = new System.Windows.Forms.GroupBox();
this.btnStart = new System.Windows.Forms.Button();
this.btnStop = new System.Windows.Forms.Button();
this.tabLogs.SuspendLayout();
this.tabMainLog.SuspendLayout();
this.tabRegionServer.SuspendLayout();
this.tabUserServer.SuspendLayout();
this.tabAssetServer.SuspendLayout();
this.tabGridServer.SuspendLayout();
this.gbLog.SuspendLayout();
this.SuspendLayout();
//
// tabLogs
//
this.tabLogs.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.tabLogs.Controls.Add(this.tabMainLog);
this.tabLogs.Controls.Add(this.tabRegionServer);
this.tabLogs.Controls.Add(this.tabUserServer);
this.tabLogs.Controls.Add(this.tabAssetServer);
this.tabLogs.Controls.Add(this.tabGridServer);
this.tabLogs.Location = new System.Drawing.Point(6, 19);
this.tabLogs.Name = "tabLogs";
this.tabLogs.SelectedIndex = 0;
this.tabLogs.Size = new System.Drawing.Size(562, 230);
this.tabLogs.TabIndex = 0;
//
// tabMainLog
//
this.tabMainLog.Controls.Add(this.txtMainLog);
this.tabMainLog.Location = new System.Drawing.Point(4, 22);
this.tabMainLog.Name = "tabMainLog";
this.tabMainLog.Size = new System.Drawing.Size(554, 204);
this.tabMainLog.TabIndex = 4;
this.tabMainLog.Text = "Main log";
this.tabMainLog.UseVisualStyleBackColor = true;
//
// txtMainLog
//
this.txtMainLog.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.txtMainLog.Location = new System.Drawing.Point(6, 5);
this.txtMainLog.Multiline = true;
this.txtMainLog.Name = "txtMainLog";
this.txtMainLog.ScrollBars = System.Windows.Forms.ScrollBars.Vertical;
this.txtMainLog.Size = new System.Drawing.Size(542, 195);
this.txtMainLog.TabIndex = 1;
//
// tabRegionServer
//
this.tabRegionServer.Controls.Add(this.label1);
this.tabRegionServer.Controls.Add(this.txtInputRegionServer);
this.tabRegionServer.Controls.Add(this.txtOpenSim);
this.tabRegionServer.Location = new System.Drawing.Point(4, 22);
this.tabRegionServer.Name = "tabRegionServer";
this.tabRegionServer.Padding = new System.Windows.Forms.Padding(3);
this.tabRegionServer.Size = new System.Drawing.Size(554, 204);
this.tabRegionServer.TabIndex = 0;
this.tabRegionServer.Text = "Region server";
this.tabRegionServer.UseVisualStyleBackColor = true;
//
// label1
//
this.label1.AutoSize = true;
this.label1.Location = new System.Drawing.Point(6, 183);
this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(57, 13);
this.label1.TabIndex = 4;
this.label1.Text = "Command:";
//
// txtInputRegionServer
//
this.txtInputRegionServer.Location = new System.Drawing.Point(69, 180);
this.txtInputRegionServer.Name = "txtInputRegionServer";
this.txtInputRegionServer.Size = new System.Drawing.Size(479, 20);
this.txtInputRegionServer.TabIndex = 0;
//
// txtOpenSim
//
this.txtOpenSim.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.txtOpenSim.Location = new System.Drawing.Point(6, 6);
this.txtOpenSim.Multiline = true;
this.txtOpenSim.Name = "txtOpenSim";
this.txtOpenSim.ScrollBars = System.Windows.Forms.ScrollBars.Vertical;
this.txtOpenSim.Size = new System.Drawing.Size(542, 168);
this.txtOpenSim.TabIndex = 0;
//
// tabUserServer
//
this.tabUserServer.Controls.Add(this.label2);
this.tabUserServer.Controls.Add(this.txtInputUserServer);
this.tabUserServer.Controls.Add(this.txtUserServer);
this.tabUserServer.Location = new System.Drawing.Point(4, 22);
this.tabUserServer.Name = "tabUserServer";
this.tabUserServer.Padding = new System.Windows.Forms.Padding(3);
this.tabUserServer.Size = new System.Drawing.Size(554, 204);
this.tabUserServer.TabIndex = 1;
this.tabUserServer.Text = "User server";
this.tabUserServer.UseVisualStyleBackColor = true;
//
// label2
//
this.label2.AutoSize = true;
this.label2.Location = new System.Drawing.Point(6, 181);
this.label2.Name = "label2";
this.label2.Size = new System.Drawing.Size(57, 13);
this.label2.TabIndex = 6;
this.label2.Text = "Command:";
//
// txtInputUserServer
//
this.txtInputUserServer.Location = new System.Drawing.Point(69, 178);
this.txtInputUserServer.Name = "txtInputUserServer";
this.txtInputUserServer.Size = new System.Drawing.Size(479, 20);
this.txtInputUserServer.TabIndex = 5;
//
// txtUserServer
//
this.txtUserServer.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.txtUserServer.Location = new System.Drawing.Point(6, 5);
this.txtUserServer.Multiline = true;
this.txtUserServer.Name = "txtUserServer";
this.txtUserServer.ScrollBars = System.Windows.Forms.ScrollBars.Vertical;
this.txtUserServer.Size = new System.Drawing.Size(542, 168);
this.txtUserServer.TabIndex = 1;
//
// tabAssetServer
//
this.tabAssetServer.Controls.Add(this.label3);
this.tabAssetServer.Controls.Add(this.txtInputAssetServer);
this.tabAssetServer.Controls.Add(this.txtAssetServer);
this.tabAssetServer.Location = new System.Drawing.Point(4, 22);
this.tabAssetServer.Name = "tabAssetServer";
this.tabAssetServer.Size = new System.Drawing.Size(554, 204);
this.tabAssetServer.TabIndex = 2;
this.tabAssetServer.Text = "Asset server";
this.tabAssetServer.UseVisualStyleBackColor = true;
//
// label3
//
this.label3.AutoSize = true;
this.label3.Location = new System.Drawing.Point(6, 182);
this.label3.Name = "label3";
this.label3.Size = new System.Drawing.Size(57, 13);
this.label3.TabIndex = 6;
this.label3.Text = "Command:";
//
// txtInputAssetServer
//
this.txtInputAssetServer.Location = new System.Drawing.Point(69, 179);
this.txtInputAssetServer.Name = "txtInputAssetServer";
this.txtInputAssetServer.Size = new System.Drawing.Size(479, 20);
this.txtInputAssetServer.TabIndex = 5;
//
// txtAssetServer
//
this.txtAssetServer.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.txtAssetServer.Location = new System.Drawing.Point(6, 5);
this.txtAssetServer.Multiline = true;
this.txtAssetServer.Name = "txtAssetServer";
this.txtAssetServer.ScrollBars = System.Windows.Forms.ScrollBars.Vertical;
this.txtAssetServer.Size = new System.Drawing.Size(542, 168);
this.txtAssetServer.TabIndex = 1;
//
// tabGridServer
//
this.tabGridServer.Controls.Add(this.label4);
this.tabGridServer.Controls.Add(this.txtInputGridServer);
this.tabGridServer.Controls.Add(this.txtGridServer);
this.tabGridServer.Location = new System.Drawing.Point(4, 22);
this.tabGridServer.Name = "tabGridServer";
this.tabGridServer.Size = new System.Drawing.Size(554, 204);
this.tabGridServer.TabIndex = 3;
this.tabGridServer.Text = "Grid server";
this.tabGridServer.UseVisualStyleBackColor = true;
//
// label4
//
this.label4.AutoSize = true;
this.label4.Location = new System.Drawing.Point(6, 182);
this.label4.Name = "label4";
this.label4.Size = new System.Drawing.Size(57, 13);
this.label4.TabIndex = 6;
this.label4.Text = "Command:";
//
// txtInputGridServer
//
this.txtInputGridServer.Location = new System.Drawing.Point(69, 179);
this.txtInputGridServer.Name = "txtInputGridServer";
this.txtInputGridServer.Size = new System.Drawing.Size(479, 20);
this.txtInputGridServer.TabIndex = 5;
//
// txtGridServer
//
this.txtGridServer.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.txtGridServer.Location = new System.Drawing.Point(6, 5);
this.txtGridServer.Multiline = true;
this.txtGridServer.Name = "txtGridServer";
this.txtGridServer.ScrollBars = System.Windows.Forms.ScrollBars.Vertical;
this.txtGridServer.Size = new System.Drawing.Size(542, 168);
this.txtGridServer.TabIndex = 1;
//
// gbLog
//
this.gbLog.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.gbLog.Controls.Add(this.tabLogs);
this.gbLog.Location = new System.Drawing.Point(2, 41);
this.gbLog.Name = "gbLog";
this.gbLog.Size = new System.Drawing.Size(574, 255);
this.gbLog.TabIndex = 1;
this.gbLog.TabStop = false;
this.gbLog.Text = "Logs";
//
// btnStart
//
this.btnStart.Location = new System.Drawing.Point(8, 12);
this.btnStart.Name = "btnStart";
this.btnStart.Size = new System.Drawing.Size(75, 23);
this.btnStart.TabIndex = 2;
this.btnStart.Text = "Start";
this.btnStart.UseVisualStyleBackColor = true;
this.btnStart.Click += new System.EventHandler(this.btnStart_Click);
//
// btnStop
//
this.btnStop.Location = new System.Drawing.Point(89, 12);
this.btnStop.Name = "btnStop";
this.btnStop.Size = new System.Drawing.Size(75, 23);
this.btnStop.TabIndex = 3;
this.btnStop.Text = "Stop";
this.btnStop.UseVisualStyleBackColor = true;
this.btnStop.Click += new System.EventHandler(this.btnStop_Click);
//
// Main
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(583, 299);
this.Controls.Add(this.btnStop);
this.Controls.Add(this.btnStart);
this.Controls.Add(this.gbLog);
this.Name = "Main";
this.Text = "OpenSim";
this.Load += new System.EventHandler(this.Main_Load);
this.tabLogs.ResumeLayout(false);
this.tabMainLog.ResumeLayout(false);
this.tabMainLog.PerformLayout();
this.tabRegionServer.ResumeLayout(false);
this.tabRegionServer.PerformLayout();
this.tabUserServer.ResumeLayout(false);
this.tabUserServer.PerformLayout();
this.tabAssetServer.ResumeLayout(false);
this.tabAssetServer.PerformLayout();
this.tabGridServer.ResumeLayout(false);
this.tabGridServer.PerformLayout();
this.gbLog.ResumeLayout(false);
this.ResumeLayout(false);
}
#endregion
private System.Windows.Forms.TabControl tabLogs;
private System.Windows.Forms.TabPage tabRegionServer;
private System.Windows.Forms.TabPage tabUserServer;
private System.Windows.Forms.GroupBox gbLog;
private System.Windows.Forms.TextBox txtOpenSim;
private System.Windows.Forms.TextBox txtUserServer;
private System.Windows.Forms.TabPage tabAssetServer;
private System.Windows.Forms.TextBox txtAssetServer;
private System.Windows.Forms.TabPage tabGridServer;
private System.Windows.Forms.TextBox txtGridServer;
private System.Windows.Forms.TabPage tabMainLog;
private System.Windows.Forms.Button btnStart;
private System.Windows.Forms.Button btnStop;
private System.Windows.Forms.TextBox txtMainLog;
private System.Windows.Forms.Label label1;
private System.Windows.Forms.Label label2;
private System.Windows.Forms.Label label3;
private System.Windows.Forms.Label label4;
private InputTextBoxControl txtInputRegionServer;
private InputTextBoxControl txtInputUserServer;
private InputTextBoxControl txtInputAssetServer;
private InputTextBoxControl txtInputGridServer;
}
}

View File

@ -0,0 +1,187 @@
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
namespace OpenSim.GUI
{
public partial class Main : Form
{
public ProcessManager proc_OpenSim;
public ProcessManager proc_UserServer;
public ProcessManager proc_GridServer;
public ProcessManager proc_AssetServer;
public Main()
{
InitializeComponent();
}
private void Main_Load(object sender, EventArgs e)
{
txtInputUserServer.KeyPress += new KeyPressEventHandler(txtInputUserServer_KeyPress);
txtInputGridServer.KeyPress += new KeyPressEventHandler(txtInputGridServer_KeyPress);
txtInputAssetServer.KeyPress += new KeyPressEventHandler(txtInputAssetServer_KeyPress);
txtInputRegionServer.KeyPress += new KeyPressEventHandler(txtInputRegionServer_KeyPress);
tabLogs.Selected += new TabControlEventHandler(tabLogs_Selected);
}
void tabLogs_Selected(object sender, TabControlEventArgs e)
{
if (e.TabPage == tabUserServer)
txtInputUserServer.Focus();
if (e.TabPage == tabGridServer)
txtInputGridServer.Focus();
if (e.TabPage == tabAssetServer)
txtInputAssetServer.Focus();
if (e.TabPage == tabRegionServer)
txtInputRegionServer.Focus();
}
void txtInputUserServer_KeyPress(object sender, KeyPressEventArgs e)
{
if (e.KeyChar == 13)
{
// We got a command
e.Handled = true;
proc_UserServer.StandardInput.WriteLine(txtInputUserServer.Text + "\r\n");
txtInputUserServer.Text = "";
}
}
void txtInputGridServer_KeyPress(object sender, KeyPressEventArgs e)
{
if (e.KeyChar == 13)
{
// We got a command
e.Handled = true;
proc_GridServer.StandardInput.WriteLine(txtInputGridServer.Text + "\r\n");
txtInputGridServer.Text = "";
}
}
void txtInputAssetServer_KeyPress(object sender, KeyPressEventArgs e)
{
if (e.KeyChar == 13)
{
// We got a command
e.Handled = true;
proc_AssetServer.StandardInput.WriteLine(txtInputAssetServer.Text + "\r\n");
txtInputAssetServer.Text = "";
}
}
void txtInputRegionServer_KeyPress(object sender, KeyPressEventArgs e)
{
if (e.KeyChar == 13)
{
// We got a command
e.Handled = true;
proc_OpenSim.StandardInput.WriteLine(txtInputRegionServer.Text + "\r\n");
txtInputRegionServer.Text = "";
}
}
private void btnStart_Click(object sender, EventArgs e)
{
btnStart.Enabled = false;
btnStop.Enabled = false;
// Start UserServer
proc_UserServer = new ProcessManager("OpenSim.Grid.UserServer.exe", "");
txtMainLog.AppendText("Starting: UserServer");
proc_UserServer.OutputDataReceived += new System.Diagnostics.DataReceivedEventHandler(proc_UserServer_DataReceived);
proc_UserServer.ErrorDataReceived += new System.Diagnostics.DataReceivedEventHandler(proc_UserServer_DataReceived);
proc_UserServer.StartProcess();
System.Threading.Thread.Sleep(2000);
// Start GridServer
proc_GridServer = new ProcessManager("OpenSim.Grid.GridServer.exe", "");
txtMainLog.AppendText("Starting: GridServer");
proc_GridServer.OutputDataReceived += new System.Diagnostics.DataReceivedEventHandler(proc_GridServer_DataReceived);
proc_GridServer.ErrorDataReceived += new System.Diagnostics.DataReceivedEventHandler(proc_GridServer_DataReceived);
proc_GridServer.StartProcess();
System.Threading.Thread.Sleep(2000);
// Start AssetServer
proc_AssetServer = new ProcessManager("OpenSim.Grid.AssetServer.exe", "");
txtMainLog.AppendText("Starting: AssetServer");
proc_AssetServer.OutputDataReceived += new System.Diagnostics.DataReceivedEventHandler(proc_AssetServer_DataReceived);
proc_AssetServer.ErrorDataReceived += new System.Diagnostics.DataReceivedEventHandler(proc_AssetServer_DataReceived);
proc_AssetServer.StartProcess();
System.Threading.Thread.Sleep(2000);
// Start OpenSim
proc_OpenSim = new ProcessManager("OpenSim.EXE", "-gridmode=true");
txtMainLog.AppendText("Starting: OpenSim");
proc_OpenSim.OutputDataReceived += new System.Diagnostics.DataReceivedEventHandler(proc_OpenSim_DataReceived);
proc_OpenSim.ErrorDataReceived += new System.Diagnostics.DataReceivedEventHandler(proc_OpenSim_DataReceived);
proc_OpenSim.StartProcess();
btnStart.Enabled = false;
btnStop.Enabled = true;
}
public delegate void AppendText(string Text);
void proc_UserServer_DataReceived(object sender, System.Diagnostics.DataReceivedEventArgs e)
{
this.Invoke(new AppendText(txtUserServer.AppendText), new object[] { e.Data + "\r\n" });
this.Invoke(new AppendText(txtMainLog.AppendText), new object[] { "UserServer: " + e.Data + "\r\n" });
}
void proc_GridServer_DataReceived(object sender, System.Diagnostics.DataReceivedEventArgs e)
{
this.Invoke(new AppendText(txtGridServer.AppendText), new object[] { e.Data + "\r\n" });
this.Invoke(new AppendText(txtMainLog.AppendText), new object[] { "GridServer: " + e.Data + "\r\n" });
}
void proc_AssetServer_DataReceived(object sender, System.Diagnostics.DataReceivedEventArgs e)
{
this.Invoke(new AppendText(txtAssetServer.AppendText), new object[] { e.Data + "\r\n" });
this.Invoke(new AppendText(txtMainLog.AppendText), new object[] { "AssetServer: " + e.Data + "\r\n" });
}
void proc_OpenSim_DataReceived(object sender, System.Diagnostics.DataReceivedEventArgs e)
{
this.Invoke(new AppendText(txtOpenSim.AppendText), new object[] { e.Data + "\r\n" });
this.Invoke(new AppendText(txtMainLog.AppendText), new object[] { "OpenSim: " + e.Data + "\r\n" });
}
private void btnStop_Click(object sender, EventArgs e)
{
btnStart.Enabled = false;
btnStop.Enabled = false;
if (proc_UserServer != null)
{
txtMainLog.AppendText("Shutting down UserServer. CPU time used: " + proc_UserServer.TotalProcessorTime);
proc_UserServer.StopProcess();
}
if (proc_GridServer != null)
{
txtMainLog.AppendText("Shutting down GridServer. CPU time used: " + proc_GridServer.TotalProcessorTime);
proc_GridServer.StopProcess();
}
if (proc_AssetServer != null)
{
txtMainLog.AppendText("Shutting down AssetServer. CPU time used: " + proc_AssetServer.TotalProcessorTime);
proc_AssetServer.StopProcess();
}
if (proc_OpenSim != null)
{
txtMainLog.AppendText("Shutting down OpenSim. CPU time used: " + proc_OpenSim.TotalProcessorTime);
proc_OpenSim.StopProcess();
}
btnStart.Enabled = true;
btnStop.Enabled = false;
}
}
}

View File

@ -0,0 +1,120 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
</root>

View File

@ -0,0 +1,84 @@
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProductVersion>8.0.50727</ProductVersion>
<SchemaVersion>2.0</SchemaVersion>
<ProjectGuid>{78AEEDD5-4DA8-4E05-8D53-F3C5476A0B97}</ProjectGuid>
<OutputType>WinExe</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>OpenSim.GUI</RootNamespace>
<AssemblyName>OpenSim.GUI</AssemblyName>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>..\..\..\bin\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>bin\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<ItemGroup>
<Reference Include="System" />
<Reference Include="System.Data" />
<Reference Include="System.Deployment" />
<Reference Include="System.Drawing" />
<Reference Include="System.Windows.Forms" />
<Reference Include="System.Xml" />
</ItemGroup>
<ItemGroup>
<Compile Include="InputTextBoxControl.cs">
<SubType>Component</SubType>
</Compile>
<Compile Include="Main.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="Main.Designer.cs">
<DependentUpon>Main.cs</DependentUpon>
</Compile>
<Compile Include="ProcessManager.cs">
<SubType>Component</SubType>
</Compile>
<Compile Include="Program.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
<EmbeddedResource Include="Main.resx">
<SubType>Designer</SubType>
<DependentUpon>Main.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="Properties\Resources.resx">
<Generator>ResXFileCodeGenerator</Generator>
<LastGenOutput>Resources.Designer.cs</LastGenOutput>
<SubType>Designer</SubType>
</EmbeddedResource>
<Compile Include="Properties\Resources.Designer.cs">
<AutoGen>True</AutoGen>
<DependentUpon>Resources.resx</DependentUpon>
</Compile>
<None Include="Properties\Settings.settings">
<Generator>SettingsSingleFileGenerator</Generator>
<LastGenOutput>Settings.Designer.cs</LastGenOutput>
</None>
<Compile Include="Properties\Settings.Designer.cs">
<AutoGen>True</AutoGen>
<DependentUpon>Settings.settings</DependentUpon>
<DesignTimeSharedInput>True</DesignTimeSharedInput>
</Compile>
</ItemGroup>
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets.
<Target Name="BeforeBuild">
</Target>
<Target Name="AfterBuild">
</Target>
-->
</Project>

View File

@ -0,0 +1,71 @@
using System;
using System.Collections.Generic;
using System.Text;
using System.Diagnostics;
namespace OpenSim.GUI
{
public class ProcessManager : Process
{
private string m_FileName;
private string m_Arguments;
public ProcessManager(string FileName,string Arguments)
{
m_FileName = FileName;
m_Arguments = Arguments;
// MyProc = new Process();
StartInfo.WorkingDirectory = AppDomain.CurrentDomain.BaseDirectory;
Console.WriteLine("WorkingDirectory: " + StartInfo.WorkingDirectory);
StartInfo.FileName = m_FileName;
//p.StartInfo.Arguments = "";
StartInfo.UseShellExecute = false;
StartInfo.RedirectStandardError = true;
StartInfo.RedirectStandardInput = true;
StartInfo.RedirectStandardOutput = true;
StartInfo.CreateNoWindow = true;
}
public void StartProcess()
{
try
{
Start();
BeginOutputReadLine();
BeginErrorReadLine();
}
catch (Exception ex)
{
Console.WriteLine("Exception Occurred :{0},{1}",
ex.Message, ex.StackTrace.ToString());
}
}
public void StopProcess()
{
try
{
CancelErrorRead();
CancelErrorRead();
if (!HasExited)
{
StandardInput.WriteLine("quit");
StandardInput.WriteLine("shutdown");
System.Threading.Thread.Sleep(500);
if (!HasExited)
{
Kill();
}
}
}
catch (Exception ex)
{
Console.WriteLine("Exception Occurred :{0},{1}",
ex.Message, ex.StackTrace.ToString());
}
}
}
}

View File

@ -0,0 +1,20 @@
using System;
using System.Collections.Generic;
using System.Windows.Forms;
namespace OpenSim.GUI
{
static class Program
{
/// <summary>
/// The main entry point for the application.
/// </summary>
[STAThread]
static void Main()
{
Application.EnableVisualStyles();
Application.SetCompatibleTextRenderingDefault(false);
Application.Run(new Main());
}
}
}

View File

@ -0,0 +1,33 @@
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
// General Information about an assembly is controlled through the following
// set of attributes. Change these attribute values to modify the information
// associated with an assembly.
[assembly: AssemblyTitle("OpenSim.GUI")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("OpenSim.GUI")]
[assembly: AssemblyCopyright("Copyright © 2007")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
// Setting ComVisible to false makes the types in this assembly not visible
// to COM components. If you need to access a type in this assembly from
// COM, set the ComVisible attribute to true on that type.
[assembly: ComVisible(false)]
// The following GUID is for the ID of the typelib if this project is exposed to COM
[assembly: Guid("c8dbda49-66bd-476b-93b3-71774870b73e")]
// Version information for an assembly consists of the following four values:
//
// Major Version
// Minor Version
// Build Number
// Revision
//
[assembly: AssemblyVersion("1.0.0.0")]
[assembly: AssemblyFileVersion("1.0.0.0")]

View File

@ -0,0 +1,71 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Runtime Version:2.0.50727.312
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
namespace OpenSim.GUI.Properties
{
/// <summary>
/// A strongly-typed resource class, for looking up localized strings, etc.
/// </summary>
// This class was auto-generated by the StronglyTypedResourceBuilder
// class via a tool like ResGen or Visual Studio.
// To add or remove a member, edit your .ResX file then rerun ResGen
// with the /str option, or rebuild your VS project.
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "2.0.0.0")]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
internal class Resources
{
private static global::System.Resources.ResourceManager resourceMan;
private static global::System.Globalization.CultureInfo resourceCulture;
[global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
internal Resources()
{
}
/// <summary>
/// Returns the cached ResourceManager instance used by this class.
/// </summary>
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
internal static global::System.Resources.ResourceManager ResourceManager
{
get
{
if ((resourceMan == null))
{
global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("OpenSim.GUI.Properties.Resources", typeof(Resources).Assembly);
resourceMan = temp;
}
return resourceMan;
}
}
/// <summary>
/// Overrides the current thread's CurrentUICulture property for all
/// resource lookups using this strongly typed resource class.
/// </summary>
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
internal static global::System.Globalization.CultureInfo Culture
{
get
{
return resourceCulture;
}
set
{
resourceCulture = value;
}
}
}
}

View File

@ -0,0 +1,117 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
</root>

View File

@ -0,0 +1,30 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Runtime Version:2.0.50727.312
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
namespace OpenSim.GUI.Properties
{
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "8.0.0.0")]
internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase
{
private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings())));
public static Settings Default
{
get
{
return defaultInstance;
}
}
}
}

View File

@ -0,0 +1,7 @@
<?xml version='1.0' encoding='utf-8'?>
<SettingsFile xmlns="http://schemas.microsoft.com/VisualStudio/2004/01/settings" CurrentProfile="(Default)">
<Profiles>
<Profile Name="(Default)" />
</Profiles>
<Settings />
</SettingsFile>