How do you exit an application in CocosSharp? - cocossharp

I am trying to add "Exit Game" functionality in my CocosSharp game (for Windows phone) but I am unable to find any sample code/ guidance online. Any pointers would be welcome.
User should be able to quit the game by pressing a button image on the screen.

Mobile apps are not closed.
They run forever unless they crash, are forced closed by the user, or are shut down by the OS to free up resources.
It's not to say you cannot invoke a system call to exit your program but it is simply not the implementation that is done in modern mobile development.

Well, simply by looking at intellisense i found ExitGame() method on CCApplication instance.

Related

How to launch Skype in HoloLens from Unity through script

I have read a question similar to this one, but years ago. I just want to know if there is now an option or some code to put in my Unity app to run Skype from HoloLens.
I have tried putting the Skype uri by code, but it only works on my PC, not on my HoloLens. It just exit my App and I have to open Skype manually, so it is not the thing I really want.
Anyone knows what to do?
You cannot open up or run Skype from within your own app. It works on your Desktop because that Skype is the full release version. The Skype app that is on the HoloLens is essentially just a beta version and doesn't contain all the features and the Skype URI would be one of the features that it doesn't have.
The only workaround there currently is, is to invoke Cortana to do it for you since you can do that through scripting and it basically is what you described as what you don't want to do.
Sorry, currently it is still not possible.

Are desktop programs daemons?

I am a beginner for programming, so I am sorry if this question sounds stupid...
I am reading a book on Unix. I am wondering whether the programs that run on my desktop, such as iTunes or Skype, are regarded as deamons. I am confused because if I type ps in the terminal, all that I see is the bash kernel, unless I utilize the option -e. This seems to suggest that iTunes and Skype are just like other daemons running in the background.
However, conceptually a daemon should not use any input from the user, but I think iTunes and Skype do need input from the user...
What am I getting wrong? Please help, thank you!!
Programs like iTunes and Skype are not really daemons, precisely because they do interact with the user and can display to the screen. However, they are not tied to a terminal session either.
They are independent processes; they run in the background until you bring them to the foreground. They may have daemons of their own (iTunes has a helper program that is a daemon). But the main UI for Skype or iTunes is not a daemon.

VT500 terminal emulation Flex component

Does anybody know of an existing Flex component that does VT500 terminal emulation?
We are gradually replacing terminal-based user interfaces with an AIR-based GUI.
We would like to have a terminal emulator embedded in that new AIR GUI, in order to give our users an integrated user experience when navigating between our old and new software.
Emulation of other VT-series terminals than the VT500 could also be usefull.
Btw, I'm not interested in writing it myself (nor having it written for me) because it would only be a nice-to-have in our software architecture.
Thanks,
Pieter
Isn't the whole point of using Air and upgrading the technology is that you DON'T need to use a terminal anymore? Seems a bit redundant.
I don't think you'll find anyone that has already created the emulator, but it can't be that hard to implement if you really need the functionality. I know I've seen an AJAX implementation of it (anyterm.org) that uses the ROTE library for the virtual emulator. You might want to look into that.

Flex application suspended while in the background using Safari on Mac

Users of my Flex application report that sometimes the application is freezed when the browser window is minimized or they select another active tab over it. In this suspended state, the application receives no CPU share and all network connections it uses are closed. When the browser window is restored, the application is resumed. This happened with Safari 5 on Mac OS Leopard, with both Flash player 10.0 and 10.1. I searched a lot but I could not find any information about such behavior.
This behavior is not reproducible on each Mac with Safari, so my questions are:
Under which circumstances this may happen?
Is it possible entering in suspended state to be prevented and how?
Is it possible for the Flex application to be notified about going into sleep mode and wake up back?
This is a Safari thing and is by design. Newer versions of Safari suspend flash content that is not in the foreground tab (not sure when this started, version 4?) For instance, if you have multiple tabs open, each with a youtube video playing and you go back and forth between the tabs, only one of the videos will be playing at a time. To answer your specific questions:
This will happen to any flash content that is in a background tab (not sure about the minimized state.)
Not aware of a means of disabling this behavior.
You may want to dig around in the Safari documentation to see if there is some sort of JavaScript event that you can grab onto, but I don't think you are likely to have success there.
Good luck.
Are your users using Flash Player 10.1 ? As part of the performance improvements in 10.1; I believe an application in a minimized state will get throttled in order to use less system resources / battery power.
I don't think there is any way to prevent this; and no APIs exposed that relate to this.
Other people I've spoken to have had issues with using local connections between minimized apps and active apps. I'd bet there is already a bug in the bug base on that.
Wrt the following above:
.I don't think there is any way to prevent this; and no APIs exposed that relate to this.
You may want to check out if Silverline from Librato can help you control how much and which applications get what system resources (CPU, memory, Disk and Network IO) with dynamic control based on application demand. If the above issue is a feature of flash - then obviously it may not help. But if you are trying to say run multiple applications / processes and would like to control who gets how much system resources (dynamically) then you could try Silverline - it does not require any changes to OS or app. http://silverline.librato.com

Web browser lock-down: How to?

I have an ASP.NET web application where a portion of it needs to run in a web browser as a public facing terminal.
Essentially it is used to capture anonymous user feedback (wizard control on a .aspx) in a commercial location such as a shop.
An administrator will login and prep the application for 'terminal' mode.
The terminal is a normal PC with keyboard and/or mouse like device.
I would like to prevent users from:
Viewing the browser menu's, pushing back button and/or entering a different URI in the URL and also disallow keyboard shortcuts from bypassing the intended looping functionality of the application that is running?
Which browser is best suited for its ability to disable functionality as mentioned? The app runs on IE/FF/Chrome/Opera/Safari.
HOW would one go about configuring the machine and/or browser so it is locked to prevent unauthorized/unintended use?
On a side note, I guess the web application session needs to have an unlimited timeout?
Thanks for your input!
EDITED: I am leaving the question as unanswered for now... I would like to see responses that highlight possible options for the other browsers as well.
You can run Internet Explorer in Kiosk mode.
Please see this MS KB article.
Simply put, start Internet Explorer with the -k argument
There seems to be some commercial products available also, like this.
Try How to use Kiosk Mode in Microsoft Internet Explorer
Also, there are many Kiosk tools to assist in locking down a machine. Example: http://www.thekioskstore.com/index.php/software/kiosk-lock-down
Firefox has at least two plugins (and possibly many more):
https://addons.mozilla.org/en-US/firefox/addon/1659
https://addons.mozilla.org/en-US/firefox/addon/509
It is also possible to lock down KDE and GNOME (GNOME at least has a built in tool), which you can also use to lock down the rest of the system. I suggest installing Ubuntu if the web app is running on another system.
If you have to use MS Windows, check out: http://www.microsoft.com/windows/products/winfamily/sharedaccess/seeit/internetcafe.mspx.
You can use an opensource Linux distribution designed for this very purpose, http://webconverger.com/

Resources