4 Replies - 898 Views - Last Post: 17 July 2019 - 06:54 AM Rate Topic: -----

#1 wilkog   User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 3
  • Joined: 09-July 19

Find_Listview save to a txt file

Posted 09 July 2019 - 05:08 AM

I managed to change that Login and Real load buttons are auto clicked. Now I need that all data which I can see now in Find_ list View are online added to C:\Users\Public\WattLOG.txt file Then I Will Access to this file with another program and read all events. When there comes new line, I need to store it immediately in file.

using System;
using System.Collections;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Diagnostics;
using System.Drawing;
using System.IO;
using System.Linq;
using System.Runtime.InteropServices;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
using NetSDKCS;

namespace FaceAttendance
{
    public partial class Form1 : Form
    {
        IntPtr loginID = IntPtr.Zero;
        IntPtr realLoadID = IntPtr.Zero;
        fDisConnectCallBack disConnectCallBack;
        fHaveReConnectCallBack haveReConnectCallBack;
        fAnalyzerDataCallBack analyzerDataCallBack;
        NET_DEVICEINFO_Ex device;
        int pic_index = 0;
        private int ListViewCount = 100;
        public static ArrayList device_channel = new ArrayList();
        private ArrayList arrayList_userID = new ArrayList();
        private bool IsListen = false;
        public Form1()
        {
            InitializeComponent();
            this.Load += new EventHandler(Form1_Load);
        }

        ~Form1()
        {
            if(realLoadID != IntPtr.Zero)
            {
                NETClient.StopLoadPic(realLoadID);
            }
            if(IsListen)
            {
                NETClient.StopListen(loginID);
            }
            if(loginID != IntPtr.Zero)
            {
                NETClient.Logout(loginID);
            }
        }

        private void Form1_Load(object sender, EventArgs e)
        {
            disConnectCallBack = new fDisConnectCallBack(DisConnectCallBack);
            haveReConnectCallBack = new fHaveReConnectCallBack(ReConnectCallBack);
            analyzerDataCallBack = new fAnalyzerDataCallBack(AnalyzerDataCallBack);
            try
            {
                NETClient.Init(disConnectCallBack, IntPtr.Zero, null);
                NETClient.SetAutoReconnect(haveReConnectCallBack, IntPtr.Zero);
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message);
                Process.GetCurrentProcess().Kill();
            }
            System.Threading.Thread.Sleep(1000);
            if (IntPtr.Zero == loginID)
            {
                ushort port = 0;
                try
                {
                    port = Convert.ToUInt16(port_textBox.Text.Trim());
                }
                catch
                {
                    MessageBox.Show("Input port error");
                    return;
                }
                device = new NET_DEVICEINFO_Ex();
                // 172.5.2.136
                loginID = NETClient.Login(ip_textBox.Text.Trim(), port, user_textBox.Text.Trim(), pwd_textBox.Text.Trim(), EM_LOGIN_SPAC_CAP_TYPE.TCP, IntPtr.Zero, ref device);
                if (IntPtr.Zero == loginID)
                {
                    MessageBox.Show(this, NETClient.GetLastError());
                    return;
                }
                //for(int i=0; i < device.nChanNum; ++i)
                //{
                //    channel_comboBox.Items.Add(i);
                //    device_channel.Add(i);
                //}
                //channel_comboBox.SelectedIndex = 0;
                LoginUpdateUI();
            }
            if (realLoadID == IntPtr.Zero)
            {
                realLoadID = NETClient.RealLoadPicture(loginID, 0, (uint)EM_EVENT_IVS_TYPE.ACCESS_CTL, true, analyzerDataCallBack, IntPtr.Zero, IntPtr.Zero);
                if (realLoadID == IntPtr.Zero)
                {
                    MessageBox.Show(this, NETClient.GetLastError());
                    return;
                }
                RealLoad.Text = "Stop realload";
            }
        }
        private int AnalyzerDataCallBack(IntPtr lAnalyzerHandle, uint dwEventType, IntPtr pEventInfo, IntPtr pBuffer, uint dwBufSize, IntPtr dwUser, int nSequence, IntPtr reserved)
        {
            if(realLoadID != lAnalyzerHandle)
            {
                return 0;
            }
            switch (dwEventType)
            {
                case (uint)EM_EVENT_IVS_TYPE.ACCESS_CTL:
                    NET_DEV_EVENT_ACCESS_CTL_INFO info = (NET_DEV_EVENT_ACCESS_CTL_INFO)Marshal.PtrToStructure(pEventInfo, typeof(NET_DEV_EVENT_ACCESS_CTL_INFO));
                    this.BeginInvoke(new Action(() =>
                    {
                        var list_item = new ListViewItem();
                        list_item.Text = info.UTC.ToString();
                        list_item.SubItems.Add(info.szUserID);
                        list_item.SubItems.Add(info.szCardName);
                        list_item.SubItems.Add(info.emOpenMethod.ToString());
                        list_item.SubItems.Add(info.emAttendanceState.ToString());

                        find_listView.BeginUpdate();
                        find_listView.Items.Add(list_item);
                        if(find_listView.Items.Count > ListViewCount)
                        {
                            find_listView.Items.RemoveAt(ListViewCount);
                        }
                        find_listView.EndUpdate();
                    }));
                    if(IntPtr.Zero != pBuffer && dwBufSize > 0)
                    {
                        byte[] pic = new byte[dwBufSize];
                        Marshal.Copy(pBuffer, pic, 0, (int)dwBufSize);
                        using(MemoryStream stream = new MemoryStream(pic))
                        {
                            try
                            {
                                Image image = Image.FromStream(stream);
                                realload_pictureBox.Image = image;
                            }
                            catch(Exception e)
                            {
                                Console.WriteLine(e);
                            }
                        }
                    }

                    break;
                default:
                    break;
            }

            return 0;
        }

