|
|
Yes, the class comparison tool indicates that the DataGrid class and the ComboBox class are included in Compact .NET.
|
|
|
|
|
Hi,
Imaginge that one is dealing with business objects which are exposing their attributes through public properties. One is now able to bind these properties to UI Controls with the build-in .net data binding mechanism. So far so good.
Data validation should be done inside the business objects in two different modes. Every public property on a business object can have a ValidateXXX method which validate just the given value. The second method validates all given data in a context that is meaningfuel for the whole business object instance.
Last but not least all validation messages should be displayed at UI level with an ErrorProvider component. Each control should show the assigned validation error message from the business logic layer.
So far we have some business objects, which are bound to UI controls. We have a collection with validation messages provided by the business object instance.
How to connect the whole thing togheter? The databinding mechanism is the only part that knows which UI Control is bound to which business object property. I miss the part which takes care of settings the validation messages for each control after validation is done.
Shouldn't the databinding mechanism provide a way to transport validation messages and shows them with a ErrorProvider next to the bound control
myMsg.BehindDaKeys = "Jerry Maguire";
-- modified at 11:22 Wednesday 1st March, 2006
|
|
|
|
|
Hi,
I have faced exactly the same problem and i concluded that my BusinessObject in order to perform proper data-bound functionality has to implement 3 interfaces:
IDataErrorInfo<br />
INotifyPropertyChanged<br />
IEditableObject
Chris Richner aka Jerry Maguire wrote: Shouldn't the databinding mechanism provide a way to transport validation messages and shows them with a ErrorProvider next to the bound control
As long as you have implemented IDataErrorInfo just set ErrorProvider.Datasource to your object and enjoy the magic.
|
|
|
|
|
Hi predragzakisevic,
I'm trying to solve my problem with your solution. I didn't implement IEditableObject, just added IDataErrorInfo. The problem is raised when I try to attach the business object to the error provider as a datasource. It saids that it's invalid because my business object doesn't implement IList.
How did you implemented yor business objects?
Thanks for you answer btw.
myMsg.BehindDaKeys = "Jerry Maguire";
|
|
|
|
|
class BusinessObject : IDataErrorInfo,INotifyPropertyChanged,IEditableObject ...
{
private Dictionary<string,string> m_Errors = new Dictionary<string,string>();
string IDataErrorInfo.Error
{
get
{
return ((m_Errors.Count > 0) ? "Business object is in an invalid state" : string.Empty);
}
}
string IDataErrorInfo.this[string columnName]
{
get
{
///Fetch from dictionary;
return GetErrorDescription(columnName);
}
}
}
|
|
|
|
|
Hi predragzakisevic,
Thank you for your code snippet. Maybe it's not working because I'm running against .net 1.1. Maybe they changed the way the errorprovider works in .net 2.0. If I try to set the errorprovider.datasource which an object that not implement IList I get an exception. As far as I can see your code doesn't implement IList.
I wrote my own DataProvider implementation under .net 1.1 that does the job as well. Great to have your feedback about this topic.
Have a nice day
myMsg.BehindDaKeys = "Jerry Maguire";
|
|
|
|
|
|
I am upgrading from Windows 2000 to Windows 2003, using .NET Framework 1.1 and using the CryptoAPI's RSA encryption for encrypting connection string.
I get the error:
"CryptoAPI cryptographic service provider (CSP) for this implmentation could not be acquired"
I checked msdn article http://support.microsoft.com/default.aspx?scid=KB;EN-US;322371[^]. It didn't help.
Also tried to give the account (under which ASP.NET is running) Full Control access to the files containing the keys the WSE will need to retrieve in the following folder:
C:\Documents and Settings\All Users\Application Data\Microsoft\Crypto\RSA\MachineKeys
Didn't help either.
I am running out of ideas. Some articles suggested to create certificates. I am not sure how I go about doing that. Anybody run into a similar situation before. Any ideas or suggestions?
Vasudha Ghosal
Developer
Penske Logistics
|
|
|
|
|
I found the solution. It works only if both these are true.
1. the user identity under which the program runs has a profile under Documents and Settings.
2.Full Control access to the files containing the keys the WSE will need to retrieve in the following folder:
C:\Documents and Settings\AllUsers\Application Data\Microsoft\Crypto\RSA\MachineKeys
|
|
|
|
|
Hi,
I have a question, I need to set the custom font angle for italic font, how can I do this in GDI?
The default font angle is 15 degrees, but I need to set it to 10, 20, 25 . . .
Please, help!!! I cannot find decision
-- modified at 8:41 Wednesday 1st March, 2006
|
|
|
|
|
Im not too sure you can without defining your own font or converting the text to an image and modifying it there
|
|
|
|
|
There are two types of italic fonts. One is a normal font that is tilted, the other is a completely separate font for italics.
For the first type, the angle is specified in the font file. The author of the font has chosen that angle, and there is normally never any reason to use any other angle.
For the second type, the characters just looks tilted. The characters are drawn without tilting, as they already look the way they should, so there is no angle to change.
So there is no support in GDI for changing the angle.
---
b { font-weight: normal; }
-- modified at 19:28 Wednesday 1st March, 2006
|
|
|
|
|
I work with POST SCRIPT fonts, and I saw this functionality in one project, but I cannot understand how did they do that.
|
|
|
|
|
Hi,
I'm experimenting with .net 2 and VS2005 support for localization.
Using a sort of Resource Manager wrapper class I give the application the capability of switching in real-time from one language to another, knowing its own default language, ....
The application has a Tool/Settings/Language/... menu that is filled with the available localization languages (the main assembly built-in resources (<something>.resource) and localizations supported by the satellite support assemblies (<something>en-En.resource, <something>it-IT.resource), ...)
So, at startup, I would like the wrapper class to be able to enumerate (at resource, or at resource manager level, not at file system level) the actually available localization satellite assemblies.
Does anyone have an idea about how I can accomplish this little last task?
Of course, should not this possible, I will end in looking directly for the actually available resource files. Anyway I think that this should be an exposed feature of the ResourceManager class.
At the end I would like to post a little article about this work. I searched on CodeProject for Localization Issue and I found something general but nothing similar to what I'm trying to do.
Thanks in advance to everyone,
Luca
BiasoSoft Sw&Hw Engineering
Falconara (AN) ITALY
www.biasosoft.com
|
|
|
|
|
B"H
I am running into a little problem where I can not figure out how to seach for things on the web whether its articles, code, message board answers and find what I am looking for.
I always find aricles, etc. relating to .net ver1.1. when I an developing in ver2.0
this is a problem both on codeproject or if I use google.
this problem is particularly bad when it comes to winforms which where redone in a big way, particularly the data binding. and there seems to be a lack of information about the new systems or at least it is very hard to find.
please post your suggestions.
Thank you
Rabbi Moshe Plotkin
Director of Chabad of New Paltz
Lecturer in Computer Science
SUNY New Paltz
|
|
|
|
|
Just Go through this Link
http://www.asp.net/QuickStart/aspnet/Default.aspx"
U can search in microsoft sites for relavent information
Go to MS Elearning site We can get Kits that are available for paying one year subscription and even some are free E-learning Courses that are avialable
For Whidbay
All the Best
Senior Software Engineer
Nothing is Impossible Even Impossible says I'MPOSSSIBLE
|
|
|
|
|
Thanks for the response.
to clarify.
I know how to program...
I develop in .net ver2 microsofts specific help was useful when I was just starting.
for profesionals like us, there is a need for sites like code project to see articles, discoveries and tweeks of other profesionals who have gone in depth.
how do you search those sites either though google or a code project site serch and return only information that is truly relavent.
Moshe Plotkin
|
|
|
|
|
Hello, I am experiencing some weirdness with my OpenFileDialog filter. When I first open the dialog, the filter works and shows me the files with the filename scheme that I specify. However, if I select a different filter, then all the files disappear from the list. In addition, if I manually type the filter into the filename field and press Enter, then the files show up again. Here is a snippet where I create the dialog:
System::Void button_xmtr_Click(System::Object * sender, System::EventArgs * e)
{
OpenFileDialog* dlg = new OpenFileDialog();
dlg->Title = S"Choose Transmitter file";
dlg->InitialDirectory = S"input";
dlg->Filter = S"Transmitter files (xmtr*.dat)|xmtr*.dat|DAT files (*.dat)|*.dat|All files (*.*)|*.*";
if (dlg->ShowDialog() == DialogResult::OK) {
textbox_xmtr->Text = dlg->FileName;
}
}
Has anybody else run into this problem? Does anybody know of a workaround? Thanks.
--
Marcus Kwok
|
|
|
|
|
OK, now I'm really confused. I used this exact same code in a test app and it works perfectly there! It still does not work right in my main app though
--
Marcus Kwok
|
|
|
|
|
|
I'm using a native C++ extension DLL in a MFC 7.0 application.
The native DLL shows a dialog through DoModal using a dialog resource.
DoModal produces an assertion (at GetResourceHandle() and GetModuleHandle()),
How can I solve the problem?
|
|
|
|
|
I have created one dll called as mydll.dll and added following code for security.
Imports System.Security
Imports System.Security.Permissions
'<assembly: strongnameidentitypermissionattribute(securityaction.demand,="" _
'="" publickey:=" 0, 36, 0, 0, 4, 128, 0, 0, 148, 0, 0, 0, 6, 2, 0, 0, 0, 36, 0, 0, 82, 83, 65, 49, 0, 4, 0, 0, 1, 0, 1, 0, 59, 217, 201, 231, 35, 199, 134, 255, 210, 242, 120, 184, 173, 106, 168, 25, 233, 75, 135, 27, 198, 104, 243, 255, 116, 171, 230, 227, 14, 186, 202, 180, 166, 31, 199, 105, 19, 183, 203, 186, 83, 15, 8, 108, 71, 2, 27, 122, 149, 96, 237, 175, 87, 48, 90, 226, 156, 236, 188, 158, 21, 99, 189, 226, 1, 195, 186, 247, 5, 241, 110, 117, 214, 187, 67, 38, 78, 6, 225, 254, 186, 29, 238, 199, 138, 190, 183, 151, 173, 180, 134, 177, 105, 72, 57, 240, 11, 154, 12, 245, 30, 179, 238, 108, 120, 155, 8, 87, 23, 18, 82, 161, 8, 93, 255, 147, 70, 166, 219, 55, 3, 134, 79, 155, 236, 118, 33, 163 " )="">
Public Class MyClass1
Public Sub New()
MsgBox("new Class" & Now.Today)
End Sub
End Class
Now no one can access the code. but while development how can i remove the security.
Sachin D. Thamke
Pcs Technologn
|
|
|
|
|
Hi there!
I want to encrypt an XML-file using c#. So far everything works fine. Only the solution of saving the private Key in a safe place makes difficulties.
Heard about saving the private Key in the Registry, but for some reasons i can not find good examples on that. The only page i found is this (http://www.codinghorror.com/blog/archives/000501.html). I just don't get what he wants to tell me... Do i need a pfx-File... Eventhough i only want to save a private key...? How do i generate such a file?
Can anyone help?
|
|
|
|
|
Hello,
There's a problem that I encounter when trying to implement database transactions
over multiple webservices. The thing I try to accomplish is trying to make three
webservices (startTransaction, commitTransaction and rollbackTransaction).
The idea behind this is that i could start a transaction serverside, calling some
webservices which do some database updates and consecutive to that call the
commitTransaction or rollbackTransaction webservice to commit or rollback the transaction.
The thing I tried is to put the transaction object in the session but this didn't work.
So my question is, is the thing I want possible or isn't it the best practice to do ?
thanks in advance.
Greetings from Holland
|
|
|
|
|