Exemplo n.º 1
0
        public int GetSelectedCurrencyIndex()
        {
            if (!string.IsNullOrEmpty(SelectedCurrencyItem))
            {
                getCurrencySymbol      = SelectedCurrencyItem.Split('-');
                SelectedCurrencySymbol = getCurrencySymbol[0];

                int count = 0;
                foreach (var item in CurrencyCollection)
                {
                    var symbol = item.Split('-')[0];
                    if (SelectedCurrencySymbol == symbol)
                    {
                        return(count);
                    }
                    count++;
                }
            }
            return(0);
        }
Exemplo n.º 2
0
 public void GetSelectedCurrencyValue()
 {
     if (!string.IsNullOrEmpty(SelectedCurrencyItem))
     {
         getCurrencySymbol      = SelectedCurrencyItem.Split('-');
         SelectedCurrencySymbol = getCurrencySymbol[0];
     }
     else
     {
         if (CurrencyCollection.Count == 0)
         {
             SelectedCurrencySymbol = string.Empty;
         }
         else
         {
             getCurrencySymbol      = CurrencyCollection[0].Split('-');
             SelectedCurrencySymbol = getCurrencySymbol[0];
         }
     }
     _MyMainWindow.SelectLastSelectedItem(GetSelectedCurrencyIndex());
 }