Beispiel #1
0
    int rememberMe;   //0 = false, 1 = true

    private void Start()
    {
        //PlayerPrefs.DeleteKey("REGISTERED");
        //PlayerPrefs.DeleteKey("EMAIL");
        //PlayerPrefs.DeleteKey("PASS");
        isRegistered       = PlayerPrefs.GetInt("REGISTERED"); //is registered go to sign in
        rememberMe         = PlayerPrefs.GetInt("REMEMBERME"); // remember the user info
        SignInemailaddress = PlayerPrefs.GetString("EMAIL");   //remembers the email
        SignInpass         = PlayerPrefs.GetString("PASS");    // remembers the pass

        if (isRegistered.Equals(1))
        {
            RegisterView.SetActive(false);
            SignInView.SetActive(true);
        }
        else if (isRegistered.Equals(0))
        {
            RegisterView.SetActive(true);
            SignInView.SetActive(false);
        }
        if (rememberMe.Equals(1))
        {
            SignInEmailAddress.text = SignInemailaddress;
            SignInPassword.text     = SignInpass;
            checkBox.isOn           = true;
        }
        else if (rememberMe.Equals(0))
        {
            PlayerPrefs.DeleteKey("EMAIL");
            PlayerPrefs.DeleteKey("PASS");
            checkBox.isOn = false;
        }
    }
Beispiel #2
0
        public App()
        {
            InitializeComponent();

            Resources = StylesFactory.GenerateStyles(Resources);

            ContentPage startPage             = null;
            var         authenticationService = _container.Resolve <IAuthenticationService>();

            if (authenticationService.IsLoggedIn)
            {
                startPage = new HomeView();
            }
            else
            {
                startPage = new SignInView();
            }

            var navigationPage = new TransitionNavigationPage(startPage)
            {
                BarTextColor = Color.White,
            };

            MainPage = navigationPage;
        }
 internal void NullifyViewModels()
 {
     _randomizerView = null;
     _signInView     = null;
     _signUpView     = null;
     _archiveView    = null;
 }
Beispiel #4
0
        public static SignInView GetSignInView(DataRow row)
        {
            SignInView view = new SignInView();

            view.UserId             = Conversion.TryCastInteger(ConversionHelper.GetColumnValue(row, "user_id"));
            view.Role               = Conversion.TryCastString(ConversionHelper.GetColumnValue(row, "role"));
            view.IsAdmin            = Conversion.TryCastBoolean(ConversionHelper.GetColumnValue(row, "is_admin"));
            view.IsSystem           = Conversion.TryCastBoolean(ConversionHelper.GetColumnValue(row, "is_system"));
            view.UserName           = Conversion.TryCastString(ConversionHelper.GetColumnValue(row, "user_name"));
            view.FullName           = Conversion.TryCastString(ConversionHelper.GetColumnValue(row, "full_name"));
            view.LogOnId            = Conversion.TryCastInteger(ConversionHelper.GetColumnValue(row, "login_id"));
            view.OfficeId           = Conversion.TryCastInteger(ConversionHelper.GetColumnValue(row, "office_id"));
            view.Culture            = Conversion.TryCastString(ConversionHelper.GetColumnValue(row, "culture"));
            view.Office             = Conversion.TryCastString(ConversionHelper.GetColumnValue(row, "office"));
            view.OfficeCode         = Conversion.TryCastString(ConversionHelper.GetColumnValue(row, "office_code"));
            view.OfficeName         = Conversion.TryCastString(ConversionHelper.GetColumnValue(row, "office_name"));
            view.Nickname           = Conversion.TryCastString(ConversionHelper.GetColumnValue(row, "nick_name"));
            view.RegistrationDate   = Conversion.TryCastDate(ConversionHelper.GetColumnValue(row, "registration_date"));
            view.RegistrationNumber = Conversion.TryCastString(ConversionHelper.GetColumnValue(row, "registration_number"));
            view.PanNumber          = Conversion.TryCastString(ConversionHelper.GetColumnValue(row, "pan_number"));
            view.AddressLine1       = Conversion.TryCastString(ConversionHelper.GetColumnValue(row, "address_line_1"));
            view.AddressLine2       = Conversion.TryCastString(ConversionHelper.GetColumnValue(row, "address_line_2"));
            view.Street             = Conversion.TryCastString(ConversionHelper.GetColumnValue(row, "street"));
            view.City               = Conversion.TryCastString(ConversionHelper.GetColumnValue(row, "city"));
            view.State              = Conversion.TryCastString(ConversionHelper.GetColumnValue(row, "state"));
            view.ZipCode            = Conversion.TryCastString(ConversionHelper.GetColumnValue(row, "zip_code"));
            view.Country            = Conversion.TryCastString(ConversionHelper.GetColumnValue(row, "country"));
            view.Phone              = Conversion.TryCastString(ConversionHelper.GetColumnValue(row, "phone"));
            view.Fax   = Conversion.TryCastString(ConversionHelper.GetColumnValue(row, "fax"));
            view.Email = Conversion.TryCastString(ConversionHelper.GetColumnValue(row, "email"));
            view.Url   = new Uri(Conversion.TryCastString(ConversionHelper.GetColumnValue(row, "url")), UriKind.RelativeOrAbsolute);


            return(view);
        }
