Hi I made a service that runs under the system account. The service gets a message from my server that tells it to shut down if no user is logged on. But because my service is run under system I can use this code to find out who is logged on.
a = System.Security.Principal.WindowsIdentity.GetCurrent().Name.ToString();
I was wondering does any one know a different way to find if a user is logged on.
I'm trying to save a unicode utf8 string --> "سلام" in a feature of a featureclass, but it is saved like "????".as ArcMap support different encodin and also Farsi that I'm working with, It should be possible through my program.but I didn't find any way yet.anybody knows about this?
fc is an IFeatureClass, feature is an IFeature and o.Name is a unicode.utf8 string.in watch window:
feature.get_value(feature.Fields.FindField("Name"))--> is OK
fc.GetFeature(1).Get_Value(feature.Fields.FindField("Name")) --> is "????"
If you're sure that your data is intact when sent to the component (easily checked with some breakpoints) then you should ask in their forums[^].
Dave BTW, in software, hope and pray is not a viable strategy. (Luc Pattyn) Visual Basic is not used by normal people so we're not covering it here. (Uncyclopedia) Why are you using VB6? Do you hate yourself? (Christian Graus)
I have to develop UI in windows mobile in which the icons come one by one in a line by using left/right key (AS developed in iphone). The selected icon gets focus and enlarged, others are going in background of screen.
How to develop ?
I am writing a Windows.Forms application and I have a some objects that I want to be Global. Example of these objects are an object for maintaining a collection of remote resources, and a "Task list" type object that shows all running tasks. There is only ever 1 instance of these objects, they are created when the application starts and are destroyed when the application ends.
I use these objects throughout my application and inorder to do so I have to pass an "Environment" object to each form, this Environment object serves as a pointer to the global objects.
This seems very kludgy, is there a way that you can have global objects shared across the application without having to pass them to each form/thread you create?
If I understand correctly, you need a object TaskList across the application. Assuming it has a set of properties, you can have a public static class TaskList, with all the properties needed, which will be available across the application.
If it is just a list of tasks and there are some more things of this sort, have all these as properties in a common static class and expose them as properties of type List.
Since the class would be public, you can access it anywhere in the application.
Hi, I am using EF and want to use its generated objects to be returned to the web service (By serializing it). The problem is All generated classes are inherited from EntityObject (member of System.Data) and I don't want its member to be included in the wsdl.
Please help me if anyone know the solution. Thanks in advance.
I have a windows application, reporting-tool, wich alows a user to create a XML that later can be generated to a Excel-File.
I am now developing a new function. The user should have the possibility to create a DLL consisting model/generator and also the created XML. By now I have splited the application into two projects:
1. The main windows application with all the forms etc.
2. The model of the excel-report and the classes which generate the report.
Now how can I create the DLL and embed the XML, and all that should be implemented in the windows application project
Create an assembly by using a compiler? Could you be a bit more specific ?
It's a windowsapplication that uses COM-Interop to create a excelfile. The XML file has stored the definition for the report, like position of the cell, cell-content, cell-format etc.
Generation the excelreport works fine. But the next step is to create that DLL.
When the user has created that DLL he can upload it to a ASP.Net application which handels that DLL and provides the report as a download.
It has to be a DLL consisting the C#Project(model/generator) and the XML Definiton-File.
When the user has created that DLL he can upload it to a ASP.Net application
Woah! You are allowing users to upload DLL files to a web server?! Are you nuts! Can you not see what a massive gaping security hole you are punching in the Web server? It would be like a bank saying that they want to make it easier for their customers to access their money, so here's a stick of dynamite to use if you ever need to access the vault out of hours.