Ejemplo n.º 1
0
        private List <KeyValuePair <string, string> > LoadFontInformation()
        {
            KeyValuePair <string, string> Get(CanvasFontInformation info)
            {
                var infos = FontFace.GetInformationalStrings(info);

                if (infos.Count == 0)
                {
                    return(new KeyValuePair <string, string>());
                }

                var name = info.Humanize().Transform(To.TitleCase);
                var dic  = infos.ToDictionary(k => k.Key, k => k.Value);

                if (infos.TryGetValue(CultureInfo.CurrentCulture.Name, out string value) ||
                    infos.TryGetValue("en-us", out value))
                {
                    return(KeyValuePair.Create(name, value));
                }
                else
                {
                    return(KeyValuePair.Create(name, infos.First().Value));
                }
            }

            return(INFORMATIONS.Select(Get).Where(s => s.Key != null).ToList());
        }
Ejemplo n.º 2
0
        private List <KeyValuePair <string, string> > LoadFontInformation()
        {
            //KeyValuePair<string, string> Get(CanvasFontInformation info)
            //{
            //    var infos = FontFace.GetInformationalStrings(info);
            //    if (infos.Count == 0)
            //        return new KeyValuePair<string, string>();

            //    var name = info.Humanise();
            //    var dic = infos.ToDictionary(k => k.Key, k => k.Value);
            //    if (infos.TryGetValue(CultureInfo.CurrentCulture.Name, out string value)
            //        || infos.TryGetValue("en-us", out value))
            //        return KeyValuePair.Create(name, value);
            //    return KeyValuePair.Create(name, infos.First().Value);
            //}

            return(INFORMATIONS.Select(i => GetInfoKey(FontFace, i)).Where(s => s.Key != null).ToList());
        }
Ejemplo n.º 3
0
 private void ForkUsOnGitHub(object sender, RoutedEventArgs e)
 {
     INFORMATIONS.forkus();
 }
Ejemplo n.º 4
0
 private void Help(object sender, RoutedEventArgs e)
 {
     INFORMATIONS.opendoku();
 }
Ejemplo n.º 5
0
 private void AboutUs(object sender, RoutedEventArgs e)
 {
     INFORMATIONS.aboutus();
 }
Ejemplo n.º 6
0
 private void AboutUs(object sender, RoutedEventArgs e)
 {
     gitcom.Visibility = Visibility.Hidden;
     INFORMATIONS.aboutus();
 }