Localize Windows Service - vb.net

I want to Set Culture for Windows Service that I developed. Can someone recommend me a good read for or how to go about it.
So far I have I Tried to do the Following OnStart()
Dim oCultureInfo as CultureInfo = New CultureInfo("tr-TR")
System.Threading.Thread.CurrentThread.Culture = oCultureInfo
System.Threading.Thread.CurrentThread.UICulture = oCultureInfo
After doing so I still see that My culture is US English.

Go to your setup which will be in the same solution.
Right click on it and select ADD->PROJECT OUTPUT--> a window will appear.
Select Project- your localization project then select from below localized resource.
Just click ok. you will see one file is added to setup project.
Just compile and install it will work fine.

Related

How do I add my privacy policy link to the Windows Settings charm with Unity?

Windows Store rule 4.1.1 mandate that:
You must provide access to your privacy policy in the Description page
of your app, as well as in the app’s settings as displayed in the
Windows Settings charm.
The Description page is easy, since when you setup your app in the store there's a field where you can enter the URL.
However I'm a bit clueless about how to add this entry in the Windows Setting charm in a Unity project. I've found this answer but that assumes you are in full control and knowledge of your Windows Store app, while I'm just exporting from Unity, so I've no clue on where I would put that code.
So, how do I do that?
Unity is exporting the game as JS or C#.
So have a look to these samples http://code.msdn.microsoft.com/windowsapps/Windows-8-Modern-Style-App-Samples. In these samples, there are a few Setting Charm screnios that you can use in your application.
But remember that, you should add setting charm after export the game.
The plugin prime31/MetroEssentials has the function registerSettingsCommand, which allows you to do just that.
// Registers a settings item with an associated message that will be displaed in a popup when clicked
public static void registerSettingsCommand( string title, string message )
// Registers a settings item with an action. When the settings item is clicked the action will be called.
public static void registerSettingsCommand( string title, Action onActivated )

Windows Phone ThemeManager

is it possible to for example - write a background service, which randomly changes the windows phone theme, I mean is it possible to access the windows phone theme under settings via code? and change it?
if so can you please give me an example of the API's I can use or additional libraries I can dl
thank you
Unfortunately you can't. It is not possible to change the Windows Phone theme by code. The only one who can is the user. This is part of the Windows Phone concept.
The only thing you can do is defining themes that are used in your own apps.
Sorry for the bad news...
You are allowed to change the theme for your application. There is a Nuget package available that makes this even easier. You could accomplish changing it in a background task by setting a property that you check when the app opens.
// background agent code
// get random value
IsolatedStorageSettings.ApplicationSettings["Theme"] = randomValue; // this is just a string or something simple
IsolatedStorageSettings.ApplicationSettings.Save();
When your app opens, you would check this value
var theme = "Standard";
if(IsolatedStorageSettings.ApplicationSettings.ContainsValue("Theme"))
{
theme = IsolatedStorageSettings.ApplicationSettings["Theme"];
// Set the theme
}
You can modify the source of the Theme Manager by downloading the source from github. Here is some more info on the Theme Manager. If you would like to change values yourself, you can accomplish this by setting the resource values when the papp starts
((SolidColorBrush)Resources["PhoneAccentBrush"]).Color = myAccentBrush;
((SolidColorBrush)Resources["PhoneBackgroundBrush"]).Color = myBackgroundBrush;
((SolidColorBrush)Resources["PhoneChromeBrush"]).Color = myChromeBrush;
((SolidColorBrush)Resources["PhoneForegroundBrush"]).Color = myForegroundBrush;

Checked use Core Data in new project

When I created my Xcode project i checked the checkbox "use Core Data" because I thought I was going to use that. Now however it turns out I never used Core Data and would like to disable it. My project is way to big to just simply create a new project and leave the checkbox unchecked.
Does anyone know what methodes and files I need to delete in order to have a project without Core Data? I think some project settings need to be changed as well.
Just create a new empty project and find out. Must of the methods will be in your App delegate. You also have to remove the Data model (.xcdatamodel) file from your project

How do I create a file with the iOS\Cocoa Touch\Objective-C class template in Xcode

Forgive how simple this might sound but I'm stuck and need help. I am putting In App Purchases into may first app, which is not yet released. (So I'm very new)
I have been using a tutorial by Ray Wenderlich. I have just finished starting the Master Detail Application Template. Now it says I need to create a IAPHelper class which will be my class for the IAP the step I am on says to "create a file with the iOS\Cocoa Touch\Objective-C class template". However when I open Xcode and I select new project, I don't see this option. It has Single View Application etc.. the closest thing I see is Cocoa Touch Static Library.
Can someone tell me how I "create a file with the iOS\Cocoa Touch\Objective-C class template". I'm lost, do I do it from inside the Master Application Template? Or do I use some other template name like utility or empty application or Cocoa Touch Static Library? Or do I not have this in my version of Xcode? Or am I totally coming at this the wrong way? ahhhh!lol
I have Xcode 4.3.2
I know this is probably a no-brainer for some but not for me :(
Thanks for the help :)
In the current project you are working in, right click on a file and click "New File..." or go to File>New>File and then you will probably want a Objective-c class objection under Cocoa Touch
You need to do this in the same project which you have done till now. What you are trying to do is to create new project where as the tutorial is asking you to create new file. You have to do this in the same project which you are working on. In order to do that there is an option in file menu to add a new file to project.

getting location of installed application vb.net

i published an application in vb.net. the user will be able to install the application anywhere they choose on the computer (or perhaps not anywhere they choose but where ever the default location is). how can i programmatically get the location where the user installed the application? another words i need the application to know where it is running from. how do i detect that?
In runtime, you can use:
Application.StartupPath
Application.ExecutablePath
that will tell you where your .exe is. Hope that helps.
If your app is a Windows Forms app you can use the Application static class, as others have noted. For other kinds of applications, use reflection:
Dim a = System.Reflection.Assembly.GetEntryAssembly()
Dim location = a.Location
I had to do this the other day, works great.
Like this:
Shared ReadOnly AppDirectory As String = _
Path.GetDirectoryName(New Uri(GetType(Program).Assembly.CodeBase).LocalPath)
You can have a look at
Application.ExecutablePath Property
or
AppDomain.BaseDirectory Property
If you put this code in your exe then it will give you the path of the exe.
System.IO.Path.GetDirectoryName(System.Reflection.Assembly.GetExecutingAssembly().Location)