Наследование: UIBehaviour
        protected void EfetueLogin(string login, string senha)
        {
            var loginUI = new LoginUI(ComponenteDeTela);

            loginUI.AbrirFuncionalidade();
            loginUI.EfetueLogin(login, senha);
        }
Пример #2
0
        public IEnumerator Start()
        {
            loginUI = FindObjectOfType <LoginUI>();

            // Init SF controller
            SalesforceClient client = GetComponent <SalesforceClient>();

            if (ApplicationState.sfConnection != null)
            {
                client.setConnection(ApplicationState.sfConnection);
            }
            sfController = new SalesforceController(this, client);

            // Is this the first run?
            if (ApplicationState.sfConnection == null)
            {
                // Show login screen
                yield return(FindObjectOfType <VRUtil>().enableVrMode(false));

                loginUI.setSalesforceController(sfController);
                StartCoroutine(loginUI.fadeIn());
            }
            else             // Returning to menu, display config list
            {
                // Destroy non-VR UI
                Destroy(loginUI.gameObject);
                Destroy(FindObjectOfType <StandaloneInputModule>());
                // Enable VR UI
                StartCoroutine(Camera.main.fadeIn(3));
                setVrUiScreen(configurationSelectionContainer.name);
                yield return(initConfigSelectionView());

                yield return(transitionUi(true));
            }
        }
Пример #3
0
    void EnterGame()
    {
        if (Application.platform != RuntimePlatform.IPhonePlayer &&
            Application.platform != RuntimePlatform.Android && input != null)
        {
            SDGlobal.ptUserName = input.GetComponent <UIInput>().value;

            FileStream file = new FileStream("Assets/account.txt", FileMode.Create);
            byte[]     data = Encoding.UTF8.GetBytes(SDGlobal.ptUserName);
            file.Write(data, 0, data.Length);
            file.Close();

            // test serverip..
            if (serverip != "")
            {
                SDNetGlobal.Login_IP = serverip;
            }
        }
        if (Application.platform == RuntimePlatform.IPhonePlayer || Application.platform == RuntimePlatform.Android)
        {
            gate = SDNetGlobal.serverId;
        }
        else
        {
            gate = 4;            //BM_add
        }
        GameObject goUIRoot = GameObject.Find("UI Root (2D)");

        if (goUIRoot)
        {
            LoginUI loginUI = goUIRoot.GetComponent <LoginUI>();
            loginUI.StartGame(gate);
        }
    }
Пример #4
0
        static void Main(string[] args)
        {
            //Console.WindowHeight = Console.LargestWindowHeight;
            //Console.WindowWidth = Console.LargestWindowWidth;
            //TeacherUI teacherUI = new TeacherUI();
            //teacherUI.Menu();
            //RoomUI roomUI = new RoomUI();
            //roomUI.Menu();
            //SubjectUI subjectUI = new SubjectUI();
            //subjectUI.Menu();
            //MajorUI majorUI = new MajorUI();
            //majorUI.Menu();
            //ClassUI classUI = new ClassUI();
            //classUI.Menu();
            //TermUI termUI = new TermUI();
            //termUI.Menu();
            //ClassUI classUI = new ClassUI();
            //classUI.Menu();
            //string classType = "hello";

            LoginUI loginUI = new LoginUI();

            loginUI.Login();
            //AssignmentUI assignmentUI = new AssignmentUI();
            //assignmentUI.Menu();

            //TermUI termUI = new TermUI();
            //termUI.Menu();
            //Assignment assignment = new Assignment("101191A","001", "001");

            //AssignmentHandler handler = new AssignmentHandler();
            //handler.Update("191A002001", assignment);
        }
Пример #5
0
 public virtual void Start()
 {
     loginUI   = GetComponent <LoginUI>();
     lobby     = GetComponent <LobbyUI>();
     gameStart = GetComponent <GameStart>();
     PhotonEngine.Instance.AddEvent(this);
 }
Пример #6
0
        private void LogoutBtn_PreviewMouseUp(object sender, MouseButtonEventArgs e)
        {
            LoginUI loginUI = new LoginUI();

            loginUI.Show();
            Close();
        }
Пример #7
0
    //进入游戏主界面
    public void IntoMainUI()
    {
        Destroy(_loginUI.gameObject);
        _loginUI = null;

        _mainUI = ResourcesManager.Instance.GetIniPrefabResourceByName("MainUI").AddComponent <MainUI>();
        _mainUI.Initialization(null, false);
    }
