示例#1
0
        void Handle_Tapped(object sender, EventArgs e)
        {
            var name = ((Image)sender).ClassId;

            switch (name)
            {
            case "UserName":
                if (!UserNameEntry.IsFocused)
                {
                    UserNameEntry.Focus();
                }
                break;

            case "Email":
                if (!EmailEntry.IsFocused)
                {
                    EmailEntry.Focus();
                }
                break;

            case "DisplayName":
                //  if (!DisplayNameEntry.IsFocused)
                // DisplayNameEntry.Focus();
                break;

            default:
                break;
            }
        }
示例#2
0
        public BookingCustomerPage()
        {
            InitializeComponent();

            NameEntry.Completed  += (s, e) => EmailEntry.Focus();
            EmailEntry.Completed += (s, e) => MobileEntry.Focus();
        }
示例#3
0
 private void EmailEdit_Click(object sender, EventArgs e)
 {
     EmailEntry.Enabled = true;
     EmailEntry.Focus();
     button2.Visible   = true;
     EmailEdit.Visible = false;
 }
示例#4
0
        private async Task <bool> ValidarControles()
        {
            bool   b_error = false;
            string s_msg   = "";

            if (string.IsNullOrEmpty(EmailEntry.Text))
            {
                s_msg   = "Debe Ingresar un usuario";
                b_error = true;
                EmailEntry.Focus();
            }

            if (string.IsNullOrEmpty(PasswordEntry.Text) && !b_error)
            {
                s_msg   = "Debe Ingresar una clave";
                b_error = true;
                PasswordEntry.Focus();
            }

            if (b_error)
            {
                await DisplayAlert("Error", s_msg, "Aceptar");
            }
            return(b_error);
        }
示例#5
0
        private void StartLayout()
        {
            BackLabel.FadeTo(0, 1);
            EmailEntry.FadeTo(0, 1);
            PasswordEntry.FadeTo(0, 1);

            BackLabel.TranslateTo(0, 30, 1);
            EmailEntry.TranslateTo(0, -60, 1);
            PasswordEntry.TranslateTo(0, -60, 1);
        }
示例#6
0
        private void ShowControls()
        {
            BackLabel.TranslateTo(0, 0, AnimationSpeed);
            EmailEntry.TranslateTo(0, 0, AnimationSpeed);
            PasswordEntry.TranslateTo(0, 0, AnimationSpeed);

            BackLabel.FadeTo(1, AnimationSpeed);
            EmailEntry.FadeTo(1, AnimationSpeed);
            PasswordEntry.FadeTo(1, AnimationSpeed);
        }
示例#7
0
        private void HideControls()
        {
            BackLabel.FadeTo(0, AnimationSpeed);
            EmailEntry.FadeTo(0, AnimationSpeed);
            PasswordEntry.FadeTo(0, AnimationSpeed);

            BackLabel.TranslateTo(0, 30, AnimationSpeed);
            EmailEntry.TranslateTo(0, -60, AnimationSpeed);
            PasswordEntry.TranslateTo(0, -60, AnimationSpeed);
        }
示例#8
0
        public RegisterPage()
        {
            InitializeComponent();
            BindingContext = new RegisterViewModel(Navigation, Alert);

            DisplayNameEntry.ReturnCommand = new Command(() => EmailEntry.Focus());
            EmailEntry.ReturnCommand       = new Command(() => PasswordEntry.Focus());

            PasswordEntry.ReturnCommand        = new Command(() => ConfirmpasswordEntry.Focus());
            ConfirmpasswordEntry.ReturnCommand = new Command(() => Register.Focus());
        }
        protected override async Task OnAppearingAnimationEndAsync()
        {
            if (!IsAnimationEnabled)
            {
                return;
            }

            var translateLength = 400u;

            await Task.WhenAll(
                UsernameEntry.TranslateTo(0, 0, easing: Easing.SpringOut, length: translateLength),
                UsernameEntry.FadeTo(1),
                (new Func <Task>(async() =>
            {
                await Task.Delay(100);
                await Task.WhenAll(
                    EmailEntry.TranslateTo(0, 0, easing: Easing.SpringOut, length: translateLength),
                    EmailEntry.FadeTo(1)
                    );
            }))(),
                (new Func <Task>(async() =>
            {
                await Task.Delay(100);
                await Task.WhenAll(
                    PasswordEntry.TranslateTo(0, 0, easing: Easing.SpringOut, length: translateLength),
                    PasswordEntry.FadeTo(1)
                    );
            }))(),
                (new Func <Task>(async() =>
            {
                await Task.Delay(100);
                await Task.WhenAll(
                    PasswordConfirmEntry.TranslateTo(0, 0, easing: Easing.SpringOut, length: translateLength),
                    PasswordConfirmEntry.FadeTo(1)
                    );
            }))(),
                (new Func <Task>(async() =>
            {
                await Task.Delay(100);
                await Task.WhenAll(
                    PhoneNumberEntry.TranslateTo(0, 0, easing: Easing.SpringOut, length: translateLength),
                    PhoneNumberEntry.FadeTo(1)
                    );
            }))()
                );

            await Task.WhenAll(
                RegisterButton.ScaleTo(1),
                RegisterButton.FadeTo(1)
                );

            RegisterButton.IsEnabled = false;
        }