Beispiel #5
0
        internal void Navigate(ModesEnum mode)
        {
            switch (mode)
            {
            case ModesEnum.SignIn:
                _contentWindow.ContentControl.Content = _signInView = new SignInView();
                SignInViewModel signInViewModel = _signInView.DataContext as SignInViewModel;
                if (signInViewModel != null)
                {
                    if (StationManager.CurrentUser != null)
                    {
                        signInViewModel.Login = StationManager.CurrentUser.Login;
                    }
                    signInViewModel.Password = string.Empty;
                }
                break;

            case ModesEnum.SingUp:
                _contentWindow.ContentControl.Content = _signUpView = new SignUpView();
                break;

            case ModesEnum.Main:
                _contentWindow.ContentControl.Content = _mainView = new MainView();
                break;

            default:
                throw new ArgumentOutOfRangeException(nameof(mode), mode, null);
            }
        }
Beispiel #6
0
        private static Dictionary <string, object> GetDictionary(SignInView signInView)
        {
            Dictionary <string, object> dictionary = new Dictionary <string, object>();

            dictionary.Add("AddressLine1", signInView.AddressLine1);
            dictionary.Add("AddressLine2", signInView.AddressLine2);
            dictionary.Add("City", signInView.City);
            dictionary.Add("Country", signInView.Country);
            dictionary.Add("Culture", signInView.Culture);
            dictionary.Add("CurrencyCode", signInView.CurrencyCode);
            dictionary.Add("Email", signInView.Email);
            dictionary.Add("Fax", signInView.Fax);
            dictionary.Add("FullName", signInView.FullName);
            dictionary.Add("NickName", signInView.NickName);
            dictionary.Add("Office", signInView.Office);
            dictionary.Add("OfficeCode", signInView.OfficeCode);
            dictionary.Add("OfficeId", signInView.OfficeId);
            dictionary.Add("OfficeName", signInView.OfficeName);
            dictionary.Add("PanNumber", signInView.PanNumber);
            dictionary.Add("Phone", signInView.Phone);
            dictionary.Add("RegistrationDate", signInView.RegistrationDate);
            dictionary.Add("RegistrationNumber", signInView.RegistrationNumber);
            dictionary.Add("Role", signInView.Role);
            dictionary.Add("RoleCode", signInView.RoleCode);
            dictionary.Add("RoleName", signInView.RoleName);
            dictionary.Add("State", signInView.State);
            dictionary.Add("Street", signInView.Street);
            dictionary.Add("Url", signInView.Url);
            dictionary.Add("UserId", signInView.UserId);
            dictionary.Add("UserName", signInView.UserName);
            dictionary.Add("ZipCode", signInView.ZipCode);

            return(dictionary);
        }
Beispiel #7
0
        public void Navigate(ModesEnum mode)
        {
            switch (mode)
            {
            case ModesEnum.SignIn:
                _contentWindow.ContentControl.Content = _signInView ?? (_signInView = new SignInView());
                Logger.Log("Navigate to SignIn");

                break;

            case ModesEnum.SingUp:
                _contentWindow.ContentControl.Content = _signUpView ?? (_signUpView = new SignUpView());
                Logger.Log("Navigate to SignUp");

                break;

            case ModesEnum.Main:
                _contentWindow.ContentControl.Content = _mainView ?? (_mainView = new MainView());
                Logger.Log("Navigate to Main");
                break;

            default:
                Logger.Log("Fail to Navigate: ArgumentOutOfRangeException");
                throw new ArgumentOutOfRangeException(nameof(mode), mode, null);
            }
        }
Beispiel #8
0
        private void SignInMethod(object param)
        {
            SignInView signInView = new SignInView();

            App.Current.MainWindow.Close();
            App.Current.MainWindow = signInView;
            signInView.Show();
        }
