Esempio n. 1
0
        public SparkleLog(string path) : base()
        {
            LocalPath = path;

            Delegate = new SparkleLogDelegate();

            SetFrame(new RectangleF(0, 0, 480, 640), true);
            Center();

            // Open slightly off center for each consecutive window
            if (SparkleUI.OpenLogs.Count > 0)
            {
                RectangleF offset = new RectangleF(Frame.X + (SparkleUI.OpenLogs.Count * 20),
                                                   Frame.Y - (SparkleUI.OpenLogs.Count * 20), Frame.Width, Frame.Height);

                SetFrame(offset, true);
            }

            StyleMask = (NSWindowStyle.Closable |
                         NSWindowStyle.Miniaturizable |
                         NSWindowStyle.Titled);

            MaxSize     = new SizeF(480, 640);
            MinSize     = new SizeF(480, 640);
            HasShadow   = true;
            BackingType = NSBackingStore.Buffered;

            CreateEventLog();
            UpdateEventLog();

            OrderFrontRegardless();
        }
Esempio n. 2
0
        public SparkleLog(string path)
            : base()
        {
            LocalPath = path;

            Delegate = new SparkleLogDelegate ();

            SetFrame (new RectangleF (0, 0, 480, 640), true);
            Center ();

            // Open slightly off center for each consecutive window
            if (SparkleUI.OpenLogs.Count > 0) {
                RectangleF offset = new RectangleF (Frame.X + (SparkleUI.OpenLogs.Count * 20),
                    Frame.Y - (SparkleUI.OpenLogs.Count * 20), Frame.Width, Frame.Height);

                SetFrame (offset, true);
            }

            StyleMask = (NSWindowStyle.Closable |
                         NSWindowStyle.Miniaturizable |
                         NSWindowStyle.Titled);

            MaxSize     = new SizeF (480, 640);
            MinSize     = new SizeF (480, 640);
            HasShadow   = true;
            BackingType = NSBackingStore.Buffered;

            CreateEventLog ();
            UpdateEventLog ();

            OrderFrontRegardless ();
        }
Esempio n. 3
0
        public SparkleLog(string path)
            : base()
        {
            LocalPath = path;

            Delegate = new SparkleLogDelegate ();

            SetFrame (new RectangleF (0, 0, 480, 640), true);
            Center ();

            // Open slightly off center for each consecutive window
            if (SparkleUI.OpenLogs.Count > 0) {

                RectangleF offset = new RectangleF (Frame.X + (SparkleUI.OpenLogs.Count * 20),
                    Frame.Y - (SparkleUI.OpenLogs.Count * 20), Frame.Width, Frame.Height);

                SetFrame (offset, true);

            }

            StyleMask = (NSWindowStyle.Closable |
                         NSWindowStyle.Miniaturizable |
                         NSWindowStyle.Titled);

            MaxSize     = new SizeF (480, 640);
            MinSize     = new SizeF (480, 640);
            HasShadow   = true;
            BackingType = NSBackingStore.Buffered;

            CreateEventLog ();
            UpdateEventLog ();

            ContentView.AddSubview (WebView);

            OpenFolderButton = new NSButton (new RectangleF (16, 12, 120, 32)) {
                Title = "Open Folder",
                BezelStyle = NSBezelStyle.Rounded	,
                Font = SparkleUI.Font
            };

                OpenFolderButton.Activated += delegate {
                    SparkleShare.Controller.OpenSparkleShareFolder (LocalPath);
                };

            ContentView.AddSubview (OpenFolderButton);

            CloseButton = new NSButton (new RectangleF (480 - 120 - 16, 12, 120, 32)) {
                Title = "Close",
                BezelStyle = NSBezelStyle.Rounded,
                Font = SparkleUI.Font
            };

                CloseButton.Activated += delegate {
                    InvokeOnMainThread (delegate {
                        PerformClose (this);
                    });
                };

            ContentView.AddSubview (CloseButton);

            string name = Path.GetFileName (LocalPath);
            Title = String.Format ("Events in ‘{0}’", name);

            Separator = new NSBox (new RectangleF (0, 58, 480, 1)) {
                BorderColor = NSColor.LightGray,
                BoxType = NSBoxType.NSBoxCustom
            };

            ContentView.AddSubview (Separator);

            OrderFrontRegardless ();
        }