Пример #8
0
        private void Btn_Logout_Click(object sender, RoutedEventArgs e)
        {
            WebserviceAPI.Logout();

            LoginUI loginUI = new LoginUI();

            loginUI.Show();
            this.Close();
        }
Пример #9
0
        private void btnLogout_Click(object sender, EventArgs e)
        {
            this.Hide();
            LoginUI loginUI = new LoginUI();

            loginUI.ShowDialog();
            orderStatusTimer.Enabled = false;
            this.Close();
        }
Пример #10
0
        protected override IEnumerator Load()
        {
            UILoader <LoginUI> loader = new UILoader <LoginUI>(this, "LoginUI", "core/scenes/ui/login");

            yield return(loader.Load());

            m_ui = loader.ui;
            m_ui.SetParams(PlayerPreferences.lastLogin, PlayerPreferences.lastPassword, PlayerPreferences.lastServer);
        }
Пример #11
0
    public static void SaltReceived(Packet _packet)
    {
        string message = _packet.ReadString();

        Debug.Log(message);
        LoginUI loginUI  = UIManager.Instance.UIWindows["Login"].GetComponent <LoginUI>();
        string  password = Encrypter.HashPasswordGiven(loginUI.password, message);

        Sender.LoginRequest(loginUI.username, password);
    }
Пример #12
0
    public void ShowUI()
    {
        GameObject obj = MonoBehaviour.Instantiate(Resources.Load("LoginPanel", typeof(GameObject)), Vector3.zero, new Quaternion(0, 0, 0, 0), GameObject.Find("Canvas").transform) as GameObject;

        obj.transform.localScale    = Vector3.one;
        obj.transform.localPosition = Vector3.zero;

        view = obj.GetComponent <LoginUI>();
        RegisterCMD();
    }
Пример #13
0
 // Use this for initialization
 void Start()
 {
     adminUI = transform.Find("admin").GetComponent<AdminUI>();
     mainUI = transform.Find("menu").GetComponent<MainUI>();
     accountUI = transform.Find("account").GetComponent<AccountUI>();
     loginUI = transform.Find("login").GetComponent<LoginUI>();
     passwordUI = transform.Find("password").GetComponent<PasswordUI>();
     charactersUI = transform.Find("characters").GetComponent<CharactersUI>();
     characterUI = transform.Find("character").GetComponent<CharacterUI>();
     playerUI = transform.Find("player").GetComponent<PlayerUI>();
 }
Пример #14
0
    private void Awake()
    {
        if (Instance != null && Instance != this)
        {
            // If that is the case, we destroy other instances
            Destroy(gameObject);
        }

        // Here we save our singleton instance
        Instance = this;
    }
Пример #15
0
 public ActionResult Login(LoginUI loginUI)
 {
     if (loginUI != null && !string.IsNullOrWhiteSpace(loginUI.EmailAddress) && !string.IsNullOrWhiteSpace(loginUI.Password))
     {
         //FormAuthentication.
     }
     else
     {
     }
     return(View());
 }
Пример #16
0
 //public event EventHandler Shows;
 public Login()
 {
     InitializeComponent();
     loginUI = new LoginUI(this);
     if (Common.Versions == SoftwareVersions.S)
     {
         this.Load -= new EventHandler(Login_Load);
         ShowMainForm();
         return;
     }
     rawHeight = this.Size.Height;
 }
Пример #17
0
 public void Start()
 {
     try
     {
         loginUI   = GetComponent <LoginUI>();
         lobby     = GameObject.FindWithTag("Lobby").GetComponent <LobbyUI>();
         gameStart = GameObject.FindWithTag("GameStart").GetComponent <GameStart>();
     }
     catch
     {
     }
     PhotonEngine.Instance.AddRequest(this);
 }
