I'm trying to embed Windows-Sidebar-Widgets into my own .Net Application (WPF and C#), but I dont't realy know where to start. I googled a bit but only found SDK and tutorials for widget-development. I found that there is a small service in Windows, running the widgets. My thought was that I could perhaps fake this service and provide his functions whithin my programm, so that I can run and show the widgets.
Does anyone have some tips on how to do this? Or some experience in doing so? Perhaps there is even some kind of libary for that kind of stuff?
If this is not possible it is also an option to switch to an OpenSource widged-manager to use this widgeds, but this is only an emergency solution and the windows-gadgeds would be very appreciated.
Some information about my system:
I've written some kind of small windowmanager for childwindows in my application. And on the top of this I want to show the widgets in some kind of HostWindow.
Any hint will be appreciated.
P.S.: I would be willing to share the results if I (or we) get this working :-)
I've never seen a library for hosting gadgets, but since they are basically just websites you could use the MSHTML component to host any arbitrary gadget in theory.
This isn't to say it will be easy.
You'll need to extract a gadget to some temporary directory, spin up something hosting MSHTML (in WinForms WebBrowser would be convenient), navigate to the appropriate file in that temp directory (discovered by parsing gadget.xml), and shove something resembling the System object into the gadget.
As a starting point, inject some script that sets System = window.external; onload and WebBrowerser.ObjectForScripting = new FakeGadgetSystem().
FakeGadgetSystem will need [ComVisible(true)] and to implement a decent amount of stuff. I'd advise grabbing a widget or two to test with that mildly exercise the Gadget API, and then slowly implement the calls they make. It'll be a long haul for 100% compatibility with the official gadget hosting service.
Related
I'll try to keep this coherent and to the point, been coding all day and a little fried right now. I know doing this is also entirely possible, I'm just not entirely how to do it directly.
The idea is I'm working on a program I'd like to make commercial and sell in the future. Currently it's been holding up to testing processes and everything looks good, but now that I'm starting the improve the program's GUI, I'm hitting limitations using Windows Forms (EI, tab control tops not being easily recolor-able, etc, etc), and had a thought... That I could make the GUI look infinitly better if I could import the program into a web page. Using a dot net project makes that relatively easy since I can copy the C# code over and after a bit of tweaking, it should be fairly straight forward to get everything running and then I just need to rewire everything to the web page GUI.
To handle launching the web page, I was contemplating making a program that creates a "harness" (Small graphic program that just runs a command prompt line to initialize the web service and provides a link to the web page being hosted on the local service. This approach works, but the big issue I'm hitting while probing this route is that the "Release" folder generated on the web application isn't fully self contained and in addition to this all resources are visible. (Hard to sell a product if the first person you sell it to can just distribute the source code around)
So ideally at this point, I'm looking to see if anyone can guide me in the right direct. I'm not sure how to go about creating a program that runs an app inside a local browser AND hides/otherwise makes all the code / resources (images, etc) unviewable/inaccessible to anything outside the program.
Sorry if this is a bit rambly, not entirely sure how to actually ask/find what I'm looking for. (There maybe a name for the thing I'm looking for and I've just never heard of it before.)
I would recommend you to use WPF windows presentation foundation, you can make much more user friendly and intuitive interfaces in WPF comparing to windows form.
Developing and trying to sell a desktop program as a website is never recommended, the website is meant to be hosted on a server and let the clients access all of its functionalities within the browser. So I would suggest you to go and search for WPF.
You also mentioned that you are struggling to improve the windows form User interface design and are struggling to design attractive GUI. Well this is not true you can make amazing GUIs with windows form. take a look at this link https://www.youtube.com/watch?v=K9Ps66GoD-k this will greatly help you to improve the existing windows form application design you already have developed.
I'm looking to automate the GUI available for TortoiseSVN. Rather than using the one provided and manually inputting the urls, I would like to save off various urls that I switch to on a daily basis and at the click of a button switch my working copy to one of my choosing.
TortioseSVN's 'TortioseProc.exe Switch' command does not support the /url parameter until a future release (1.8), this prevents me from being able to embed these easily within an anchor tag (supported by Tortiose) somewhere on our intranet.
Using the standard svn CLI thats compatible with the 1.7 build I'm able to perform switches and automatically close the command line, however I don't know of a way to perform these from a web interface and as I'm not familiar with desktop development I don't know of a plausible desktop solution.
I'm coming to you StackOverflow in hopes you know of a lightweight desktop alternative that wouldn't require much setup on the users side or better yet (web developer by trade) a web solution.
I want to clarify, I'm not looking for actual code but a library or language that will allow me to meet these requirements as I'm hoping to open this solution up to more developers at my workplace and would rather something that allows easy adoption (not a messy setup).
Thanks!
From a Windows/.NET application (whether it be ASP.NET within IIS, or a standalone application), your best way to go is SharpSVN.
Second place would be to write a wrapper around the command-line client.
I've been running around the web for a while now looking for a solution to this problem, but I'm quite disheartened by now to find something that will fit all of my requirements. So here goes.
I'm trying to build a desktop application that uses the Kinect for Windows sensor to control a visualization of digital library (as in, the place you go to for books) assets. I'm quite versed in using the official MS Kinect SDK and already have a neat utility framework for prototyping at hand, so I'd obviously love to make use of it. This plus the desktop app theme of things says the whole shebang will need to be in C#, which is fine by me.
On the other hand, the visualization part already exists and looks gorgeous, but it's JavaScript (and specifically, JIT i.e. javascript infovis toolkit). It has all the bells and whistles I need and it's neatly animated. Also, I'm a noob at JavaScript.
The point is, how do I avoid rewriting either one into the other's language while still allowing them to talk at runtime?
So, do you know any way to either
A) embed a JIT visualization (e.g. radial tree visualization) in a windows application in a way that allows me to manipulate the graph at runtime from a C# class (e.g. selecting a new node to be animated into focus) or
B) send C# events to JS to react to gesture input at runtime? Is this something ASP.NET can do?
I have a feeling the result will be a weird mix of desktop and web technology, but any pointers to the right sort of technology is greatly appreciated.
Maybe you should look at this projects about using Kinect with JavaScript:
http://research.microsoft.com/en-us/projects/kinectedbrowser/
http://kinesis.io/
The other day I found myself addicted to a Flash game and frustrated by the thing at the same time. In a moment of frustration with the game I thought I would make a 'bot' to beat it for me. Well, I really wouldn't, but it made me realize: I don't know how to interact with another application in a way to do this. Which brings me to the question, how would one take screenshots of another running application and interact with it with the keyboard and mouse. Ideally the solution would be in a managed language like c#.
When doing the background reading the net was drowning with articles on scraping HTML. There were not many articles on actually screen scraping an application.
I'm looking for a way to interface with another application rather than script/macro another application.
Could something like Xming be used to redirect the interface? http://www.straightrunning.com/XmingNotes/
Perhaps a Terminal Services client?
http://www.codeproject.com/KB/cs/RemoteDesktop_CSharpNET.aspx
Check out Sikuli, it is basically what you are looking for. It is written in Java however.
http://groups.csail.mit.edu/uid/sikuli/
I ended up making the bot which did all this and documented it in a post
http://www.charlesrcook.com/archive/2010/09/05/creating-a-bejeweled-blitz-bot-in-c.aspx
I have used AutoHotKey for application automation.
Using ExternalInterface in AS3 is it possible to call OS (C#?) functions within XP?
Example: Set the desktop background to a image supplied by a flash app?
If it is possible would it be different calls when applied to different OS. And what about cross over the Mac?
Any information would be great
Thanks
If you're launching the swf from within a C# app, external interface will do just fine. Nothing will change on the flash side, but you'll need to go through a couple hoops to get it to work in C#. It's not as simple as AMF or External Interface to JS.
All the communications to C# get converted to XML describing the data, and you've gotta write XML to send back to flash. Other than that though, its relativly simple.
Here's some info on how to do it. The AS portion is Flash 8/AS2, but the C# portion should say the same.
When working with Flash from a webpage or as a desktop app, you are limited to a small security sandbox and you will not be able to make any relevant OS call. I thought that switching to AIR would give the developper more flexibility but it doesn't seem correct either. From "The Pros and Cons of Adobe Air":
AIR apps have
file access, clipboard access, support
multiple windows, support drag and
drop, and can trigger notifications
(toast in Windows). If you app needs
to interact with the desktop in other
ways, the chances are that AIR is not
suitable. For example, there is no
access to COM automation, and no way
to execute external applications. The
reason is to maintain cross-platform
compatibility. That's a worthy goal,
but it would be good to have a way out
of the sandbox. Unlike Java or .NET,
you cannot extend AIR with custom
native code libraries. Nor can you
call operating system APIs.
As Alex Jillard commented, if your swf is called inside a C# desktop application, you should be able to access more OS funcionalities although I'm not sure how.
You could use as already mentioned AIR. Another idea would be to use HippoHX (I haven't written this, the similarity with my username is just coincidence). It runs on top of the NekoVM and gives you unrestricted (so no limitations like in AIR ) access to the system.