Windows Vista Forums
Vista Forums Home Join Vista Forums Windows 7 Forum Vista Tutorials Tags
Welcome to Windows Vista Forums. Our forum is dedicated to helping you find solutions with any problems, errors or issues you are experiencing with Windows Vista. The Vista forum also covers news and updates and has an extensive Windows Vista tutorial section that covers a wide range of tips and tricks.

Go Back   Vista Forums > Misc Newsgroups > Avalon

Vista - Urgent

 
 
Old 11-27-2006   #1 (permalink)
chirag


 
 

Urgent

I want to know that I have created one custom activity and in that I
have created main class and with that also created designer class and
validator class but when I debug my solution the control goes inside
the validator class but does not goes inside the designer class so I
want to know that what is the entry point to debug the designer class
so my control goes inside that the class for sample I am providing its
syntax. From the main class i have to call the designer class before my
main class started so i cannot place a break point at that location
So please tell my what is the entry point of that class.
calling of the class syntax is followings :
[DesignerAttribute(typeof(LwSqlDbActivity.LwSqlDesigner))]
Thank You
and designer class is :
public sealed class LwSqlDesigner : ActivityDesigner
{
protected override void Initialize(Activity activity)
{
base.Initialize(activity);
this.DesignerTheme.BackColorStart = Color.White;
this.DesignerTheme.BackColorEnd =
ColorTranslator.FromHtml("#F9CB5A");
this.DesignerTheme.BackgroundStyle =
System.Drawing.Drawing2D.LinearGradientMode.Vertical;
this.DesignerTheme.BorderColor =
ColorTranslator.FromHtml("#BF8311");
}
protected override void PreFilterProperties(IDictionary
properties)
{
base.PreFilterProperties(properties);
UpdateSqlParametersList(properties);
UpdateDynamicProperties(properties);
}

private void UpdateSqlParametersList(IDictionary properties)
{
if (this.Activity != null && this.Activity is
LwSqlActivity)
{
LwSqlActivity activity = Activity as LwSqlActivity;
try
{
if (activity.ConnectionString != null &&
activity.ConnectionString.Length > 0)
{
SqlCommand command = activity.CreateCommand();
//Build SQL parameters list


if (activity.ConnectionString != null)
{
LwSqlHelper.GetTextParameters(command);
}
if (command.Parameters != null &&
command.Parameters.Count > 0)
{
for (int i = 0; i <
command.Parameters.Count; i++)
{
PropertyDescriptor prop =
new
LwSqlParameterPropertyDescriptor(command.Parameters[i].ParameterName,

LwSqlHelper.GetType(command.Parameters[i].SqlDbType),
new Attribute[] { new
ParenthesizePropertyNameAttribute(true) });
properties[prop.Name] = prop;

}
}
}
}
catch (InvalidOperationException)
{
Console.WriteLine("Operation is invalid");
}
}
}

private void UpdateDynamicProperties(IDictionary properties)
{

if (this.Activity != null && this.Activity is
LwSqlActivity)
{
LwSqlActivity activity = Activity as LwSqlActivity;
if (activity.ConnectionString == null)
{
properties.Remove("SourceTable");
}

}
}
protected override void
OnActivityChanged(ActivityChangedEventArgs e)
{
base.OnActivityChanged(e);
TypeDescriptor.Refresh(e.Activity);


}
}
Please reply as soon as possible


My System SpecsSystem Spec
 

Thread Tools


Similar Threads
Thread Forum
URGENT HELP Vista installation & setup


Vista Forums is an independent web site and has not been authorized,
sponsored, or otherwise approved by Microsoft Corporation.
"Windows Vista", the Start Orb, and related materials are trademarks of Microsoft Corp.
© Designer Media Ltd

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46