Example #1
0
        void timer_Elapsed(object sender, ElapsedEventArgs e)
        {
            this.Dispatcher.Invoke(System.Windows.Threading.DispatcherPriority.Normal, (Action)(() =>
            {
                if (ProgressBar.Value < 100)
                {
                    ProgressBar.Value += 1;
                }
                else 
                {
                    timer.Stop();
                    LoginScreen loginScreen = new LoginScreen();
                    loginScreen.Show();
                    this.Close();
                }
					if (ProgressBar.Value == 2) 
            {
                lblStatus.Content = "Estabelecendo conexão";
            }
            if (ProgressBar.Value == 25)
            {
                               
            }
            if (ProgressBar.Value == 27)
            {
                lblStatus.Content = "Conectando com o banco de dados..";

            }
            if (ProgressBar.Value == 30)
            {
                lblStatus.Content = "Conectando com o banco de dados...";

            }
            if (ProgressBar.Value == 38)
            {
                lblStatus.Content = "Conectando com o banco de dados....";
            }
            if (ProgressBar.Value == 45)
            {
                lblStatus.Content = "Recebendo dados.";
            }
            if (ProgressBar.Value == 49)
            {
                lblStatus.Content = "Recebendo dados..";
            }
            if (ProgressBar.Value == 54)
            {
                lblStatus.Content = "Recebendo dados..";
            }
            if (ProgressBar.Value == 59)
            {
                lblStatus.Content = "Recebendo dados...";
            }
            if (ProgressBar.Value == 67)
            {
                lblStatus.Content = "Recebendo dados....";
            }
            }));
            
        }
 public LoginController(MainFrame mainFrame, LoginScreen screen)
 {
     this._screen   = screen;
     _dbc           = DatabaseController.Instance;
     this.MainFrame = mainFrame;
 }
Example #3
0
 public void GivenTheUserEntersInvalidCredentials()
 {
     login = new LoginScreen();
     login.EnterUserName(InvalidUsername);
     login.EnterPin(Pin);
 }
Example #4
0
 public void GivenTheUserChangeSettingsURI()
 {
     login = new LoginScreen();
     login.ChangeSettingsURI();
 }
