コード例 #1
0
 public PickGenreImage(GenrePath genrePath)
 {
     InitializeComponent();
     DataContext = this;
     InitializePidList(genrePath.Path);
     GenrePath = genrePath;
 }
コード例 #2
0
ファイル: Chart.xaml.cs プロジェクト: JimLynn/MatchRedux
        private void ZoomIn_Click(object sender, RoutedEventArgs e)
        {
            GenrePath clicked = (sender as Button).DataContext as GenrePath;

            if (clicked.Children.Count() > 0)
            {
                treeMap.ItemsSource = clicked.Children;
            }
            else
            {
                new PickGenreImage(clicked).Show();
            }
        }
コード例 #3
0
ファイル: Chart.xaml.cs プロジェクト: JimLynn/MatchRedux
        private void ZoomOut_Click(object sender, RoutedEventArgs e)
        {
            IEnumerable <GenrePath> selection = (treeMap.ItemsSource as IEnumerable <GenrePath>);

            if (selection != null)
            {
                if (selection.Count() > 0)
                {
                    GenrePath item   = selection.First();
                    GenrePath parent = (from p in paths where p.Path == item.Parent select p).FirstOrDefault();
                    if (parent != null)
                    {
                        treeMap.ItemsSource = from p in paths where p.Parent == parent.Parent select p;
                    }
                }
            }
        }