Ejemplo n.º 1
0
 private void OnEnvironmentChanged(REnvironmentChangedEventArgs args)
 {
     if (EnvironmentChanged != null)
     {
         EnvironmentChanged(this, args);
     }
 }
Ejemplo n.º 2
0
        private void EnvironmentProvider_EnvironmentChanged(object sender, REnvironmentChangedEventArgs e)
        {
            int selectedIndex = 0;

            var currentItem = EnvironmentComboBox.SelectedItem as REnvironment;

            if (currentItem != null && e.Environments.Count > 0 && !e.Environments[0].FrameIndex.HasValue)
            {
                for (int i = 1; i < e.Environments.Count; i++)
                {
                    if (e.Environments[i].Name == currentItem.Name)
                    {
                        selectedIndex = i;
                        break;
                    }
                }
            }

            EnvironmentComboBox.ItemsSource   = e.Environments;
            EnvironmentComboBox.SelectedIndex = selectedIndex;
        }