Example #5
0
        public void LinkEveryController()
        {
            //obvious question - "why":
            //this is for mono ahead of time compilation. By referencing everything here,
            //we make sure these classes and generic variants are AOT compiled

            var load  = new LoadingScreen();
            var loadc = new LoadingScreenController(null, null, null);


            var screen = new PersonSelectionEdit();
            var t      = new TerrainController(null, null, null, null, null);
            var n      = new Network.Network(null, null, null, null);
            var v      = new Credits();
            var cd     = new Common.DataService.ClientDataService(null, null, null);
            var c      = new CoreGameScreen();
            var cc     = new CoreGameScreenController(null, null, null, null, null);
            var s      = new SandboxGameScreen();
            var ps     = new PersonSelection(null, null);
            var psc    = new PersonSelectionController(null, null, null, null);
            var cl1    = new Server.Clients.AuthClient("");
            var cl2    = new Server.Clients.CityClient("");
            var cl3    = new Server.Clients.ApiClient("");
            var ls     = new LoginScreen(null);
            var lc     = new LoginController(null, null);
            var lr     = new Regulators.LoginRegulator(null, null, null);

            var seled = new PersonSelectionEditController(null, null);
            var casr  = new Regulators.CreateASimRegulator(null);
            var purch = new Regulators.PurchaseLotRegulator(null);
            var conn  = new Regulators.LotConnectionRegulator(null, null, null);
            var t2    = new Regulators.CityConnectionRegulator(null, null, null, null, Kernel, null);
            var regu  = new Regulators.RegulatorsModule();

            var prov = new CacheProvider();
            var clip = new AuthClientProvider(null);
            var citp = new CityClientProvider(null);
            var ar   = new Server.Clients.AriesClient(null);
            var tso  = new cTSOSerializerProvider(null);
            var ser  = new Server.Protocol.Voltron.DataService.cTSOSerializer(null);
            var mods = new ModelSerializerProvider(null);
            var dbs  = new Common.DatabaseService.DatabaseService(null);
            var cds  = new Common.DataService.ClientDataService(null, null, null);

            var arp  = new Server.Protocol.Aries.AriesProtocolDecoder(null);
            var are  = new Server.Protocol.Aries.AriesProtocolEncoder(null);
            var serc = new Common.Serialization.SerializationContext(null, null);

            var packets = new object[]
            {
                new ClientOnlinePDU(),
                new HostOnlinePDU(),
                new SetIgnoreListPDU(),
                new SetIgnoreListResponsePDU(),
                new SetInvinciblePDU(),
                new RSGZWrapperPDU(),
                new TransmitCreateAvatarNotificationPDU(),
                new DataServiceWrapperPDU(),
                new DBRequestWrapperPDU(),
                new OccupantArrivedPDU(),
                new ClientByePDU(),
                new ServerByePDU(),
                new FindPlayerPDU(),
                new FindPlayerResponsePDU(),
                new ChatMsgPDU(),
                new AnnouncementMsgPDU(),

                new MessagingWindowController(null, null, null),
                new Controllers.Panels.SecureTradeController(null, null),
                new GizmoSearchController(null, null, null),
                new GizmoTop100Controller(null, null, null, null, null),
                new LotAdmitController(null, null, null),
                new GizmoController(null, null, null),
                new PersonPageController(null, null, null),
                new LotPageController(null, null),
                new BookmarksController(null, null, null),
                new RelationshipDialogController(null, null, null, null),
                new InboxController(null, null, null, null),
                new JoinLotProgressController(null, null),
                new DisconnectController(null, null, null, null, null),

                ImmutableList.Create <uint>(),
                ImmutableList.Create <JobLevel>(),
                ImmutableList.Create <Relationship>(),
                ImmutableList.Create <Bookmark>(),
                ImmutableList.Create <bool>(),

                new cTSOGenericData(),
            };
        }
Example #6
0
        public void ShouldOpenApp()
        {
            var loginScreen = new LoginScreen(Driver);

            loginScreen.IsVisible().Should().NotThrow();
        }
Example #7
0
        public void LoginScreenTest()
        {
            LoginScreen window = new LoginScreen();

            Assert.AreEqual(300, 300);
        }
 //Chat Functions 
 void Awake()
 {
     SP = this;
 }
 void NextScreenExecute(LoginScreen screen)
 {
     thisScreen = screen;
     MainWindow mainWindow = new MainWindow(UserName, Password, Broker, Project, this);
     mainWindow.Show();
     //screen.Hide();
 }
Example #10
0
        private void BtnLogin_Click(object sender, RoutedEventArgs e)
        {
            LoginScreen login = new LoginScreen(this);

            login.ShowDialog();
        }
Example #11
0
 static void Main(string[] args)
 {
     LoginScreen.Login();
 }
