Run local web application but restrict access to resources - c#

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.

Related

Utiltizing SVN commands from a custom interface

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.

How to create a launcher application for two Air desktop aplications

I know that my question is very general and I don't expect very detailed answer either, just a lead would be great.
Here is what I want to achieve.
I have build two desktop applications using Adobe Air from Flash AS3 files. Both applications are parts of the same project. They're displaying over two screens, each app on one screen, and whatever you do in one it reflects the other, because they are communication each other through local connection class (AS3).
In fact those two applications are One Multi-screen Application. However to install them on the desktop computer you have to first install one Air app and after that the second Air app. The procedure with launching the apps is the same. You have to click on one icon for the first app to open , and than you click on the other icon for the second app to open, and only then you have whole application up and working.
So I'm looking for some solution which would allowed me to "pack" two installation Air files into one package. The user would have to click only on one "instal.exe" icon to fire up installation of those two air apps.
Maybe it needs to be use some external small C++ scrip, or application launcher - I have no Idea
Pease help me with this case, as I couldn't find it anywhere. I would be very grateful even far the smallest lead.
Thanks in advance
Not real sure but could this help ?
http://www.adobe.com/devnet/air/articles/air3-install-and-deployment-options.html
Depending how large / complicated your applications are maybe you could redactor it into one application and use Native window to then launch two windows each one containing the separate app logic.
This may even offer advantages over using the local connection class, and of course help ease development and maintenance of two separate apps.

Windows application using Silverlight

I want to develop a windows based application in silverlight. I went through many articles and every where I found that "Silverlight is for web based application". I don't know whether I am wrong or right, as my superiors told me that in Silverlight5 we can develop Windows based application. Can any body help me to give a clue for how to start. Any help would be highly appreciated.
Thanks in advance
If you mean a Windows based application which can connect with internet you go for Out of Browser application which silverlight supports but if you want simple plain desktop application, there is no point in using Silverlight, WPF would be the right choice in that case.
Look at this article for building an out of browser app using Silverlight.
Silverlight specializes in building rich UI based Web applications and WPF is best for making UI rich applications for Desktop.
You can run silverlight apps "Out Of Browser", its just a setting in the config. Here's a video with more info: http://www.silverlight.net/learn/videos/all/out-of-browser-experiences/
silverlight is a web-based technology that runs on the client machine. it is, basically, Microsoft's version of Flash.
Now, that being said, you CAN write silverlight apps that run out of the browser. but, they are not "really" windows apps. silverlight is a sub-set of WPF. However, you can also make WPF apps that run in a browser. Confused yet?
The bottom line is that WPF is for desktop apps and is full-featured with access to the machine resources.
while silverlight is a light-weight version of WPF that is intended to be run in a browser, similar to flash. it does not have all the features of a full desktop application due to security model and that sort of thing.
Both have elements that cross into the domain of the other.
Like all good things, the answer is "it depends on what you're trying to do". If you want an application that can run inside the browser, outside the browser, plus on Windows and Mac then Silverlight is the answer. You also get for free/are restricted by a security sandbox; you can get around this sandbox by requiring additional permissions from the user. If you're trying to do something that requires multiple monitor support, access to COM objects, stroke/pen/stylus input, 3D hardware acceleration, or access to a large local file store then WPF is probably the better answer. Silverlight out of browser applications also have a nice "phone home" feature that will automatically download updates; WPF requires you to roll this by hand.
Some folks have mention XBAPs (running WPF inside of a browser). Stay away from this error prone steaming pile of stuff. It's good for demoware, but is not something which you'd want to support.
You heard right.
This is called "out of browser":
Silverlight-based applications typically run within Web pages, but you can enable users to install them from the Web and run them outside the browser.

Is it possible to embed Windows Sidebar Widgeds in own .Net Application

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.

A lan pet Project

Its an idea i have had for many years and i want to finally start doing it.I am still a newbie , but i have enough experience to understand new things.The basic idea is this.There will be an animal.A spider for example, which can run across systems connected in lan.It comes and sits in one computer, and if the user nudges it it crawls away to visit a nearby or random computer, where it stays until nudged again.That's it.
Now i want to know the following things
1)Which languages are best for this one?I have some knowledge of C# and java.I can do flash animations also
2)What all should i search for to get started?
Its a nonsense project and has no use to anybody.But i will get immense pleasure if i see it work.I will be posting more questions as i progress.
This wouldn't be too difficult in C#. You could create a program (or service) that runs on the systems across the lan, and use WCF Discovery to find other copies of the program running on other systems.
When you want to make the spider move, just see which other systems are available, and send a message to that system that you want it to go there. You'd then make your spider crawl away, and on that system, crawl into place.

Categories

Resources