Exemplo n.º 1
0
        public void EndEdit()
        {
            if (MemberCtrl.IsEnabled && MemberCtrl.Visibility == Visibility.Visible)
            {
                if (MemberCtrl.Member != null && MemberCtrl.Member.Name != MemberCtrl.NameText)
                {
                    Members.Remove(MemberCtrl.Member.Name);
                    String newName = BuildNewCalculatedMemberName(MemberCtrl.NameText);
                    MemberCtrl.Member.Name = newName;
                    Members.Add(MemberCtrl.Member.Name, MemberCtrl.Member);
                    MemberCtrl.Initialize(MemberCtrl.Member);

                    MembersList.Refresh();
                }
            }

            if (SetCtrl.IsEnabled && SetCtrl.Visibility == Visibility.Visible)
            {
                if (SetCtrl.Set != null && SetCtrl.Set.Name != SetCtrl.NameText)
                {
                    Sets.Remove(SetCtrl.Set.Name);
                    String newName = BuildNewCalculatedNamedSetName(SetCtrl.NameText);
                    SetCtrl.Set.Name = newName;
                    Sets.Add(SetCtrl.Set.Name, SetCtrl.Set);
                    SetCtrl.Initialize(SetCtrl.Set);

                    MembersList.Refresh();
                }
            }

            RefreshMetadataTree();
        }
Exemplo n.º 2
0
        void MemberCtrl_EditEnd(object sender, EventArgs e)
        {
            EndEdit();

            MembersList.Refresh();
        }