Beispiel #9
0
        public void SignIn(object parameter)
        {
            SignInView window = new SignInView()
            {
                DataContext = new SignInViewModel()
            };

            window.Show();
            App.Current.MainWindow.Close();
            App.Current.MainWindow = window;
        }
        private void OnSignInMenuItem_Click(object sender, RoutedEventArgs e)
        {
            var view = new SignInView();
            var b    = view.ShowDialog();

            if (b.Value)
            {
                this.UserName = view.UserName;
                this.LoadNewGame(null);
            }
        }
Beispiel #11
0
        public static Config GetScrudConfig()
        {
            SignInView view = CacheProvider.GetSignInView();

            return(new Config
            {
                OfficeId = view.OfficeId.ToInt(),
                UserId = view.UserId.ToInt(),
                UserName = view.UserName,
                OfficeCode = view.OfficeCode,
            });
        }
Beispiel #12
0
        public static bool SetSession(Page page, string user)
        {
            if (page != null)
            {
                try
                {
                    SignInView signInView = Data.Office.User.GetLastSignInView(user);
                    long       logOnId    = signInView.LogOnId;

                    if (logOnId.Equals(0))
                    {
                        RequestLogOnPage();
                        return(false);
                    }

                    page.Session["LogOnId"]            = signInView.LogOnId;
                    page.Session["UserId"]             = signInView.UserId;
                    page.Session["Culture"]            = signInView.Culture;
                    page.Session["UserName"]           = user;
                    page.Session["FullUserName"]       = signInView.FullName;
                    page.Session["Role"]               = signInView.Role;
                    page.Session["IsSystem"]           = signInView.IsSystem;
                    page.Session["IsAdmin"]            = signInView.IsAdmin;
                    page.Session["OfficeCode"]         = signInView.OfficeCode;
                    page.Session["OfficeId"]           = signInView.OfficeId;
                    page.Session["NickName"]           = signInView.Nickname;
                    page.Session["OfficeName"]         = signInView.OfficeName;
                    page.Session["RegistrationDate"]   = signInView.RegistrationDate;
                    page.Session["RegistrationNumber"] = signInView.RegistrationNumber;
                    page.Session["PanNumber"]          = signInView.PanNumber;
                    page.Session["AddressLine1"]       = signInView.AddressLine1;
                    page.Session["AddressLine2"]       = signInView.AddressLine2;
                    page.Session["Street"]             = signInView.Street;
                    page.Session["City"]               = signInView.City;
                    page.Session["State"]              = signInView.State;
                    page.Session["Country"]            = signInView.Country;
                    page.Session["ZipCode"]            = signInView.ZipCode;
                    page.Session["Phone"]              = signInView.Phone;
                    page.Session["Fax"]   = signInView.Fax;
                    page.Session["Email"] = signInView.Email;
                    page.Session["Url"]   = signInView.Url;

                    return(true);
                }
                catch (DbException)
                {
                    //Swallow the exception
                }
            }

            return(false);
        }
        public void ShouldThrowAnErrorIfSignInDetailsAreMissing()
        {
            //Arrange
            string expectedError = "There were errors in your submission";

            var signInView = new SignInView();

            //Act
            string actualError = signInView.GetErrorMessageIfSignInDetailsAreMissing();

            //Assert
            Assert.True(actualError.Contains(expectedError));
        }
Beispiel #14
0
        public JsonResult GetMenu()
        {
            SignInView view = Providers.CacheProvider.GetSignInView();

            int    userId   = view.UserId.ToInt();
            int    officeId = view.OfficeId.ToInt();
            string culture  = view.Culture;

            Navigation nav = new Navigation(userId, officeId, culture);
            IEnumerable <NavigationMenu> menus = nav.GetMenus();

            return(Json(menus, JsonRequestBehavior.AllowGet));
        }
Beispiel #15
0
 private void WindowLoaded(object sender, RoutedEventArgs e)
 {
     new Thread(() => { Helper.FFmpeg = new FFmpegFa.FFmpeg(); }).Start();
     Helper.LocalPath.Output();
     Helper.CreateDirectory();
     SettingsHelper.Load();
     SettingsView.Load();
     SignInView.Load();
     if (Helper.InstaApi != null && Helper.InstaApi.IsUserAuthenticated)
     {
         PostView.IsEnabled = true;
     }
 }