        private void ReConnectCallBack(IntPtr lLoginID, IntPtr pchDVRIP, int nDVRPort, IntPtr dwUser)
        {
            this.BeginInvoke((Action)UpdateReConnectedUI);
        }

        private void UpdateReConnectedUI()
        {
            this.Text = "FaceAttendance -- OnLine";
        }

        private void DisConnectCallBack(IntPtr lLoginID, IntPtr pchDVRIP, int nDVRPort, IntPtr dwUser)
        {
            this.BeginInvoke((Action)UpdateDisConnectedUI);
        }

        private void UpdateDisConnectedUI()
        {
            this.Text = "FaceAttendance -- offline";
        }

        private void LoginDevice_Click(object sender, EventArgs e)
        {
            if (IntPtr.Zero == loginID)
            {
                ushort port = 0;
                try
                {
                    port = Convert.ToUInt16(port_textBox.Text.Trim());
                }
                catch
                {
                    MessageBox.Show("Input port error");
                    return;
                }
                device = new NET_DEVICEINFO_Ex();
                // 172.5.2.136
                loginID = NETClient.Login(ip_textBox.Text.Trim(), port, user_textBox.Text.Trim(), pwd_textBox.Text.Trim(), EM_LOGIN_SPAC_CAP_TYPE.TCP, IntPtr.Zero, ref device);
                if (IntPtr.Zero == loginID)
                {
                    MessageBox.Show(this, NETClient.GetLastError());
                    return;
                }
                //for(int i=0; i < device.nChanNum; ++i)
                //{
                //    channel_comboBox.Items.Add(i);
                //    device_channel.Add(i);
                //}
                //channel_comboBox.SelectedIndex = 0;
                LoginUpdateUI();
            }
            else
            {
                NETClient.StopListen(loginID);
                bool result = NETClient.Logout(loginID);
                if (!result)
                {
                    MessageBox.Show(this, NETClient.GetLastError());
                    return;
                }
                loginID = IntPtr.Zero;
                LogoutUpdateUI();
            }
        }