Example #12
0
        public LoginWindow(Manager manager, LoginScreen screen) : base(manager)
        {
            this.screen = screen;

            // Events

            // Listen for valid response from auth server
            screen.Client.Events.Network.Auth.InitReceived.AddHandler(OnInit);

            // Listen for failed login response from auth server
            screen.Client.Events.Network.Auth.FailedLogin.AddHandler(OnFailedLogin);

            // Setup the window
            CaptionVisible   = false;
            Caption.Text     = "Welcome to Bricklayer!";
            Description.Text =
                "An open source, fully moddable and customizable 2D\nbuilding game.";
            Movable         = false;
            Resizable       = false;
            Width           = 450;
            Height          = 218;
            TopPanel.Height = 72;
            Shadow          = true;
            Center();

            // Text boxes
            txtUsername = new TextBox(Manager);
            txtUsername.Init();
            txtUsername.Width       = ClientWidth / 2 - 16;
            txtUsername.Left        = 8;
            txtUsername.Top         = TopPanel.Bottom + 8;
            txtUsername.Placeholder = "Username";
            txtUsername.Text        = screen.Client.IO.Config.Client.Username;
            Add(txtUsername);

            txtPassword = new TextBox(Manager);
            txtPassword.Init();
            txtPassword.Width       = txtUsername.Width;
            txtPassword.Left        = txtUsername.Left;
            txtPassword.Top         = txtUsername.Bottom + 8;
            txtPassword.Placeholder = "Password";
            txtPassword.Text        = screen.Client.IO.GetPassword();
            txtPassword.Mode        = TextBoxMode.Password;
            Add(txtPassword);

            chkRemember = new CheckBox(Manager);
            chkRemember.Init();
            chkRemember.Width   = txtUsername.Width;
            chkRemember.Left    = txtUsername.Right + 16;
            chkRemember.Top     = txtPassword.Top + 3;
            chkRemember.Text    = "Remember Me";
            chkRemember.Checked = screen.Client.IO.Config.Client.RememberMe;
            Add(chkRemember);

            // Sign in buttons
            btnLoginAccount = new Button(Manager);
            btnLoginAccount.Init();
            btnLoginAccount.Width  = txtUsername.Width;
            btnLoginAccount.Left   = txtUsername.Left;
            btnLoginAccount.Top    = 8;
            btnLoginAccount.Click += LoginAccountClick;
            btnLoginAccount.Text   = "Sign in";
            BottomPanel.Add(btnLoginAccount);

            btnLoginGuest         = new Button(Manager);
            btnLoginGuest.Enabled = false;
            btnLoginGuest.Init();
            btnLoginGuest.Width = btnLoginAccount.Width;
            btnLoginGuest.Left  = btnLoginAccount.Right + 16;
            btnLoginGuest.Top   = btnLoginAccount.Top;
            btnLoginGuest.Text  = "Try as Guest";
            BottomPanel.Add(btnLoginGuest);

            // Links
            lnkForgot = new LinkLabel(Manager);
            lnkForgot.Init();
            lnkForgot.Width     = txtUsername.Width;
            lnkForgot.Alignment = Alignment.MiddleCenter;
            lnkForgot.Left      = txtUsername.Left;
            lnkForgot.Top       = btnLoginAccount.Bottom + 8;
            lnkForgot.Text      = "Forgot Password?";
            lnkForgot.URL       = Constants.Strings.ForgotPasswordURL;
            lnkForgot.ToolTip   = new ToolTip(Manager)
            {
                Text = "A new browser window will be opened."
            };
            BottomPanel.Add(lnkForgot);

            lnkCreateAccount = new LinkLabel(Manager);
            lnkCreateAccount.Init();
            lnkCreateAccount.Width     = txtUsername.Width;
            lnkCreateAccount.Alignment = Alignment.MiddleCenter;
            lnkCreateAccount.Left      = btnLoginGuest.Left;
            lnkCreateAccount.Top       = lnkForgot.Top;
            lnkCreateAccount.Text      = "Create an account";
            lnkCreateAccount.URL       = Constants.Strings.CreateAccountURL;
            BottomPanel.Add(lnkCreateAccount);

            // Color selector
            bodyClr = new ColorPicker(Manager)
            {
                Left = txtUsername.Right + 16, Top = txtUsername.Top, Width = txtUsername.Width - 18 - 8, Saturation = 210, Value = 250
            };
            bodyClr.Init();
            bodyClr.ValueChanged += (sender, args) =>
            {
                BodyImg.Color = bodyClr.SelectedColor;
                // TODO: Update value in the game class
            };
            Add(bodyClr);

            BodyImg = new ImageBox(Manager)
            {
                Left = bodyClr.Right + 8, Top = bodyClr.Top, Width = 18, Height = 18, Image = screen.Client.Content["entity.body"]
            };
            BodyImg.Init();
            Add(BodyImg);

            SmileyImg = new ImageBox(Manager)
            {
                Left = BodyImg.Left, Top = BodyImg.Top, Width = 18, Height = 18, Image = screen.Client.Content["entity.smileys"], SourceRect = new Rectangle(0, 0, 18, 18)
            };
            SmileyImg.Init();
            SmileyImg.ToolTip.Text = "I love this color!";
            Add(SmileyImg);

            bodyClr.Hue = screen.Client.IO.Config.Client.Color;

            BottomPanel.Height = lnkForgot.Bottom + 28;
            BottomPanel.Top    = Height - BottomPanel.Height;
        }
 public LoginSteps(IScreenFactory screenFactory)
 {
     loginScreen = screenFactory.GetScreen <LoginScreen>();
 }
