Esempio n. 1
0
 private void Reset(object sender, RoutedEventArgs e)
 {
     model = new BarViewModel(Title, ScrollViewer.ActualHeight, ScrollViewer.ActualWidth, model.Descending);
     model.Init(Datas, model.Current);
     this.DataContext          = model;
     ItemsControl1.ItemsSource = null;
     ItemsControl2.ItemsSource = null;
     ItemsControl1.ItemsSource = model.CurrentDatas;
     ItemsControl2.ItemsSource = model.CurrentDatas;
 }
Esempio n. 2
0
 private void Load(object sender, EventArgs e)
 {
     model = new BarViewModel(Title, ScrollViewer.ActualHeight, ScrollViewer.ActualWidth);
     if (this.Datas != null)
     {
         model.Init(this.Datas);
     }
     this.DataContext          = model;
     ItemsControl1.Background  = DefaultBackground;
     ItemsControl1.ItemsSource = model.CurrentDatas;
     ItemsControl2.ItemsSource = model.CurrentDatas;
 }
Esempio n. 3
0
 public void Refresh()
 {
     App.Current.Dispatcher.Invoke((Action) delegate {
         model = new BarViewModel(Title, ScrollViewer.ActualHeight, ScrollViewer.ActualWidth);
         if (this.Datas != null)
         {
             model.Init(this.Datas);
         }
         this.DataContext          = model;
         ItemsControl1.Background  = DefaultBackground;
         ItemsControl1.ItemsSource = model.CurrentDatas;
         ItemsControl2.ItemsSource = model.CurrentDatas;
     });
 }
Esempio n. 4
0
        private void Sort(object sender, RoutedEventArgs e)
        {
            Button button = sender as Button;
            string text   = button.Content.ToString();

            if (text == Jvedio.Language.Resources.SmallToBig)
            {
                button.Content = Jvedio.Language.Resources.BigToSmall;
            }
            else
            {
                button.Content = Jvedio.Language.Resources.SmallToBig;
            }
            model = new BarViewModel(Title, ScrollViewer.ActualHeight, ScrollViewer.ActualWidth, !model.Descending);
            model.Init(Datas);
            this.DataContext          = model;
            ItemsControl1.ItemsSource = null;
            ItemsControl2.ItemsSource = null;
            ItemsControl1.ItemsSource = model.CurrentDatas;
            ItemsControl2.ItemsSource = model.CurrentDatas;
        }