Пример #1
0
 private void BtRefresh_Click(object sender, RoutedEventArgs e)
 {
     if (tb_ProcessControl.IsSelected)
     {
         ProcessControlSearchControl.ResetSearchControl();
         ProcessControlModel = new ProcessControlModel(this);
     }
     else if (tb_Period.IsSelected)
     {
         PeriodSearchControl.ResetSearchControl();
         PeriodModel = new PeriodModel(this);
     }
 }
Пример #2
0
        private void TbPage_SelectionChanged(object sender, SelectionChangedEventArgs e)
        {
            if (!(e.Source is TabControl))
            {
                return;
            }

            if (tb_ProcessControl.IsSelected)
            {
                if (ProcessControlModel == null)
                {
                    ProcessControlModel = new ProcessControlModel(this);
                }
            }
            if (tb_Period.IsSelected)
            {
                if (PeriodModel == null)
                {
                    PeriodModel = new PeriodModel(this);
                }
            }
        }