        private void RealLoad_Click(object sender, EventArgs e)
        {
            if(realLoadID == IntPtr.Zero)
            {
                realLoadID = NETClient.RealLoadPicture(loginID, 0, (uint)EM_EVENT_IVS_TYPE.ACCESS_CTL, true, analyzerDataCallBack, IntPtr.Zero, IntPtr.Zero);
                if (realLoadID == IntPtr.Zero)
                {
                    MessageBox.Show(this, NETClient.GetLastError());
                    return;
                }
                RealLoad.Text = "Stop realload";
            }
            else
            {
                NETClient.StopLoadPic(realLoadID);
                realLoadID = IntPtr.Zero;
                RealLoad.Text = "Start realload";
            }
        }

        private void Snap_button_Click(object sender, EventArgs e)
        {
            NET_IN_SNAP_PIC_TO_FILE_PARAM inParam = new NET_IN_SNAP_PIC_TO_FILE_PARAM()
            {
                dwSize = (uint)Marshal.SizeOf(typeof(NET_IN_SNAP_PIC_TO_FILE_PARAM)),
                stuParam = new NET_SNAP_PARAMS()
                {
                    Channel = 0,
                    Quality = 2,
                    mode = 0
                },
                szFilePath = string.Format("./{0}_image.jpg", pic_index)
            };
            NET_OUT_SNAP_PIC_TO_FILE_PARAM outParam = new NET_OUT_SNAP_PIC_TO_FILE_PARAM()
            {
                dwSize = (uint)Marshal.SizeOf(typeof(NET_OUT_SNAP_PIC_TO_FILE_PARAM)),
                dwPicBufLen = 1024000,
                szPicBuf = Marshal.AllocHGlobal(1024000),
            };

            bool result = NETClient.SnapPictureToFile(loginID, ref inParam, ref outParam, 3000);
            if (!result)
            {
                MessageBox.Show("snap picture fail");
                return;
            }
            byte[] pic = new byte[outParam.dwPicBufRetLen];
            Marshal.Copy(outParam.szPicBuf, pic, 0, (int)outParam.dwPicBufRetLen);
            using (MemoryStream stream = new MemoryStream(pic))
            {
                try
                {
                    Image image = Image.FromStream(stream);
                    snap_pictureBox.Image = image;
                }
                catch (Exception ex)
                {
                    Console.WriteLine(ex);
                }
            }
            Marshal.FreeHGlobal(outParam.szPicBuf);
            ++pic_index;
        }

        private void OpenDoor_Click(object sender, EventArgs e)
        {
            IntPtr intPtr = Marshal.AllocHGlobal(Marshal.SizeOf(typeof(NET_CTRL_ACCESS_OPEN)));
            try
            {
                NET_CTRL_ACCESS_OPEN open = new NET_CTRL_ACCESS_OPEN()
                {
                    dwSize = (uint)Marshal.SizeOf(typeof(NET_CTRL_ACCESS_OPEN)),
                    nChannelID = 0,
                    szTargetID = IntPtr.Zero,
                    emOpenDoorType = EM_OPEN_DOOR_TYPE.REMOTE
                };
                
                Marshal.StructureToPtr(open, intPtr, true);
                bool result = NETClient.ControlDevice(loginID, EM_CtrlType.ACCESS_OPEN, intPtr, 3000);
                if(result)
                {
                    MessageBox.Show("open door successfully");
                }
            }
            catch
            {

            }
            finally
            {
                Marshal.FreeHGlobal(intPtr);
            }
        }

