Пример #1
0
 private void BtRefresh_Click(object sender, RoutedEventArgs e)
 {
     if (tb_Region.IsSelected)
     {
         RSearchControl.ResetSearchControl();
         r = new RegionModel(this);
     }
     else if (tb_Area.IsSelected)
     {
         ASearchControl.ResetSearchControl();
         a = new AreaModel(this);
     }
 }
Пример #2
0
        private void TbPage_SelectionChanged(object sender, SelectionChangedEventArgs e)
        {
            if (!(e.Source is TabControl))
            {
                return;
            }

            if (tb_Region.IsSelected)
            {
                if (r == null)
                {
                    r = new RegionModel(this);
                }
            }
            else if (tb_Area.IsSelected)
            {
                if (a == null)
                {
                    a = new AreaModel(this);
                }
            }
        }