|
Hi all.
I'm about to start enhancing/debugging a VS2008 solution (am contracting at the moment and this is an urgentzzz (lol) jhob)
Does anyone know of a free application that will take a project and create a map of calling/called classes/methods? Basically so I don't have to trawl through and create my own.
Cheers
PS am a UK programmer, not an Indian university student with some homework to do.
|
|
|
|
|
The puppy you are looking for is NDepend[^].
"WPF has many lovers. It's a veritable porn star!" - Josh Smith As Braveheart once said, "You can take our freedom but you'll never take our Hobnobs!" - Martin Hughes.
My blog | My articles | MoXAML PowerToys | Onyx
|
|
|
|
|
Thank you - looks good.
I take it you use it yourself?
|
|
|
|
|
Oh yes. We use it to quality check our code.
"WPF has many lovers. It's a veritable porn star!" - Josh Smith As Braveheart once said, "You can take our freedom but you'll never take our Hobnobs!" - Martin Hughes.
My blog | My articles | MoXAML PowerToys | Onyx
|
|
|
|
|
hi All,
I have an issue for which i need some guidance/help. I've tried to be concise but please excuse me if you do not find it so.
I have a windows service which interacts with ms-office (and other) applications using their API.
I usually switch-off interactivity support if provided by the library/API so that no messagebox's are thrown during execution.
However, occasionally due to an unforeseen situation, we get a msgbox pop-up which blocks the service thread.
Given the nature of the application, its difficult to identify if the thread is blocked due to a message box or due to some processing overhead in the 3rd party application.
one of the solutions i thought of is as follows - implement a monitoring thread to check if the office app does not return control. if control is not returned within a given interval, kill the app and exit the task(which is not best but feasible most of the times)
however this seems more of a brute-force approach and it doesnt tell me what the issue is.
In some of the cases the issue may not be reproducible immediately.
Is there a more graceful approach?
has anyone resolved such an issue earlier on how to identify the above situation?
Thanks in advance
Kalyan
|
|
|
|
|
Yes, don't directly access the office applications themselves at all in services and this will not happen.
Any time you make calls to an application you run the risk of a dialog box coming up because those apps are made to interact at the UI layer with people.
Sorry, that's just the way it is.
Apps are made for PEOPLE to use... not services
|
|
|
|
|
Thanks Ray.
Unfortunately, my application will have to live with it for now.
Thanks for your reply.
|
|
|
|
|
another problem for me.. i recently read that in .net it supports 16 bytes maximum for a value type as it's capacity, so what happen if the structure exceed this limit , i know that there will be a performance issue due to pass by value, but i want to know how the stack reacts for this kind of situation.
|
|
|
|
|
Nonsense. Look at this example[^].
Luc Pattyn [Forum Guidelines] [Why QA sucks] [My Articles]
I only read formatted code with indentation, so please use PRE tags for code snippets.
I'm not participating in frackin' Q&A, so if you want my opinion, ask away in a real forum (or on my profile page).
|
|
|
|
|
thanx Luc, i got to know that there are structures that can grow with out limit, and i don't know whether my question is not clear,what i wanted to know was when the struct is growing what happens in the stack , because as i know there is a limit for struct so when it exceeds there should be something happening restricting to create it or nothing ... thanx.
|
|
|
|
|
The stack size is fixed when a thread gets created; it defaults to 1MB. I hope you are not considering value types that come anywhere close to that?
Luc Pattyn [Forum Guidelines] [Why QA sucks] [My Articles]
I only read formatted code with indentation, so please use PRE tags for code snippets.
I'm not participating in frackin' Q&A, so if you want my opinion, ask away in a real forum (or on my profile page).
|
|
|
|
|
ok i agree with your point , there will be no value type comes near to 1mb, then why they have imposed a restriction saying the structure should be 16 bytes max, is that only because of performance ...
|
|
|
|
|
performance when passing method parameters and return values
Luc Pattyn [Forum Guidelines] [Why QA sucks] [My Articles]
I only read formatted code with indentation, so please use PRE tags for code snippets.
I'm not participating in frackin' Q&A, so if you want my opinion, ask away in a real forum (or on my profile page).
|
|
|
|
|
i am passing information from listbox to another listbox in a different form by just pass using system
this is the code i'm passing with
string[] items = new string[lstSelectedItems.Items.Count];
amoun = txtAmount.Text;
lstSelectedItems.Items.CopyTo(items, 0);
FrmOrderDetails order = new FrmOrderDetails(txtAmount.Text,items);
order.Show();
this is the code in a form that i want to accept the data am passing
string it;
private string totalprice;
public string Totalprice
{
get { return totalprice; }
set { totalprice = value; }
}
public FrmOrderDetails(string tprice, string[] items)
{
InitializeComponent();
it = items.ToString();
tprice = Totalprice;
private void FrmOrderDetails_Load(object sender, EventArgs e)
{
totalprice = txtTotalPrice.Text;
lstOrderDetails.Items.Add(it);
}
|
|
|
|
|
And your question is?
Henry Minute
Do not read medical books! You could die of a misprint. - Mark Twain
Girl: (staring) "Why do you need an icy cucumber?"
“I want to report a fraud. The government is lying to us all.”
Why do programmers often confuse Halloween and Christmas?
Because 31 Oct = 25 Dec.
|
|
|
|
|
|
The problem in your code is this
it = items.ToString();
line.
items.ToString() will give "System.String[]" (in other words a description of the Type you are using not its contents). Not what you want, I suspect.
Investigate the String.Join() method for one possible solution.
Henry Minute
Do not read medical books! You could die of a misprint. - Mark Twain
Girl: (staring) "Why do you need an icy cucumber?"
“I want to report a fraud. The government is lying to us all.”
Why do programmers often confuse Halloween and Christmas?
Because 31 Oct = 25 Dec.
|
|
|
|
|
nowhere to be seen.
Luc Pattyn [Forum Guidelines] [Why QA sucks] [My Articles]
I only read formatted code with indentation, so please use PRE tags for code snippets.
I'm not participating in frackin' Q&A, so if you want my opinion, ask away in a real forum (or on my profile page).
|
|
|
|
|
ask a proper question and/or give precise symptoms, and please use PRE tags to show code snippets.
Maybe what you need is similar to
lb2.Items.Add(lb1.SelectedItems);
Luc Pattyn [Forum Guidelines] [Why QA sucks] [My Articles]
I only read formatted code with indentation, so please use PRE tags for code snippets.
I'm not participating in frackin' Q&A, so if you want my opinion, ask away in a real forum (or on my profile page).
|
|
|
|
|
Suppose there is an element in XML data:
<abc:xyz:name attr="value"/>
I'm trying to read it with XmlReader. The problem is that I get XmlException that says:
The ‘:’ character, hexadecimal value 0x3A, cannot be included in a name
I have already declared "abc" namespace. I have also tried adding "abc:xyz" and "xyz" namespaces. But this doesn't help at all. I could replace some text before parsing but there may be some more elegant solution. So what should I do?
Here is my code:
XmlReaderSettings settings = new XmlReaderSettings()
NameTable nt = new NameTable();
XmlNamespaceManager nsmgr = new XmlNamespaceManager(nt);
nsmgr.AddNamespace("abc", "");
nsmgr.AddNamespace("xyz", "");
XmlParserContext context = new XmlParserContext(null, nsmgr, null, XmlSpace.None);
XmlReader reader = XmlReader.Create(path, settings, context);
|
|
|
|
|
Actually, .NET tells you what is wrong.
According to the XML 1.0 specification, a QName is a qualified or an unqualified name. A qualified name consist of a prefix, and this prefix is a NCName: it cannot contain colons (':').
So what you're asking would not be possible: it's not valid XML to begin with.
See also http://www.w3.org/TR/REC-xml-names/#Conformance[^], where it says :
It follows that in a namespace-well-formed document:
* All element and attribute names contain either zero or one colon;
* No entity names, processing instruction targets, or notation names contain any colons.
Nested XML namespaces are much simpler:
<an:elem><another:one></another:one></an:elem>
|
|
|
|
|
I have a form with a listbox bound to a sql database. I use a dataset to fill the listbox.
I need to have it multiselect and return the data selected. Trying to test this in a messagebox it returns dataview objects and mot the data selected.
Any ideas
Mike
|
|
|
|
|
You need to use the SelectedItems property.
See here.
|
|
|
|
|
Thanks for that reply, I see that and have ammended my code as such, I am making headway though. I can now return the corect amount of selected items but it only returns the top item that many times.
Any ideas from virewing my code.
private void AddData(System.Data.DataRow row, System.Data.DataRow row2)
{
StringBuilder strb = new StringBuilder();
string str1 = "";
object missing = System.Type.Missing;
if ((checkBox1.Checked) || (checkBox2.Checked))
{
MessageBox.Show("There are no rows to insert");
}
else
{
Microsoft.Office.Interop.Word.Selection selection = Globals.ThisDocument.Application.Selection;
int count = Globals.ThisDocument.Tables.Count;
if (selection.Tables.Count > 0)
{
Microsoft.Office.Interop.Word.Row newRow = Globals.ThisDocument.Tables[count].Rows.Add(ref missing);
newRow.Range.Font.Bold = 0;
newRow.Range.ParagraphFormat.Alignment =
Microsoft.Office.Interop.Word.WdParagraphAlignment.wdAlignParagraphLeft;
newRow.Cells[2].Range.ParagraphFormat.Alignment =
Microsoft.Office.Interop.Word.WdParagraphAlignment.wdAlignParagraphRight;
newRow.Cells[1].Range.Text = row["HSActionPlanSubHeader"].ToString();
foreach (DataRowView itm in this.itemDescriptionListBox.SelectedItems)
{
str1 = row2["ItemDescription"].ToString();
strb.Append(str1);
}
newRow.Cells[2].Range.Text = strb.ToString();
}
else
{
MessageBox.Show("Cursor must be within a table.",
"Actions Pane", MessageBoxButtons.OK, MessageBoxIcon.Error);
}
}
}
|
|
|
|
|
I did not analyze your code, however this struck me:
surfluds wrote: foreach (DataRowView itm in this.itemDescriptionListBox.SelectedItems)
{
//newRow.Cells[2].Range.Text = row2["ItemDescription"].ToString();
str1 = row2["ItemDescription"].ToString();
strb.Append(str1);
}
itm is enumerating a collection, however you don't use it anywhere???
Luc Pattyn [Forum Guidelines] [Why QA sucks] [My Articles]
I only read formatted code with indentation, so please use PRE tags for code snippets.
I'm not participating in frackin' Q&A, so if you want my opinion, ask away in a real forum (or on my profile page).
|
|
|
|