        private void Search_button_Click(object sender, EventArgs e)
        {
            NET_FIND_RECORD_ACCESSCTLCARDREC_CONDITION_EX condition = new NET_FIND_RECORD_ACCESSCTLCARDREC_CONDITION_EX();
            condition.dwSize = (uint)Marshal.SizeOf(typeof(NET_FIND_RECORD_ACCESSCTLCARDREC_CONDITION_EX));
            if (card_checkBox.Checked)
            {
                condition.bCardNoEnable = true;
                condition.szCardNo = cardno_textBox.Text;
            }
            if (time_checkBox.Checked)
            {
                condition.bTimeEnable = true;
                condition.stStartTime = NET_TIME.FromDateTime(start_dateTimePicker.Value);
                condition.stEndTime = NET_TIME.FromDateTime(end_dateTimePicker.Value);
            }
            SearchInfo info = new SearchInfo(loginID, condition);
            info.ShowDialog(); 
        }

        private void Add_button_Click(object sender, EventArgs e)
        {
            AddInfo addInfo = new AddInfo(loginID);
            addInfo.ShowDialog();
            Get();
        }

        private void Remove_button_Click(object sender, EventArgs e)
        {
            bool ret = false;
            if (search_listView.SelectedItems.Count == 0)
            {
                MessageBox.Show("Please select one card");
                return;
            }
            NET_RECORDSET_ACCESS_CTL_CARD info = (NET_RECORDSET_ACCESS_CTL_CARD)search_listView.SelectedItems[0].Tag;

            // delete facedata
            NET_IN_REMOVE_FACE_INFO face_in = new NET_IN_REMOVE_FACE_INFO()
            {
                dwSize = (uint)Marshal.SizeOf(typeof(NET_IN_REMOVE_FACE_INFO)),
                szUserID = info.szUserID
            };
            NET_OUT_REMOVE_FACE_INFO face_out = new NET_OUT_REMOVE_FACE_INFO()
            {
                dwSize = (uint)Marshal.SizeOf(typeof(NET_OUT_REMOVE_FACE_INFO)),
            };
            IntPtr intPtr = Marshal.AllocHGlobal(Marshal.SizeOf(typeof(NET_IN_REMOVE_FACE_INFO)));
            IntPtr outPtr = Marshal.AllocHGlobal(Marshal.SizeOf(typeof(NET_OUT_REMOVE_FACE_INFO)));
            Marshal.StructureToPtr(face_in, intPtr, true);
            Marshal.StructureToPtr(face_out, outPtr, true);
            ret = NETClient.FaceInfoOpreate(loginID, EM_FACEINFO_OPREATE_TYPE.REMOVE, intPtr, outPtr, 5000);
            if (!ret)
            {
                MessageBox.Show("delete face data fail");
            }
            Marshal.FreeHGlobal(intPtr);
            Marshal.FreeHGlobal(outPtr);

            // delete fingerprint
            NET_CTRL_IN_FINGERPRINT_REMOVE_BY_USERID remove_in = new NET_CTRL_IN_FINGERPRINT_REMOVE_BY_USERID()
            {
                dwSize = (uint)Marshal.SizeOf(typeof(NET_CTRL_IN_FINGERPRINT_REMOVE_BY_USERID)),
                szUserID = info.szUserID
            };
            NET_CTRL_OUT_FINGERPRINT_REMOVE_BY_USERID remove_out = new NET_CTRL_OUT_FINGERPRINT_REMOVE_BY_USERID()
            {
                dwSize = (uint)Marshal.SizeOf(typeof(NET_CTRL_OUT_FINGERPRINT_REMOVE_BY_USERID)),
            };

            ret = NETClient.Attendance_RemoveFingerByUserID(loginID, ref remove_in, ref remove_out, 3000);
            if (!ret)
            {
                MessageBox.Show("delete fingerprint data fail");
            }

            // delete card info
            NET_CTRL_RECORDSET_PARAM inParam = new NET_CTRL_RECORDSET_PARAM
            {
                dwSize = (uint)Marshal.SizeOf(typeof(NET_CTRL_RECORDSET_PARAM)),
                emType = EM_NET_RECORD_TYPE.ACCESSCTLCARD
            };
            IntPtr recPtr = IntPtr.Zero;
            IntPtr inPtr = IntPtr.Zero;
            try
            {
                recPtr = Marshal.AllocHGlobal(Marshal.SizeOf(typeof(int)));
                Marshal.StructureToPtr(info.nRecNo, recPtr, true);
                inParam.pBuf = recPtr;
                inParam.nBufLen = Marshal.SizeOf(typeof(int));
                inPtr = Marshal.AllocHGlobal(Marshal.SizeOf(typeof(NET_CTRL_RECORDSET_PARAM)));
                Marshal.StructureToPtr(inParam, inPtr, true);
                ret = NETClient.ControlDevice(loginID, EM_CtrlType.RECORDSET_REMOVE, inPtr, 10000);
                if (!ret)
                {
                    MessageBox.Show(NETClient.GetLastError());
                }
                else
                {
                    MessageBox.Show("Delete success");
                }
            }
            finally
            {
                Marshal.FreeHGlobal(recPtr);
                Marshal.FreeHGlobal(inPtr);
            }
            Get();
        }

