void IProject.NotifyNameChanged(Stetic.Wrapper.WidgetNameChangedArgs args) { if (loading) { return; } NotifyChanged(); OnWidgetNameChanged(args, args.WidgetWrapper.IsTopLevel); }
void OnWidgetNameChanged(Stetic.Wrapper.WidgetNameChangedArgs args, bool isTopLevel) { if (frontend != null) { frontend.NotifyWidgetNameChanged(Component.GetSafeReference(args.WidgetWrapper), args.OldName, args.NewName, isTopLevel); } if (args.WidgetWrapper != null && WidgetNameChanged != null) { WidgetNameChanged(this, args); } }
void OnWidgetNameChanged(Stetic.Wrapper.WidgetNameChangedArgs args, bool isTopLevel) { if (frontend != null) { frontend.NotifyWidgetNameChanged(Component.GetSafeReference(args.WidgetWrapper), args.OldName, args.NewName, isTopLevel); } if (args.WidgetWrapper != null && WidgetNameChanged != null) { WidgetNameChanged(this, args); } if (modifiedTopLevels.Contains(args.OldName)) { modifiedTopLevels.Remove(args.OldName); } if (!modifiedTopLevels.Contains(args.NewName)) { modifiedTopLevels.Add(args.NewName); } }