partial void DeleteGrucoxSystemInfo(GrucoxSystemInfo instance);
partial void InsertGrucoxSystemInfo(GrucoxSystemInfo instance);
partial void UpdateGrucoxSystemInfo(GrucoxSystemInfo instance);
/// <summary> /// Perform tasks at first run and upgrade /// </summary> private void InitializeFirstRun() { ManagementObjectCollection mbsList = null; ManagementObjectSearcher mbs = new ManagementObjectSearcher("Select * From Win32_processor"); mbsList = mbs.Get(); string id = ""; foreach (ManagementObject mo in mbsList) { id = mo["ProcessorID"].ToString(); } DataClasses.GrucoxSystemInfo SystemInfo = new DataClasses.GrucoxSystemInfo(); SystemInfo.HardwareID = id; //Reset the Windows Shell ResetWindowsShell(); //Add Application to Startup in Windows Registry ConfigAppStartupRegistry(); if (ApplicationDeployment.IsNetworkDeployed && ApplicationDeployment.CurrentDeployment.IsFirstRun) { //Insert function to poll internet connection first DataClasses.AccessorSystemManagement.TryRegisterNewSystem(ref SystemInfo, SystemInfo.HardwareID); CalibrationSettings.Default.SerialNumber = SystemInfo.SoftwareSerialNumber.ToString(); CalibrationSettings.Default.Save(); } if (CalibrationSettings.Default.IsInternetConfigured) { string IPAddress = DataClasses.AccessorSystemManagement.GetPublicIP(); SystemInfo.IPAddress = IPAddress; if (SystemInfo.IPAddress != "N/A") { DataClasses.AccessorSystemManagement.TryRegisterNewSystem(ref SystemInfo, SystemInfo.HardwareID); } CalibrationSettings.Default.IPAddress = SystemInfo.IPAddress; CalibrationSettings.Default.Save(); } }