private void btnInstrinsicExport_Click(object sender, EventArgs e) { try { /* * //Export by file * string nameTag = "RtIntrinsicExport"; * var tag = GetTag(ResourceUtility.GetString(nameTag)); * if (tag != null) * { * InsightClickButton(tag.Location); * } */ //Export by Snippet mCvsInSightDisplayEdit = mCvsInsightDisplay.Edit; mCvsInsightDisplay.SetCurrentCell(79, 1); CvsCellLocation cvs = mCvsInsightDisplay.CurrentCellNow; int col = mCvsInsightDisplay.CurrentCellNow.Column; int row = mCvsInsightDisplay.CurrentCellNow.Row; CvsAction.SetEnabled(mCvsInSightDisplayEdit.ExportSnippet, true); bool isEnable = mCvsInSightDisplayEdit.ExportSnippet.Enabled; mCvsInSightDisplayEdit.ExportSnippet.Execute(); MessageLoggerManager.Log.Info(String.Format("[Action] Click Export")); } catch (Exception ex) { } }
private object GetValue(CvsCellLocation location) { Cognex.InSight.Cell.CvsCell c = mCvsInsightDisplay.InSight.Results.Cells[location]; var type = c.GetType(); if (c.GetType() == typeof(Cognex.InSight.Cell.CvsCellEditFloat)) { return(((Cognex.InSight.Cell.CvsCellEditFloat)c).Value); } else if (c.GetType() == typeof(Cognex.InSight.Cell.CvsCellEditInt)) { return(((Cognex.InSight.Cell.CvsCellEditInt)c).Value); } else if (c.GetType() == typeof(Cognex.InSight.Cell.CvsCellEditString)) { return(((Cognex.InSight.Cell.CvsCellEditString)c).Text); } else if (c.GetType() == typeof(Cognex.InSight.Cell.CvsCellCheckBox)) { return(((Cognex.InSight.Cell.CvsCellCheckBox)c).Checked); } else if (c.GetType() == typeof(Cognex.InSight.Cell.CvsCellFloat)) { return(((Cognex.InSight.Cell.CvsCellFloat)c).Value); } else if (c.GetType() == typeof(Cognex.InSight.Cell.CvsCellListBox)) { return(((Cognex.InSight.Cell.CvsCellListBox)c).Value); } return(null); }
private void EditCellGraphic(CvsCellLocation location) { try { mCvsInsightDisplay.EditCellGraphic(location); } catch (Exception ex) { } }
private void btnTwoHEUpdate_Click(object sender, EventArgs e) { MessageManager.MessageLoggerManager.Log.Info("[Action] Update Two HE SLMP..."); try { //Import by Snippet mCvsInSightDisplayEdit = mCvsInsightDisplay.Edit; mCvsInsightDisplay.SetCurrentCell(88, 19); CvsCellLocation cvs = mCvsInsightDisplay.CurrentCellNow; int col = mCvsInsightDisplay.CurrentCellNow.Column; int row = mCvsInsightDisplay.CurrentCellNow.Row; CvsAction.SetEnabled(mCvsInSightDisplayEdit.ImportSnippet, true); bool isEnable = mCvsInSightDisplayEdit.ImportSnippet.Enabled; mCvsInSightDisplayEdit.ImportSnippet.Execute(); } catch (Exception ex) { } }
private void InsightSetListBoxValue(CvsCellLocation location, int value) { mCvsInsightDisplay.InSight.SetListBoxIndex(location, value); }
private void InsightSetValue(CvsCellLocation location, bool value) { mCvsInsightDisplay.InSight.SetCheckBox(location, value); }
private void InsightSetValue(CvsCellLocation location, string value) { mCvsInsightDisplay.InSight.SetString(location, value); }
private void InsightSetValue(CvsCellLocation location, int value) { mCvsInsightDisplay.InSight.SetInteger(location, value); }
private void InsightSetValue(CvsCellLocation location, float value) { mCvsInsightDisplay.InSight.SetFloat(location, value); }
private void InsightClickButton(CvsCellLocation location) { mCvsInsightDisplay.InSight.ClickButton(location); }
public void OpenPropertySheet(CvsCellLocation location, string expression) { cvsInSightDisplay1.OpenPropertySheet(location, expression); }
private void InsightSetListBox(CvsCellLocation location, int index) { mCvsInsightDisplay.InSight.SetListBoxIndex(location, index); }
private void EditCellGraphic(CvsCellLocation location) { mCvsInsightDisplay.EditCellGraphic(location); }