GUI also contains option for Stand Alone mode.
parent
dcaab9103c
commit
b12bfb6315
|
@ -50,6 +50,9 @@ namespace OpenSim.GUI
|
|||
this.gbLog = new System.Windows.Forms.GroupBox();
|
||||
this.btnStart = new System.Windows.Forms.Button();
|
||||
this.btnStop = new System.Windows.Forms.Button();
|
||||
this.rbGridRegionMode = new System.Windows.Forms.RadioButton();
|
||||
this.rbStandAloneMode = new System.Windows.Forms.RadioButton();
|
||||
this.rbGridServer = new System.Windows.Forms.RadioButton();
|
||||
this.tabLogs.SuspendLayout();
|
||||
this.tabMainLog.SuspendLayout();
|
||||
this.tabRegionServer.SuspendLayout();
|
||||
|
@ -292,11 +295,49 @@ namespace OpenSim.GUI
|
|||
this.btnStop.UseVisualStyleBackColor = true;
|
||||
this.btnStop.Click += new System.EventHandler(this.btnStop_Click);
|
||||
//
|
||||
// rbGridRegionMode
|
||||
//
|
||||
this.rbGridRegionMode.AutoSize = true;
|
||||
this.rbGridRegionMode.Location = new System.Drawing.Point(407, 18);
|
||||
this.rbGridRegionMode.Name = "rbGridRegionMode";
|
||||
this.rbGridRegionMode.Size = new System.Drawing.Size(76, 17);
|
||||
this.rbGridRegionMode.TabIndex = 4;
|
||||
this.rbGridRegionMode.Text = "Grid region";
|
||||
this.rbGridRegionMode.UseVisualStyleBackColor = true;
|
||||
this.rbGridRegionMode.CheckedChanged += new System.EventHandler(this.rbGridRegionMode_CheckedChanged);
|
||||
//
|
||||
// rbStandAloneMode
|
||||
//
|
||||
this.rbStandAloneMode.AutoSize = true;
|
||||
this.rbStandAloneMode.Checked = true;
|
||||
this.rbStandAloneMode.Location = new System.Drawing.Point(319, 18);
|
||||
this.rbStandAloneMode.Name = "rbStandAloneMode";
|
||||
this.rbStandAloneMode.Size = new System.Drawing.Size(82, 17);
|
||||
this.rbStandAloneMode.TabIndex = 5;
|
||||
this.rbStandAloneMode.TabStop = true;
|
||||
this.rbStandAloneMode.Text = "Stand alone";
|
||||
this.rbStandAloneMode.UseVisualStyleBackColor = true;
|
||||
this.rbStandAloneMode.CheckedChanged += new System.EventHandler(this.rbStandAloneMode_CheckedChanged);
|
||||
//
|
||||
// rbGridServer
|
||||
//
|
||||
this.rbGridServer.AutoSize = true;
|
||||
this.rbGridServer.Location = new System.Drawing.Point(484, 18);
|
||||
this.rbGridServer.Name = "rbGridServer";
|
||||
this.rbGridServer.Size = new System.Drawing.Size(76, 17);
|
||||
this.rbGridServer.TabIndex = 6;
|
||||
this.rbGridServer.Text = "Grid server";
|
||||
this.rbGridServer.UseVisualStyleBackColor = true;
|
||||
this.rbGridServer.CheckedChanged += new System.EventHandler(this.rbGridServer_CheckedChanged);
|
||||
//
|
||||
// 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.rbGridServer);
|
||||
this.Controls.Add(this.rbStandAloneMode);
|
||||
this.Controls.Add(this.rbGridRegionMode);
|
||||
this.Controls.Add(this.btnStop);
|
||||
this.Controls.Add(this.btnStart);
|
||||
this.Controls.Add(this.gbLog);
|
||||
|
@ -316,6 +357,7 @@ namespace OpenSim.GUI
|
|||
this.tabGridServer.PerformLayout();
|
||||
this.gbLog.ResumeLayout(false);
|
||||
this.ResumeLayout(false);
|
||||
this.PerformLayout();
|
||||
|
||||
}
|
||||
|
||||
|
@ -343,6 +385,9 @@ namespace OpenSim.GUI
|
|||
private InputTextBoxControl txtInputUserServer;
|
||||
private InputTextBoxControl txtInputAssetServer;
|
||||
private InputTextBoxControl txtInputGridServer;
|
||||
private System.Windows.Forms.RadioButton rbGridRegionMode;
|
||||
private System.Windows.Forms.RadioButton rbStandAloneMode;
|
||||
private System.Windows.Forms.RadioButton rbGridServer;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -29,6 +29,8 @@ namespace OpenSim.GUI
|
|||
txtInputRegionServer.KeyPress += new KeyPressEventHandler(txtInputRegionServer_KeyPress);
|
||||
|
||||
tabLogs.Selected += new TabControlEventHandler(tabLogs_Selected);
|
||||
|
||||
UpdateTabVisibility();
|
||||
}
|
||||
|
||||
void tabLogs_Selected(object sender, TabControlEventArgs e)
|
||||
|
@ -93,9 +95,13 @@ namespace OpenSim.GUI
|
|||
btnStart.Enabled = false;
|
||||
btnStop.Enabled = false;
|
||||
|
||||
|
||||
|
||||
if (rbGridServer.Checked)
|
||||
{
|
||||
// Start UserServer
|
||||
proc_UserServer = new ProcessManager("OpenSim.Grid.UserServer.exe", "");
|
||||
txtMainLog.AppendText("Starting: UserServer");
|
||||
txtMainLog.AppendText("Starting: User server" + "\r\n");
|
||||
proc_UserServer.OutputDataReceived += new System.Diagnostics.DataReceivedEventHandler(proc_UserServer_DataReceived);
|
||||
proc_UserServer.ErrorDataReceived += new System.Diagnostics.DataReceivedEventHandler(proc_UserServer_DataReceived);
|
||||
proc_UserServer.StartProcess();
|
||||
|
@ -103,7 +109,7 @@ namespace OpenSim.GUI
|
|||
|
||||
// Start GridServer
|
||||
proc_GridServer = new ProcessManager("OpenSim.Grid.GridServer.exe", "");
|
||||
txtMainLog.AppendText("Starting: GridServer");
|
||||
txtMainLog.AppendText("Starting: Grid server" + "\r\n");
|
||||
proc_GridServer.OutputDataReceived += new System.Diagnostics.DataReceivedEventHandler(proc_GridServer_DataReceived);
|
||||
proc_GridServer.ErrorDataReceived += new System.Diagnostics.DataReceivedEventHandler(proc_GridServer_DataReceived);
|
||||
proc_GridServer.StartProcess();
|
||||
|
@ -111,15 +117,20 @@ namespace OpenSim.GUI
|
|||
|
||||
// Start AssetServer
|
||||
proc_AssetServer = new ProcessManager("OpenSim.Grid.AssetServer.exe", "");
|
||||
txtMainLog.AppendText("Starting: AssetServer");
|
||||
txtMainLog.AppendText("Starting: Asset server" + "\r\n");
|
||||
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");
|
||||
string p = "";
|
||||
if (rbGridServer.Checked)
|
||||
p = "-gridmode=true";
|
||||
|
||||
proc_OpenSim = new ProcessManager("OpenSim.EXE", p);
|
||||
txtMainLog.AppendText("Starting: OpenSim (Region server)" + "\r\n");
|
||||
proc_OpenSim.OutputDataReceived += new System.Diagnostics.DataReceivedEventHandler(proc_OpenSim_DataReceived);
|
||||
proc_OpenSim.ErrorDataReceived += new System.Diagnostics.DataReceivedEventHandler(proc_OpenSim_DataReceived);
|
||||
proc_OpenSim.StartProcess();
|
||||
|
@ -157,22 +168,22 @@ namespace OpenSim.GUI
|
|||
|
||||
if (proc_UserServer != null)
|
||||
{
|
||||
txtMainLog.AppendText("Shutting down UserServer. CPU time used: " + proc_UserServer.TotalProcessorTime);
|
||||
txtMainLog.AppendText("Shutting down UserServer. CPU time used: " + proc_UserServer.TotalProcessorTime.ToString() + "\r\n");
|
||||
proc_UserServer.StopProcess();
|
||||
}
|
||||
if (proc_GridServer != null)
|
||||
{
|
||||
txtMainLog.AppendText("Shutting down GridServer. CPU time used: " + proc_GridServer.TotalProcessorTime);
|
||||
txtMainLog.AppendText("Shutting down GridServer. CPU time used: " + proc_GridServer.TotalProcessorTime.ToString() + "\r\n");
|
||||
proc_GridServer.StopProcess();
|
||||
}
|
||||
if (proc_AssetServer != null)
|
||||
{
|
||||
txtMainLog.AppendText("Shutting down AssetServer. CPU time used: " + proc_AssetServer.TotalProcessorTime);
|
||||
txtMainLog.AppendText("Shutting down AssetServer. CPU time used: " + proc_AssetServer.TotalProcessorTime.ToString() + "\r\n");
|
||||
proc_AssetServer.StopProcess();
|
||||
}
|
||||
if (proc_OpenSim != null)
|
||||
{
|
||||
txtMainLog.AppendText("Shutting down OpenSim. CPU time used: " + proc_OpenSim.TotalProcessorTime);
|
||||
txtMainLog.AppendText("Shutting down OpenSim. CPU time used: " + proc_OpenSim.TotalProcessorTime.ToString() + "\r\n");
|
||||
proc_OpenSim.StopProcess();
|
||||
}
|
||||
|
||||
|
@ -182,6 +193,43 @@ namespace OpenSim.GUI
|
|||
|
||||
}
|
||||
|
||||
private void UpdateTabVisibility()
|
||||
{
|
||||
if (rbStandAloneMode.Checked)
|
||||
{
|
||||
if (tabLogs.TabPages.Contains(tabUserServer))
|
||||
tabLogs.TabPages.Remove(tabUserServer);
|
||||
if (tabLogs.TabPages.Contains(tabGridServer))
|
||||
tabLogs.TabPages.Remove(tabGridServer);
|
||||
if (tabLogs.TabPages.Contains(tabAssetServer))
|
||||
tabLogs.TabPages.Remove(tabAssetServer);
|
||||
}
|
||||
else
|
||||
{
|
||||
if (!tabLogs.TabPages.Contains(tabUserServer))
|
||||
tabLogs.TabPages.Add(tabUserServer);
|
||||
if (!tabLogs.TabPages.Contains(tabGridServer))
|
||||
tabLogs.TabPages.Add(tabGridServer);
|
||||
if (!tabLogs.TabPages.Contains(tabAssetServer))
|
||||
tabLogs.TabPages.Add(tabAssetServer);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
private void rbStandAloneMode_CheckedChanged(object sender, EventArgs e)
|
||||
{
|
||||
UpdateTabVisibility();
|
||||
}
|
||||
|
||||
private void rbGridRegionMode_CheckedChanged(object sender, EventArgs e)
|
||||
{
|
||||
UpdateTabVisibility();
|
||||
}
|
||||
|
||||
private void rbGridServer_CheckedChanged(object sender, EventArgs e)
|
||||
{
|
||||
UpdateTabVisibility();
|
||||
}
|
||||
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue