📄 logininfo.cs
字号:
// **********************************************************************
//
// Copyright (c) 2003-2008 ZeroC, Inc. All rights reserved.
//
// This copy of Chat Demo is licensed to you under the terms
// described in the CHAT_DEMO_LICENSE file included in this// distribution.
//
// **********************************************************************
using System;
namespace ChatDemoGUI
{
//
// This class stores information needed to log in. All info other
// than the password is stored in Properties.Settings.
//
public class LoginInfo
{
public LoginInfo()
{
_userName = ChatUtils.getSystemUsername();
load();
}
public void save()
{
Properties.Settings.Default.Username = Username;
Properties.Settings.Default.Host = Host;
Properties.Settings.Default.Save();
}
public void load()
{
if(Properties.Settings.Default.Username != "")
{
Username = Properties.Settings.Default.Username;
}
Host = Properties.Settings.Default.Host;
}
public string Username
{
set
{
_userName = value;
}
get
{
return _userName;
}
}
public string Password
{
set
{
_userPassword = value;
}
get
{
return _userPassword;
}
}
public string Host
{
set
{
_host = value;
}
get
{
return _host;
}
}
private string _userName = "";
private string _userPassword = "";
private string _host = "127.0.0.1";
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -