private void GenerateProject()
        {
            FormDevice formDevice1 = null;
            FormDevice formDevice2 = null;

            ScriptGenerate.TpLocatorEstrategy locatorEstrategy = ScriptGenerate.TpLocatorEstrategy.IndividualExpression;

            if (rbCombinedExpInOrder.Checked)
            {
                locatorEstrategy = ScriptGenerate.TpLocatorEstrategy.CombinedExpressionsInOrder;
            }
            else if (rbCombinedExpMultiLocator.Checked)
            {
                locatorEstrategy = ScriptGenerate.TpLocatorEstrategy.CombinedExpressionsMultiLocator;
            }



            if (cbCRef1.SelectedIndex > -1)
            {
                formDevice1 = FormMain.FormDevices[_cbCRef1Index[cbCRef1.SelectedIndex]];
            }

            if (cbCRef2.SelectedIndex > -1)
            {
                formDevice2 = FormMain.FormDevices[_cbCRef2Index[cbCRef2.SelectedIndex]];
            }

            if (formDevice1 == null || formDevice2 == null)
            {
                MessageBox.Show("Select two devices.");
                return;
            }

            string msg = "";

            if (!MyNode.CheckDeviceConfigCompatibility(formDevice1.DeviceConfig, formDevice2.DeviceConfig, out msg))
            {
                MessageBox.Show(msg);
                return;
            }


            try
            {
                this.Cursor = Cursors.WaitCursor;

                string dirProject = Support.ScriptGenerate.GenerateVisualStudioProjectTest(formDevice1.DeviceConfig, formDevice2.DeviceConfig, locatorEstrategy, (XPathSelector.XPathType)cbIndividualExp.SelectedItem);
                System.Diagnostics.Process.Start(dirProject);
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message);
            }
            finally
            {
                this.Cursor = Cursors.Default;
            }
        }