        private void Update_button_Click(object sender, EventArgs e)
        {
            if(search_listView.SelectedItems.Count == 0)
            {
                MessageBox.Show("Please select!");
                return;
            }
            string userID = search_listView.FocusedItem.SubItems[0].Text;
            AddInfo addInfo = new AddInfo(loginID, userID);
            addInfo.ShowDialog();
        }

        private void Get()
        {
            bool result = false;
            search_listView.Items.Clear();
            var item = new ListViewItem();

            NET_FIND_RECORD_ACCESSCTLCARD_CONDITION condition = new NET_FIND_RECORD_ACCESSCTLCARD_CONDITION();
            condition.dwSize = (uint)Marshal.SizeOf(typeof(NET_FIND_RECORD_ACCESSCTLCARD_CONDITION));
            if (searchcardno_textBox.Text != "")
            {
                condition.abCardNo = true;
                condition.szCardNo = searchcardno_textBox.Text;
            }
            object obj = condition;
            IntPtr findID = IntPtr.Zero;
            bool ret = NETClient.FindRecord(loginID, EM_NET_RECORD_TYPE.ACCESSCTLCARD, obj, typeof(NET_FIND_RECORD_ACCESSCTLCARD_CONDITION), ref findID, 10000);
            if (!ret)
            {
                MessageBox.Show(NETClient.GetLastError());
                return;
            }

            Task task = new Task(() =>
            {
                while (true)
                {
                    int max = 20;
                    int retNum = 0;
                    List<object> ls = new List<object>();
                    for (int i = 0; i < max; i++)
                    {
                        NET_RECORDSET_ACCESS_CTL_CARD card = new NET_RECORDSET_ACCESS_CTL_CARD
                        {
                            dwSize = (uint)Marshal.SizeOf(typeof(NET_RECORDSET_ACCESS_CTL_CARD)),
                            bEnableExtended = true,
                            stuFingerPrintInfoEx = new NET_ACCESSCTLCARD_FINGERPRINT_PACKET_EX()
                            {
                                nCount = 3,
                                nLength = 1024,
                                nPacketLen = 3*1024,
                                pPacketData = Marshal.AllocHGlobal(3*1024),
                            }
                        };
                        ls.Add(card);
                        
                    }
                    
                    NETClient.FindNextRecord(findID, max, ref retNum, ref ls, typeof(NET_RECORDSET_ACCESS_CTL_CARD), 10000);
                    foreach(var it in ls)
                    {
                        NET_OUT_FINGERPRINT_GETBYUSER finger_out = new NET_OUT_FINGERPRINT_GETBYUSER()
                        {
                            dwSize = (uint)Marshal.SizeOf(typeof(NET_OUT_FINGERPRINT_GETBYUSER)),
                            nSinglePacketLength = 1024,
                            nMaxFingerDataLength = 100 * 1024,
                            pbyFingerData = Marshal.AllocHGlobal(100 * 1024),
                        };
                        NET_RECORDSET_ACCESS_CTL_CARD info = (NET_RECORDSET_ACCESS_CTL_CARD)it;

                        IntPtr inFacePtr = Marshal.AllocHGlobal(Marshal.SizeOf(typeof(NET_IN_GET_FACE_INFO)));
                        IntPtr outFacePtr = Marshal.AllocHGlobal(Marshal.SizeOf(typeof(NET_OUT_GET_FACE_INFO)));
                        NET_OUT_GET_FACE_INFO get_face = new NET_OUT_GET_FACE_INFO()
                        {
                            dwSize = (uint)Marshal.SizeOf(typeof(NET_OUT_GET_FACE_INFO)),
                        };
                        try
                        {
                            NET_IN_GET_FACE_INFO get_in = new NET_IN_GET_FACE_INFO()
                            {
                                dwSize = (uint)Marshal.SizeOf(typeof(NET_IN_GET_FACE_INFO)),
                                szUserID = info.szUserID
                            };

                            if (!arrayList_userID.Contains(info.szUserID))
                            {
                                arrayList_userID.Add(info.szUserID);
                            }
                            

                            Marshal.StructureToPtr(get_in, inFacePtr, true);
                            Marshal.StructureToPtr(get_face, outFacePtr, true);

                            // find fingerprint
                            NET_IN_FINGERPRINT_GETBYUSER finger_in = new NET_IN_FINGERPRINT_GETBYUSER()
                            {
                                dwSize = (uint)Marshal.SizeOf(typeof(NET_IN_FINGERPRINT_GETBYUSER)),
                                szUserID = info.szUserID
                            };

                            result = NETClient.Attendance_GetFingerByUserID(loginID, ref finger_in, ref finger_out, 3000);
                            if (!result)
                            {
                                //MessageBox.Show(NETClient.GetLastError());
                                //return;
                                //it.SubItems.Add("");
                            }
                            else
                            {

                            }
                            // find face
                            result = NETClient.FaceInfoOpreate(loginID, EM_FACEINFO_OPREATE_TYPE.GET, inFacePtr, outFacePtr, 5000);
                            if (!result)
                            {
                                //MessageBox.Show(NETClient.GetLastError());
                            }
                            get_face = (NET_OUT_GET_FACE_INFO)Marshal.PtrToStructure(outFacePtr, typeof(NET_OUT_GET_FACE_INFO));
                        }
                        catch
                        {
                            //MessageBox.Show(ex.Message);
                        }
                        finally
                        {
                            Marshal.FreeHGlobal(inFacePtr);
                            Marshal.FreeHGlobal(outFacePtr);
                        }

                        BeginInvoke(new Action(() =>
                        {
                            var list_item = new ListViewItem();
                            list_item.Text = info.szUserID.ToString();
                            list_item.SubItems.Add(info.szCardNo);
                            list_item.SubItems.Add(info.szCardName);
                            list_item.SubItems.Add(info.szPsw);
                            if (info.nUserType == 0)
                            {
                                list_item.SubItems.Add("General user");
                            }
                            else if (info.nUserType == 1)
                            {
                                list_item.SubItems.Add("Blacklist user");
                            }

                            if (finger_out.nRetFingerPrintCount > 0 && finger_out.nRetFingerDataLength > 0)
                            {
                                byte[] data = new byte[finger_out.nRetFingerDataLength];
                                Marshal.Copy(finger_out.pbyFingerData, data, 0, finger_out.nRetFingerDataLength);
                                list_item.SubItems.Add(Convert.ToBase64String(data));
                            }
                            else
                            {
                                list_item.SubItems.Add("");
                            }

                            //if (info.stuFingerPrintInfoEx.pPacketData != IntPtr.Zero)
                            //{
                            //    byte[] data = new byte[info.stuFingerPrintInfoEx.nRealPacketLen];
                            //    Marshal.Copy(info.stuFingerPrintInfoEx.pPacketData, data, 0, info.stuFingerPrintInfoEx.nRealPacketLen);
                            //    list_item.SubItems.Add(Convert.ToBase64String(data));
                            //    Marshal.FreeHGlobal(info.stuFingerPrintInfoEx.pPacketData);
                            //}
                            //else
                            //{
                            //    list_item.SubItems.Add("");
                            //}

                            if (get_face.nFaceData > 0)
                            {
                                list_item.SubItems.Add(Convert.ToBase64String(get_face.szFaceData[0].byFaceData));
                            }
                            list_item.Tag = info;

                            
                            search_listView.BeginUpdate();
                            search_listView.Items.Insert(0, list_item);
                            if (search_listView.Items.Count > ListViewCount)
                            {
                                search_listView.Items.RemoveAt(ListViewCount);
                            }
                            search_listView.EndUpdate();
                        }));
                    }
                    
                    if (retNum < max)
                    {
                        break;
                    }
                }

            });
            task.Start();
        }

