private void UpdateCurrentParameterSetToSource()
        {
            SelectableParameterSet selectedParameterSet = ytreeviewParameterSets.GetSelectedObject() as SelectableParameterSet;

            if (selectedParameterSet != null && selectedParameterSet == viewModel.CurrentParameterSet)
            {
                return;
            }

            viewModel.CurrentParameterSet = selectedParameterSet;
            if (viewModel.CurrentParameterSet != null)
            {
                viewModel.CurrentParameterSet.Parameters.ListContentChanged -= CurrentParameterSet_ListContentChanged;
                viewModel.CurrentParameterSet.Parameters.ListContentChanged += CurrentParameterSet_ListContentChanged;
            }
        }
        private void UpdateCurrentParameterSetFromSource()
        {
            RefreshParametersSource();
            RefreshButtons();

            SelectableParameterSet selectedParameterSet = ytreeviewParameterSets.GetSelectedObject() as SelectableParameterSet;

            if (selectedParameterSet != null && selectedParameterSet == viewModel.CurrentParameterSet)
            {
                return;
            }

            var selectedIter = ytreeviewParameterSets.YTreeModel.IterFromNode(viewModel.CurrentParameterSet);

            if (selectedIter.UserData == IntPtr.Zero)
            {
                return;
            }
            ytreeviewParameterSets.Selection.SelectIter(selectedIter);
        }