Example #14
0
 private void Awake()
 {
     DontDestroyOnLoad(gameObject);
     SceneManager.sceneLoaded += OnSceneLoaded;
     _Instance = this;
 }
Example #15
0
    void OnGUI()
    {
        GUI.depth = 0;
        GUI.skin  = RoomSelectionGUISkin;

        GUI.DrawTexture(new Rect(0, 0, Screen.width, Screen.height), Background);

        if (GUI.Button(new Rect(Screen.width / 25, Screen.height / 25, Properties.BackButtonSize, Properties.BackButtonSize), Properties.BackButton))
        {
            Hide();
            WarpClient.GetInstance().Disconnect();
            LoginScreen.Show();
        }

        scrollPosition = GUI.BeginScrollView(scrollViewPosition, scrollPosition, scrollViewInnerPosition);

        float offsetX = roomBoxPosition.x;
        float offsetY = roomBoxPosition.y;

        for (int i = 0; i < ActiveRooms.Count; i++)
        {
            LiveRoomInfoEvent currentRoom = ActiveRooms[i];
            string[]          joinedUsers = currentRoom.getJoinedUsers();
            string            roomId      = currentRoom.getData().getId();
            object            type        = string.Empty;
            object            goal        = string.Empty;
            object            pw          = string.Empty;
            selectedRoomProperties = currentRoom.getProperties();
            selectedRoomProperties.TryGetValue("PW", out pw);
            if (selectedRoomProperties.TryGetValue("TYPE", out type) && selectedRoomProperties.TryGetValue("GOAL", out goal))
            {
                string playersText = string.Empty;

                for (int j = 0; j < 4; j++)
                {
                    if (j == 0 && joinedUsers != null)
                    {
                        playersText = joinedUsers[j];
                    }
                    else if (j == 0)
                    {
                        playersText = "-";
                    }
                    else if (joinedUsers != null && j < joinedUsers.Length)
                    {
                        playersText += "\n" + joinedUsers[j];
                    }
                    else
                    {
                        playersText += "\n-";
                    }
                }

                if (selectedRoomId == roomId)
                {
                    GUI.DrawTexture(new Rect(offsetX, offsetY, roomBoxPosition.width, roomBoxPosition.height), SelectedRoomBoxBackground);
                }
                else if (GUI.Button(new Rect(offsetX, offsetY, roomBoxPosition.width, roomBoxPosition.height), ""))
                {
                    selectedRoomId = roomId;
                    selectedRoomPw = pw == null ? null : pw.ToString();
                }
                GUI.BeginGroup(new Rect(offsetX, offsetY, roomBoxPosition.width, roomBoxPosition.height));
                DrawRoomBox(currentRoom.getData().getName(), type.ToString(), goal.ToString(), playersText, joinedUsers == null ? 0 : joinedUsers.Length, pw == null? null : pw.ToString());
                GUI.EndGroup();
                offsetX += offsetWidth / 2 + roomBoxPosition.width;
                if (i % 2 == 1)
                {
                    offsetY += offsetHeight + roomBoxPosition.height;
                    offsetX  = roomBoxPosition.x;
                }
            }
        }

        GUI.EndScrollView();

        if (GUI.Button(createRoomButtonPos, LanguageManager.getString("CRTROOM")))
        {
            Hide();
            CreateRoomMenu.Show();
        }

        if (!string.IsNullOrEmpty(selectedRoomId) && GUI.Button(joinRoomButtonPos, LanguageManager.getString("JOINROOM")))
        {
            if (selectedRoomPw != null && !string.IsNullOrEmpty(selectedRoomPw.ToString()))
            {
                PasswordEnterMenu.Show(selectedRoomPw.ToString(), selectedRoomId);
                Hide();
            }
            else
            {
                StartCoroutine(JoinRoom(selectedRoomId));
            }
        }

        if (GUI.Button(renewButtonPos, LanguageManager.getString("RENEW")))
        {
            Renew();
        }
    }
