예제 #1
0
    private void BrowseApp(DcopClient client, String appName)
    {
        if (appName.StartsWith("anonymous"))
        {
            return;
        }

        string appDisplayName = appName;

        if (appName.LastIndexOf("-") != -1)
        {
            appDisplayName = appName.Substring(0, appName.LastIndexOf("-"));
        }
        TreeNode node = treeView.Nodes.Add(appDisplayName);

        node.ImageIndex = -1;

        DcopRef appRef = new DcopRef();

        appRef.DiscoverApplication(appName, false, false);
        foreach (String obj in appRef.objects())
        {
            BrowseObject(appRef, obj, node);
        }
    }
예제 #2
0
 private void BrowseDcop(DcopClient client)
 {
     String[] apps = client.registeredApplications();
     treeView.BeginUpdate();
     treeView.ImageIndex         = 0;
     treeView.SelectedImageIndex = -1;
     treeView.ImageList          = GetImageList();
     foreach (String app in apps)
     {
         BrowseApp(client, app);
     }
     treeView.EndUpdate();
 }
예제 #3
0
    public static void Main(String[] args)
    {
        DcopBrowser db = new DcopBrowser();
        // Note call GetDcopClient after creating the Form
        DcopClient client = GetDcopClient(args);
        DcopRef    dr     = null;

        if (client == null)
        {
            MessageBox.Show("Make sure that KDE is running");
            return;
        }
        db.BrowseDcop(client);
        Application.Run(db);
    }
예제 #4
0
파일: DcopSample.cs 프로젝트: ForNeVeR/pnet
    public static void Main(String[] args)
    {
        String url = "http://dotgnu.org/";

        if (args.Length != 0 && args[0].StartsWith("http://"))
        {
            url = args[0];
        }
        Application app = new Application("DcopSample", args);
        DcopClient  dc  = new DcopClient(app.Display, null);
        DcopRef     dr  = new DcopRef();

        dr.DiscoverApplication("konqueror", true, true);
        dr.Obj = "KonquerorIface";
        dr.Initialise();
        dr.Call("DCOPRef openBrowserWindow(QString url)", url);
    }