        private void Find_button_Click(object sender, EventArgs e)
        {
            Get();
        }

        private void LoginUpdateUI()
        {
            LoginDevice.Text = "Logout";
            //RealLoad.Text = "Stop realload";
        }

        private void LogoutUpdateUI()
        {
            LoginDevice.Text = "Login";
            //RealLoad.Text = "Start realload";
        }
        private void Add_finger_button_Click(object sender, EventArgs e)
        {
            GetFingerPrint getFingerPrint = new GetFingerPrint(loginID);
            getFingerPrint.ShowDialog();
        }

        private void Update_finger_button_Click(object sender, EventArgs e)
        {
            GetFingerPrint getFingerPrint = new GetFingerPrint(loginID);
            getFingerPrint.ShowDialog();
        }

        private void Find_listView_SelectedIndexChanged(object sender, EventArgs e)
        {

        }

        private void Search_listView_SelectedIndexChanged(object sender, EventArgs e)
        {

        }
    }

}



Is This A Good Question/Topic? 0
  • +

Replies To: Find_Listview save to a txt file

#2 modi123_1   User is offline

  • Suitor #2
  • member icon



Reputation: 15215
  • View blog
  • Posts: 60,899
  • Joined: 12-June 08

Re: Find_Listview save to a txt file

Posted 09 July 2019 - 07:02 AM