示例#10
0
        public override void Map(Context context)
        {
            // base.Map(context);
            EmailEntry ee = new EmailEntry();

            ee.CC      = new string[] { "test2" };
            ee.BCC     = new string[] { "teset2" };
            ee.To      = new string[] { "test2" };
            ee.Subject = "hehe2";
            ee.Context = "context2";
            context.Write(ee);
        }
示例#11
0
        private async void Button_Login(object sender, EventArgs e)
        {
            // Verifica os campos
            if (VerificaCamposLogin())
            {
                // Verifica a conexão com a internet
                if (!CrossConnectivity.Current.IsConnected)
                {
                    bool answer = await DisplayAlert("Atenção",
                                                     "Não foi possivel conectar-se com a internet, verifique sua conexão e tente novamente!",
                                                     "Cancelar", "Tentar Novamente");

                    return;
                }
                // Chama o Popup de Loading
                await PopupNavigation.Instance.PushAsync(new LoadingPopUpView());

                // Chama a requisição
                var cliente = clienteService.RealizaLogin(EmailEntry.Text, SenhaEntry.Text);

                // Verifica a resposta
                if (cliente.Result == "ok")
                {
                    // Verifica definição de login automático
                    if (manterConectado.IsChecked)
                    {
                        // Salva definição
                        Preferences.Set("manterConectado", true);
                        Preferences.Set("email", EmailEntry.Text);
                        Preferences.Set("senha", SenhaEntry.Text);
                    }
                    //Chama a página Home
                    await Navigation.PushAsync(new Home());

                    // Fecha o Popup de Loading
                    await PopupNavigation.Instance.PopAsync();
                }
                else
                {
                    // Fecha o Popup de Loading
                    await PopupNavigation.Instance.PopAsync();

                    // Exibe o alerta
                    await DisplayAlert("Ops...", "Usúario ou Senha incorreto!", "Aceitar");

                    // Manda o foco para o campo de e-mail
                    EmailEntry.Focus();
                    // Quebra a função
                    return;
                }
            }
        }
示例#12
0
    void OpenEmailReplyWindow(EmailEntry email)
    {
        currentEmail = email;
        emailReplyWindow.SetActive(true);
        emailReplyWindow.transform.SetAsLastSibling();

        // Set up Images
        if (email.itemID != null)
        {
            emailReplyWindow.transform.FindDeepChild("Image_Item").GetComponent <Image>().sprite = GM.GetSpriteSet(email.itemID).normalSprites[0];
        }
        else
        {
            emailReplyWindow.transform.FindDeepChild("Image_Item").gameObject.SetActive(false);
        }

        // Reset Buttons
        foreach (Button b in replyButtons)
        {
            b.onClick.RemoveAllListeners();
        }


        replyButtons.Clear();
        replyButtons.Add(replyButton1);
        replyButtons.Add(replyButton2);
        replyButtons.Add(replyButton3);


        // set up button text and listeners

        // Assign random button as good response, then remove it. Assign bad response from the left over, and then neutral response
        int randomGood = AssignRandom(0, replyButtons.Count);

        replyButtons[randomGood].transform.GetComponentInChildren <Text>().text = currentEmail.playerReplyGood;
        replyButtons[randomGood].onClick.AddListener(delegate { SubmitReply("g", currentEmail.playerReplyGood); });
        replyButtons.Remove(replyButtons[randomGood]);

        // Assign Bad
        int randomBad = AssignRandom(0, replyButtons.Count);

        replyButtons[randomBad].transform.GetComponentInChildren <Text>().text = currentEmail.playerReplyBad;
        replyButtons[randomBad].onClick.AddListener(delegate { SubmitReply("b", currentEmail.playerReplyBad); });
        replyButtons.Remove(replyButtons[randomBad]);


        // Assign Neutral
        replyButtons[0].transform.GetComponentInChildren <Text>().text = currentEmail.playerReplyNeutral;
        replyButtons[0].onClick.AddListener(delegate { SubmitReply("n", currentEmail.playerReplyNeutral); });
    }
