Exemplo n.º 1
0
    public void Connect(string mediatorClassRef, string mediatorName)
    {
        this.mediatorName     = mediatorName;
        this.mediatorClassRef = mediatorClassRef;

        UnityFacade.GetInstance().ConnectMediator(this);
    }
Exemplo n.º 2
0
        public override void Execute(Like4LikeManager mgr)
        {
            Login(mgr);

            while (true)
            {
                ReNavigateEarnUrl(mgr);
                var oldWindow = mgr.Driver.WindowHandles.First();

                if (mgr.Driver.Url == mgr.BonusUrl)
                {
                    var bonus = UnityFacade.Resolve <BonusPage>();
                    bonus.OldPage    = this;
                    mgr.CurrentState = bonus;

                    break;
                }

                mgr.Driver.SwitchTo().Window(oldWindow);
                var buttons = new ButtonGetter().Execute(mgr.Driver);

                foreach (var type in GetTypes())
                {
                    var arr = type.Split(new[] { "###" }, StringSplitOptions.RemoveEmptyEntries);
                    ProcessLike(mgr, buttons.Buttons, arr[0], arr[1]);
                }

                mgr.Driver.SwitchTo().Window(oldWindow);
                //mgr.Driver.Navigate().Refresh();
            }
        }
Exemplo n.º 3
0
 // Override Singleton Factory method
 public static UnityFacade GetInstance()
 {
     if (m_instance == null)
     {
         m_instance = new UnityFacade();
     }
     return(m_instance as UnityFacade);
 }
Exemplo n.º 4
0
 // Use this for initialization
 void Awake()
 {
     Debug.Log("main方法操作没有");
     //启动Facade操作
     UnityFacade.GetInstance().StartUp();
     //net启动
     NetWork.init();
 }
Exemplo n.º 5
0
        protected override JobHandle OnUpdate(JobHandle inputDeps)
        {
            JobHandle job = new MovementJob
            {
                deltaTime = UnityFacade.getDeltaTime(),
            }.Schedule(this, inputDeps);

            return(job);
        }
Exemplo n.º 6
0
        static void Main()
        {
            UnityFacade.Reinit("unity");
            var driver = UnityFacade.Resolve <DriverManager>();

            driver.Init();
            driver.CurrentState = UnityFacade.Resolve <LoginPage>();

            while (true)
            {
                driver.Do();
            }
        }
Exemplo n.º 7
0
 private void CheckForNavigate(Like4LikeManager mgr, IWebDriver driver)
 {
     if (driver.FindElements(By.XPath(ElementCheckLoginSuccessXPath)).Count > 0)
     {
         mgr.CurrentState = UnityFacade.Resolve <LogedInPage>();
     }
     else
     if (driver.FindElements(By.XPath(ElementCheckFailedXPath)).Count > 0)
     {
         mgr.CurrentState = UnityFacade.Resolve <EnterCodePage>();
     }
     else
     {
         Thread.Sleep(2000);
         throw new Exception("Unknown page");
     }
 }
Exemplo n.º 8
0
 // Use this for initialization
 void Awake()
 {
     UnityFacade.GetInstance().StartUp();
 }
Exemplo n.º 9
0
 static UnityFacade()
 {
     m_instance = new UnityFacade();
 }
Exemplo n.º 10
0
 static UnityFacade()
 {
     Instance = new UnityFacade();
 }
Exemplo n.º 11
0
 // Use this for initialization
 void Awake()
 {
     UnityFacade.GetInstance().StartUp(viewComponents, GetComponent <PhotonManager> ());
 }
Exemplo n.º 12
0
 private static void ToFacebookLike(Like4LikeManager mgr)
 {
     mgr.CurrentState = UnityFacade.Resolve <LikeFacebookPage>();//new LikeFacebookPage();
 }
Exemplo n.º 13
0
 private static void ToYoutubeLike(Like4LikeManager mgr)
 {
     mgr.CurrentState = UnityFacade.Resolve <LikeYoutubePage>();// new LikeYoutubePage();
 }
Exemplo n.º 14
0
 public void Disconnect()
 {
     UnityFacade.GetInstance().DisconnectMediator(mediatorName);
 }
Exemplo n.º 15
0
 //
 public void Connect()
 {
     UnityFacade.GetInstance().ConnectMediator(this);
 }