public void Save() { _xml.Write("LastRunRecipeName", CommonFunctions.Instance.ProductRecipeName); AxesProfile.Save("MoveProfile", _xml); DelayTimer.Save("DelayTimer", _xml); _xml.Save(); }
public void Save(SettingsXml xml, string section) { xml.OpenSection(section); //xml.Write("TailType", CurrentInstalledTestTailType.ToString()); xml.CloseSection(); xml.Save(); }
private void SaveData() { _settings.ProblemsRootDirectory = txtProblemRootDirectory.Text; _settings.LibraryRootDirectory = txtLibraryRootDirectory.Text; _settings.Save(); }
private void SaveData() { _settings.LatestContestName = txtContestName.Text; _settings.LatestTemplateName = ((ProblemTemplate)cbTemplate.SelectedItem).Name; _settings.LatestBasedOnExistingFile = rbExistingFile.Checked; _settings.Save(); }
public override void SetPropertyValues(SettingsContext context, SettingsPropertyValueCollection collection) { lock (LockObject) { //Iterate through the settings to be stored, only dirty settings for this provider are in collection foreach (SettingsPropertyValue propval in collection) { var groupName = context["GroupName"].ToString(); var groupNode = SettingsXml.SelectSingleNode("/configuration/userSettings/" + context["GroupName"]); if (groupNode == null) { var parentNode = SettingsXml.SelectSingleNode("/configuration/userSettings"); groupNode = SettingsXml.CreateElement(groupName); parentNode.AppendChild(groupNode); } var section = (XmlElement)SettingsXml.SelectSingleNode("/configuration/configSections/sectionGroup/section"); if (section == null) { var parentNode = SettingsXml.SelectSingleNode("/configuration/configSections/sectionGroup"); section = SettingsXml.CreateElement("section"); section.SetAttribute("name", groupName); section.SetAttribute("type", String.Format("{0}, {1}", typeof(ClientSettingsSection), Assembly.GetAssembly(typeof(ClientSettingsSection)))); parentNode.AppendChild(section); } SetValue(groupNode, propval); } Directory.CreateDirectory(UserConfigLocation); SettingsXml.Save(Path.Combine(UserConfigLocation, "user.config")); } }
public void Save() { xml.OpenSection("Counter"); xml.Write("InputEEDycemCleaningCount", inputEEDycemCleaningCount.ToString()); xml.Write("OutputEEDycemCleaningCount", outputEEDycemCleaningCount.ToString()); xml.Write("StartDateTime", startDateTime.ToString()); xml.CloseSection(); xml.Save(); }
public override void SetPropertyValues(SettingsContext context, SettingsPropertyValueCollection collection) { foreach (SettingsPropertyValue propVal in collection) { setValue(propVal); } try{ SettingsXml.Save(Path.Combine(AppSettingsPath, AppSettingsFilename)); }catch (IOException e) { SysDbg.WriteLine("Xml saving error: " + e); } }
public void Save() { foreach (KeyValuePair <string, FormPosition> kvp in _fromLayoutTalbe) { _xml.OpenSection(kvp.Key); _xml.Write("X", kvp.Value.X); _xml.Write("Y", kvp.Value.Y); _xml.Write("Width", kvp.Value.Width); _xml.Write("Height", kvp.Value.Height); _xml.Write("WindowState", kvp.Value.WindowState); _xml.CloseSection(); } _xml.Save(); }
public void saveCCC() { _xml = new SettingsXml(this.HSTSettingsFilePath); _hstCCCCounter.CCCCounterAllMc.CCCCounterForHst = HSTMachine.Workcell.TICCccControl.CCCControlAllMc.CccResult.OutputCounter; _hstCCCCounter.CCCCounterTicMc1.CCCCounterForHst = HSTMachine.Workcell.TICCccControl.CCCControlTicMc1.CccResult.OutputCounter; _hstCCCCounter.CCCCounterTicMc2.CCCCounterForHst = HSTMachine.Workcell.TICCccControl.CCCControlTicMc2.CccResult.OutputCounter; _ancsetting.All_TicFailCounter = double.Parse(_hstCCCCounter.CCCCounterAllMc.CCCCounterForHst.TicFailCounter.ToString()); _ancsetting.All_HstFailCounter = double.Parse(_hstCCCCounter.CCCCounterAllMc.CCCCounterForHst.HstFailCounter.ToString()); _ancsetting.All_TicGoodPartCounter = double.Parse(_hstCCCCounter.CCCCounterAllMc.CCCCounterForHst.TicGoodPartCounter.ToString()); _ancsetting.All_HstGoodPartCounter = double.Parse(_hstCCCCounter.CCCCounterAllMc.CCCCounterForHst.HstGoodPartCounter.ToString()); _ancsetting.All_AdaptivePartRunCounter = double.Parse(_hstCCCCounter.CCCCounterAllMc.CCCCounterForHst.AdaptivePartRunCounter.ToString()); _ancsetting.All_AdaptiveDefectCounter = double.Parse(_hstCCCCounter.CCCCounterAllMc.CCCCounterForHst.AdaptiveDefectCounter.ToString()); _ancsetting.All_LastSaveLogTime = DateTime.ParseExact(System.DateTime.Now.ToString("dd-MMM-yy:HH:mm:ss"), "dd-MMM-yy:HH:mm:ss", null); _ancsetting.All_MCDownTriggering = double.Parse(_hstCCCCounter.CCCCounterAllMc.CCCCounterForHst.MCDownTriggering.ToString()); int.Parse(_ancsetting.All_MCDownTriggering.ToString()); _ancsetting.All_TicHighPercentTriggeringCounter = double.Parse(_hstCCCCounter.CCCCounterAllMc.CCCCounterForHst.TicHighPercentTriggeringCounter.ToString()); _ancsetting.All_HstHighPercentTriggeringCounter = double.Parse(_hstCCCCounter.CCCCounterAllMc.CCCCounterForHst.HstHighPercentTriggeringCounter.ToString()); _ancsetting.All_InternalTriggerCounter = double.Parse(_hstCCCCounter.CCCCounterAllMc.CCCCounterForHst.InternalTriggerCounter.ToString()); _ancsetting.MC1_TicFailCounter = double.Parse(_hstCCCCounter.CCCCounterTicMc1.CCCCounterForHst.TicFailCounter.ToString()); _ancsetting.MC1_HstFailCounter = double.Parse(_hstCCCCounter.CCCCounterTicMc1.CCCCounterForHst.HstFailCounter.ToString()); _ancsetting.MC1_TicGoodPartCounter = double.Parse(_hstCCCCounter.CCCCounterTicMc1.CCCCounterForHst.TicGoodPartCounter.ToString()); _ancsetting.MC1_HstGoodPartCounter = double.Parse(_hstCCCCounter.CCCCounterTicMc1.CCCCounterForHst.HstGoodPartCounter.ToString()); _ancsetting.MC1_AdaptivePartRunCounter = double.Parse(_hstCCCCounter.CCCCounterTicMc1.CCCCounterForHst.AdaptivePartRunCounter.ToString()); _ancsetting.MC1_AdaptiveDefectCounter = double.Parse(_hstCCCCounter.CCCCounterTicMc1.CCCCounterForHst.AdaptiveDefectCounter.ToString()); _ancsetting.MC1_LastSaveLogTime = DateTime.ParseExact(System.DateTime.Now.ToString("dd-MMM-yy:HH:mm:ss"), "dd-MMM-yy:HH:mm:ss", null); _ancsetting.MC1_MCDownTriggering = double.Parse(_hstCCCCounter.CCCCounterTicMc1.CCCCounterForHst.MCDownTriggering.ToString()); int.Parse(_ancsetting.MC1_MCDownTriggering.ToString()); _ancsetting.MC1_TicHighPercentTriggeringCounter = double.Parse(_hstCCCCounter.CCCCounterTicMc1.CCCCounterForHst.TicHighPercentTriggeringCounter.ToString()); _ancsetting.MC1_HstHighPercentTriggeringCounter = double.Parse(_hstCCCCounter.CCCCounterTicMc1.CCCCounterForHst.HstHighPercentTriggeringCounter.ToString()); _ancsetting.MC1_InternalTriggerCounter = double.Parse(_hstCCCCounter.CCCCounterTicMc1.CCCCounterForHst.InternalTriggerCounter.ToString()); _ancsetting.MC2_TicFailCounter = double.Parse(_hstCCCCounter.CCCCounterTicMc2.CCCCounterForHst.TicFailCounter.ToString()); _ancsetting.MC2_HstFailCounter = double.Parse(_hstCCCCounter.CCCCounterTicMc2.CCCCounterForHst.HstFailCounter.ToString()); _ancsetting.MC2_TicGoodPartCounter = double.Parse(_hstCCCCounter.CCCCounterTicMc2.CCCCounterForHst.TicGoodPartCounter.ToString()); _ancsetting.MC2_HstGoodPartCounter = double.Parse(_hstCCCCounter.CCCCounterTicMc2.CCCCounterForHst.HstGoodPartCounter.ToString()); _ancsetting.MC2_AdaptivePartRunCounter = double.Parse(_hstCCCCounter.CCCCounterTicMc2.CCCCounterForHst.AdaptivePartRunCounter.ToString()); _ancsetting.MC2_AdaptiveDefectCounter = double.Parse(_hstCCCCounter.CCCCounterTicMc2.CCCCounterForHst.AdaptiveDefectCounter.ToString()); _ancsetting.MC2_LastSaveLogTime = DateTime.ParseExact(System.DateTime.Now.ToString("dd-MMM-yy:HH:mm:ss"), "dd-MMM-yy:HH:mm:ss", null); _ancsetting.MC2_MCDownTriggering = double.Parse(_hstCCCCounter.CCCCounterTicMc2.CCCCounterForHst.MCDownTriggering.ToString()); int.Parse(_ancsetting.MC2_MCDownTriggering.ToString()); _ancsetting.MC2_TicHighPercentTriggeringCounter = double.Parse(_hstCCCCounter.CCCCounterTicMc2.CCCCounterForHst.TicHighPercentTriggeringCounter.ToString()); _ancsetting.MC2_HstHighPercentTriggeringCounter = double.Parse(_hstCCCCounter.CCCCounterTicMc2.CCCCounterForHst.HstHighPercentTriggeringCounter.ToString()); _ancsetting.MC2_InternalTriggerCounter = double.Parse(_hstCCCCounter.CCCCounterTicMc2.CCCCounterForHst.InternalTriggerCounter.ToString()); _hstCCCCounter.Save("TicCounter", _xml); _ancsetting.Save(); _xml.Save(); }
private void tbSave_Click(object sender, EventArgs e) { if (lvTemplates.SelectedItems.Count > 0) { lvTemplates.SelectedItems[0].Tag = _rtbTemplateSource.Text; } var templates = new List <ProblemTemplate>(); foreach (ListViewItem item in lvTemplates.Items) { templates.Add(new ProblemTemplate { Name = item.SubItems[0].Text, Code = (string)item.Tag }); } _settings.Templates = templates.ToArray(); _settings.Save(); }
public void Save() { if (OnSettingsChanged != null) { OnSettingsChanged(this, null); } _xml.OpenSection("TestProbe"); _xml.Write("COMPort", TestProbe.COMPort.ToString()); _xml.Write("BaudRate", TestProbe.BaudRate.ToString()); _xml.Write("StopBits", TestProbe.StopBits.ToString()); _xml.Write("Parity", TestProbe.Parity.ToString()); _xml.Write("DataBits", TestProbe.DataBits.ToString()); _xml.CloseSection(); _xml.Save(); }
public override void SetPropertyValues(SettingsContext context, SettingsPropertyValueCollection propvals) { //Iterate through the settings to be stored //Only dirty settings are included in propvals, and only ones relevant to this provider foreach (SettingsPropertyValue propval in propvals) { SetValue(propval); } try { SettingsXml.Save(GetDotSettingsFile()); } catch (Exception) { //Ignore if cant save, device been ejected } }
public void Save(SettingsXml xml, string section) { int pid = 0; foreach (HGAProductType item in HGAProduct) { pid++; var pidname = string.Format("PID{0}", pid.ToString()); xml.OpenSection(section); xml.Write(pidname + "/ProductName", item.Name); xml.Write(pidname + "/ConversionBoardID", item.ConversionBoardID.ToString()); xml.Write(pidname + "/HGAProductTailType", item.HGATailType.ToString()); xml.Write(pidname + "/TestProbeType", item.TestProbeType); xml.Write(pidname + "/GlobalPath", item.RecipeGlobalPath); xml.CloseSection(); } xml.Save(); }
public override void SetPropertyValues(SettingsContext context, SettingsPropertyValueCollection propvals) { //Iterate through the settings to be stored //Only dirty settings are included in propvals, and only ones relevant to this provider foreach (SettingsPropertyValue propval in propvals) { SetValue(propval); } try { SettingsXml.Save(Path.Combine(GetAppSettingsPath(), GetAppSettingsFilename())); } catch (Exception ex) { Console.WriteLine("Failed to save settings - " + ex); } }
public override void SetPropertyValues(SettingsContext context, SettingsPropertyValueCollection collection) { foreach (SettingsPropertyValue value in collection) { SetValue(value); } try { if (!Directory.Exists(AppInfo.DataPath)) { Directory.CreateDirectory(AppInfo.DataPath); } SettingsXml.Save(Path.Combine(AppInfo.DataPath, "user.config")); } catch (System.Exception ex) { throw ex; } }
public void Save() { HSTMachine.Workcell.HSTSettings.getConfigPerformance().UPH = uph; xml.OpenSection("Counter"); xml.Write("ProcessedHGACount", processedHGACount.ToString()); xml.Write("CycleTime", cycleTime.ToString()); xml.Write("UPH", uph.ToString()); xml.Write("UPH2", uph2.ToString()); xml.Write("StartDateTime", startDateTime.ToString()); xml.Write("SamplingCounter", _samplingCounter.ToString()); xml.Write("LastSamplingReset", _lastSamplingCounterReset.ToString()); CarrierTriggeringData.Save("CarrierTriggeringData", xml); xml.Write("LastActiveSamplingPartCount", _lastActiveSamplingPartCount.ToString()); xml.Write("WRBridgeRunningPercentage", _wrBridgeRunningPercentage.ToString()); xml.Write("LastWRBridgePercentage", _lastWRBridgePercentage); xml.Write("WriterBridgePartRunCounter", _writerBridgePartRunCounter); xml.CloseSection(); xml.Save(); }
public override void SetPropertyValues(SettingsContext context, SettingsPropertyValueCollection propvals) { //Iterate through the settings to be stored //Only dirty settings are included in propvals, and only ones relevant to this provider foreach (SettingsPropertyValue propval in propvals) { SetValue(propval); } try { SettingsXml.Save(Path.Combine(GetAppSettingsPath(), GetAppSettingsFilename())); } catch (Exception ex) { Log.Error("Exception in PortableSettingsProvider: " + ex); } //Ignore if cant save, device been ejected }
public override void SetPropertyValues(SettingsContext context, SettingsPropertyValueCollection collection) { lock (LockObject) { // We need to forget any cached version of the XML. Otherwise, when more than one lot of settings // is saved in the same file, the provider that is doing the save for one of them may have stale // (or missing) settings for the other. We want to write the dirty properties over a current // version of everything else that has been saved in the file. _settingsXml = null; //Iterate through the settings to be stored, only dirty settings for this provider are in collection foreach (SettingsPropertyValue propval in collection) { var groupName = context["GroupName"].ToString(); var groupNode = SettingsXml.SelectSingleNode("/configuration/userSettings/" + context["GroupName"]); if (groupNode == null) { var parentNode = SettingsXml.SelectSingleNode("/configuration/userSettings"); groupNode = SettingsXml.CreateElement(groupName); parentNode.AppendChild(groupNode); } var section = (XmlElement)SettingsXml.SelectSingleNode("/configuration/configSections/sectionGroup/section"); if (section == null) { var parentNode = SettingsXml.SelectSingleNode("/configuration/configSections/sectionGroup"); section = SettingsXml.CreateElement("section"); section.SetAttribute("name", groupName); section.SetAttribute("type", String.Format("{0}, {1}", typeof(ClientSettingsSection), Assembly.GetAssembly(typeof(ClientSettingsSection)))); parentNode.AppendChild(section); } SetValue(groupNode, propval); } Directory.CreateDirectory(UserConfigLocation); SettingsXml.Save(Path.Combine(UserConfigLocation, UserConfigFileName)); } }
public void Save() { if (OnSettingsChanged != null) { OnSettingsChanged(this, null); } if (string.Compare(Directory.TSRRecipeGlobalPath, Directory.TSRRecipLocalPath) == 0) { Notify.PopUp("WorkOrder Error", "WorkOrder global path and local path should not be the same location, please check directory setting!", "", "OK"); return; } File.Create(this.HSTSettingsFilePath).Dispose(); _xml = new SettingsXml(this.HSTSettingsFilePath); _xml.OpenSection("Config"); // Loop through all properties of this type and read from // config based on property's name. foreach (PropertyInfo pi in this.GetType().GetProperties()) { if (!pi.CanWrite) // Avoid saving readonly property to config file such as IsAutoRecipe { continue; } if (pi.PropertyType == typeof(String)) { _xml.Write(pi.Name, (String)pi.GetValue(this, null)); } if (pi.PropertyType == typeof(Int32)) { _xml.Write(pi.Name, (Int32)pi.GetValue(this, null)); } if (pi.PropertyType == typeof(Double)) { _xml.Write(pi.Name, (Double)pi.GetValue(this, null)); } if (pi.PropertyType == typeof(Boolean)) { _xml.Write(pi.Name, (Boolean)pi.GetValue(this, null)); } if (pi.PropertyType.IsEnum == true) { _xml.Write(pi.Name, (int)pi.GetValue(this, null)); } } _xml.Write("OperatorGID", OperatorGID); _xml.CloseSection(); // Any other types goes here. _xml.OpenSection("Install"); _xml.Write("EquipmentID", Install.EquipmentID); _xml.Write("LocationID", Install.LocationID); _xml.Write("CellID", Install.CellID); _xml.Write("Factory", Install.Factory.ToString()); if (Install.LocationID.Length > 7) { Install.LocationID = Install.LocationID.Substring(0, 7); } if (Install.CellID.Length > 7) { Install.CellID = Install.CellID.Substring(0, 7); } // Disable simulation if vision is enabled if (Install.EnableVision == true) { if (Install.OperationMode == OperationMode.Simulation) { Install.OperationMode = OperationMode.Auto; HSTMachine.Workcell.OperationMode = OperationMode.Auto; } } _xml.Write("OperationMode", HSTMachine.Workcell.OperationMode.ToString()); _xml.Write("EnableDebugLog", Install.EnableDebugLog); _xml.Write("AudibleAlarmEnabled", Install.AudibleAlarmEnabled); _xml.Write("DataLoggingFileSavingEnabled", Install.DataLoggingFileSavingEnabled); _xml.Write("ProcessStepCheckingEnabled", Install.ProcessStepCheckingEnabled); _xml.Write("DataLoggingForRFIDAndSeatrackRecordUpdateEnabled", Install.DataLoggingForRFIDAndSeatrackRecordUpdateEnabled); _xml.Write("SeatrackRecordUpdateEnabled", Install.SeatrackRecordUpdateEnabled); _xml.Write("ClearImproperShutDownMessage", Install.ClearImproperShutDownMessage); _xml.Write("EnableRunTestScriptButton", Install.EnableRunTestScriptButton); _xml.Write("TestScript", Install.TestScript); _xml.Write("LogIOChangeState", Install.LogIOChangeState); _xml.Write("HGADetectionUsingVision", Install.HGADetectionUsingVision); _xml.Write("EnableVision", Install.EnableVision); _xml.Write("ConveyorCongestionToleranceTimeLimit", Install.ConveyorCongestionToleranceTimeLimit); _xml.Write("MeasurementTestTimeOutLimit", Install.MeasurementTestTimeOutLimit); _xml.Write("HGAPurgingDurationInms", Install.HGAPurgingDurationInms); _xml.Write("TICFailHGAsInBoatLimit", Install.TICFailHGAsInBoatLimit); _xml.Write("TICConsecutiveFailBoatsLimit", Install.TICConsecutiveFailBoatsLimit); _xml.Write("TICFailHGAsTotalLimit", Install.TICFailHGAsTotalLimit); _xml.Write("TICErrorCountingTimeInterval", Install.TICErrorCountingTimeInterval); _xml.Write("ConsecutiveFailBoatsFailPickupByInputEE", Install.ConsecutiveFailBoatsFailPickupByInputEE); _xml.Write("FlattenerDeployBeforePrecisorVaccumON", Install.FlattenerDeployBeforePrecisorVaccumON); _xml.Write("FlattenerDeployDuration", Install.FlattenerDeployDuration); _xml.Write("EnableFlattener", Install.EnableFlattenerAsPrecisor); _xml.Write("EnableFlattenerAsInput", Install.EnableFlattenerAsInput); _xml.Write("EnableMaintenanceSpeedForManualMove", Install.EnableMaintenanceSpeedForManualMove); _xml.Write("RFIDUpdateOption", Install.RFIDUpdateOption.ToString()); _xml.Write("InputEETouchingOnDycemDuration", Install.InputEETouchingOnDycemDuration); _xml.Write("OutputEETouchingOnDycemDuration", Install.OutputEETouchingOnDycemDuration); _xml.Write("TotalNumberOfInputEETouchingOnDycem", Install.TotalNumberOfInputEETouchingOnDycem); _xml.Write("TotalNumberOfOutputEETouchingOnDycem", Install.TotalNumberOfOutputEETouchingOnDycem); _xml.Write("CapacitanceTestSamplingSize", Install.CapacitanceTestSamplingSize); _xml.Write("EnabledTDFSystem", Install.EnabledTDFFileSystem); _xml.Write("EnabledSaveTDFFileOnly", Install.EnabledSaveTDFFileOnly); _xml.Write("EnabledSaveTDFBackupFile", Install.EnabledSaveTDFBackupFile); _xml.Write("EnabledUserAccessControl", Install.EnabledUserAccessControl); _xml.Write("DataRecordDisplayCounter", Install.DataRecordDisplayCounter); _xml.Write("ANCGraphCounterMaximum", Install.ANCGraphCounterMaximum); _xml.CloseSection(); _xml.OpenSection("Directories"); _xml.Write("LocalRecipePath", Directory.WorkorderLocalPath); _xml.Write("GlobalRecipePath", Directory.WorkorderGlobalPath); _xml.Write("LogFilePath", Directory.LogFilePath); _xml.Write("WorkOrderPath", Directory.TSRRecipLocalPath); _xml.Write("DataPath", Directory.DataPath); _xml.Write("ErrorHandlingPath", Directory.ErrorHandlingPath); _xml.Write("ServerDirectoryForWorkOrder", Directory.TSRRecipeGlobalPath); _xml.Write("IOChangeStatePath", Directory.IOChangeStatePath); _xml.Write("McConfigGlobalPath", Directory.McConfigGlobalPath); _xml.Write("MachineRobotPointPath", Directory.MachineRobotPointPath); _xml.CloseSection(); _xml.OpenSection("SimulatedPart"); int i = 0; foreach (CarrierSettings CurrentCarrier in SimulatedPart.Carriers) { string CurrentCarrierLabel = "Carrier" + (i++); _xml.Write(CurrentCarrierLabel + "CarrierID", CurrentCarrier.CarrierID); _xml.Write(CurrentCarrierLabel + "Name", CurrentCarrier.Name); _xml.Write(CurrentCarrierLabel + "ImageFileName", CurrentCarrier.ImageFileName); _xml.Write(CurrentCarrierLabel + "RFIDFileName", CurrentCarrier.RFIDFileName); _xml.Write(CurrentCarrierLabel + "IsPassThroughMode", CurrentCarrier.IsPassThroughMode); _xml.Write(CurrentCarrierLabel + "HGA1Status", CurrentCarrier.Hga1.Hga_Status.ToString()); _xml.Write(CurrentCarrierLabel + "HGA2Status", CurrentCarrier.Hga2.Hga_Status.ToString()); _xml.Write(CurrentCarrierLabel + "HGA3Status", CurrentCarrier.Hga3.Hga_Status.ToString()); _xml.Write(CurrentCarrierLabel + "HGA4Status", CurrentCarrier.Hga4.Hga_Status.ToString()); _xml.Write(CurrentCarrierLabel + "HGA5Status", CurrentCarrier.Hga5.Hga_Status.ToString()); _xml.Write(CurrentCarrierLabel + "HGA6Status", CurrentCarrier.Hga6.Hga_Status.ToString()); _xml.Write(CurrentCarrierLabel + "HGA7Status", CurrentCarrier.Hga7.Hga_Status.ToString()); _xml.Write(CurrentCarrierLabel + "HGA8Status", CurrentCarrier.Hga8.Hga_Status.ToString()); _xml.Write(CurrentCarrierLabel + "HGA9Status", CurrentCarrier.Hga9.Hga_Status.ToString()); _xml.Write(CurrentCarrierLabel + "HGA10Status", CurrentCarrier.Hga10.Hga_Status.ToString()); } _xml.CloseSection(); Install.BypassInputAndOutputEEsPickAndPlace = HSTMachine.Workcell.getPanelSetup().chkBypassInputAndOutputEEsPickAndPlace.Checked; Install.BypassMeasurementTestAtTestProbe = HSTMachine.Workcell.getPanelSetup().chkBypassMeasurementTestAtTestProbe.Checked; Install.BypassRFIDReadAtInput = HSTMachine.Workcell.getPanelSetup().chkBypassRFIDReadAtInputStation.Checked; Install.BypassRFIDAndSeatrackWriteAtOutput = HSTMachine.Workcell.getPanelSetup().chkBypassRFIDAndSeatrackWriteAtOutputStation.Checked; Install.BypassVisionAtInputTurnStation = HSTMachine.Workcell.getPanelSetup().chkBypassVisionAtInputTurnStation.Checked; Install.BypassVisionAtOutput = HSTMachine.Workcell.getPanelSetup().chkBypassVisionAtOutputStation.Checked; Install.DryRunWithoutBoat = HSTMachine.Workcell.getPanelSetup().rdoWithoutBoat.Checked; _xml.OpenSection("Bypass"); _xml.Write("BypassInputAndOutputEEsPickAndPlace", Install.BypassInputAndOutputEEsPickAndPlace); _xml.Write("BypassMeasurementTestAtTestProbe", Install.BypassMeasurementTestAtTestProbe); _xml.Write("BypassRFIDReadAtInput", Install.BypassRFIDReadAtInput); _xml.Write("BypassRFIDAndSeatrackWriteAtOutput", Install.BypassRFIDAndSeatrackWriteAtOutput); _xml.Write("BypassVisionAtInputTurnStation", Install.BypassVisionAtInputTurnStation); _xml.Write("BypassVisionAtOutput", Install.BypassVisionAtOutput); _xml.Write("WorkOrderFilePath", Install.WorkOrderFilePath); _xml.CloseSection(); _xml.OpenSection("DryRun"); _xml.Write("DryRunWithoutBoat", Install.DryRunWithoutBoat); _xml.CloseSection(); _xml.CloseSection(); _configPerformance.Save("PerformanceConfig", _xml); _triggeringConfig.Save("TriggeringConfig", _xml); _resistanceCheckingConfig.Save("ResistanceChecking", _xml); _cccParameterSetting.Save("CCCParameterSetting", _xml); _cccCrdlParameterSetting.Save("CccCrdlParameterSetting", _xml); if (HSTMachine.Workcell.TICCccControl != null) { _hstCCCCounter.CCCCounterAllMc.CCCCounterForHst = HSTMachine.Workcell.TICCccControl.CCCControlAllMc.CccResult.OutputCounter; _hstCCCCounter.CCCCounterTicMc1.CCCCounterForHst = HSTMachine.Workcell.TICCccControl.CCCControlTicMc1.CccResult.OutputCounter; _hstCCCCounter.CCCCounterTicMc2.CCCCounterForHst = HSTMachine.Workcell.TICCccControl.CCCControlTicMc2.CccResult.OutputCounter; _hstCCCCounter.Save("TicCounter", _xml); } _xml.Save(); Install.OperationMode = HSTMachine.Workcell.OperationMode; HSTMachine.Workcell.RunMode = HSTMachine.Workcell.OperationMode; HSTMachine.Instance.MainForm.getPanelCommand().DebugButtonsVisibility(); }
public void Save() { File.Create(this.GompertzSettingFilePath).Dispose(); _xml = new SettingsXml(this.GompertzSettingFilePath); _xml.OpenSection("Settings"); // Loop through all properties of this type and read from // config based on property's name. foreach (PropertyInfo pi in this.GetType().GetProperties()) { if (!pi.CanWrite) // Avoid saving readonly property to config file such as IsAutoRecipe { continue; } if (pi.PropertyType == typeof(String)) { _xml.Write(pi.Name, (String)pi.GetValue(this, null)); } if (pi.PropertyType == typeof(Int32)) { _xml.Write(pi.Name, (Int32)pi.GetValue(this, null)); } if (pi.PropertyType == typeof(Double)) { _xml.Write(pi.Name, (Double)pi.GetValue(this, null)); } if (pi.PropertyType == typeof(Boolean)) { _xml.Write(pi.Name, (Boolean)pi.GetValue(this, null)); } if (pi.PropertyType.IsEnum == true) { _xml.Write(pi.Name, (int)pi.GetValue(this, null)); } } // _xml.Write("SSEInitial", SSEInitial.ToString()); // _xml.Write("RSQInitial", RSQInitial.ToString()); _xml.Write("amin", amin.ToString()); _xml.Write("amax", amax.ToString()); _xml.Write("bmin", bmin.ToString()); _xml.Write("bmax", bmax.ToString()); _xml.Write("cmin", cmin.ToString()); _xml.Write("cmax", cmax.ToString()); _xml.Write("dmin", dmin.ToString()); _xml.Write("dmax", dmax.ToString()); // _xml.Write("randomscale", randomscale.ToString()); // _xml.Write("weight", weight.ToString()); // _xml.Write("adaptiveSearch_A", adaptiveSearch_A.ToString()); // _xml.Write("adaptiveSearch_B", adaptiveSearch_B.ToString()); // _xml.Write("adaptiveSearch_C", adaptiveSearch_C.ToString()); // _xml.Write("adaptiveSearch_D", adaptiveSearch_D.ToString()); // _xml.Write("HardLimit_RSQ", HardLimit_RSQ.ToString()); // _xml.Write("HardLimit_SSE", HardLimit_SSE.ToString()); // _xml.Write("MaxTest", MaxTest.ToString()); _xml.Write("Step", Step.ToString()); // _xml.Write("Iteration", Iteration.ToString()); _xml.Write("UseGompertz", UseGompertz.ToString()); // _xml.Write("TestTimePerHGA", TestTimePerHGA.ToString()); _xml.Write("GompertzCalculationMethod", GompertzCalMethod.ToString()); _xml.Write("Split", Split.ToString()); _xml.CloseSection(); _xml.Save(); }
public void Save() { if (OnSettingsChanged != null) { OnSettingsChanged(this, null); } File.Create(HSTMachine.Workcell.HSTSettings.CalibrationSettingsFilePath).Dispose(); _xml = new SettingsXml(HSTMachine.Workcell.HSTSettings.CalibrationSettingsFilePath); _xml.OpenSection("Config"); // Loop through all properties of this type and read from // config based on property's name. foreach (PropertyInfo pi in this.GetType().GetProperties()) { if (!pi.CanWrite) // Avoid saving readonly property to config file such as IsAutoRecipe { continue; } if (pi.PropertyType == typeof(String)) { _xml.Write(pi.Name, (String)pi.GetValue(this, null)); } if (pi.PropertyType == typeof(Int32)) { _xml.Write(pi.Name, (Int32)pi.GetValue(this, null)); } if (pi.PropertyType == typeof(Double)) { _xml.Write(pi.Name, (Double)pi.GetValue(this, null)); } if (pi.PropertyType == typeof(Boolean)) { _xml.Write(pi.Name, (Boolean)pi.GetValue(this, null)); } if (pi.PropertyType.IsEnum == true) { _xml.Write(pi.Name, (int)pi.GetValue(this, null)); } } _xml.OpenSection("RFID"); _xml.Write("RFIDCOMPort", RFID.RFIDCOMPort.ToString()); _xml.Write("RFIDBaudRate", RFID.RFIDBaudRate.ToString()); _xml.Write("RFIDStopBits", RFID.RFIDStopBits.ToString()); _xml.Write("RFIDParity", RFID.RFIDParity.ToString()); _xml.Write("RFIDDataBits", RFID.RFIDDataBits.ToString()); _xml.CloseSection(); _xml.OpenSection("MeasurementTest"); _xml.Write("COMPort", MeasurementTest.COMPort.ToString()); _xml.Write("BaudRate", MeasurementTest.BaudRate.ToString()); _xml.Write("StopBits", MeasurementTest.StopBits.ToString()); _xml.Write("Parity", MeasurementTest.Parity.ToString()); _xml.Write("DataBits", MeasurementTest.DataBits.ToString()); _xml.Write("CurrentInstalledTestProbeType", MeasurementTest.CurrentInstalledTestProbeType.ToString()); int i = 0; foreach (TestProbeType TestProbeType in MeasurementTest.TestProbeTypes) { string CurrentTestProbe = "TestProbe" + (i++); _xml.Write(CurrentTestProbe + "TestProbeName", TestProbeType.Name); } _xml.CloseSection(); _xml.OpenSection("Camera"); _xml.Write("InputCamera_Recipe", Vision.InputCamera.Recipe.ToString()); _xml.Write("InputCamera_ImagesOutputPath", Vision.InputCamera.ImagesOutputPath.ToString()); _xml.Write("InputCamera_SaveAllImages", Vision.InputCamera.SaveAllImages.ToString()); _xml.Write("InputCamera_SaveImagesLessThanTenHGAs", Vision.InputCamera.SaveImagesLessThanTenHGAs.ToString()); _xml.Write("InputCamera_SerialNumber", Vision.InputCamera.CameraSerialNumber.ToString()); _xml.Write("Input_TotalDayToStoreImage", Vision.InputCamera.TotalDayToStoreImage.ToString()); _xml.Write("OutputCamera_Recipe", Vision.OutputCamera.Recipe.ToString()); _xml.Write("OutputCamera_ImagesOutputPath", Vision.OutputCamera.ImagesOutputPath.ToString()); _xml.Write("OutputCamera_SaveAllImages", Vision.OutputCamera.SaveAllImages.ToString()); _xml.Write("OutputCamera_SaveImagesLessThanTenHGAs", Vision.OutputCamera.SaveImagesLessThanTenHGAs.ToString()); _xml.Write("OutputCamera_SerialNumber", Vision.OutputCamera.CameraSerialNumber.ToString()); _xml.Write("Output_TotalDayToStoreImage", Vision.OutputCamera.TotalDayToStoreImage.ToString()); _xml.CloseSection(); _xml.OpenSection("SafetyController"); _xml.Write("COMPort", SafetyController.COMPort.ToString()); _xml.Write("BaudRate", SafetyController.BaudRate.ToString()); _xml.Write("StopBits", SafetyController.StopBits.ToString()); _xml.Write("Parity", SafetyController.Parity.ToString()); _xml.Write("DataBits", SafetyController.DataBits.ToString()); _xml.CloseSection(); _xml.CloseSection(); _xml.Save(); HSTMachine.Instance.MainForm.getPanelCommand().DebugButtonsVisibility(); }
public void Save() { if (OnSettingsChanged != null) { OnSettingsChanged(this, null); } _xml.OpenSection("Config"); // Loop through all properties of this type and read from // config based on property's name. foreach (PropertyInfo pi in this.GetType().GetProperties()) { if (!pi.CanWrite) // Avoid saving readonly property to config file such as IsAutoRecipe { continue; } if (pi.PropertyType == typeof(String)) { _xml.Write(pi.Name, (String)pi.GetValue(this, null)); } if (pi.PropertyType == typeof(Int32)) { _xml.Write(pi.Name, (Int32)pi.GetValue(this, null)); } if (pi.PropertyType == typeof(Double)) { _xml.Write(pi.Name, (Double)pi.GetValue(this, null)); } if (pi.PropertyType == typeof(Boolean)) { _xml.Write(pi.Name, (Boolean)pi.GetValue(this, null)); } if (pi.PropertyType.IsEnum == true) { _xml.Write(pi.Name, (int)pi.GetValue(this, null)); } } _xml.OpenSection("MoveProfile/InputEEZ/"); _xml.Write("Acceleration", MoveProfile.InputEEZ.Acceleration.ToString()); _xml.Write("Deceleration", MoveProfile.InputEEZ.Deceleration.ToString()); _xml.Write("Velocity", MoveProfile.InputEEZ.Velocity.ToString()); _xml.CloseSection(); _xml.OpenSection("MoveProfile/PrecisorX/"); _xml.Write("Acceleration", MoveProfile.PrecisorX.Acceleration.ToString()); _xml.Write("Deceleration", MoveProfile.PrecisorX.Deceleration.ToString()); _xml.Write("Velocity", MoveProfile.PrecisorX.Velocity.ToString()); _xml.CloseSection(); _xml.OpenSection("MoveProfile/PrecisorY/"); _xml.Write("Acceleration", MoveProfile.PrecisorY.Acceleration.ToString()); _xml.Write("Deceleration", MoveProfile.PrecisorY.Deceleration.ToString()); _xml.Write("Velocity", MoveProfile.PrecisorY.Velocity.ToString()); _xml.CloseSection(); _xml.OpenSection("MoveProfile/PrecisorTheta/"); _xml.Write("Acceleration", MoveProfile.PrecisorTheta.Acceleration.ToString()); _xml.Write("Deceleration", MoveProfile.PrecisorTheta.Deceleration.ToString()); _xml.Write("Velocity", MoveProfile.PrecisorTheta.Velocity.ToString()); _xml.CloseSection(); _xml.OpenSection("MoveProfile/TestProbeZ/"); _xml.Write("Acceleration", MoveProfile.TestProbeZ.Acceleration.ToString()); _xml.Write("Deceleration", MoveProfile.TestProbeZ.Deceleration.ToString()); _xml.Write("Velocity", MoveProfile.TestProbeZ.Velocity.ToString()); _xml.CloseSection(); _xml.OpenSection("MoveProfile/OutputEEZ/"); _xml.Write("Acceleration", MoveProfile.OutputEEZ.Acceleration.ToString()); _xml.Write("Deceleration", MoveProfile.OutputEEZ.Deceleration.ToString()); _xml.Write("Velocity", MoveProfile.OutputEEZ.Velocity.ToString()); _xml.CloseSection(); _xml.OpenSection("DelayTimer"); _xml.Write("VacuumOnDelay", Delay.VacuumOnDelay.ToString()); _xml.Write("VacuumOffDelay", Delay.VacuumOffDelay.ToString()); _xml.CloseSection(); _xml.Save(); HSTMachine.Instance.MainForm.getPanelCommand().DebugButtonsVisibility(); }
private void btnSaveRecipe_Click(object sender, EventArgs e) { string FunctionalTestsRecipeFilePath = string.Format("{0}FunctionalTestsRecipe.rcp", CommonFunctions.Instance.RecipeFileDirectory); if (!Directory.Exists(CommonFunctions.Instance.RecipeFileDirectory)) { Directory.CreateDirectory(CommonFunctions.Instance.RecipeFileDirectory); } Log.Info("Startup", "Saving recipe for functional tests to {0}.", FunctionalTestsRecipeFilePath); SettingsXml _xml = new SettingsXml(FunctionalTestsRecipeFilePath); _xml.OpenSection("ZeroOhm"); // 0Ohm _xml.Write("Ch1WriterResistance0Ohm", txtFunctionalTests0CH1.Text); _xml.Write("Ch2TAResistance0Ohm", txtFunctionalTests0CH2.Text); _xml.Write("Ch3WHResistance0Ohm", txtFunctionalTests0CH3.Text); _xml.Write("Ch4RHResistance0Ohm", txtFunctionalTests0CH4.Text); _xml.Write("Ch5R1Resistance0Ohm", txtFunctionalTests0CH5.Text); _xml.Write("Ch6R2Resistance0Ohm", txtFunctionalTests0CH6.Text); _xml.CloseSection(); _xml.OpenSection("TenOhm"); // 10Ohm _xml.Write("Ch1WriterResistance10Ohm", txtFunctionalTests10CH1.Text); _xml.Write("Ch2TAResistance10Ohm", txtFunctionalTests10CH2.Text); _xml.Write("Ch3WHResistance10Ohm", txtFunctionalTests10CH3.Text); _xml.Write("Ch4RHResistance10Ohm", txtFunctionalTests10CH4.Text); _xml.Write("Ch5R1Resistance10Ohm", txtFunctionalTests10CH5.Text); _xml.Write("Ch6R2Resistance10Ohm", txtFunctionalTests10CH6.Text); _xml.CloseSection(); _xml.OpenSection("OneHundredOhm"); // 100Ohm _xml.Write("Ch1WriterResistance100Ohm", txtFunctionalTests100CH1.Text); _xml.Write("Ch2TAResistance100Ohm", txtFunctionalTests100CH2.Text); _xml.Write("Ch3WHResistance100Ohm", txtFunctionalTests100CH3.Text); _xml.Write("Ch4RHResistance100Ohm", txtFunctionalTests100CH4.Text); _xml.Write("Ch5R1Resistance100Ohm", txtFunctionalTests100CH5.Text); _xml.Write("Ch6R2Resistance100Ohm", txtFunctionalTests100CH6.Text); _xml.CloseSection(); _xml.OpenSection("FiveHundredOhm"); // 500Ohm _xml.Write("Ch1WriterResistance500Ohm", txtFunctionalTests500CH1.Text); _xml.Write("Ch2TAResistance500Ohm", txtFunctionalTests500CH2.Text); _xml.Write("Ch3WHResistance500Ohm", txtFunctionalTests500CH3.Text); _xml.Write("Ch4RHResistance500Ohm", txtFunctionalTests500CH4.Text); _xml.Write("Ch5R1Resistance500Ohm", txtFunctionalTests500CH5.Text); _xml.Write("Ch6R2Resistance500Ohm", txtFunctionalTests500CH6.Text); _xml.CloseSection(); _xml.OpenSection("OneThousandOhm"); // 1000Ohm _xml.Write("Ch1WriterResistance1000Ohm", txtFunctionalTests1000CH1.Text); _xml.Write("Ch2TAResistance1000Ohm", txtFunctionalTests1000CH2.Text); _xml.Write("Ch3WHResistance1000Ohm", txtFunctionalTests1000CH3.Text); _xml.Write("Ch4RHResistance1000Ohm", txtFunctionalTests1000CH4.Text); _xml.Write("Ch5R1Resistance1000Ohm", txtFunctionalTests1000CH5.Text); _xml.Write("Ch6R2Resistance1000Ohm", txtFunctionalTests1000CH6.Text); _xml.CloseSection(); _xml.OpenSection("TenThousandOhm"); // 10000Ohm _xml.Write("Ch1WriterResistance10000Ohm", txtFunctionalTests10000CH1.Text); _xml.Write("Ch2TAResistance10000Ohm", txtFunctionalTests10000CH2.Text); _xml.Write("Ch3WHResistance10000Ohm", txtFunctionalTests10000CH3.Text); _xml.Write("Ch4RHResistance10000Ohm", txtFunctionalTests10000CH4.Text); _xml.Write("Ch5R1Resistance10000Ohm", txtFunctionalTests10000CH5.Text); _xml.Write("Ch6R2Resistance10000Ohm", txtFunctionalTests10000CH6.Text); _xml.CloseSection(); _xml.OpenSection("Capacitance"); // Capacitance _xml.Write("Capacitance100pF", txtFunctionalTests100Capa.Text); _xml.Write("Capacitance270pF", txtFunctionalTests270Capa.Text); _xml.Write("Capacitance470pF", txtFunctionalTests470Capa.Text); _xml.Write("Capacitance680pF", txtFunctionalTests680Capa.Text); _xml.Write("Capacitance820pF", txtFunctionalTests820Capa.Text); _xml.Write("Capacitance10nF", txtFunctionalTests10000Capa.Text); _xml.CloseSection(); _xml.OpenSection("Temperature"); // Temperature _xml.Write("Ch1Temperature", txtFunctionalTests0Temp.Text); _xml.Write("Ch2Temperature", txtFunctionalTests50Temp.Text); _xml.Write("Ch3Temperature", txtFunctionalTests100Temp.Text); _xml.CloseSection(); _xml.Save(); }