Example #1
0
 private void BtRefresh_Click(object sender, RoutedEventArgs e)
 {
     if (tb_UnitDefinition.IsSelected)
     {
         UDSearchControl.ResetSearchControl();
         ud = new UnitDefinitionModel(this);
     }
     else if (tb_UnitConversion.IsSelected)
     {
         UCSearchControl.ResetSearchControl();
         uc = new UnitConversionModel(this);
     }
 }
Example #2
0
        private void TbPage_SelectionChanged(object sender, SelectionChangedEventArgs e)
        {
            if (!(e.Source is TabControl))
            {
                return;
            }

            if (tb_UnitDefinition.IsSelected)
            {
                if (ud == null)
                {
                    ud = new UnitDefinitionModel(this);
                }
            }
            else if (tb_UnitConversion.IsSelected)
            {
                if (uc == null)
                {
                    uc = new UnitConversionModel(this);
                }
            }
        }