Пример #18
0
    void OnClick()
    {
        if (gameObject.name == "bt_StartGame")
        {
            EnterGame();
        }
        else if (gameObject.name == "bt_PlayVideo")
        {
            GameObject mainCamera = GameObject.Find("@MainCamera");
            if (mainCamera != null && (Application.platform == RuntimePlatform.Android || Application.platform == RuntimePlatform.IPhonePlayer))
            {
                sdMovieVideo movie = mainCamera.GetComponent <sdMovieVideo>();
                if (movie != null)
                {
                    movie.PlayMovie("DS_intro.mp4");
                }
            }

            //sdUICharacter.Instance.ShowMsgLine("错误提示测试!",MSGCOLOR.Red);
        }
        else if (gameObject.name == "bt_Username")
        {
            Debug.Log("bt_Username button onclick");
            sdUICharacter.Instance.HideLoginMsg();
            GameObject goUIRoot = GameObject.Find("UI Root (2D)");
            if (goUIRoot)
            {
                Debug.Log("Find ui root");
                GHome.GetInstance().Logout((code, msg, data) =>
                {
                    Debug.Log("GHome logout callback code: " + code + "msg: " + msg);

                    if (code == 0)
                    {
                        LoginUI loginUI = goUIRoot.GetComponent <LoginUI>();
                        loginUI.Relogin();
                    }
                });
            }

            gameObject.SetActive(false);
        }
        else if (gameObject.name == "bt_Server")
        {
            List <JsonNode> lst = SDNetGlobal.m_lstSrvInfo;
            if (lst.Count > 0)
            {
                sdUICharacter.Instance.ShowSelectSrvWnd(true);
            }
        }
    }
Пример #19
0
 public ActionResult Login()
 {
     if (!string.IsNullOrWhiteSpace(ConfigurationManager.AppSettings["EnableTestLogin"]) && Utility.IsBool(ConfigurationManager.AppSettings["EnableTestLogin"]))
     {
         LoginUI login = new LoginUI();
         login.EmailAddress = ConfigurationManager.AppSettings["TestEmailAddress"];
         login.Password     = ConfigurationManager.AppSettings["TestPassword"];
         return(View(login));
     }
     else
     {
         return(View());
     }
 }
Пример #20
0
    public void Init()
    {
        errorManager = ErrorManager.GetInstance();

        appplyButton   = transform.FindChild("applyButton").GetComponent <Button>();
        closeButton    = transform.FindChild("closeButton").GetComponent <Button>();
        userInputField = transform.FindChild("userInputField").GetComponent <InputField>();
        //       passwordInputField = transform.FindChild("passwordInputField").GetComponent<InputField>();

        appplyButton.onClick.AddListener(OnAppplyButton);
        closeButton.onClick.AddListener(OnCloseButton);

        loginUI = LoginUI.GetInstance();
        Hide();
    }
Пример #21
0
        /// <summary>
        /// This method table below parameters and perform operation required to login into website
        /// </summary>
        /// <param name="Username"></param>
        /// <param name="Password"></param>
        /// <param name="driver"></param>
        public void login(String Username, String Password, IWebDriver driver)
        {
            LoginUI     Ui = new LoginUI();
            IWebElement GetusernameField = Ui.Username(driver);
            IWebElement GetSubmitButton  = Ui.Submit(driver);

            KeyboardActions.SendKeys(GetusernameField, Username, driver);
            MouseActions.Click(GetSubmitButton, driver);
            IWebElement GetPasswordField = Ui.Password(driver);

            KeyboardActions.SendKeys(GetPasswordField, Password, driver);
            IWebElement GetLoginButton = Ui.Submit(driver);

            MouseActions.Click(GetLoginButton, driver);
        }
Пример #22
0
    // Use this for initialization
    void Start()
    {
        playerManager = FindObjectOfType <PlayerManager>();
        loginUI       = FindObjectOfType <LoginUI>();
        serverPackets = new Queue <IServerPacket>();
        client        = new NetworkClient();

        client.OnPacket += (packet) =>
        {
            lock (mutex)
            {
                serverPackets.Enqueue(packet);
            }
        };
    }
        public RequestObject SignIn(LoginUI login)
        {
            var request      = new RequestObject();
            var isUserExists = CRUDContext.UserLoginInfo.AsNoTracking()
                               .Where(u => u.EmailId == login.EmailId).Any();

            if (!isUserExists)
            {
                using (var scope = CRUDContext.Database.BeginTransaction())
                {
                    try
                    {
                        var userLogin = new UserLoginInfo()
                        {
                            FirstName   = login.FirstName,
                            LastName    = login.LastName,
                            EmailId     = login.EmailId,
                            Password    = login.Password,
                            LogInTime   = DateTime.Now,
                            CreatedBy   = login.UserName,
                            CreatedDate = DateTime.Now
                        };
                        CRUDContext.UserLoginInfo.Add(userLogin);
                        CRUDContext.SaveChanges();
                        request.status = true;
                        scope.Commit();
                    }
                    catch (DbUpdateException ex)
                    {
                        request.IsDbException = true;
                        request.ErrorMessage  = ex.Message;
                        scope.Rollback();
                    }
                    catch (Exception Ex)
                    {
                        request.status       = false;
                        request.ErrorMessage = Ex.Message;
                        scope.Rollback();
                    }
                }
            }
            else
            {
                request.status = isUserExists;
            }

            return(request);
        }
