// ================================================= SaveInfoToRegistry private void SaveInfoToRegistry () { string strRegKey = Form_Main .strRegKey + strAddRegKey; RegistryKey regkey = null; try { regkey = Registry .CurrentUser .OpenSubKey (strRegKey, true); if (regkey == null) { regkey = Registry .CurrentUser .CreateSubKey (strRegKey); } regkey .SetValue (nameSizes, new string [] {ClientSize .Width .ToString (), // 0 ClientSize .Height .ToString (), // 1 views .Count .ToString (), // 2 }, RegistryValueKind .MultiString); for (int i = 0; i < views .Count; i++) { views [i] .IntoRegistry (regkey, "View_" + i .ToString ()); } PersonalInfoView_LTP viewOnSave = new PersonalInfoView_LTP ("ViewOnSave", ClientSize, info .Location, TextM .Copy (this, tmBirth .Location, tmBirth), comctrls); viewOnSave .IntoRegistry (regkey, "OnSave"); } catch { } finally { if (regkey != null) regkey .Close (); } }
// ------------------------------------------------- Click_miNameView private void Click_miNameView (object sender, EventArgs e) { Form_NameView_LTP form = new Form_NameView_LTP (views); form .ShowDialog (); if (!string .IsNullOrEmpty (form .NewName)) { PersonalInfoView_LTP piv = new PersonalInfoView_LTP (form .NewName, ClientSize, info .Location, TextM .Copy (this, tmBirth .Location, tmBirth), comctrls); views .Insert (0, piv); } }