Exemple #1
0
        /// <inheritdoc />
        /// <summary>
        /// </summary>
        /// <param name="gameTime"></param>
        public override void Update(GameTime gameTime)
        {
            Border.FadeToColor(Selected ? Colors.MainAccent : Color.White, gameTime.ElapsedGameTime.TotalMilliseconds, 60);
            KeyText.FadeToColor(Selected ? Colors.MainAccent : Color.White, gameTime.ElapsedGameTime.TotalMilliseconds, 60);

            base.Update(gameTime);
        }
 private void delete_Click(object sender, RoutedEventArgs e)
 {
     if (!string.IsNullOrEmpty(KeyText))
     {
         KeyText = KeyText.Substring(0, KeyText.Length - 1);
     }
 }
Exemple #3
0
 public FinancialTableModel()
 {
     /*
      * Each instance variable is associated with a small string of text which is used to associate
      * instance variables within this class, with keys in the Form Recognizer response
      */
     populateInformation = new KeyText[]
     {
         new KeyText(nameof(income), "income income"),
         new KeyText(nameof(extraIncome), "extra income"),
         new KeyText(nameof(totalMonthlyIncome), "total monthly income"),
         new KeyText(nameof(mortgageOrRent), "mortgage or rent"),
         new KeyText(nameof(phone), "phone"),
         new KeyText(nameof(electricity), "electricity"),
         new KeyText(nameof(housingSubtotal), "housing subtotal"),
         new KeyText(nameof(personal), "personal"),
         new KeyText(nameof(student), "student"),
         new KeyText(nameof(creditCard), "credit card"),
         new KeyText(nameof(loansSubtotal), "loans subtotal"),
         new KeyText(nameof(home), "home"),
         new KeyText(nameof(health), "health"),
         new KeyText(nameof(life), "life"),
         new KeyText(nameof(insuranceSubtotal), "insurance subtotal"),
         new KeyText(nameof(totalActualCost), "total actual cost"),
         new KeyText(nameof(actualBalance), "actual balance")
     };
 }
Exemple #4
0
 public bool IsEmpty()
 {
     if (KeyText.Trim() == "" || KeySearchName.Trim() == "")
     {
         return(true);
     }
     return(false);
 }
Exemple #5
0
 public override string ToString()
 {
     if (KeyText != null)
     {
         return(KeyText.ToString());
     }
     else
     {
         return(base.ToString());
     }
 }
    public void initTexter(KeyText inKeyText, string userInput)
    {
        keyText           = inKeyText;
        dispUserText.text = userInput;
        warningText.text  = "";
        inText.text       = "";
        scoreText.text    = "";

        RetryButton.SetActive(false);
        NewTextButton.SetActive(false);
        AnswerButton.SetActive(false);
    }
Exemple #7
0
    public void FromMakerToLoader()
    {
        keyText = quoteMaker.SubmitQuote();
        if (keyText != null)
        {
            QuoteLoaderPanel.SetActive(true);
            TextCheckerPanel.SetActive(false);
            QuoteMakerPanel.SetActive(false);
            MenuPanel.SetActive(false);

            Background2.SetActive(false);

            quoteLoader.initQuoteLoader(keyText);
        }
    }
Exemple #8
0
    public void StartLoader()
    {
        QuoteLoaderPanel.SetActive(true);
        TextCheckerPanel.SetActive(false);
        QuoteMakerPanel.SetActive(false);
        MenuPanel.SetActive(false);

        Background2.SetActive(false);

        int index = Random.Range(0, 17);

        QuoteObj myQuote = qList.QuoteList [index];

        keyText = new KeyText(myQuote.Quote, myQuote.Keys, myQuote.Banned);
        quoteLoader.initQuoteLoader(keyText);
    }
Exemple #9
0
    public void initQuoteLoader(KeyText inkeyText)
    {
        keyText       = inkeyText;
        UserText.text = "";

        QuoteText.text = "Make hint for:\n" + keyText.Sentence;
        string BanList = "Ban List: ";

        foreach (string word in keyText.KeyWords)
        {
            BanList += "\n" + word;
        }
        foreach (string word in keyText.BannedWords)
        {
            BanList += "\n" + word;
        }
        BannedText.text = BanList;
    }
Exemple #10
0
 public void ConfigureResourceDictionary(ResourceDictionary dictionary, string prefix)
 {
     Default.ConfigureResourceDictionary(dictionary, prefix);
     Highlight.ConfigureResourceDictionary(dictionary, prefix + "Highlight");
     KeyText.ConfigureResourceDictionary(dictionary, prefix + "KeyText");
     SubText.ConfigureResourceDictionary(dictionary, prefix + "SubText");
     HyperlinkText.ConfigureResourceDictionary(dictionary, prefix + "HyperlinkText");
     FavoriteCounter.ConfigureResourceDictionary(dictionary, prefix + "FavoriteCounter");
     RetweetCounter.ConfigureResourceDictionary(dictionary, prefix + "RetweetCounter");
     RetweetMarker.ConfigureResourceDictionary(dictionary, prefix + "RetweetMarker");
     FavoriteAndRetweetButton.ConfigureResourceDictionary(dictionary, prefix + "FavAndRtButton");
     FavoriteButton.ConfigureResourceDictionary(dictionary, prefix + "FavoriteButton");
     ColoredFavoriteButton.ConfigureResourceDictionary(dictionary, prefix + "ColoredFavoriteButton");
     RetweetButton.ConfigureResourceDictionary(dictionary, prefix + "RetweetButton");
     ColoredRetweetButton.ConfigureResourceDictionary(dictionary, prefix + "ColoredRetweetButton");
     MentionButton.ConfigureResourceDictionary(dictionary, prefix + "MentionButton");
     DeleteButton.ConfigureResourceDictionary(dictionary, prefix + "DeleteButton");
 }
 void ReleaseDesignerOutlets()
 {
     if (KeyLabel != null)
     {
         KeyLabel.Dispose();
         KeyLabel = null;
     }
     if (KeyText != null)
     {
         KeyText.Dispose();
         KeyText = null;
     }
     if (MobileServiceSegments != null)
     {
         MobileServiceSegments.Dispose();
         MobileServiceSegments = null;
     }
     if (StartButton != null)
     {
         StartButton.Dispose();
         StartButton = null;
     }
     if (StatusLabel != null)
     {
         StatusLabel.Dispose();
         StatusLabel = null;
     }
     if (URLLabel != null)
     {
         URLLabel.Dispose();
         URLLabel = null;
     }
     if (URLText != null)
     {
         URLText.Dispose();
         URLText = null;
     }
 }