Пример #24
0
    void Start( )
    {
        instance = this;

        m_canvasGroup = GetComponent <CanvasGroup>();

        goButton.onClick.AddListener(() =>
        {
            Signup();
        });
        GameObject      nickName = displayNameInput.transform.parent.gameObject;
        Text            text     = changeFuncButton.GetComponentInChildren <Text>();
        GridLayoutGroup grid     = GetComponentInChildren <GridLayoutGroup>();

        changeFuncButton.onClick.AddListener(() =>
        {
            if (text.text == "NO ACCOUNT?")
            {
                grid.padding.top = 0;
                grid.spacing     = Vector2.zero;
                nickName.SetActive(true);
                text.text = "HAVE AN ACCOUNT";
                goButton.onClick.RemoveAllListeners();
                goButton.onClick.AddListener(() =>
                {
                    Signup();
                });
            }
            else
            {
                grid.padding.top = 30;
                grid.spacing     = new Vector2(0, 30);
                nickName.SetActive(false);
                text.text = "NO ACCOUNT?";
                goButton.onClick.RemoveAllListeners();
                goButton.onClick.AddListener(() =>
                {
                    Login();
                });
            }
        });

        //自动登录
        if (PlayerPrefs.HasKey("auto login") && PlayerPrefs.GetInt("auto login") == 1)
        {
            KiiLogin.AutoLogin();
        }
    }
Пример #25
0
    //加载游戏完成
    protected void FinishLoadingGame(IEvent evt)
    {
        EHLoadingEvent e = evt as EHLoadingEvent;

        if (!e._state)
        {
            //游戏加载失败
        }

        Destroy(_loadingUI.gameObject);
        _loadingUI = null;

        _loginUI = ResourcesManager.Instance.GetIniPrefabResourceByName("LoginUI").AddComponent <LoginUI>();
        _loginUI.Initialization(null, false);

        EventCenter.Instance.RemoveEventListenerPermanently((int)EHGameProcessEventID.Process_Loading_Event, FinishLoadingGame);
    }
Пример #26
0
    void Start( )
    {
        instance = this;

        m_canvasGroup = GetComponent<CanvasGroup>();

        goButton.onClick.AddListener(( ) =>
        {
            Signup();
        });
        GameObject nickName = displayNameInput.transform.parent.gameObject;
        Text text = changeFuncButton.GetComponentInChildren<Text>();
        GridLayoutGroup grid = GetComponentInChildren<GridLayoutGroup>();
        changeFuncButton.onClick.AddListener(( ) =>
        {
            if (text.text == "NO ACCOUNT?")
            {
                grid.padding.top = 0;
                grid.spacing = Vector2.zero;
                nickName.SetActive(true);
                text.text = "HAVE AN ACCOUNT";
                goButton.onClick.RemoveAllListeners();
                goButton.onClick.AddListener(( ) =>
                {
                    Signup();
                });
            }
            else
            {
                grid.padding.top = 30;
                grid.spacing = new Vector2(0, 30);
                nickName.SetActive(false);
                text.text = "NO ACCOUNT?";
                goButton.onClick.RemoveAllListeners();
                goButton.onClick.AddListener(( ) =>
                {
                    Login();
                });
            }
        });

        //自动登录
        if (PlayerPrefs.HasKey("auto login") && PlayerPrefs.GetInt("auto login") == 1)
            KiiLogin.AutoLogin();
    }
Пример #27
0
    public static void ConnectionMessageReceived(Packet _packet)
    {
        string message = _packet.ReadString();
        int    ID      = _packet.ReadInt();

        Debug.Log(message + " " + ID);
        Client.Instance.clientID = ID;
        Sender.ConnectionMessageResponse();
        if (message.Contains("[Game]"))
        {
            Client.Instance.udp.Connect(((IPEndPoint)Client.Instance.tcp.clientSocket.Client.LocalEndPoint).Port);
        }
        else
        {
            LoginUI loginUI = UIManager.Instance.UIWindows["Login"].GetComponent <LoginUI>();
            loginUI.ChangeConnectionState(LoginUI.ConnectionState.Connected);
        }
    }
