private void checkBox1_Click(object sender, EventArgs e) { var check = sender as CheckBox; if (check.Checked) { this.ipTxt.Text = Controlles.GetIP(); this.ipTxt.ReadOnly = true; } else { this.ipTxt.ReadOnly = false; } }
public static void RefConfigData() { if (ConfigUtil.ConfigData != null) { var type = ""; MainPicListCount = Convert.ToInt16(GetConfig("mainFormPicListCount", out type)); EditPicListCount = Convert.ToInt16(GetConfig("editPicListCount", out type)); PrintPicListCount = Convert.ToInt16(GetConfig("printPicListCount", out type)); ImageCodeKey = GetConfig("imageCodeKey", out type); Host = GetConfig("host", out type); WifiPath = GetConfig("wifiPath", out type); if (type == "default") { WifiPath = string.Format(WifiPath, Application.StartupPath); } LocationPath = GetConfig("locationPath", out type); if (type == "default") { LocationPath = string.Format(LocationPath, Application.StartupPath); } LogPath = GetConfig("logPath", out type); if (type == "default") { LogPath = string.Format(LogPath, Application.StartupPath); } IpPath = GetConfig("ipPath", out type); if (type == "default") { IpPath = string.Format(IpPath, Controlles.GetIP()); } PrintCount = int.Parse(GetConfig("printCount", out type)); ImgLocation = GetConfig("imgLocation", out type); if (type == "default") { ImgLocation = string.Format(ImgLocation, Application.StartupPath); } PageSize = GetConfig("pageSize", out type); Landscape = bool.Parse(GetConfig("landscape", out type)); MarginLeft = int.Parse(GetConfig("marginLeft", out type)); MarginRight = int.Parse(GetConfig("marginRight", out type)); MarginTop = int.Parse(GetConfig("marginTop", out type)); MarginBottom = int.Parse(GetConfig("marginBottom", out type)); PrintName = GetConfig("printName", out type); } }