Beispiel #1
0
        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)
            {
            }
        }
Beispiel #2
0
        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);
        }
Beispiel #3
0
 private void EditCellGraphic(CvsCellLocation location)
 {
     try
     {
         mCvsInsightDisplay.EditCellGraphic(location);
     }
     catch (Exception ex)
     {
     }
 }
Beispiel #4
0
        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)
            {
            }
        }
Beispiel #5
0
 private void InsightSetListBoxValue(CvsCellLocation location, int value)
 {
     mCvsInsightDisplay.InSight.SetListBoxIndex(location, value);
 }
Beispiel #6
0
 private void InsightSetValue(CvsCellLocation location, bool value)
 {
     mCvsInsightDisplay.InSight.SetCheckBox(location, value);
 }
Beispiel #7
0
 private void InsightSetValue(CvsCellLocation location, string value)
 {
     mCvsInsightDisplay.InSight.SetString(location, value);
 }
Beispiel #8
0
 private void InsightSetValue(CvsCellLocation location, int value)
 {
     mCvsInsightDisplay.InSight.SetInteger(location, value);
 }
Beispiel #9
0
 private void InsightSetValue(CvsCellLocation location, float value)
 {
     mCvsInsightDisplay.InSight.SetFloat(location, value);
 }
Beispiel #10
0
 private void InsightClickButton(CvsCellLocation location)
 {
     mCvsInsightDisplay.InSight.ClickButton(location);
 }
Beispiel #11
0
 public void OpenPropertySheet(CvsCellLocation location, string expression)
 {
     cvsInSightDisplay1.OpenPropertySheet(location, expression);
 }
Beispiel #12
0
 private void InsightSetListBox(CvsCellLocation location, int index)
 {
     mCvsInsightDisplay.InSight.SetListBoxIndex(location, index);
 }
Beispiel #13
0
 private void EditCellGraphic(CvsCellLocation location)
 {
     mCvsInsightDisplay.EditCellGraphic(location);
 }