Esempio n. 1
0
 public void SynchronizeItem()
 {
     if (CheckAccess())
     {
         this._StackPanel.Children.Clear();
         List <ICanPlotInOpenGL> ValueList = Value.V.ToList();
         for (int i = 0; i < Value.V.Count; i++)
         {
             if (ValueList[i] is IHaveVisibility)
             {
                 IHaveVisibility item = ValueList[i] as IHaveVisibility;
                 CheckBox        cb   = new CheckBox()
                 {
                     IsChecked = (item.Visible == true)
                 };
                 cb.Checked   += CheckBoc_IsCheckedChanged;
                 cb.Unchecked += CheckBoc_IsCheckedChanged;
                 this._StackPanel.Children.Add(cb);
             }
         }
     }
     else
     {
         Dispatcher.Invoke(SynchronizeItem);
     }
 }
Esempio n. 2
0
        public static string GetVisibilityChangeText(IHaveVisibility from, IHaveVisibility to)
        {
            // When collapsing properties the visibility of the property itself (as opposed to the child accessors) may actually
            // be the same....
            if (from.Visibility == to.Visibility && from is PropertyDetail && to is PropertyDetail)
            {
                return("Accessor visibility changed");
            }

            return(GetVisibilityChangeText(from.Visibility, to.Visibility));
        }
 protected virtual string SerializeGetWhatChangedValue(ChangeType changeType)
 {
     if (((changeType & ChangeType.DeclarationChangedNonBreaking) != 0) || ((changeType & ChangeType.DeclarationChangedBreaking) != 0) || (changeType == ChangeType.Added) || (changeType == ChangeType.ValueChangedBreaking) || (changeType == ChangeType.ValueChangedNonBreaking))
     {
         return(ToString());
     }
     else if ((this is IHaveVisibility) && (((changeType & ChangeType.VisibilityChangedBreaking) != 0) || ((changeType & ChangeType.VisibilityChangedNonBreaking) != 0)))
     {
         IHaveVisibility hv = (IHaveVisibility)this;
         return(hv.Visibility.ToString().ToLower());
     }
     else
     {
         return(null);
     }
 }