示例#13
0
    public void PutNextEmailToConversation(string receivedEmailID) // Called from Delivery Manager when EmailOrder is Received
    {
        // Find the relevant email, then use the property conversationID to find where to send it


        EmailEntry nextEmail = allEmailsInData.Where(EmailEntry => EmailEntry.entryID == receivedEmailID).SingleOrDefault();

        nextEmail.received = true;

        // Send to EmailConversation
        emailConversationsDictionary[nextEmail.conversationID].AddNextEmail(nextEmail);

        // Show 'New' Notification
        laptopScreenNotification.SetActive(true);
    }
示例#14
0
 //Echange l'input de mail avec celui de password, et ensuite affiche le menu. (Animation)
 void ShowNext(object sender, EventArgs e)
 {
     if (EmailEntry.IsVisible)
     {
         EmailEntry.FadeTo(0, 300, Easing.SinIn);
         EmailEntry.IsVisible = false;
         PassEntry.IsVisible  = true;
         PassEntry.FadeTo(1, 300, Easing.SinOut);
         PassEntry.Focus();
     }
     else
     {
         Navigation.PushAsync(new MenuPage());
     }
 }
示例#15
0
        public override void Map(Context context)
        {
            //base.Map(context);
            EmailEntry ee = new EmailEntry();

            ee.CC      = new string[] { "test" };
            ee.BCC     = new string[] { "teset" };
            ee.To      = new string[] { "test" };
            ee.Subject = "hehe";
            ee.Context = "context";
            context.Write(ee);

            //int a = 3;
            //int b = 0;
            //int c = a / b;
            //Console.WriteLine(c);
        }
示例#16
0
    public void AddNextEmail(EmailEntry incomingEmail) // Called from EmailManager
    {
        // Receive new email
        receivedEmails.Add(incomingEmail);
        incomingEmail.received = true;

        // Check if new email has been opened (This method also runs on game load)
        if (incomingEmail.opened == false)
        {
            unreadEmail = true;
        }

        // Update conversation stage
        stage = incomingEmail.stage;

        Debug.Log("New email added to conversation: " + conversationID + ". Conversation Stage = " + stage + "| entryID = " + incomingEmail.entryID);
    }
        protected override void OnAppearing()
        {
            base.OnAppearing();

            if (string.IsNullOrEmpty(EmailEntry.Text))
            {
                EmailEntry.Focus();
            }
            else if (string.IsNullOrEmpty(PasswordEntry.Text))
            {
                PasswordEntry.Focus();
            }
            else
            {
                LoginButton.Focus();
            }

            ViewModel.MessageLabel       = string.Empty;
            ViewModel.CanExecuteCommands = true;
        }
示例#18
0
    void PopulateConversationsList() // The Screen where it shows all conversations and the latest from each
    {
        foreach (KeyValuePair <string, EmailConversation> eConvo in EM.emailConversationsDictionary)
        {
            EmailConversation conversation = eConvo.Value;
            GameObject        emailConversationHeader;

            if (!eConvo.Value.uiHeaderExists)
            {
                // Set up Email Conversation Prefab and Text, etc
                emailConversationHeader     = GameObject.Instantiate(emailPrefab, emailListScrollContent);
                conversation.inGameHeader   = emailConversationHeader;
                conversation.uiHeaderExists = true;
            }
            EmailEntry latestEmail = eConvo.Value.GetLatestEmail();

            conversation.inGameHeader.transform.Find("Text_Name").GetComponent <Text>().text    = latestEmail.characterName;
            conversation.inGameHeader.transform.Find("Text_Subject").GetComponent <Text>().text = latestEmail.bodyText;


            Transform readButton = conversation.inGameHeader.transform.Find("Button_Open");

            // Display "NEW" if has an unread email
            if (conversation.unreadEmail)
            {
                readButton.GetComponent <Image>().color         = Color.yellow;
                readButton.GetComponentInChildren <Text>().text = "New Message!";
            }
            else
            {
                readButton.GetComponent <Image>().color         = Color.white;
                readButton.GetComponentInChildren <Text>().text = "Open";
            }


            // Set up button
            readButton.GetComponent <Button>().onClick.AddListener(delegate { CreateEmailConversation(latestEmail.conversationID); });
        }
    }
