Windows Vista Forums
Vista Forums Home Join Vista Forums Donate Vista Tutorials Tags

Welcome to Vista Forums we are your forum to discuss Windows Vista x64 and x86 systems. Whether you need help or just want to post an idea you have on Vista, this is the forum for you.
Register at Vista forums...the world biggest Windows Vista resource Join Vista Forums Now

Go Back   Vista Forums > Microsoft Technical Newsgroups > Avalon

Urgent

Closed Thread
 
Thread Tools Display Modes
Old 11-27-2006   #1 (permalink)
chirag
Guest


 

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

Closed Thread

Thread Tools
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
Urgent Help vivek Sound & Audio 2 05-18-2008 11:19 AM
I need URGENT help Milan Vista account administration 8 04-08-2007 06:42 PM
Urgent chirag Avalon 0 09-27-2006 06:26 AM
urgent chirag Avalon 0 09-23-2006 04:27 AM
Need help URGENT! =?Utf-8?B?Tm9TcGluVmV0dGU=?= Vista General 0 09-15-2006 03:01 PM








Vistax64.com 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 2005-2008

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 47 48 49 50