示例#1
0
        //Upon OK click:
        private void OK_btn_Click(object sender, EventArgs e)
        {
            //If paths don't exist, re-enter.
            if (!File.Exists(ChooseInputFilePath_tb.Text))//) || (!File.Exists(ChooseOutputFilePath_tb.Text)))
            {
                MessageBox.Show("Path can't be found - please review your path.");
            }

            //If paths exist, get current device list.
            else
            {
                ELM_GUI.CurrentSession.inputPath  = ChooseInputFilePath_tb.Text;
                ELM_GUI.CurrentSession.outputPath = ChooseOutputFilePath_tb.Text;

                IntPtr p = ELM_GUI.GetCurrentDeviceNameList_GUI(ELM_GUI.stringToCharArray(ELM_GUI.CurrentSession.inputPath));
                ELM_GUI.CurrentSession.ProcessIntPtrToStringArray(p);

                MessageBox.Show("Loaded (" + ELM_GUI.CurrentSession.currentDeviceNameList.Length + ")" +
                                " devices from:\n " + ELM_GUI.CurrentSession.inputPath);

                SendToBack();
                Visible = false;
            }
        }