示例#19
0
        public async Task <IActionResult> SendEmail(EmailEntryDTO mailEntryDTO)
        {
            if (!ModelState.IsValid)
            {
                return(BadRequest());
            }

            var mailEntry = new EmailEntry()
            {
                Subject    = mailEntryDTO.Subject,
                Body       = mailEntryDTO.Body,
                Recipients = mailEntryDTO.Recipients,
                MailFrom   = mailEntryDTO.MailFrom,
                Result     = "OK"
            };

            try
            {
                await EmailService.SendEmailAsync(
                    mailEntryDTO.Subject,
                    mailEntryDTO.Body,
                    mailEntryDTO.Recipients,
                    mailEntryDTO.MailFrom);

                await Context.Emails.AddAsync(mailEntry);

                return(Ok(mailEntryDTO));
            }
            catch (Exception ex)
            {
                mailEntry.Result        = "Failed";
                mailEntry.FailedMessage = ex.Message;
                await Context.Emails.AddAsync(mailEntry);

                return(StatusCode(500));
            }
        }
示例#20
0
        // Função responsável por válidar os campos de login
        private bool  VerificaCamposLogin()
        {
            if (string.IsNullOrEmpty(EmailEntry.Text) && string.IsNullOrEmpty(SenhaEntry.Text))
            {
                // Exibe o alerta
                DisplayAlert("Ops...", "Preencha os campos para realizar o Login", "Aceitar");
                // Manda o foco para o campo de e-mail
                EmailEntry.Focus();
                // Sai da função
                return(false);
            }

            // Verifica se o campo email foi preenchido
            if (string.IsNullOrEmpty(EmailEntry.Text))
            {
                // Exibe o alerta
                DisplayAlert("Ops...", "Preencha o campo de E-mail", "Aceitar");
                // Manda o foco para o campo de e-mail
                EmailEntry.Focus();
                // Sai da função
                return(false);
            }

            // Verifica se o campo de senha foi preenchido
            if (string.IsNullOrEmpty(SenhaEntry.Text))
            {
                // Exibe o alerta
                DisplayAlert("Ops...", "Preencha o campo de Senha", "Aceitar");
                // Manda o foco para o campo de e-mail
                SenhaEntry.Focus();
                // Sai da função
                return(false);
            }

            // Caso os campos estiverem corretos
            return(true);
        }
示例#21
0
 private void EmailFocus(Object sender, EventArgs args)
 {
     EmailEntry.Focus();
 }