Beispiel #16
0
        public string GetMenus()
        {
            SignInView view = AppUsers.GetCurrentLogin().View;

            string catalog  = AppUsers.GetCurrentUserDB();
            int    userId   = view.UserId.ToInt();
            int    officeId = view.OfficeId.ToInt();
            string culture  = view.Culture;

            Navigation nav   = new Navigation(catalog, userId, officeId, culture);
            var        menus = nav.GetMenus();

            return(JsonConvert.SerializeObject(menus));
        }
        public async void StartChallengeV2(InstaChallengeLoginInfo challengeLoginInfo)
        {
            try
            {
                try
                {
                    var device = Helper.InstaApi.GetCurrentDevice();
                    //UserAgentHelper.SetUserAgent("Mozilla/5.0 (Linux; Android 4.4; Nexus 5 Build/_BuildID_) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/30.0.0.0 Mobile Safari/537.36");
                    UserAgentHelper.SetUserAgent($"Mozilla/5.0 (Linux; Android {device.AndroidVer.VersionNumber}; {device.DeviceModelIdentifier}) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/87.0.4280.86 Mobile Safari/537.36");
                }
                catch
                {
                    try
                    {
                        UserAgentHelper.SetUserAgent($"Mozilla/5.0 (Linux; Android 10; SM-A205U) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/87.0.4280.86 Mobile Safari/537.36");
                    }
                    catch { }
                }
                try
                {
                    SignInView.DeleteFacebookCookies();
                }
                catch { }
                Visibility = Visibility.Visible;
                ChallengeV2LoadingOn();
                await Task.Delay(1500);

                Uri baseUri = new Uri(challengeLoginInfo.Url);
                HttpBaseProtocolFilter filter = new HttpBaseProtocolFilter();
                var cookies = Helper.InstaApi.HttpRequestProcessor.HttpHandler.CookieContainer
                              .GetCookies(Helper.InstaApi.HttpRequestProcessor.Client.BaseAddress);
                foreach (System.Net.Cookie c in cookies)
                {
                    HttpCookie cookie = new HttpCookie(c.Name, baseUri.Host, "/")
                    {
                        Value = c.Value
                    };
                    filter.CookieManager.SetCookie(cookie, false);
                }

                HttpRequestMessage httpRequestMessage = new HttpRequestMessage(HttpMethod.Get, baseUri);
                ChallengeV2kWebView.NavigateWithHttpRequestMessage(httpRequestMessage);
            }
            catch (Exception ex)
            {
                ChallengeV2LoadingOff();
                Helper.ShowErr("Something unexpected happened", ex);
            }
        }
    void Awake()
    {
        Debug.Log("---------------  Awake ------------------------");

        foreach (UIFacade facade in uIFacades)
        {
            facade.Register();
        }

        initialize();

        //windowtools
        WindowToolsView viewWindowTools = new WindowToolsView();

        framework.viewCenter.Register(WindowToolsView.NAME, viewWindowTools);

        // quit dialog
        QuitDialogView viewQuitDialog = new QuitDialogView();

        framework.viewCenter.Register(QuitDialogView.NAME, viewQuitDialog);

        // account
        AccountService    serviceAccount    = new AccountService();
        AccountModel      modelAccount      = new AccountModel();
        AccountController controllerAccount = new AccountController();

        framework.modelCenter.Register(AccountModel.NAME, modelAccount);
        framework.controllerCenter.Register(AccountController.NAME, controllerAccount);
        framework.serviceCenter.Register(AccountService.NAME, serviceAccount);

        //signin
        SignInView       viewSignIn       = new SignInView();
        SignInModel      modelSignIn      = new SignInModel();
        SignInController controllerSignIn = new SignInController();
        SignInService    serviceSignIn    = new SignInService();


        serviceSignIn.domain = Constant.Domain;

        /*
         * serviceSignIn.MockProcessor = AuthMock.Processor;
         * serviceSignIn.useMock = true;
         */
        framework.viewCenter.Register(SignInView.NAME, viewSignIn);
        framework.modelCenter.Register(SignInModel.NAME, modelSignIn);
        framework.controllerCenter.Register(SignInController.NAME, controllerSignIn);
        framework.serviceCenter.Register(SignInService.NAME, serviceSignIn);
    }
