|
i anyone here can answer my question?
The flame of Hope should never go out from your life...and with Hope, each of us can live a life with Peace, Faith & Love.
|
|
|
|
|
Hi !!
about your question, were you able to find the solution at last?
Thanks
Roey
Don't believe to what you hear on the news...
|
|
|
|
|
I'm planning to create WinForms ERP application which uses Entity classes for data access layer.
I created code generator which creates .cs files, separate file for every
database table.
My appl users can add fields to database tables after application is
deployed to create new fields for customer, invoice tables etc.
So I need to re-generate data-access layer if end user adds custom columns
to tables.
For this I need to create assembly from .cs files at runtime.
I'm planning to create class hierarchy containing 5 classes in 5 dll files
from which 2 (3 entity classes and 5 custom business logic) can be compiled
dynamically at customer sites:
1 EntityBase<t> - EntityBase.dll class. Base class for classes 2-5
2 ModelGenericBase<t> - ModelGenericBase.dll - common logic. Static dll,
deployed with application.
3 Entity classes: CustomerEntity, InvoiceEntity etc. -
ModelEntity.dll - this dll is generated dynamically from database tables.
4 Business logic - Business.dll - business logic, uses entity
classes. Static dll, deployed with application.
5 Customer, Invoice etc. class - ModelCustom.dll - contains custom
logic. Generated dynamically if on-site customization is used.
So I have 120 .cs files in single directory containig POCO s like:
Entity1.cs:
namespace Model {<br />
public class Entity1 {<br />
string property1;<br />
<br />
public virtual string Property1 {<br />
get { return property1; }<br />
set { property1 = value; }<br />
}<br />
}<br />
}
Entity2.cs:
namespace Model {<br />
public class Entity2 {<br />
string property2;<br />
<br />
public virtual string Property2 {<br />
get { return property2; }<br />
set { property2 = value; }<br />
}<br />
}<br />
}
I need to generate ModelEntity.dll assembly from those files from my application.
What do yuo think about this approach ?
Where to find sample code which compiles cs files and creates dll file ?
Andrus
|
|
|
|
|
Hi,
Can anybody tell me how to create a shortcut in start up menu using windows c#.
I dont want to use any com component.
Pls help
-- modified at 5:08 Wednesday 25th July, 2007
Nana
|
|
|
|
|
Hello
I'm working with Windows Forms and ASP.NET projects using C#.
Today the user interface strings, like labels, messageboxes, etc. are located directly in the cs file within the code. I would like to place these strings separate from the code, but where? My first thought was to use a .resx file.
Localization is currently not an issue and probably never will be, but you never know. So I would like to keep that possibility open or at least not close the door.
Any suggestions?
|
|
|
|
|
Yes, put them in a resource file - If you are using VS2005 you'll find that it does quite a bit to help you access them in a sensible and type safe way as it creates a code behind file for the resource file.
Upcoming events:
* Glasgow: Mock Objects, SQL Server CLR Integration, Reporting Services, db4o, Dependency Injection with Spring ...
"I wouldn't say boo to a goose. I'm not a coward, I just realise that it would be largely pointless."
My website
|
|
|
|
|
Thanks. Do you know of any good articles about this?
|
|
|
|
|
It does everything for you. I can't see that an article would add much. It creates a class with the same name as the resource file with lots of static properties named after the string resource that get the actual string value for you. There is nothing much more complex about it. Visual Studio does the hard work so you don't have to.
Upcoming events:
* Glasgow: Mock Objects, SQL Server CLR Integration, Reporting Services, db4o, Dependency Injection with Spring ...
"I wouldn't say boo to a goose. I'm not a coward, I just realise that it would be largely pointless."
My website
|
|
|
|
|
Hi,
I am developing an application which needs to change the User Interface language of my WinCE device to the selected one from my application.I need to change the device language programmatically.
Can any one help me out in this ??? (I need it urgently)
Thanks.
Jyoti.
|
|
|
|
|
look into the resourcemanager class on MSDN.
You can attach assemblies with translations to your application that each contain the translations for your app.
V.
No hurries, no worries
|
|
|
|
|
Thanks for the quick reply but this is not i m searching for. I need to change WinCE device language programmatically. Manually we can change it from the regional settings. But i have to do it programmatically.
Thanks.
|
|
|
|
|
You don't want to set the language to french, english, chinese via a menu option or something?
|
|
|
|
|
No..i do want to set the language using a combobox. See when i select a language from a combobox from my application, i have to change the application UI language also(i have idea how to do that using ResourceManager and Satellite assemblies)but along with that i also want to change the OS language also.
|
|
|
|
|
Jyoti.Patil wrote: along with that i also want to change the OS language also.
Ok that is much clearer, but unfortunately I can't help you there...
|
|
|
|
|
Hello all,
Finally i got the answer for my question after a lot of R & D.
To change the language of the WinCE device user just has to change the two keys in the device registry.
RegistryKey regKey = Registry.CurrentUser.OpenSubKey("MUI", true);
if (regKey != null)
{
regKey.SetValue("CurLang", 1031); // 1031 is for German
regKey.Flush();
regKey.Close();
}
regKey = Registry.LocalMachine.OpenSubKey(@"nls\overrides", true);
if(regKey != null)
{
regKey.SetValue("LCID", 1031);
regKey.Flush();
regKey.Close();
}
and then add the code to restart the device. Without restarting the language change will not get reflected.
Thanks.
|
|
|
|
|
cool thanks for the info !
|
|
|
|
|
Hello. I need to create a service the will simply log all of the downloads that are perfromed with the built in IE downloader. I have no idea where to start though. Please adwise if possible. Thank you.
Assume that I know C#, VS, .NET.
Max V. Pavlov
|
|
|
|
|
I'm searching for technology, that enables to define GUI in text file (xml, properties or sth). The definition will be read at runtime, and GUI will be generated and shown. Changes in definition file will affect on program appearance (for example: adding new field in form definition in file - will affect in form appearance after next application start - without recompilation of all application
Can anyone help me ?
|
|
|
|
|
|
|
Hi All,
I make the reports in my program using crystal report, I design it using the stored procedure the problem is in the procedure which have if condition or execute statement the fields does not appear in the design of the crystal report.
merwa
|
|
|
|
|
I have an application. it has two forms. first form - mainForm is big and some images are loading into mainForm. second form - loginForm should be showed while mainForm is invisible is loading.
loginForm has a label that has "Loading...".
all is working but this label on the loginForm is not visible few seconds and I guess apllication is not response, but then all is ok. label is visible and formLogin to. after loading of maiForm is complete , loginForm should be hide..
can I fix waiting of showing of the label on the formLogin? is there somethig like "Application.ProcessMessagess" in Delphi?
thanx!
--
"Success is simple. Do what's right, the right way, at the right time."
best regards,
tradakad
|
|
|
|
|
Application.DoEvents.
Getting your init to happen on another thread, is even better.
Christian Graus - Microsoft MVP - C++
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
Thanx!
I tryed - but it doesnt work
it is my loginForm
public partial class frmLoading : Form
{
private int pointCount = 0;
private int iterationsCount = 0;
public frmLoading()
{
InitializeComponent();
}
private void frmLoading_Load(object sender, EventArgs e)
{
Application.DoEvents();
}
private void frmLoading_Shown(object sender, EventArgs e)
{
Application.DoEvents();
tmrProcess.Enabled = true;
}
private void tmrProcess_Tick(object sender, EventArgs e)
{
Application.DoEvents();
if (iterationsCount <= 2)
{
if (pointCount <= 10)
{
lblLoadingText.Text += ".";
pointCount++;
tmrProcess.Enabled = true;
}
else
{
lblLoadingText.Text = "Loading";
iterationsCount++;
pointCount = 0;
}
}
}
}
--
"Success is simple. Do what's right, the right way, at the right time."
best regards,
tradakad
|
|
|
|
|
Hello,
tradakad wrote: private void tmrProcess_Tick(object sender, EventArgs e)
{
Application.DoEvents();
if (iterationsCount <= 2)
{
if (pointCount <= 10)
{
lblLoadingText.Text += ".";
pointCount++;
tmrProcess.Enabled = true;
}
else
{
lblLoadingText.Text = "Loading";
iterationsCount++;
pointCount = 0;
}
}
}
You should call the DoEvents at the end of the code!
tradakad wrote: private void frmLoading_Shown(object sender, EventArgs e)
{
Application.DoEvents();
tradakad wrote: private void frmLoading_Load(object sender, EventArgs e)
{
Application.DoEvents();
}
I don't think that this is neccessary!
Apart from that, you are using the Forms.Timer which is running in the GUI Thread.
So the Timer is influenced from the action in you thread and might be throwing the Tick event not as expected (delayed)!
You could use a System.Threading or System.Timers Timer, which are running in an own thread.
Therefore you would have to invoke the Form if you want to change the Text, from the elapsed event for example!
All the best,
Martin
|
|
|
|