示例#22
0
    /// <summary>
    /// currentEmail is the EmailEntry the player is replying to.
    /// playerReplyGBN is a single-character string g,b,or n
    /// </summary>
    /// <param name="currentEmail"></param>
    public void RecordPlayerReplyAndQueueNextEmail(EmailEntry currentEmail, string playerReplyGBN, string playerReplyFull)
    // Will run when player has replied to an email. Finds next Email, Packs it, sends to DeliveryMgr
    // NOTE: Has to queue TWO emails: The initial reply *and* the next item order (if there is one)
    {
        EmailConversation currentConversation = emailConversationsDictionary[currentEmail.conversationID];


        // -------------------- RECORD PLAYER RESPONSE --------------
        // Before Anything else, record the player's response. Important for saving and loading emails later
        currentEmail.playerReplyGBN = playerReplyGBN;
        currentEmail.replied        = true;

        EmailEntry playerReplyEmail = new EmailEntry();

        playerReplyEmail.conversationID = currentEmail.conversationID;
        playerReplyEmail.characterName  = "Player";
        playerReplyEmail.stage          = currentEmail.stage;
        playerReplyEmail.entryID        = currentEmail.conversationID + "_" + currentEmail.stage + "_" + "player";
        playerReplyEmail.bodyText       = playerReplyFull;
        playerReplyEmail.received       = true;
        playerReplyEmail.dateTime       = System.DateTime.Now.ToString("dddd MMM dd h:mm:ss tt");

        // Put player reply to allEmails List in the right spot
        int targetIndex = allEmailsInData.IndexOf(currentEmail) + 1;

        allEmailsInData.Insert(targetIndex, playerReplyEmail);

        // Add player reply to Conversation
        currentConversation.AddNextEmail(playerReplyEmail);



        // ----------------- FIND NEXT EMAIL ----------------
        // Find next emailID
        // Examples: davinta_0_normal_initial_n
        //davinta_0_normal_reply_g
        //davinta_0_normal_reply_b
        //davinta_0_normal_reply_n


        // Create the string to find the next emailID (The immediate reply to the player).
        string replyEmailID = currentEmail.conversationID + "_" + currentEmail.stage + "_" +
                              currentEmail.state + "_" + "reply" + "_" + playerReplyGBN;

        Debug.Log("Next NPC Reply EmailID = " + replyEmailID);

        // Create the email on disc, we will send it to Delivery Manager shortly
        EmailEntry replyEmail = GetEmailByID(replyEmailID);

        Debug.Log("Found reply email: " + replyEmail.entryID);


        // ---------------- QUEUE NEXT TIME EMAIL ---------------

        EmailEntry nextTimeEmail = new EmailEntry();
        string     nextEmailID   = currentEmail.conversationID + "_" + (currentEmail.stage + 1) + "_" +
                                   "normal" + "_" + "initial" + "_" + "n";

        if (currentConversation.stage < currentConversation.maxStage)
        {
            nextTimeEmail = GetEmailByID(nextEmailID);
        }


        // ---------------- SEND NEXT EMAILS TO DELIVERY MANAGER -----------

        // Immediate NPC Response Order
        Order emailOrder = new Order();

        emailOrder.myOrderType = Order.orderType.email;
        emailOrder.orderAmount = 1;
        emailOrder.orderID     = replyEmail.entryID;
        GetComponent <DelayedOrderManager>().AddNewOrder
            (emailOrder, 1, "You have a reply email from " + replyEmail.characterName); // 1 minute

        // Next time NPC Initial Email Order
        if (nextTimeEmail.entryID != null)
        {
            Order nextTimeEmailOrder = new Order();
            nextTimeEmailOrder.myOrderType = Order.orderType.email;
            nextTimeEmailOrder.orderAmount = 1;
            nextTimeEmailOrder.orderID     = nextTimeEmail.entryID;

            // Randomise delivery time between 1 - 6 hours (adjusted to 1 hour for development)
            int deliveryTime = 60;

            GetComponent <DelayedOrderManager>().AddNewOrder
                (nextTimeEmailOrder, deliveryTime, "You have a new email from " + replyEmail.characterName + "!"); // Six hours
        }
    }
示例#23
0
 public EmailWorker(EmailEntry impl)
     : this()
 {
     classImpl = impl;
 }
