|
Dear all.
I'm a total newbie to programming (I have made som very trivial applications in C#). Right now I'm looking at multilangual programming for the Windows User Interface. Could anyone provide a really (and I mean really) simple code/application which shows how to implement multilangual controls?
I have searched both Google and CodeProject, but most of the examples there are a bit too "difficult" for me to understand at this point, and most often the examples contain a lot more than just the language function. I know it has something to do with multiple resx files, but that's about it.
Thanks in advance.
|
|
|
|
|
The easiest way is :
1. Create Resource.resx in Visual Studio and add some text in it, for example :
MyText : World
2. Then create Resource.de.resx in Visual Studio and add some text in it, for example :
MyText : Welt
In your source code, you can call it using :
MessageBox.Show(Resource.MyText);
The content of Resource.MyText is depend on your CurrentCulture.
If your CurrentCulture is English, then you get "World"
If your CurrentCulture is German, then you get "Welt"
|
|
|
|
|
|
Hi all, especially to stancrm. I inlude the components in my code, but it only plays when the entire program runs. I mean I cannot control the wmp interface, even it doesn't work using button. I think I missed some concepts. pleas help me I want to make my own wmp(sample).
|
|
|
|
|
Here[^] you will find some basic instructions on how to control the WMP. It is a "step by step" explanation of creating an application that plays video and uses custom play and stop buttons. I think that it's a good start point.
If you need something more complex have a look at the Remote control media player[^] article.
Regards,
Nuri Ismail
|
|
|
|
|
Is the datagrid control the only grid available in C#? I am more familiar with delphi and stringgrids, which allow me to set certain cells, rows, or columns to read-only, different colors, or sizes, etc... Does the datagrid control have any of this functionality? I have only be able to find tutorials on how to view, add, or delete data. Can anyone offer any advice? thanks.
|
|
|
|
|
|
|
jai eto nkita ko code
public void RadixSort(int[] a)
{
// our helper array
int[] t=new int[a.Length];
// number of bits our group will be long
int r=4; // try to set this also to 2, 8 or 16 to see if it is
//quicker or not
// number of bits of a C# int
int b=32;
// counting and prefix arrays
// (note dimensions 2^r which is the number of all possible values of a
//r-bit number)
int[] count=new int[1<<r];
int[] pref=new int[1<<r];
// number of groups
int groups=(int)Math.Ceiling((double)b/(double)r);
// the mask to identify groups
int mask = (1<<r)-1;
// the algorithm:
for (int c=0, shift=0; c<groups; c++, shift+=r)
{
// reset count array
for (int j=0; j<count.Length; j++)
count[j]=0;
// counting elements of the c-th group
for (int i=0; i<a.Length; i++)
count[(a[i]>>shift)&mask]++;
// calculating prefixes
pref[0]=0;
for (int i=1; i<count.Length; i++)
pref[i]=pref[i-1]+count[i-1];
// from a[] to t[] elements ordered by c-th group
for (int i=0; i<a.Length; i++)
t[pref[(a[i]>>shift)&mask]++]=a[i];
// a[]=t[] and start again until the last group
t.CopyTo(a,0);
}
// a is sorted
}
|
|
|
|
|
Hello I have 2 xml one of them has a same data but less in records i want to get their inner join, i searched alot but they always mention merge merging them was not help full at all since they get all combined
What i want:
XML1 XML2 MyXmlShould have
---- ---- ----------------
1 2 2(plus its menu item since xml has menu item & menu sub Item ) here the 2 stands for Menu)
2
3
|
|
|
|
|
Hi,
I guess you have to write a routine yourself, implementing a join like sql by hand.
Regards
Sebastian
|
|
|
|
|
You can either write some XSLT to combine the two file or use Linq to XML
only two letters away from being an asset
|
|
|
|
|
How>????It is the first time i use LINQ
|
|
|
|
|
HI,
How can I get Oracle Servers names in current computer Using C#. Suppose a list of DBMSs names are appeared in a list box. When I clicked in SQL server data base then it shows all the sql server data bases in my current computer. But now I need when I will click oracl then it will display the servers names and when i click a particular server it will ask for user name and password from me. So currently my main problem is how can I get oracle server name using C#. After getting server name I will be able to do the next steps.
|
|
|
|
|
This will help you get a list of SQLservers
just include using System.Data.Sql;
DataTable ListOfServersNames=new DataTable();<br />
var sqlServers = SqlDataSourceEnumerator.Instance;<br />
ListOfServersNames= sqlServers.GetDataSources();
Now the datatable will contain the list of servernames available.
|
|
|
|
|
Hi..
I just wanted to know whether there is any way to get collection editor form
inside a another form , without using property grid, since my boss doesn't like the pop up coming up for collection editor, so without triggering any event the collection editor must be placed in a particular location of my form, which i can further edit and add items into the collection list.
Can anyone guide me how can i do this..
|
|
|
|
|
I would like to use the AxMSChart control but I can't find any documentation about how to use it. Does anyone have experiance with this?
|
|
|
|
|
|
Does it support .net 2.0 framework?
|
|
|
|
|
No, it's only for .NET 3.5
|
|
|
|
|
If your not using .NET 3.5, have a look at ZedGraph[^] instead.
|
|
|
|
|
Thanks Dave
|
|
|
|
|
I'm writing a VS add-on which, on activation, is supposed to add a couple of attributes in the App.xaml.
The problem I get is, when App.xaml is opened for editing, everything works fine.
But, if App.xaml isn't opened the changes aren't saved. I went through the code, it still goes through it like it should, it adds the attributes like it should, it even executes the line of code that's supposed to save the changes, except... changes aren't saved
This is an overview of what i do:
<br />
codeState.editPoint.StartOfDocument();<br />
string xmlText = codeState.editPoint.GetText(codeState.textDoc.EndPoint);<br />
<br />
--- add a couple of attributes using XmlDocuments<br />
--- save the changes into a memory stream<br />
<br />
codeState.editPoint.ReplaceText(codeState.textDoc.EndPoint, reader.ReadToEnd(), 0);<br />
Any ideas why?
Where it seems there are only borderlines, Where others turn and sigh, You shall rise!
|
|
|
|
|
I think, you must ask at WPF forum.
|
|
|
|
|
It's not really a WPF issue. The file just happens to be xaml, the problem would persist no matter the file type.
I thought of asking this in the Visual Studio forum, since I am working on a Visual Studio add-on... but, that's more of a "using" forum, than programming.
Where it seems there are only borderlines, Where others turn and sigh, You shall rise!
|
|
|
|