Exemplo n.º 1
0
 public static async void SetTrigramSequence(int nSequence)
 {
     Sequences.TrigramSequence = nSequence;
     CTrigramValueSequencer.SetCurrentSequence(nSequence);
     m_hvsCurrent.Update();
     await m_dp.Dispatcher.RunAsync(CoreDispatcherPriority.Normal, UpdateDiagrams);
 }
Exemplo n.º 2
0
 public static async void SetTrigramRatio(int nRatio)
 {
     Sequences.TrigramRatio = nRatio;
     CTrigramValueSequencer.SetCurrentRatio(nRatio);
     m_hvsCurrent.Update();
     await m_dp.Dispatcher.RunAsync(CoreDispatcherPriority.Normal, UpdateDiagrams);
 }
Exemplo n.º 3
0
 private async void webText_NavigationStarting(WebView sender, WebViewNavigationStartingEventArgs args)
 {
     if (args.Uri != null)
     {
         if (args.Uri.AbsolutePath.StartsWith("Hexagram"))
         {
             DiagramPage.SetHexagramValue(Convert.ToInt32(args.Uri.AbsolutePath.Substring(8)));
             SetTextUrl(DiagramPage.m_hvsCurrent, 0);
         }
         else
         if (args.Uri.AbsolutePath.StartsWith("Trigram"))
         {
             CTrigramValueSequencer tvs = new CTrigramValueSequencer(0);
             tvs.Value = Convert.ToInt32(args.Uri.AbsolutePath.Substring(7));
             webText.Navigate(new Uri("https://en.wikipedia.org/wiki/" + tvs.Label));
         }
         else
         if (args.Uri.AbsoluteUri == "http://hermetica.info/")
         {
             args.Cancel = true;
             await Launcher.LaunchUriAsync(new Uri("http://hermetica.info/"));
         }
     }
 }
Exemplo n.º 4
0
 public static async void SetTrigramLabel(int nLabel)
 {
     Sequences.TrigramLabel = nLabel;
     CTrigramValueSequencer.SetCurrentLabel(nLabel);
     await m_dp.Dispatcher.RunAsync(CoreDispatcherPriority.Normal, UpdateDiagrams);
 }