示例#24
0
        public async Task Export()
        {
            EmailEntry = EmailEntry.Trim();
            if (Regex.IsMatch(EmailEntry, @"^(?("")("".+?(?<!\\)""@)|(([0-9a-z]((\.(?!\.))|[-!#\$%&'\*\+/=\?\^`\{\}\|~\w])*)(?<=[0-9a-z])@))" + @"(?(\[)(\[(\d{1,3}\.){3}\d{1,3}\])|(([0-9a-z][-\w]*[0-9a-z]*\.)+[a-z0-9][\-a-z0-9]{0,22}[a-z0-9]))$"))
            {
                //bool emailClient;
                //List<string> filePaths = new List<string>();

                //IFolder rootFolder = FileSystem.Current.LocalStorage;
                //IFolder folder = await rootFolder.CreateFolderAsync("ExportFolder", CreationCollisionOption.OpenIfExists);

                //IFile exportShift = await folder.CreateFileAsync("exportShift.csv", CreationCollisionOption.ReplaceExisting);
                //IFile exportVehicle = await folder.CreateFileAsync("exportVehicle.csv", CreationCollisionOption.ReplaceExisting);

                //IEnumerable<ExportShift> compiledShiftData = dbService.GetExportShift();
                //IEnumerable<ExportBreak> compiledBreakData = dbService.GetExportBreak();
                //IEnumerable<ExportNote> compiledNoteData = dbService.GetExportNote();
                //IEnumerable<ExportVehicle> compiledVehicleData = dbService.GetExportVehicle();

                //using (Stream file = await exportShift.OpenAsync(FileAccess.ReadAndWrite))
                //using (TextWriter sw = new StreamWriter(file))
                //using (var writer = new CsvWriter(sw))
                //{
                //    writer.WriteRecords(compiledShiftData);
                //}

                //filePaths.Add(exportShift.Path);

                //if (compiledBreakData != null)
                //{
                //    IFile exportBreak = await folder.CreateFileAsync("exportBreak.csv", CreationCollisionOption.ReplaceExisting);

                //    using (Stream file = await exportBreak.OpenAsync(FileAccess.ReadAndWrite))
                //    using (TextWriter sw = new StreamWriter(file))
                //    using (var writer = new CsvWriter(sw))
                //    {
                //        writer.WriteRecords(compiledBreakData);
                //    }

                //    filePaths.Add(exportBreak.Path);
                //}

                //if (compiledNoteData != null)
                //{
                //    IFile exportNote = await folder.CreateFileAsync("exportNote.csv", CreationCollisionOption.ReplaceExisting);

                //    using (Stream file = await exportNote.OpenAsync(FileAccess.ReadAndWrite))
                //    using (TextWriter sw = new StreamWriter(file))
                //    using (var writer = new CsvWriter(sw))
                //    {
                //        writer.WriteRecords(compiledNoteData);
                //    }

                //    filePaths.Add(exportNote.Path);
                //}

                //using (Stream file = await exportVehicle.OpenAsync(FileAccess.ReadAndWrite))
                //using (TextWriter sw = new StreamWriter(file))
                //using (var writer = new CsvWriter(sw))
                //{
                //    writer.WriteRecords(compiledVehicleData);
                //}

                //filePaths.Add(exportVehicle.Path);

                //emailClient = DependencyService.Get<IEmail>().Email(EmailEntry, Resource.Last7ShiftDays, filePaths);

                //if (emailClient)
                //{
                //    // MessagingCenter.Send<string>("PopAfterExport", "PopAfterExport");
                //    await Navigation.PopModalAsync();
                //}
                //else
                //{
                //    await UserDialogs.Instance.AlertAsync(Resource.EmailError, Resource.SendError, Resource.Okay);
                //    return;
                //}

                int result = await restAPI.ExportData();

                if (result < 1)
                {
                    await UserDialogs.Instance.AlertAsync(Resource.EmailError, Resource.SendError, Resource.Okay);

                    return;
                }

                await Navigation.PopModalAsync();
            }
            else
            {
                await UserDialogs.Instance.AlertAsync(Resource.InvalidEmail, Resource.Alert, Resource.Okay);
            }
        }
 public EmailWorker(EmailEntry impl)
     : this()
 {
     classImpl = impl;
 }
示例#26
0
    // Actually put the EmailEntry content into the email as a new panel in the Scroll View. Only if not yet loaded
    void CreateEmailConversationEntry(EmailEntry email)
    {
        GameObject prefabToUse;

        // Check if this email is player or character
        if (email.characterName == "Player")
        {
            prefabToUse    = emailPlayerReplyPrefab;
            email.opened   = true;
            email.received = true;
        }
        else
        {
            prefabToUse = emailContentPrefab;
        }

        GameObject newEmailEntry = GameObject.Instantiate(prefabToUse, emailConvoScrollContent);

        newEmailEntry.name = "EmailEntry_" + email.entryID;
        newEmailEntry.transform.FindDeepChild("Text_Content").GetComponent <Text>().text = email.bodyText;

        if (email.characterName == "Player")
        {
            newEmailEntry.transform.Find("Text_Label_Header").GetComponent <Text>().text = "Your Response [" + email.dateTime + "]:";
        }
        else // If an NPC Email
        {
            // Check if GM Sprite Dictionary Contains Reference, if so, pull sprites
            if (email.itemID != null && email.itemID != "" && email.itemID != " ")
            {
                Debug.Log("Attempting to Get Sprites for " + email.itemID);
                newEmailEntry.transform.FindDeepChild("Image_ItemOrder").GetComponent <Image>().sprite = GM.GetSpriteSet(email.itemID).normalSprites[0];
                Debug.Log("Retrived sprites");
            }
            else
            {
                newEmailEntry.transform.FindDeepChild("Image_ItemOrder").gameObject.SetActive(false);
            }


            // Set up the Respond button
            Transform respondButton = newEmailEntry.transform.FindDeepChild("Button_Respond");

            if (email.playerCanReply)
            {
                respondButton.GetComponent <Button>().onClick.AddListener(
                    delegate
                {
                    OpenEmailReplyWindow(email);
                });
            }
            else
            {
                respondButton.gameObject.SetActive(false);
            }
        }


        // Is now considered loaded and opened. NOTE: All emails set loaded to false when game loads for first time.
        // Important so they can appear next time
        email.opened       = true;
        email.loadedToGame = true;
    }
示例#27
0
 protected override void OnAppearing()
 {
     base.OnAppearing();
     EmailEntry.Focus();
 }