//레지스트리를 읽어보자 reg = Registry.CurrentUser.OpenSubKey("Software\\KimKitty", true); if (reg == null) { global_x = Screen.PrimaryScreen.Bounds.Width / 2; global_y = Screen.PrimaryScreen.Bounds.Height / 2; reg = Registry.CurrentUser.CreateSubKey("Software\\KimKitty", RegistryKeyPermissionCheck.ReadWriteSubTree); reg.SetValue("Button_Set", "Left"); reg.SetValue("Mouse_X", global_x.ToString()); reg.SetValue("Mouse_Y", global_y.ToString()); reg.SetValue("Interval", metroTextBox1.Text); } else { if (reg.GetValue("Button_Set").ToString() == "Left") { metroRadioButton1.Checked = true; } else { metroRadioButton2.Checked = true; } global_x = int.Parse(reg.GetValue("Mouse_X").ToString()); global_y = int.Parse(reg.GetValue("Mouse_Y").ToString()); metroTextBox1.Text = reg.GetValue("Interval").ToString(); }