public LoginForm(DecoderParam Params) { this._DecoderParams = Params; InitializeComponent(); this.cb_User.SelectedIndex = 0; }
private void _LoadDecoderParam() { XmlSerializer xs = new XmlSerializer(typeof(DecoderParam)); string pName = Directory.GetCurrentDirectory() + "\\DecoderParam.xml"; FileStream fs = new FileStream(pName, FileMode.OpenOrCreate, FileAccess.ReadWrite); fs.Position = 0; try { _DParams = (DecoderParam)xs.Deserialize(fs); } catch (Exception ex) { string message = "打开解码器配置文件失败,错误信息:\r\n"; message += ex.Message + "\r\n"; if (ex.InnerException != null) { message += ex.InnerException.Message; } MessageBox.Show(message, "错误", MessageBoxButtons.OK, MessageBoxIcon.Error); } finally { fs.Close(); } }
public PwdModForm(DecoderParam Params) { this._DecoderParams = Params; InitializeComponent(); }