00001 using System; 00002 using System.Collections.Generic; 00003 using System.ComponentModel; 00004 using System.Data; 00005 using System.Drawing; 00006 using System.Text; 00007 using System.Windows.Forms; 00008 00009 namespace Client 00010 { 00014 public partial class LoginConfig : Form 00015 { 00020 private LocalSettings localSettings; 00021 00026 public LoginConfig( LocalSettings ls ) 00027 { 00028 InitializeComponent(); 00029 localSettings = ls; 00030 00031 txtServer.Text = localSettings.Server; 00032 txtPort.Text = localSettings.Port.ToString(); 00033 } 00034 00040 private void btnRestore_Click(object sender, EventArgs e) 00041 { 00042 txtServer.Text = "localhost"; 00043 txtPort.Text = "8080"; 00044 } 00045 00051 private void btnCancel_Click(object sender, EventArgs e) 00052 { 00053 this.Close(); 00054 } 00055 00061 private void btnSave_Click(object sender, EventArgs e) 00062 { 00063 localSettings.Server = txtServer.Text; 00064 localSettings.Port = Convert.ToInt32(txtPort.Text); 00065 this.Close(); 00066 } 00067 } 00068 }
1.5.1-p1