Ejemplo n.º 1
0
        partial void ChangeBackgroundColor(NSObject sender)
        {
            NSColor color = colorWell.Color;

            Console.WriteLine("Color preference changed: {0}", color);
            PreferenceController.PreferenceTableBgColor = color;

            NSNotificationCenter nc = NSNotificationCenter.DefaultCenter;
            NSDictionary         d  = NSDictionary.FromObjectAndKey(color, DefaultStrings.RMColor);

            nc.PostNotificationName(DefaultStrings.RMColorChangedNotification.ToString(), this, d);
            Console.WriteLine("Color change notification sent: {0}", color);
        }
Ejemplo n.º 2
0
        partial void RestoreDefaults(Foundation.NSObject sender)
        {
            PreferenceController.PreferenceTableBgColor = NSColor.White;
            colorWell.Color = NSColor.White;
            PreferenceController.PreferenceEmptyDoc = true;
            checkBox.State = NSCellStateValue.On;

            // Notify open documents about this change of table view color
            NSNotificationCenter nc = NSNotificationCenter.DefaultCenter;
            NSDictionary         d  = NSDictionary.FromObjectAndKey(colorWell.Color, DefaultStrings.RMColor);

            nc.PostNotificationName(DefaultStrings.RMColorChangedNotification.ToString(), this, d);
            Console.WriteLine("Default Color change notification sent: {0}", colorWell.Color);
        }
        void UpdatePhoto(NSPhoto photo)
        {
            if (DataSource.IndexOfPhoto(photo) == -1)
            {
                return;
            }

            _notificationCenter.PostNotificationName(Constants.DNAPhotoViewControllerPhotoImageUpdatedNotification, photo);

            if (CurrentlyDisplayedPhoto.Equals(photo))
            {
                UpdateOverlayInformation();
            }
        }