Exemplo n.º 1
0
 public static void Main(string [] args)
 {
     dbus_g_thread_init();
     Connection         connection = Bus.GetSessionBus();
     Service            service    = Service.Get(connection, "org.rubiojr.MonkeyPop");
     NotificationDaemon daemon     = (NotificationDaemon)
                                     service.GetObject(typeof(NotificationDaemon), "/org/rubiojr/MonkeyPop/NotificationDaemon");
 }
Exemplo n.º 2
0
        public static int Main(string [] args)
        {
            Connection         connection = Bus.GetSessionBus();
            Service            service    = Service.Get(connection, "org.rubiojr.MonkeyPop");
            NotificationDaemon daemon     = (NotificationDaemon)
                                            service.GetObject(typeof(NotificationDaemon), "/org/rubiojr/MonkeyPop/NotificationDaemon");

            daemon.ShowMessageNotification("test", "TEST", "Info");

            return(0);
        }
Exemplo n.º 3
0
    public static void Main(string[] args)
    {
        Application.Init ();
        try {
        DBus.Connection connection = DBus.Bus.GetSessionBus ();
        DBus.Service service =
            new DBus.Service (connection,
                      NotificationDaemon.Service);

        NotificationDaemon ndaemon= new NotificationDaemon ();
        service.RegisterObject (ndaemon, NotificationDaemon.Path);

        Console.WriteLine ("Daemon active.");
        } catch (Exception e) {
        Console.WriteLine ("Daemon active.", e.Message);
        }
        Application.Run ();
    }
Exemplo n.º 4
0
    public static void Main(string[] args)
    {
        Application.Init();
        try {
            DBus.Connection connection = DBus.Bus.GetSessionBus();
            DBus.Service    service    =
                new DBus.Service(connection,
                                 NotificationDaemon.Service);

            NotificationDaemon ndaemon = new NotificationDaemon();
            service.RegisterObject(ndaemon, NotificationDaemon.Path);

            Console.WriteLine("Daemon active.");
        } catch (Exception e) {
            Console.WriteLine("Daemon active.", e.Message);
        }
        Application.Run();
    }
Exemplo n.º 5
0
        public void LoadIcons()
        {
            //That shot me back to 0.0.x with that name. Whatever.
            flnotifications.Controls.Clear(); //Clear the status tray

            foreach (var itype in NotificationDaemon.GetAllStatusIcons())
            {
                //We have the types. No need for shiftorium calls or anything.
                //First create the icon control...

                var ic = new PictureBox();
                //We can use the type name, in lowercase, for the icon tag.
                ic.Tag = itype.Name.ToLower();
                //Next get the icon data if any.

                //We can use this attribute's ID in the skin engine to get an icon.
                var img = GetIcon(itype.Name);
                //Make it transparent.
                (img as Bitmap).MakeTransparent(Color.White);
                //Assign it to the control
                ic.Image = img;
                //Set the sizing mode
                ic.SizeMode = PictureBoxSizeMode.StretchImage;
                ic.Size     = new Size(16, 16); //TODO: make it skinnable
                //add to the notification tray
                flnotifications.Controls.Add(ic);
                ic.Show();

                ic.BringToFront();

                flnotifications.Show();


                ic.Click += (o, a) =>
                {
                    HideAppLauncher();

                    if (itype.BaseType == typeof(UserControl))
                    {
                        UserControl ctrl = (UserControl)Activator.CreateInstance(itype);
                        (ctrl as IStatusIcon).Setup();
                        currentSettingsPane = ctrl;
                        ControlManager.SetupControls(ctrl);
                        this.Controls.Add(ctrl);
                        ctrl.BringToFront();
                        int left     = ic.Parent.PointToScreen(ic.Location).X;
                        int realleft = left - ctrl.Width;
                        realleft += ic.Width;
                        ctrl.Left = realleft;
                        if (LoadedSkin.DesktopPanelPosition == 0)
                        {
                            ctrl.Top = desktoppanel.Height;
                        }
                        else
                        {
                            ctrl.Top = this.Height - desktoppanel.Height - ctrl.Height;
                        }
                        ctrl.Show();
                    }
                };
            }
        }