Beispiel #19
0
 private bool Observer_MainView_handler(Observers.Interfaces.INotification note)
 {
     if ("open".Equals(note.Type))
     {
         string mark   = string.Format("openSignDay{0}", GameProxy.instance.AccountId);
         int    day    = PlayerPrefs.GetInt(mark);
         int    nowDay = TimeController.instance.ServerTime.DayOfYear;
         bool   isOpen = FunctionOpen.Model.FunctionOpenProxy.instance.IsFunctionOpen(Logic.Enums.FunctionOpenType.MainView_SignIn);
         if (isOpen && nowDay != day && !isSignInToday)
         {
             Debugger.Log(string.Format("{0}sign is open :{1},preDay:{2},nowDay:{3}", GameProxy.instance.AccountId, isOpen, day, nowDay));
             SignInView.Open();
         }
     }
     return(true);
 }
Beispiel #20
0
        public static void SetSignInView(long signInId)
        {
            if (signInId > 0)
            {
                string key = signInId.ToString(CultureInfo.InvariantCulture);

                if (MemoryCache.Default[key] == null)
                {
                    SignInView signInView = Data.Office.User.GetSignInView(signInId);
                    Dictionary <string, object> dictionary = GetDictionary(signInView);

                    CacheFactory.AddToDefaultCache("Dictionary" + key, dictionary);
                    CacheFactory.AddToDefaultCache(key, signInView);
                }
            }
        }
Beispiel #21
0
        public async Task <IActionResult> AdminSignin(SignInView model)
        {
            if (ModelState.IsValid)
            {
                var result = await signInManager.PasswordSignInAsync(model.Email, model.Password, model.RememberMe, false);

                if (result.Succeeded)
                {
                    return(RedirectToAction("Dashboard", "Home"));
                }


                ModelState.AddModelError(string.Empty, "Invalid Login Details");
            }

            return(View(model));
        }
Beispiel #22
0
        public static SignInView GetSignInView()
        {
            SignInView view = new SignInView();

            string signInId = HttpContext.Current.User.Identity.Name;

            if (!string.IsNullOrWhiteSpace(signInId))
            {
                view = CacheFactory.GetFromDefaultCacheByKey(signInId) as SignInView;
            }

            if (view == null)
            {
                view = new SignInView();
            }

            return(view);
        }
        public ActionResult SignIn(SignInView signInView)
        {
            if (!ModelState.IsValid)
            {
                return(View("SignIn", signInView));
            }
            var authenticationService = DI.GetAuthenticationService();

            if (authenticationService.PasswordMatches(signInView.UserName, signInView.Password))
            {
                FormsAuthentication.SetAuthCookie(signInView.UserName, true);

                return(Redirect(FormsAuthentication.GetRedirectUrl(signInView.UserName, true)));
                //return Redirect("https://apps.ccisd.net/Fees/");
            }
            ModelState.AddModelError("SignIn", "Please enter valid Username/Password.");
            return(View("SignIn"));
        }
        internal void Navigate(ModesEnum mode)
        {
            switch (mode)
            {
            case ModesEnum.SignIn:
                _contentWindow.ContentControl.Content = _signInView ?? (_signInView = new SignInView());
                break;

            case ModesEnum.SingUp:
                _contentWindow.ContentControl.Content = _signUpView ?? (_signUpView = new SignUpView());
                break;

            case ModesEnum.Main:
                _contentWindow.ContentControl.Content = _mainView ?? (_mainView = new MainView());
                break;

            default:
                throw new ArgumentOutOfRangeException(nameof(mode), mode, null);
            }
        }
        public void Navigate(ModesEnum mode)
        {
            switch (mode)
            {
            case ModesEnum.SignIn:
                _content.ContentControl.Content = _signInView = new SignInView();
                break;

            case ModesEnum.SingUp:
                _content.ContentControl.Content = _signUpView = new SignUpView();
                break;

            case ModesEnum.Translit:
                _content.ContentControl.Content = _mainView = new TranslitView();
                break;

            default:
                throw new ArgumentOutOfRangeException(nameof(mode), mode, null);
            }
        }
Beispiel #26
0
        public static SignInView GetLastSignInView(string userName)
        {
            SignInView view = new SignInView();

            const string sql = "SELECT * FROM office.sign_in_view WHERE user_name=@UserName;";

            using (NpgsqlCommand command = new NpgsqlCommand(sql))
            {
                command.Parameters.AddWithValue("@UserName", userName);

                using (DataTable table = DbOperations.GetDataTable(command))
                {
                    if (table != null && table.Rows.Count.Equals(1))
                    {
                        view = GetSignInView(table.Rows[0]);
                    }
                }
            }

            return(view);
        }
