private void LockClothoInputUi()
 {
     Clotho.EnableClothoTextBoxes(false);
     Thread.Sleep(5);
     Clotho.EnableClothoTextBoxes(false);
     Thread.Sleep(10);
     Clotho.EnableClothoTextBoxes(false);
     Thread.Sleep(15);
     Clotho.EnableClothoTextBoxes(false);
     Thread.Sleep(20);
     Clotho.EnableClothoTextBoxes(false);
 }
    public string DoATFInit(string args)
    {
        Debugger.Break();

        StringBuilder sb = new StringBuilder();

        sb.AppendFormat("Enter DoATFInit: {0}\nDo Minimum HW Init:\n{1}\n", args, ATFInitializer.DoMinimumHWInit());


        #region Custom Init Coding Section
        //////////////////////////////////////////////////////////////////////////////////
        // ----------- ONLY provide your Custom Init Coding here --------------- //

        _myDut = new MyDutFbar(ref sb)
        {
            TmpUnitNo = 0
        };
        _programLoadSuccess = _myDut.InitSuccess;

        _initProTag = ATFCrossDomainWrapper.GetStringFromCache(PublishTags.PUBTAG_PACKAGE_TAG, "");
        Clotho.EnableClothoTextBoxes(false);
        _firstTest = true;

        //Check boolean status of GUI ENTRY
        _guiEnable = false;

        FrmDataInput formInput;
        if (_guiEnable == true)
        {
            #region New InputUI
            formInput = new FrmDataInput();

            //string AssemblyID_ = " ";

            DialogResult rslt = formInput.ShowDialog();

            if (rslt == DialogResult.OK)
            {
                ATFCrossDomainWrapper.StoreStringToCache(PublishTags.PUBTAG_OP_ID, formInput.OperatorId + "\t");
                ATFCrossDomainWrapper.StoreStringToCache(PublishTags.PUBTAG_LOT_ID, formInput.LotId + "\t");
                ATFCrossDomainWrapper.StoreStringToCache(PublishTags.PUBTAG_SUB_LOT_ID, formInput.SublotId + "\t");
                ATFCrossDomainWrapper.StoreStringToCache(PublishTags.PUBTAG_DIB_ID, formInput.LoadBoardId + "\t");
                ATFCrossDomainWrapper.StoreStringToCache(PublishTags.PUBTAG_CONTACTOR_ID, formInput.ContactorId + "\t");
                ATFCrossDomainWrapper.StoreStringToCache(PublishTags.PUBTAG_HANDLER_SN, formInput.HandlerId);
                ATFCrossDomainWrapper.StoreStringToCache(PublishTags.PUBTAG_PCB_ID, "NA");
                ATFCrossDomainWrapper.StoreStringToCache(PublishTags.PUBTAG_WAFER_ID, "NA");
            }

            #region Lock ClothoUI
            if (!formInput.AdminLevel)
            {
                Thread t1 = new Thread(new ThreadStart(LockClothoInputUi));
                t1.Start();
            }
            #endregion

            #endregion
        }


        GU.DoInit_afterCustomCode(true, false, _myDut.ProductTag, @"C:\Avago.ATF.Common\Results");

        // ----------- END of Custom Init Coding --------------- //
        //////////////////////////////////////////////////////////////////////////////////
        #endregion Custom Init Coding Section

        return(sb.ToString());
    }