Two things.. first - explain what this project does. You start out like this was in the middle of an existing conversation.

Second - you neglected to ask a question or explain what's up.
Was This Post Helpful? 0
  • +
  • -

#3 wilkog   User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 3
  • Joined: 09-July 19

Re: Find_Listview save to a txt file

Posted 09 July 2019 - 07:31 AM

Hi
I am new to forum and to c# (my core programing language is g-code labview)
Thank you all for your time and patient.

I got attendance device with exe software to connect to device and to get fingerprint events.
First i had to click on Login and then Realload to get events in a list in exe program.

I managed to change EXE to do Autologin and auto start RealLoad.
Now i need to get the events of fingerprint, which are shown in A window list of EXE to be saved in a file on a computer disk.
Then i Will Access this *.txt file with my labview program and be happy.

Picture of frontpanel:
https://www.dropbox....LOGATT.PNG?dl=0
Was This Post Helpful? 0
  • +
  • -

#4 wilkog   User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 3
  • Joined: 09-July 19

Re: Find_Listview save to a txt file

Posted 17 July 2019 - 06:40 AM

Are there any data missing to help me or this is hard to do.
Can somebody give me sugestion where to put the code and which command to use?
Do I need first to change data to string and then save to file.

Please ideas...
Was This Post Helpful? 0
  • +
  • -

#5 modi123_1   User is offline

  • Suitor #2
  • member icon



Reputation: 15215
  • View blog
  • Posts: 60,899
  • Joined: 12-June 08

Re: Find_Listview save to a txt file

Posted 17 July 2019 - 06:54 AM

You wouldn't be trying to hook into some random executable. You would head to the manufacturer's site and look for a SDK.
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1