Пример #28
0
    /// <summary>
    /// Gotos the logon sence.
    /// 进入登录场景;
    /// </summary>
    public void GotoLogonSence()
    {
        curSenceType = UISenceType.logonUISence;


        StartCoroutine(GTUIManager.Instance().AddUiToCanvas("uilogin.unity3d", "UILogin", true, false, (GameObject obj) =>
        {
            CloseCurSence();
            LoginUI sence = obj.AddComponent <LoginUI>();
            curSence      = sence;
            if (loadingSence != null)
            {
                loadingSence.CloseUI();
            }
        }));

//        StartCoroutine(AddLoginUIToSence());
    }
        public void TestaCT0001EfetueLogin()
        {
            _contexto.AdicioneCenario("Efetuar login");

            var login = new LoginUI(_componenteDeTela);

            login.AbrirFuncionalidade();
            _componenteDeTela.Espera.AguardeIntervaloDeTempo(1);
            SalvarScreenshot("TelaInicial");

            login.EfetueLogin("admin", "senha1234");

            _componenteDeTela.Espera.AguardeElementoVisivel(By.CssSelector("#container-principal"));
            _componenteDeTela.Espera.AguardeElementoVisivel(By.CssSelector(".main-header"));

            SalvarScreenshotEspecifico("PortalCabecalho", ".main-header");

            CompararScreenshot();
        }
Пример #30
0
    void Start()
    {
        loginUI = this;

        if (PlayerPrefs.GetString("remember", "").ToLower() == "true")
        {
            tb_email.text     = PlayerPrefs.GetString("email", "");
            tb_password.text  = PlayerPrefs.GetString("password", "");
            t_rememberMe.isOn = true;
        }

        if (tb_email.text == "")
        {
            tb_email.ActivateInputField();
        }
        else if (tb_password.text == "")
        {
            tb_password.ActivateInputField();
        }
    }
Пример #31
0
    void Awake()
    {
        LoadXml.LoadTheXml();
        uiList = new List <BaseUI>();

        duelFieldUI = Resources.Load("Prefebs/DuelFieldUI") as GameObject;
        prepareUI   = Resources.Load("Prefebs/PrepareUI") as GameObject;

        editCardUI = EditUI.GetInstance();
        editCardUI.SetName(ComStr.UI_EditCardUI);
        loginUI = LoginUI.GetInstance();
        loginUI.SetName(ComStr.UI_LoginUI);
        gameHallUI = GameHallUI.GetInstance();
        gameHallUI.SetName(ComStr.UI_GameHallUI);


        uiList.Add(editCardUI);
        uiList.Add(loginUI);
        uiList.Add(gameHallUI);
    }
Пример #32
0
    // Use this for initialization
    void Start()
    {
        self = this;
        UIEventListener.Get(loginButton.gameObject).onClick  = LoginButtonOnClick;
        UIEventListener.Get(signInButton.gameObject).onClick = SignInButtonOnClick;
        if (!UdpClientWork.self.isConnected)
        {
            errorLabel.text = "服务器连接失败!";
        }

        XmlDocument dom = new XmlDocument();

        dom.Save("Assets/_fuliu/Scripts/UI/aaa.xml");
        dom.Load("Assets/_fuliu/Scripts/UI/aaa.xml");        //装载XML文档
        //遍历所有节点
        int num = 0;

        foreach (XmlElement birthday in dom.DocumentElement.ChildNodes)
        {
            //读取数据
            string type  = birthday.SelectSingleNode("type").InnerText;
            string date  = birthday.SelectSingleNode("date").InnerText;
            string title = birthday.SelectSingleNode("title").InnerText;
            string name  = birthday.SelectSingleNode("name").InnerText;
            string text  = name + ":" + title; //节点文字
            string image = type;               //节点图片
            string data  = num.ToString();     //节点对应数据
            num++;
            //装载示例,将新建的节点添加到TreeView
            //TreeNode node = new TreeNode();//create a new node
            //treeView.Nodes.Add(node);

            //编辑示例:将当前节点的生日更改为当前日期
            birthday.SelectSingleNode("date").InnerText = DateTime.Now.ToString();
            //删除示例:将当前节点删除
            birthday.ParentNode.RemoveChild(birthday);
            dom.Save("Assets/_fuliu/Scripts/UI/aaa.xml");
        }
    }
Пример #33
0
 void Awake()
 {
     instance = this;
 }