|
A very interesting development to this whole story about a month after this thread was posted. I was offered a position from 2 separate departments, including the one that turned me down!!!
I hounded the guy who turned me down for some feedback. When I got the feedback he indicated that he had hoped to see OOP, logging, extensive error checking and some "show[ing] off".
I rewrote the solution with those specs in mind and sent them back to him. Not long afterwards both he and a manager from another department contacted me to know if I was still interested and available!!! However, I had just accepted a new position with a different employer as a consultant and I turned down the offers. But I left the door open and agreed to keep in contact for future opportunities.
I hope to write the article as you suggested, but I thought you might be intested in the resolution to the whole debacle. Thanks for your feedback and encouragement. I'll post the re-write code later - maybe on another thread so more people will be likely to see it and benefit from it.
|
|
|
|
|
how can i use serial port component with wpf form?i cant add serialport component to wpf form.i create serialport object but i cant create it s data received eventhow can i control serialport with wpf form?(i mean " .xaml.cs "file).
|
|
|
|
|
System.IO.Ports.SerialPort serialPort = new System.IO.Ports.SerialPort();<br />
<br />
:confused:<br />
|
|
|
|
|
ok i write this code.but i cant create data received event.where will i create data received event?please can you write me.which file and how will i write datareceived event?
|
|
|
|
|
Have you ever taken a look at the designer form of Window you are constructing. You can see how Visual Studio creates/modifies/adds events to all controls of the form. For example for a button control it would be something like this:
Button b=new Button();
this.b.Text="This is some sample text";
//example event code
this.b.Click += new System.EventHandler(this.button1_Click);
this.Controls.Add(this.button1);
All you would have to do is to find the event details in the Object Browser and then setup the even similar to that above but specific to the serialport.
Regards,
Thomas Stockwell
Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning.
Visit my homepage Oracle Studios[ ^]
|
|
|
|
|
Hi all,
I have one xml file in that i had two nodes one for values and one for texts
for one particular value particular text has to be display
can any body help in situation
thanks and regards,
Subbu.
|
|
|
|
|
What have you tried ? ASP.NET is irrelevant, you read Xml using The XmlDocument class, typically. Then you find your node using XPath.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
There is a lot of ways to read from XML. I can adise using SERIALIZATION.
public static ArrayList SoapDeSerializeArrayList(string Path)<br />
{<br />
ArrayList L;<br />
IFormatter soapFmt = new SoapFormatter();<br />
Stream s = File.Open(Path, FileMode.Open);
L = soapFmt.Deserialize(s) as ArrayList;<br />
s.Close();<br />
return L;<br />
}
After this method, you will recieve an arrray list, with values from your file. To get values directly, upack them, for examle:
((myclass)ArrayList[index]).SomeValue
I hope, it will help you somehow
One nation - underground
|
|
|
|
|
Hi everyone,
I have this read-only DataGrid (ReadOnly property set to true), but when the user selects a cell by clicking on it, the text of the cell is automatically selected, as if it could be edited.
How can I do something more like a ListView, without this text selection?
Thanks!
|
|
|
|
|
You want read only datagrid or no selection on datagrid text? Because, you can also select text on read only datagrid.
|
|
|
|
|
"without this text selection"
I don't want any text selection to occur when I select cells on my DataGrid.
|
|
|
|
|
Change SelectionMode to FullRowSelect
Now when the user selects a row, the entire thing is highlighted. They are unable to select the text of individual cells.
Pualee
|
|
|
|
|
The DataGrid doesn't have a SelectionMode property.
|
|
|
|
|
Sorry, I must not have read closely.
Is there any reason you are using the DataGrid instead of the DataGridView? I know there are a lot of enhancements made, but am unfamilar with anything pre 2.0 Framework at this time.
Pualee
|
|
|
|
|
Well I have Visual Studio 2003 and I work with Framework 1.1. Is there an easy way of using Framework 2.0 without buying VS 2005?
Thank you!
|
|
|
|
|
Did you try the method I put in the reply below using the event? I would suggest researching further using the DataGrid if you are in 2003, but if you are interested in framework 2.0 ...
I think the download for the framework is free so you could always build everything programatically using a text editor. Since you likely won't want to do that you could try the Visual C# 2005 Express Edition which is free, but has a few limitations. Finally, you could try downloading the 2.0 framework and using it with the 2003 IDE, but I do not know what side effects you would see there.
If you are using 1.1, I assume your clients are expected to have 1.1 installed as well. If you change to 2.0, you would also change your runtime requirements for your clients, which I am not sure you want to do. Also, I have no idea what the licensing requirements will be if you ever plan to deploy your application.
Pualee
|
|
|
|
|
Looking briefly, I don't see a similar property on the DataGrid. Maybe someone else could help you there. However, you could try the following to get a similar effect:
Override the SelectedIndexChanged event so that it sets the index on the row selected (overriding the cell selection) with the SelectedIndex property. As a disclaimer, I really don't know if this would unselect the cell.
Pualee
|
|
|
|
|
Hi there,
I am using .NET 2.0 with C#.
I have a master page that I use across a couple of pages. Every web pages that uses this master page will have a different title, and maybe different meta key words and meta descriptions, etc.
I found a way of changing this, but I am not sure if this is the best way to do it??
In the code behind of my master page, I have various properties to set the page header, meta key words, meta description, meta identifier URL, meta robots, meta content language, and meta distribution. I have only included the properties of the page header and meta keys words, the rest works on the same principle:
// Properties (partial)
public HtmlHead PageHeader
{
get { return (HtmlHead)Page.Header; }
}
public string MetaKeywords
{
set
{
HtmlMeta keywords = new HtmlMeta();
keywords.Name = "keywords";
keywords.Content = value;
PageHeader.Controls.AddAt(2, keywords);
}
}
Lets say I have a default.aspx that uses this master page, then I would declare <%@ MasterType VirtualPath="~/App_MasterPages/AppMaster.master" %> at the top of the .aspx file. And then in the default.aspx.cx code behind file I would have the following partial piece of code in a method that sets the title and meta key words (called from Page_Load):
// Add the page title to the header element
Page.Title = "MyWebsite | Welcome";
// Add meta elements to the header element
Master.MetaKeywords = "keyword 1, keyword 2, keyword3";
Is there another way of doing this??
Please can someone advise me?
Regards
ma se
|
|
|
|
|
Maybe the guys from the ASP .NET forum...
|
|
|
|
|
I write a program of find next and highlight it just like in word document. This task can be done using string function.
Anyone tell me about these string function .What are its name and how many parameter they can take
life is so sweet
|
|
|
|
|
sweetcapri wrote: Anyone tell me about these string function .What are its name and how many parameter they can take
Yes. I can answer that question.
It is called IndexOf[^] and it takes 2 parameters.
|
|
|
|
|
Hi there,
I am using .NET 2.0 with C#.
When I create a new master page, the following namespaces are added automatically:
using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
And then the other necessary code:
public partial class App_MasterPages_Website : System.Web.UI.MasterPage
{
protected void Page_Load(object sender, EventArgs e)
{
}
}
Are all those namespaces required?? What would be best, to remove them all except using System; and add just the necessary namepaces as what I need them?? I see the same namespaces are included when I add a new web page.
The reason why I am asking is because I want to keep my code as clean as possible.
Please can someone advise me?
Regards
ma se
|
|
|
|
|
ma se wrote: Are all those namespaces required??
No.
ma se wrote: What would be best, to remove them all except using System; and add just the necessary namepaces as what I need them??
Sounds like a good plan.
ma se wrote: The reason why I am asking is because I want to keep my code as clean as possible.
Please can someone advise me?
Yes. Keep your code as clean as possible.
|
|
|
|
|
|
It's a matter of taste. Most of them are not required, but a using statement doesn't add anything to the generated code, so they don't do any harm either.
Actually none of them are strictly required, so you can remove all of them if you like, but then you have to specify the namespace for all classes that you use, like for example System.EventArgs.
I usually remove the ones I rarely use and leave the ones that I regularly use, and end up with:
using System;<br />
using System.Collections.Generic;<br />
using System.Web;<br />
using System.Web.UI;<br />
using System.Web.UI.WebControls;<br />
using System.Web.UI.HtmlControls;
---
single minded; short sighted; long gone;
|
|
|
|