73 lines
2.1 KiB
C#
73 lines
2.1 KiB
C#
using SuperMap.RealEstate.Launcher_WinForm;
|
|
using SuperMap.RealEstate.Windows.Forms;
|
|
using System;
|
|
using System.IO;
|
|
using System.Windows.Forms;
|
|
|
|
namespace Launcher.TestApp
|
|
{
|
|
public partial class frmMainModule : FormModule
|
|
{
|
|
public frmMainModule(string ModuleGudi, string[] args)
|
|
: base(ModuleGudi, args)
|
|
{
|
|
InitializeComponent();
|
|
label1.Text = string.Join("\r\n", args);
|
|
}
|
|
|
|
private void frmMain_Load(object sender, EventArgs e)
|
|
{
|
|
Text = Application.ProductVersion;
|
|
textBox1.Text = AppDomain.CurrentDomain.BaseDirectory + "Configuration\\serviceModel.client.config";
|
|
LoadConfig();
|
|
}
|
|
|
|
private void LoadConfig()
|
|
{
|
|
StreamReader _StreamReader = File.OpenText(textBox1.Text);
|
|
richTextBox1.Text = _StreamReader.ReadToEnd();
|
|
_StreamReader.Close();
|
|
}
|
|
|
|
private void button1_Click(object sender, EventArgs e)
|
|
{
|
|
textBox1.Text = AppDomain.CurrentDomain.BaseDirectory + "Configuration\\serviceModel.client.config";
|
|
|
|
LoadConfig();
|
|
}
|
|
|
|
private void button3_Click(object sender, EventArgs e)
|
|
{
|
|
textBox1.Text = AppDomain.CurrentDomain.BaseDirectory + "Configuration\\connectionStrings.config";
|
|
|
|
LoadConfig();
|
|
}
|
|
|
|
private void button2_Click(object sender, EventArgs e)
|
|
{
|
|
StreamWriter _StreamWriter = File.CreateText(textBox1.Text);
|
|
_StreamWriter.Write(richTextBox1.Text);
|
|
_StreamWriter.Close();
|
|
MessageBox.Show("配置文件被修改了。");
|
|
//this.Close();
|
|
}
|
|
|
|
private void button4_Click(object sender, EventArgs e)
|
|
{
|
|
LauncherHelper.SetMessageValue(textBox2.Text);
|
|
}
|
|
|
|
private void button5_Click(object sender, EventArgs e)
|
|
{
|
|
LauncherHelper.SetProgress1Value(int.Parse(textBox3.Text));
|
|
|
|
}
|
|
|
|
private void button6_Click(object sender, EventArgs e)
|
|
{
|
|
LauncherHelper.Close(int.Parse(textBox4.Text));
|
|
}
|
|
|
|
}
|
|
}
|