Esempio n. 1
0
        public void GoToOrderEntry(string windowTitle, string windowTitle2)
        {
            _Au3Lib.Opt("WinTitleMatchMode", 2);
            _Au3Lib.Sleep(250);
            _Au3Lib.ControlClick(windowTitle, "", "[NAME:btnOrderEntry]");

            _Au3Lib.Sleep(500);
            _Au3Lib.WinActivate("Order Entry");
            _Au3Lib.WinWaitActive("Order Entry");
            _Au3Lib.WinActivate(windowTitle2);
            _Au3Lib.WinWaitActive(windowTitle2);
            _Au3Lib.WinClose(windowTitle);
            _Au3Lib.WinActivate("Order Entry");
        }
Esempio n. 2
0
 public void optsendkey(int opt)
 {
     auto.Opt("SendKeyDelay", opt);
 }
Esempio n. 3
0
        public void BookJob(int numberOfPhases)
        {
            _Au3Lib.Opt("WinTitleMatchMode", 2);

            //determines if Order Log is open. Terminates program if it isn't.
            string windowTitle = "Order Entry";

            _Au3.CheckIfWindowExists(windowTitle);


            string currentJobName = _Au3Lib.ControlGetText(windowTitle, "", "[NAME:txtOrderName]");

            _Au3.InputProjectInfo(windowTitle, currentJobName, numberOfPhases);

            _Au3Lib.ControlFocus(windowTitle, "", "[NAME:cboPriceType]");
            string division = _Au3.GetDivision();

            _Au3.GetPriceType(division);

            _Au3.SetEndUseCode(windowTitle);
            _Au3Lib.ControlClick(windowTitle, "", "[NAME:btnSaveProject]", "left", 1);
            _Au3.DetermineControlVisibility("[NAME:PictureBoxHappy]", windowTitle);

            //Phasings/Buildings Screen (for Prebook)
            _Au3Lib.ControlClick(windowTitle, "", "[NAME:ProjectFeaturesTab]", "left", 1, 116, 12);
            _Au3.DetermineControlVisibility("[NAME:btnSaveBldgInfo]", windowTitle);
            _Au3Lib.WinActivate(windowTitle);
            _Au3Lib.ControlClick(windowTitle, "", "[NAME:FpSpread_Bldg]", "left", 1, 293, 52);

            //Adds 1,000 to each subsequent category, choosing the first value based on division (hard-coded at the moment)
            _Au3.InputBuildingInfoWeightDollars(division);
            _Au3Lib.ControlClick(windowTitle, "", "[NAME:btnSaveBldgInfo]");
            _Au3.DetermineControlVisibility("[NAME:picboxHappy_BldgInfo]", windowTitle);
            _Au3Lib.ControlClick(windowTitle, "", "[NAME:btnPrebookFromBldg]");

            _Au3.DetermineControlVisibility("[NAME:btnSaveMultiPhasesToDB]", windowTitle);
            _Au3.DisableEmail(windowTitle);
            _Au3Lib.ControlClick(windowTitle, "", "[NAME:btnSaveMultiPhasesToDB]");
            _Au3Lib.Sleep(1000);

            //transfer $$ and ## to Phases
            _Au3Lib.ControlClick(windowTitle, "", "[NAME:ProjectFeaturesTab]", "left", 116, 12);
            _Au3.DetermineControlVisibility("[NAME:btnSaveBldgInfo]", windowTitle);
            _Au3Lib.WinActivate(windowTitle);
            _Au3Lib.ControlClick(windowTitle, "", "[NAME:FpPhaseTool]", "left", 1, 34, 27);


            if (numberOfPhases == 1)
            {
                _Au3Lib.Send("A{TAB}1{TAB}100{ENTER}");
                _Au3Lib.Sleep(250);
            }
            else if (numberOfPhases == 2)
            {
                _Au3Lib.Send("A{TAB}1{TAB}70{ENTER}");
                _Au3Lib.Sleep(250);
                _Au3Lib.Send("{DOWN}30+{TAB}1+{TAB}B{ENTER}");
                _Au3Lib.Sleep(250);
            }

            _Au3Lib.ControlClick(windowTitle, "", "[NAME:btnSaveBldgInfo]");
            _Au3.DetermineControlVisibility("[NAME:picboxHappy_BldgInfo]", windowTitle);
            _Au3Lib.ControlClick(windowTitle, "", "[NAME:btnTsfrToPhases]");
            _Au3.DetermineControlVisibility("[NAME:btnSaveMultiPhasesToDB]", windowTitle);
            _Au3Lib.ControlClick(windowTitle, "", "[NAME:btnSaveMultiPhasesToDB]");

            //Project Dates Screen
            _Au3.DetermineControlVisibility("[NAME:btnSaveProjectDates2]", windowTitle);
            string[] arraycoordinates = _Au3.GetCoordinatesForProjectDates(division).Split(',');
            int[]    coordinates      = new int[arraycoordinates.Length];
            //for (int i = 0; i < arraycoordinates.Length; i++)
            //{
            //    coordinates[i] = Integer.parseInt(arraycoordinates[i]);
            //}

            //$Coords = StringSplit(Call("GetCoords",$Division), ",")

            _Au3Lib.ControlClick(windowTitle, "", "[NAME:FpSpreadProjDates]", "LEFT", 1, 304, 366);

            DateTime currentDate = DateTime.Now;
            //string format = "m/d/yy";
            string formattedDate = currentDate.ToShortDateString();

            _Au3Lib.Send(formattedDate);
            _Au3Lib.Send("{ENTER}");
            _Au3Lib.ControlClick(windowTitle, "", "[NAME:btnSaveProjectDates2]");
            _Au3.DetermineControlVisibility("[NAME:picboxHappy_Dates]", windowTitle);

            //Making phases Active
            _Au3Lib.ControlClick(windowTitle, "", "[NAME:ProjectFeaturesTab]", "", 1, 118, 9);
            _Au3.DetermineControlVisibility("[NAME:btnSaveBldgInfo]", windowTitle);
            _Au3Lib.ControlClick(windowTitle, "", "[NAME:TabControl4]", "", 1, 171, 12);
            _Au3.DetermineControlVisibility("[NAME:chkBookTonsDoll_ViewTons]", windowTitle);

            _Au3Lib.ControlClick(windowTitle, "", "[NAME:lvwSalesSummary]", "right", 1, 180, 70);
            _Au3Lib.Sleep(250);
            _Au3Lib.Send("{DOWN 4}");
            _Au3Lib.Send("{ENTER}");
            _Au3Lib.Sleep(3000);

            if (_RunSettings.NumberOfPhases == 2)
            {
                _Au3Lib.ControlClick(windowTitle, "", "[NAME:lvwSalesSummary]", "right", 1, 180, 138);
                _Au3Lib.Sleep(250);
                _Au3Lib.Send("{DOWN 4}");
                _Au3Lib.Send("{ENTER}");
            }
        }
Esempio n. 4
0
 private void init()
 {
     autoIT.Opt("SendKeyDelay", 250);
 }