Beispiel #27
0
        public static SignInView GetSignInView()
        {
            while (true)
            {
                string signInId = HttpContext.Current.User.Identity.Name;

                if (string.IsNullOrWhiteSpace(signInId))
                {
                    return(new SignInView());
                }

                SignInView view = CacheFactory.GetFromDefaultCacheByKey(signInId) as SignInView;

                if (view != null)
                {
                    return(view);
                }

                SetSignInView();
            }
        }
Beispiel #28
0
        public static GlobalLogin GetGloblalLogin(long globalLoginId)
        {
            const string sql   = "SELECT * FROM public.global_logins WHERE global_login_id=@0;";
            GlobalLogin  login = Factory.Get <GlobalLogin>(Factory.MetaDatabase, sql, globalLoginId).FirstOrDefault();

            if (login != null)
            {
                string catalog = login.Catalog;

                SignInView view =
                    Factory.Get <SignInView>(catalog, "SELECT * FROM office.sign_in_view WHERE login_id=@0;",
                                             login.LoginId).FirstOrDefault();

                if (view != null)
                {
                    login.View = view;
                    return(login);
                }
            }

            return(null);
        }
Beispiel #29
0
        public App()
        {
            InitializeComponent();

            MainPage = new SignInView();

            _navigator = new NavigationService(this, new ViewLocator());

            Application.Current.Properties["ApiUrl"] = "http://192.168.42.151:5000/";


            if (WebApiClient.Validate())
            {
                _navigator.PresentAsNavigatableMainPage(new MainPageViewModel(_navigator));
            }
            else
            {
                _navigator.PresentAsNavigatableMainPage(new SignInViewModel(_navigator));
            }

            //_navigator.PresentAsNavigatableMainPage(new TeamsViewModel(_navigator));
        }
Beispiel #30
0
        private static Dictionary<string, object> GetDictionary(SignInView signInView)
        {
            Dictionary<string, object> dictionary = new Dictionary<string, object>();

            if (signInView == null)
            {
                return dictionary;
            }

            dictionary.Add("AddressLine1", signInView.AddressLine1);
            dictionary.Add("AddressLine2", signInView.AddressLine2);
            dictionary.Add("City", signInView.City);
            dictionary.Add("Country", signInView.Country);
            dictionary.Add("Culture", signInView.Culture);
            dictionary.Add("CurrencyCode", signInView.CurrencyCode);
            dictionary.Add("Email", signInView.Email);
            dictionary.Add("Fax", signInView.Fax);
            dictionary.Add("FullName", signInView.FullName);
            dictionary.Add("NickName", signInView.NickName);
            dictionary.Add("Office", signInView.Office);
            dictionary.Add("OfficeCode", signInView.OfficeCode);
            dictionary.Add("OfficeId", signInView.OfficeId);
            dictionary.Add("OfficeName", signInView.OfficeName);
            dictionary.Add("PanNumber", signInView.PanNumber);
            dictionary.Add("Phone", signInView.Phone);
            dictionary.Add("RegistrationDate", signInView.RegistrationDate);
            dictionary.Add("RegistrationNumber", signInView.RegistrationNumber);
            dictionary.Add("Role", signInView.Role);
            dictionary.Add("RoleCode", signInView.RoleCode);
            dictionary.Add("RoleName", signInView.RoleName);
            dictionary.Add("State", signInView.State);
            dictionary.Add("Street", signInView.Street);
            dictionary.Add("Url", signInView.Url);
            dictionary.Add("UserId", signInView.UserId);
            dictionary.Add("UserName", signInView.UserName);
            dictionary.Add("ZipCode", signInView.ZipCode);

            return dictionary;
        }
Beispiel #31
0
    IEnumerator CustomLog(bool success)
    {
        if (authType == AuthType.Register)
        {
            if (success)
            {
                Log.GetComponent <Text>().color = successColor;
                Log.text = "user created successfully";
            }
            else
            {
                Log.GetComponent <Text>().color = ErrorColor;
                Log.text = "User with email address " + Registeremailaddress + " already exists";
            }
            yield return(new WaitForSeconds(2f));

            Log.text = "";
        }

        if (authType == AuthType.SignIn)
        {
            if (success)
            {
                Log.GetComponent <Text>().color = successColor;
                Log.text = "user signed in successfully";
            }
            else
            {
                Log.GetComponent <Text>().color = ErrorColor;
                Log.text = "wrong password or email address";
            }
            yield return(new WaitForSeconds(2f));

            Log.text = "";
            SignInView.SetActive(false);
            RegisterView.SetActive(false);
            GameManager._Instance.SetInfo();
        }
    }