473,396 Members | 1,756 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

are there UML diagrams for C# API?

Hi all,

I am having difficulties in understanding DataGrid,DataSet,DataTable
etc classes that work to have DataGrid work.

I am looking for UML diagram that depicts relations between those
classes. I don't want to read tons of text written but MSDN or anybody
else. After all "picture is worth thousand words" was not coined by
dump people.

It would be very helpful if you can point me to some url that has UML
diagrams for C# API. Again, the MS typical diagrams like MFC won't help
much I guess here, UML would be able clear more things...

Regards,
Maulin

Nov 16 '05 #1
5 4035
What? Nobody knows if there is UML or any kind of diagrams available
for C# api?

That would be too bad :(

I ask for diagram because after being used to Java API I find C# API
documentation just worthless. Don't they know english?

Regards,
Maulin
Maulin Vasavada wrote:
Hi all,

I am having difficulties in understanding DataGrid,DataSet,DataTable
etc classes that work to have DataGrid work.

I am looking for UML diagram that depicts relations between those
classes. I don't want to read tons of text written but MSDN or anybody else. After all "picture is worth thousand words" was not coined by
dump people.

It would be very helpful if you can point me to some url that has UML
diagrams for C# API. Again, the MS typical diagrams like MFC won't help much I guess here, UML would be able clear more things...

Regards,
Maulin


Nov 16 '05 #2
I typed "C# UML diagram" into Google and came up with a bunch of hits.

As well, VS2005 is coming with a bunch of code refactoring and code
design features in it, including (correct me if I'm wrong), UML-to-C#
and C#-to-UML features.

When I moved from Java to C#, it too cost me time and a bit of
frustration getting my head around the MSDN documentation format. It's
now second nature to read the stuff and figure out how to do things.

The only thing I miss is knowing--for sure--which exceptions the
various methods and properties throw. :(

Nov 16 '05 #3
Hi Bruce,

Thanks for reply.

I did the search for C# UML as well before posting but that didn't give
links where I can find UML diagram for "c# api" you know. I am not
really looking for UML generation or design features in IDE, I am
looking for diagram of the system api itself :(

But I get what you are saying, it will take time to get used to this
MSDN stuff.

I will keep looking.

Now as we are on this thread, I would ask one more question, actually I
am trying to develop Windows Forms application (not Web.UI stuff), and
I wanted to put LinkLabel in the DataColumn of DataGrid but I am not
able to do so. I got this below link where the guy extended
DataGridColumnStyle to have combobox but I can't figure out how to put
LinkLabel instead of combobox used there.
http://www.c-sharpcorner.com/winform...ataGridSKJ.asp

The issue with that example code is I have to setup too many things to
run it as its using Sql. I appreciate his sharing but I wish he would
have done it more simplistically to show an example rather than having
those sql things in there.

I copied his code and all and tried to understand by putting Enum
object in combobox but all in vein...though I now understand those
DataSet and all upto some extent. So at the end I decided to extend the
DataGridColumnStyle to put LinkLabel and copied Paint method from his
code and have mixed things right now. Here is the code which is not
working, :)
namespace TestUIApplication
{
public class LinkColumn:DataGridColumnStyle
{
int xMargin = 5;
int yMargin = 5;

private LinkLabel linkLabel;

//
// Create a new column - DisplayMember, ValueMember passed by string
//
public LinkColumn(LinkLabel linkLabel)
{
this.linkLabel = linkLabel;
}

protected override void Abort(int RowNum)
{
MessageBox.Show(new Form(),"in Abort()");
}
protected override bool Commit(CurrencyManager DataSource,int RowNum)
{
MessageBox.Show(new Form(),"in Commit()");
return true;
}
protected override void ConcedeFocus()
{
MessageBox.Show(new Form(),"in ConcedeFocus()");
}
protected override void Edit(CurrencyManager Source ,int
Rownum,Rectangle Bounds, bool ReadOnly,string InstantText, bool
CellIsVisible)
{
MessageBox.Show(new Form(),"in Edit()");
}
protected override int GetMinimumHeight()
{
return linkLabel.PreferredHeight + yMargin;
}
protected override int GetPreferredHeight(Graphics g ,object Value)
{
System.Diagnostics.Debug.WriteLine("GetPreferredHe ight()");
return FontHeight+yMargin;
}
protected override Size GetPreferredSize(Graphics g, object Value)
{
MessageBox.Show("GetPreferredSize():"+linkLabel.Te xt);
Size Extents = Size.Ceiling(g.MeasureString(linkLabel.Text,
this.DataGridTableStyle.DataGrid.Font));
Extents.Width += xMargin * 2 + DataGridTableGridLineWidth ;
Extents.Height += yMargin;
return Extents;
}
protected override void Paint(Graphics g,Rectangle
Bounds,CurrencyManager Source,int RowNum)
{
Paint(g, Bounds, Source, RowNum, false);
}
protected override void Paint(Graphics g,Rectangle
Bounds,CurrencyManager Source,int RowNum,bool AlignToRight)
{
string Text = linkLabel.Text;
PaintText(g, Bounds, Text, AlignToRight);
}

private void PaintText(Graphics g ,Rectangle Bounds,string Text,bool
AlignToRight)
{
Brush BackBrush = new SolidBrush(this.DataGridTableStyle.BackColor);
Brush ForeBrush= new SolidBrush(this.DataGridTableStyle.ForeColor);
PaintText(g, Bounds, Text, BackBrush, ForeBrush, AlignToRight);
}
private void PaintText(Graphics g , Rectangle TextBounds, string
Text, Brush BackBrush,Brush ForeBrush,bool AlignToRight)
{
System.Console.WriteLine("in paint");
Rectangle Rect = TextBounds;
RectangleF RectF = Rect;
StringFormat Format = new StringFormat();
if(AlignToRight)
{
Format.FormatFlags = StringFormatFlags.DirectionRightToLeft;
}
switch(this.Alignment)
{
case HorizontalAlignment.Left:
Format.Alignment = StringAlignment.Near;
break;
case HorizontalAlignment.Right:
Format.Alignment = StringAlignment.Far;
break;
case HorizontalAlignment.Center:
Format.Alignment = StringAlignment.Center;
break;
}
Format.FormatFlags =Format.FormatFlags;
Format.FormatFlags =StringFormatFlags.NoWrap;
g.FillRectangle(BackBrush, Rect);
Rect.Offset(0, yMargin);
Rect.Height -= yMargin;
g.DrawString("maulin", this.DataGridTableStyle.DataGrid.Font,
ForeBrush, RectF, Format);
Format.Dispose();
}

private int DataGridTableGridLineWidth
{
get
{
if(this.DataGridTableStyle.GridLineStyle ==
DataGridLineStyle.Solid)
{
return 1;
}
else
{
return 0;
}
}
}
}
}
And here is the method that loads things,

private void Form1_Load(object sender, System.EventArgs e)
{
listBox1.DataSource = this.coloursCollection;

DataSet ds = new DataSet("ColoursSet");
DataTable dt = ds.Tables.Add("ColoursTable");
dt.Columns.Add("ColoursColumn",typeof(LinkLabel));

LinkLabel ll = new LinkLabel();
ll.Name = "maulin";
ll.Text ="Maulin";

DataRow dr = dt.NewRow();
dr["ColoursColumn"] = ll;
dt.Rows.Add(dr);

GridTableStyle = new DataGridTableStyle();
GridTableStyle.MappingName = "ColoursSet";

GridTableStyle.GridColumnStyles.Add(new LinkColumn(ll));
GridTableStyle.GridColumnStyles[0].MappingName =
"ColoursTable";//EDIT ME
GridTableStyle.GridColumnStyles[0].HeaderText = "test";
GridTableStyle.GridColumnStyles[0].Alignment =
HorizontalAlignment.Left;
GridTableStyle.GridColumnStyles[0].Width = 700;
GridTableStyle.GridColumnStyles[0].NullText = string.Empty;

dataGrid1.DataSource = ds;
dataGrid1.DataMember = "ColoursTable";
dataGrid1.TableStyles.Add(GridTableStyle);
}
Please ignore my table,column names and all , its all the code after
much playing around so far and names might not make sense...
Do you have any idea how to do this? If you wish I can repost this same
thing so it appears in people's search as it would be in appropriate
thread...otherwise somebody might just go into abysmal I am in...:)
Thanks ton for helping.
Regards,
Maulin

Bruce Wood wrote:
I typed "C# UML diagram" into Google and came up with a bunch of hits.
As well, VS2005 is coming with a bunch of code refactoring and code
design features in it, including (correct me if I'm wrong), UML-to-C#
and C#-to-UML features.

When I moved from Java to C#, it too cost me time and a bit of
frustration getting my head around the MSDN documentation format. It's now second nature to read the stuff and figure out how to do things.

The only thing I miss is knowing--for sure--which exceptions the
various methods and properties throw. :(


Nov 16 '05 #4
Yes, you should probably repost with a new thread and a new title. I
haven't used DataGrid yet, so I don't really know how they work.
(However, judging from all of the posts they generate here, they're
either difficult, or popular, or both. :)

As well, since your question is specific to how to do something with a
DataGrid, you might want to post to
microsoft.public.dotnet.windowsforms.

Nov 16 '05 #5
Thank you Bruce. In Bruce we believe :)

I posted on microsoft.public.dotnet.framework.windowsforms news group.
Lets where I get...

Regards,
Maulin

Nov 16 '05 #6

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: sams | last post by:
Is there a flow draw tool/API in Java to map out a simple application flow? Tks Sam
2
by: Irlan agous | last post by:
Hello all, I suppose many people use unl for modeling. Does anybody know a free good uml tool to make sequence diagrams, from the use cases? I have use cases described, but i need a tool that...
6
by: Clay Beatty | last post by:
When you create database diagrams in Enterprise Manager, the details for constructing those diagrams is saved into the dtproperties table. This table includes an image field which contains most of...
14
by: santosh | last post by:
Hello all I want to know whether there is any greedy approach for job sequencing with variable job completion times.. if there is no greedy approach how to prove it...
2
by: Someonekicked | last post by:
I know this might not be the right group to post this question, though I am looking for any help or redirection to the right group. Its a small program, and I have to model it using state...
3
by: Alberto | last post by:
I have the professional version of visual studio 2005 and I'd like to know if I can create associations between classes in the classes diagram. Thank you.
6
by: Paul McGuire | last post by:
Back in the mid-90's, Kees Blom generated a set of railroad syntax diagrams for Python (http://python.project.cwi.nl/search/hypermail/python-1994q3/0286.html). This pre-dates any Python awareness...
0
by: craig dunn | last post by:
I've used the code from the post for a while now... but recently upgraded to SQL Server 2005. I've written a new script for SQL Server 2005, which can be found at...
4
by: Ole Nielsby | last post by:
In the old ages when I was taught Pascal, the manual had nice syntax diagrams. Each grammatical structure was shown as round boxes connected by arrows, with a model railway look, with the boxes...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.