AthensTransit_Hackathon.App.ChangeEnglishLettersToGreek C# (CSharp) Метод

ChangeEnglishLettersToGreek() публичный статический Метод

public static ChangeEnglishLettersToGreek ( string temp ) : string
temp string
Результат string
        public static string ChangeEnglishLettersToGreek(string temp)
        {
            if (temp.Contains("a"))
            {
                temp = temp.Replace("a", "Α");
            }
            else if (temp.Contains("b"))
            {
                temp = temp.Replace("b", "Β");
            }
            else if (temp.Contains("c"))
            {
                temp = temp.Replace("c", "Γ");
            }
            else if (temp.Contains("e"))
            {
                temp = temp.Replace("e", "Ε");
            }
            else if (temp.Contains("x"))
            {
                temp = temp.Replace("x", "Χ");
            }
            else if (temp.Contains("m"))
            {
                temp = temp.Replace("m", "M");
            }
            else if (temp.Contains("t"))
            {
                temp = temp.Replace("t", "T");
            }
            return temp;
        }

Usage Example

        /// <summary>
        /// The methods provided in this section are simply used to allow
        /// NavigationHelper to respond to the page's navigation methods.
        /// <para>
        /// Page specific logic should be placed in event handlers for the
        /// <see cref="NavigationHelper.LoadState"/>
        /// and <see cref="NavigationHelper.SaveState"/>.
        /// The navigation parameter is available in the LoadState method
        /// in addition to page state preserved during an earlier session.
        /// </para>
        /// </summary>
        /// <param name="e">Provides data for navigation methods and event
        /// handlers that cannot cancel the navigation request.</param>
        protected override void OnNavigatedTo(NavigationEventArgs e)
        {
            this.navigationHelper.OnNavigatedTo(e);


            Stop newStop = e.Parameter as Stop;

            pageStopName.Text     = newStop.stopName;
            myListBox.ItemsSource = newStop.OtherStops;

            for (int i = 0; i < newStop.OtherStops.Count; i++)
            {
                newStop.OtherStops[i] = App.ChangeEnglishLettersToGreek(newStop.OtherStops[i]);
            }

            //ContentRoot.Children.Add(new ListBox()
            //    {
            //        ItemTemplate = Resources["stopsRepresentation"] as DataTemplate,
            //        ItemContainerStyle = Resources["styleOfListBoxSO"] as Style,
            //        ItemsSource = newStop.OtherStops
            //    });
        }
All Usage Examples Of AthensTransit_Hackathon.App::ChangeEnglishLettersToGreek