Пример #1
0
 /// <summary>
 /// Loads initial sample of model clicked
 /// </summary>
 /// <param name="obj">Initial selected items</param>
 private void ModelClicked(object obj)
 {
     Application.Current.Dispatcher.BeginInvoke(new Action(() =>
     {
         sfTreeNavigator = obj as Syncfusion.Windows.Controls.Navigation.SfTreeNavigator;
         timer           = new DispatcherTimer();
         this.IsBusy     = true;
         timer.Interval  = new TimeSpan(0, 0, 0, 0, 1000);
         timer.Start();
         timer.Tick += timer_Tick;
     }));
 }
Пример #2
0
        /// <summary>
        /// Initial loaded values in treeview
        /// </summary>
        /// <param name="obj">Initial selected items</param>
        public void Load(object obj)
        {
            ModelCollection = GetModels();

            sfTreeNavigator = obj as Syncfusion.Windows.Controls.Navigation.SfTreeNavigator;

            if (sfTreeNavigator != null && ModelCollection[0] != null)
            {
                this.IsBusy = false;
                Visible     = true;
                ModelCollection[0].SampleCollection[0].IsSelected = true;

                this.Sample             = ModelCollection[0].SampleCollection[0];
                this.SelectedSampleName = this.Sample.ModelName + " / " + this.Sample.Name;
                this.SelectedItem       = ModelCollection[0];
                this.Sample.LoadSample();
            }
        }