Exemple #12
0
 public W2Model()
 {
     /*
      * Each instance variable is associated with a small string of text which is used to associate
      * instance variables within this class, with keys in the Form Recognizer response
      */
     populateInformation = new KeyText[]
     {
         new KeyText(nameof(ss), "Employee’s social security"),
         new KeyText(nameof(identificationNumber), "Employer identification number"),
         new KeyText(nameof(compensation), "Wages, tips, other compensation"),
         new KeyText(nameof(federalIncomeTaxWithheld), "Federal income tax withheld"),
         new KeyText(nameof(employerInformation), "Employer’s name, address, and ZIP code"),
         new KeyText(nameof(ssWages), "Social security wages"),
         new KeyText(nameof(ssTaxWithheld), "Social security tax withheld"),
         new KeyText(nameof(medicareWages), "Medicare wages and tips"),
         new KeyText(nameof(medicareTaxWithheld), "Medicare tax withheld"),
         new KeyText(nameof(ssTips), "Social security tips"),
         new KeyText(nameof(controlNumber), "Control number"),
         new KeyText(nameof(dependentCareBenifits), "Dependent care benefits"),
         new KeyText(nameof(employeeInformation), "Employee’s first name and initial")
     };
 }
Exemple #13
0
    bool CheckInputAndWarn()
    {
        bool isQuoteClean   = IsTextClean(QuoteInput.text, @"^[a-zA-Z\s\.\?',]+$");
        bool isKeyListClean = IsTextClean(KeyInput.text, @"^[a-zA-Z\s,]+$");
        bool isBanListClean = IsTextClean(BanInput.text, @"^[a-zA-Z\s,]+$");



        string pattern2 = @"[\s\.\?',]";

        string[] WordsInQuote = Regex.Split(QuoteInput.text, pattern2);

        string pattern = @"[\s,]";

        string[] ListOfKeys = Regex.Split(KeyInput.text, pattern);

        string[] ListOfBans = Regex.Split(BanInput.text, pattern);

        bool isKeyCountOK   = (ListOfKeys.Length < 6) && (ListOfKeys.Length > 0);
        bool areKeysInQuote = IsKeyListCorrect(ListOfKeys, WordsInQuote);

        bool isBanCountOK = (ListOfBans.Length < 6) && (ListOfBans.Length > 0);

        if (!isQuoteClean)
        {
            WarningText.text = "Quote has invalid characters.\nAllowed: A-Z a-z . ? ' ,";
            return(false);
        }

        if (!isKeyListClean)
        {
            WarningText.text = "Key list has invalid characters.\nAllowed: A-Z a-z ,";
            return(false);
        }

        if (!isBanListClean)
        {
            WarningText.text = "Ban list has invalid characters.\nAllowed: A-Z a-z ,";
            return(false);
        }

        if (!isKeyCountOK)
        {
            WarningText.text = "Need 1-5 keys. Separate by space or ,";
            return(false);
        }

        if (!isBanCountOK)
        {
            WarningText.text = "Need 1-5 bans. Separate by space or ,";
            return(false);
        }

        if (!areKeysInQuote)
        {
            WarningText.text = "One or more keys not found in quote.";
            return(false);
        }

        keyTextToForm = new KeyText(QuoteInput.text, ListOfKeys, ListOfBans);

        return(true);
    }
Exemple #14
0
 private void ClearAll_Click(object sender, EventArgs e)
 {
     KeyText.Clear();
     PlainText.Clear();
     CipherText.Clear();
 }
Exemple #15
0
 private void ClearKey_Click(object sender, EventArgs e)
 {
     KeyText.Clear();
 }
Exemple #16
0
        static public IEnumerable <VirtualKeyCode> ListKeyCodeFromUIText(this string ListKeyUITextAggregated)
        {
            if (null == ListKeyUITextAggregated)
            {
                return(null);
            }

            var ListKeyText = Regex.Split(ListKeyUITextAggregated.Trim(), "-")?.Select(KeyText => KeyText.Trim())?.ToArray();

            var ListKey = ListKeyText?.Where(KeyText => 0 < KeyText?.Length)?.Select(KeyCodeFromUIText)?.ToArray();

            if (ListKey?.Any(Key => null == Key) ?? true)
            {
                return(null);
            }

            return(ListKey?.WhereNotNullSelectValue());
        }