private void cbxHexagramLabel_SelectionChanged(object sender, SelectionChangedEventArgs e) { if (cbxHexagramLabel != null) { DiagramPage.SetHexagramLabel(cbxHexagramLabel.SelectedIndex); } }
private void cbxHexagramText_SelectionChanged(object sender, SelectionChangedEventArgs e) { if (cbxHexagramText != null) { DiagramPage.SetHexagramText(cbxHexagramText.SelectedIndex); } }
private void cbxTrigramRatio_SelectionChanged(object sender, SelectionChangedEventArgs e) { if (cbxTrigramRatio != null) { DiagramPage.SetTrigramRatio(cbxTrigramRatio.SelectedIndex); } }
private void cbxHexagramSequence_SelectionChanged(object sender, SelectionChangedEventArgs e) { if (cbxHexagramSequence != null) { DiagramPage.SetHexagramSequence(cbxHexagramSequence.SelectedIndex); } }
private void cbxDiagramColor_SelectionChanged(object sender, SelectionChangedEventArgs e) { if (cbxDiagramColor != null) { DiagramPage.SetDiagramColor(cbxDiagramColor.SelectedIndex); } }
private void cbxDiagramLsb_SelectionChanged(object sender, SelectionChangedEventArgs e) { if (cbxDiagramLsb != null) { DiagramPage.SetDiagramLsb(cbxDiagramLsb.SelectedIndex); } }
private async void lbxIcons_SelectionChanged(object sender, SelectionChangedEventArgs e) { if (lbxIcons.SelectedIndex == -1) { return; } if (!lbiWeb.IsSelected) { SystemNavigationManager.GetForCurrentView().AppViewBackButtonVisibility = AppViewBackButtonVisibility.Visible; } if (lbiQuestion.IsSelected) { frmMain.Navigate(typeof(QuestionPage), null, m_nti); } else if (lbiDiagram.IsSelected) { frmMain.Navigate(typeof(DiagramPage), null, m_nti); } else if (lbiText.IsSelected) { frmMain.Navigate(typeof(TextPage), null, m_nti); } else if (lbiShare.IsSelected) { DiagramPage.ShareCast(); } else if (lbiWeb.IsSelected) { await Launcher.LaunchUriAsync(new Uri("http://hermetica.info/")); } else if (lbiRate.IsSelected) { await Launcher.LaunchUriAsync(new Uri("ms-windows-store://pdp/?productid=9n5q9qxxh7wj")); // 9wzdncrfj6qs // bingmaps:?cp=40.726966~-74.006076 New York // bingmaps:?cp=-35.710013~150.18067 Home // ms-windows-store://navigatetopage/?Id=Apps // ms-windows-store://pdp/?productid=9wzdncrfj6qs } else if (lbiSettings.IsSelected) { frmMain.Navigate(typeof(SettingsPage), null, m_nti); } if (spvMain.IsPaneOpen) { spvMain.IsPaneOpen = !spvMain.IsPaneOpen; } lbxIcons.SelectedIndex = -1; }
public DiagramPage() { m_dp = this; InitializeComponent(); NavigationCacheMode = NavigationCacheMode.Enabled; m_brMonoColor = App.Current.RequestedTheme == ApplicationTheme.Dark ? m_brLightGray : m_brDarkGray; m_brMovingYang = App.Current.RequestedTheme == ApplicationTheme.Dark ? m_brBlack : m_brWhite; m_brSelectStoke = App.Current.RequestedTheme == ApplicationTheme.Dark ? m_brBlue : m_brRed; m_brBackStoke = App.Current.RequestedTheme == ApplicationTheme.Dark ? m_brWhite : m_brBlack; m_recLines[0, 0] = recLine0L; m_recLines[1, 0] = recLine1L; m_recLines[2, 0] = recLine2L; m_recLines[3, 0] = recLine3L; m_recLines[4, 0] = recLine4L; m_recLines[5, 0] = recLine5L; m_recLines[0, 1] = recLine0R; m_recLines[1, 1] = recLine1R; m_recLines[2, 1] = recLine2R; m_recLines[3, 1] = recLine3R; m_recLines[4, 1] = recLine4R; m_recLines[5, 1] = recLine5R; m_recLinesO[0] = recLine0O; m_recLinesO[1] = recLine1O; m_recLinesO[2] = recLine2O; m_recLinesO[3] = recLine3O; m_recLinesO[4] = recLine4O; m_recLinesO[5] = recLine5O; Sequences.Initialise(); //YijingData yd = new YijingData(); //yd.InitialseDB(); m_hvsCurrent = new CHexagramValueSequencer(0); SetDiagramLsb(0); m_hvsCurrent.First(); m_vsCurrent = m_hvsCurrent; cbiHexagram.IsSelected = true; cbxDiagramType.SelectedItem = cbiHexagram; UpdateDiagrams(true); //m_tskThinkGear.Start(); }
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/")); } } }
private void btnHome_Click(object sender, RoutedEventArgs e) { DiagramPage.SetHome(); SetTextUrl((CHexagramValueSequencer)DiagramPage.m_hvsCurrent, 0); }
private void btnLast_Click(object sender, RoutedEventArgs e) { DiagramPage.SetLast(); SetTextUrl(DiagramPage.m_hvsCurrent, 0); }
private void btnPrevious_Click(object sender, RoutedEventArgs e) { DiagramPage.SetPrevious(); SetTextUrl(DiagramPage.m_hvsCurrent, 0); }