/// <summary> /// <para>This is used to cast DcopRefs to subclasses in marshal code. You should use DcopRef() & /// Discover*()</para> /// </summary> /// /// <param name="parent"> /// <para>DcopRef to copy identifiers from.</para> /// </param> public DcopRef(DcopRef parent) { if (parent == null) { throw new ArgumentNullException("parent", "Argument cannot be null"); } this.app = parent.App; this.obj = parent.Obj; }
private void BrowseObject(DcopRef app, String objName, TreeNode parent) { TreeNode node = parent.Nodes.Add(objName); DcopRef objRef = (DcopRef)(app.Clone()); objRef.Obj = objName; objRef.Initialise(); foreach(String name in objRef.functions()) { BrowseFunction(objRef, name, node); } }
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); }
public Object Clone() { DcopRef res = new DcopRef(); res.Obj = obj; res.Client = client; if (!initialised) { res.App = app; } else { res.DiscoverApplication(app, false, false); res.Initialise(); } return(res); }
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); } }
private void BrowseFunction(DcopRef obj, String funcName, TreeNode parent) { TreeNode node = parent.Nodes.Add(funcName); node.ImageIndex = MethodIcon; }
/// <summary> /// <para>This is used to cast DcopRefs to subclasses in marshal code. You should use DcopRef() & /// Discover*()</para> /// </summary> /// /// <param name="parent"> /// <para>DcopRef to copy identifiers from.</para> /// </param> public DcopRef(DcopRef parent) { if(parent == null) { throw new ArgumentNullException("parent", "Argument cannot be null"); } this.app = parent.App; this.obj = parent.Obj; }
public Object Clone() { DcopRef res = new DcopRef(); res.Obj = obj; res.Client = client; if(!initialised) { res.App = app; } else { res.DiscoverApplication(app, false, false); res.Initialise(); } return res; }