コード例 #1
0
        public static TomboyRemoteControl Register()
        {
            //BusG.Init ();

            TomboyRemoteControl remote_control = new TomboyRemoteControl ();
            Bus.Session.Register (Namespace,
                                  new ObjectPath (Path),
                                  remote_control);

            /* */
            if (Bus.Session.NameHasOwner (Namespace)) {
                    Console.WriteLine(Namespace + "ist schon registriert !!");
                    return null;
             }

            //Bus.Session.Register(new ObjectPath(Path),remote_control);
            //Bus.Session.Register(new ObjectPath(Path),null);

            if (Bus.Session.RequestName (Namespace)
                            != RequestNameReply.PrimaryOwner)
            {
                Console.WriteLine(Namespace + "ist schon registriert !!");
                return null;
            }

            //remote_control.initScope();

            Console.WriteLine("alles ok");

            //Console.WriteLine(remote_control.Version());

            return remote_control;
        }
コード例 #2
0
        public static TomboyRemoteControl Register()
        {
            //BusG.Init ();

            TomboyRemoteControl remote_control = new TomboyRemoteControl();

            Bus.Session.Register(Namespace,
                                 new ObjectPath(Path),
                                 remote_control);

            /* */
            if (Bus.Session.NameHasOwner(Namespace))
            {
                Console.WriteLine(Namespace + "ist schon registriert !!");
                return(null);
            }

            //Bus.Session.Register(new ObjectPath(Path),remote_control);
            //Bus.Session.Register(new ObjectPath(Path),null);

            if (Bus.Session.RequestName(Namespace)
                != RequestNameReply.PrimaryOwner)
            {
                Console.WriteLine(Namespace + "ist schon registriert !!");
                return(null);
            }

            //remote_control.initScope();


            Console.WriteLine("alles ok");

            //Console.WriteLine(remote_control.Version());

            return(remote_control);
        }