Example #16
0
        public UILoginDialog(LoginScreen loginScreen)
            : base(UIDialogStyle.Standard, true)
        {
            this.m_LoginScreen = loginScreen;
            this.Caption       = GameFacade.Strings.GetString("UIText", "209", "1");

            SetSize(350, 225);

            m_TxtAccName          = UITextEdit.CreateTextBox();
            m_TxtAccName.X        = 20;
            m_TxtAccName.Y        = 72;
            m_TxtAccName.MaxChars = 32;
            m_TxtAccName.SetSize(310, 27);
            m_TxtAccName.CurrentText   = GlobalSettings.Default.LastUser;
            m_TxtAccName.OnChange     += M_TxtAccName_OnChange;
            m_TxtAccName.OnTabPress   += new KeyPressDelegate(m_TxtAccName_OnTabPress);
            m_TxtAccName.OnEnterPress += new KeyPressDelegate(loginBtn_OnButtonClick);

            this.Add(m_TxtAccName);

            m_TxtPass          = UITextEdit.CreateTextBox();
            m_TxtPass.X        = 20;
            m_TxtPass.Y        = 128;
            m_TxtPass.MaxChars = 64;
            m_TxtPass.SetSize(310, 27);
            m_TxtPass.Password  = true;
            m_TxtPass.OnChange += M_TxtAccName_OnChange;
            //m_TxtPass.OnTabPress += new KeyPressDelegate(m_TxtPass_OnTabPress);
            m_TxtPass.OnEnterPress    += new KeyPressDelegate(loginBtn_OnButtonClick);
            m_TxtPass.OnShiftTabPress += new KeyPressDelegate(m_TxtPass_OnShiftTabPress);
            this.Add(m_TxtPass);

            /** Login button **/
            var loginBtn = new UIButton
            {
                X       = 116,
                Y       = 170,
                Width   = 100,
                ID      = "LoginButton",
                Caption = GameFacade.Strings.GetString("UIText", "209", "2")
            };

            this.Add(loginBtn);
            loginBtn.OnButtonClick += new ButtonClickDelegate(loginBtn_OnButtonClick);

            var exitBtn = new UIButton
            {
                X       = 226,
                Y       = 170,
                Width   = 100,
                ID      = "ExitButton",
                Caption = GameFacade.Strings.GetString("UIText", "209", "3")
            };

            this.Add(exitBtn);
            exitBtn.OnButtonClick += new ButtonClickDelegate(exitBtn_OnButtonClick);

            this.Add(new UILabel
            {
                Caption = GameFacade.Strings.GetString("UIText", "209", "4"),
                X       = 24,
                Y       = 50
            });

            this.Add(new UILabel
            {
                Caption = GameFacade.Strings.GetString("UIText", "209", "5"),
                X       = 24,
                Y       = 106
            });

            GameFacade.Screens.inputManager.SetFocus(m_TxtAccName);
            RefreshBlink();
        }
Example #17
0
 public void GotHitBy(LoginScreen.EntityTypes entity, byte entityID)
 {
     LoginScreen.GetHit(id, entity, entityID);
 }
Example #18
0
 public LoginController(LoginScreen view, LoginRegulator reg)
 {
     View      = view;
     Regulator = reg;
     Regulator.OnTransition += Regulator_OnTransition;
 }
 public LoginScreenMediator(UIBase viewComponent)
     : base(NAME, viewComponent)
 {
     dialog        = (LoginScreen)viewComponent;
     dialog.Login += new EventHandler(Login);
 }
 private void BgRunWorkerCompleted(object sender, RunWorkerCompletedEventArgs e)
 {
     LoginScreen page = new LoginScreen();
     page.Show();
     this.Close();
 }