コード例 #1
0
ファイル: DayScan.xaml.cs プロジェクト: JimLynn/MatchRedux
        private void DoubleOverlap_Click(object sender, RoutedEventArgs e)
        {
            IEnumerable <ReduxViewModel> items = dataGrid1.ItemsSource as IEnumerable <ReduxViewModel>;

            if (items != null)
            {
                int startIndex = 0;
                if (dataGrid1.SelectedItem != null)
                {
                    startIndex = dataGrid1.SelectedIndex + 1;
                }
                ReduxViewModel prev = null;
                for (int i = startIndex; i < items.Count(); i++)
                {
                    ReduxViewModel item = items.ElementAt(i);
                    if (prev != null)
                    {
                        if (prev.ReduxItem.id == item.ReduxItem.id)
                        {
                            dataGrid1.SelectedIndex = i - 1;
                            dataGrid1.ScrollIntoView(prev);
                            break;
                        }
                    }
                    prev = item;
                }
            }
        }
コード例 #2
0
ファイル: DayScan.xaml.cs プロジェクト: JimLynn/MatchRedux
 private void MagicButton_Click(object sender, RoutedEventArgs e)
 {
     ReduxViewModel rvm          = ((Button)sender).DataContext as ReduxViewModel;
     bool           partialmatch = rvm.IsPartialMatchWithDescription;
 }
コード例 #3
0
 public ScheduleViewModel(ReduxViewModel rvm, DateTime dayBase)
 {
     ReduxViewModel = rvm;
     DayBase        = dayBase;
 }