|
Never worked with Delphi so I can't comment on your friends opinion. However it just takes a creative mind and good graphics to create whatever you want to create. This includes unbounded windows that take on unique shapes. When I was finished with one of my applications, many of the users thought it was a web application instead of a Windows Form application.
You can also change the appearance of various controls by making your own inherited controls.
Finally you can get a control set like Infragistics and use their controls.
|
|
|
|
|
Do you Know anywhere I can download some sasmples ???
Mr.K
|
|
|
|
|
I believe a search on MSDN would find a tutorial for non-standard forms.
And for better, artsier controls just google Infragistics.
|
|
|
|
|
|
I'll try and put it as clear as possible. I think it's quit complicated.
I have 2 dataset from which I want to make 1 filtered dataset.
...
I have a dataset that was generated from an external system with all users and data in them. this dataset is a return value and cannot be changed from the source.
The second dataset contains a series of data that came from a table we made ourselves, to keep extar data. The second dataset is just limited in number, because it only contains users with certain criteria.
My question now is how do I make a result dataset from the full (1st) dataset with just the users from the limited (2nd) dataset so I only get the users for that particular criteria. So I need the data from the 1st dataset, but filtered. both datasets have a common ID field (GUID)
can anyone help me?
|
|
|
|
|
This answer will require that you do some further research on MSDN regarding disconnected datasets.
Assuming your have some knowledge of SQL you need to join the two databases as a single disconnected dataset. This assumes, of course, that you can join them. Your isolation on your second dataset would be WHERE ... users meet criteria ...
|
|
|
|
|
how can i popup a menu on some given coordinate? Thanks.
|
|
|
|
|
popup.Location = new Point(x,y);
|
|
|
|
|
Hello,
We are building a windows desktop application using C#
that reads in an xml file, to create a user interface.
The user then enters values into the user interface.
We want to be able to save an xml file with the same
schema as the original xml file, but with the users
entered values into it.
Here is a simple example as part of input document:
<label>
<name>Needs Cleaning</name>
<type>radio</type>
<value>
<choicelist>yes</choicelist>
<choicevalue></choicevalue>
<choicelist>no</choicelist>
<choicevalue></choicevalue>
</value>
</label>
We would want the output document to contain:
<label>
<name>Needs Cleaning</name>
<type>radio</type>
<value>
<choicelist>yes</choicelist>
<choicevalue>yes</choicevalue>
<choicelist>no</choicelist>
<choicevalue></choicevalue>
</value>
</label>
or perhaps
<label>
<name>Needs Cleaning</name>
<type>text</type>
<value>
<single>yes</single>
</value>
</label>
We aren't too adept at xmlTextReaders and xmlTextWriters yet,
and have been doing some research in Google.
There was an interesting article that seemed pertinent to this, but
it dealt with C++ :
http://www.codeproject.com/csharp/dcinsertxml.asp
Any help would be appreciated.
Thank you!
Anne
|
|
|
|
|
The use of XmlTextReader and XmlTextWriter is more for loading and persisting the data. You would load the data into an XmlDocument and then modify it there. You should also be aware of the fact that your Xml is not well-formed. You cannot have value containing two instances of choicelist and choicevalue. You need to do something like
<ListValues>
<Values>
<choiceList />
<choiceValue />
</Values>
<Values>
<choiceList />
<choiceValue />
</Values>
</ListValues>
IMHO -- Navigating the DOM is a PITA. I prefer to avoid it whenever possible....especially if your application is creating/destroying xml objects quite alot. (You see the Xml engine in 2002, 2003 VS leaks memory)
A really simple approach ( I like KIS ) is to create an object that represents your data and use XmlSerializer to populate/persist the data. Then your access of the data is normal object technology and you are saved from actual node/child navigation. The sample below is only from shear memory (my VS machine is dead) so the exactness is not guarenteed.
[Serializable()]
public class lable
{
public string name{get; set;}
public string type{get; set;}
public Value value{get; set;}
}
[Serializable()]
public class ValueList:List<Values>
{
}
[Serializable()]
public class Values
{
public string choiceList{ get; set; }
public string choiceValue{ get; set; }
}
public class XmlAccessor
{
public lable GetData(string path);
{
using (FileStream stream = new FileStream(path, FileMode.Open))
{
XmlSerializer ser = new XmlSerializer(typeof(lable));
lable Lable = (lable)ser.Deserialize(stream);
}
return Lable;
}
public void PutData( string path, lable item )
{
using (FileStream stream = new FileStream(path, FileMode.Create))
{
XmlSerializer ser = new XmlSerializer(typeof(lable));
ser.Serialize(stream, item);
}
}
My only recommendation....if possible I'd change the casing on the lables so that they are Pacal cased.
|
|
|
|
|
Maybe these piece of code will help you:
1) if you want create xml file with C# you can use example:
XmlDocument myXml = new XmlDocument();<br />
string xml_text = "<?xml version=\"1.0\" standalone=\"yes\"?>"+<br />
"<!DOCTYPE label ["+<br />
"<!ELEMENT name (#PCDATA)>"+<br />
"<!ELEMENT type (#PCDATA)>"+<br />
"<!ELEMENT value (choicelist+,choicevalue+)>"+<br />
"<!ELEMENT choicelist (#PCDATA)>"+<br />
"<!ELEMENT choicevalue (#PCDATA)>"+<br />
"<label></label>";<br />
<br />
myXml.LoadXml(xml_text);
2) if you want open xml document use exmaple:
XmlDocument myXml = new XmlDocument();<br />
XmlTextReader reader = new XmlTextReader(file_name);<br />
myXml.Load(reader);<br />
reader.Close();
3) if you want save you xml document you can use example:
XmlTextWriter writer = new XmlTextWriter("output.xml",null);<br />
writer.Formatting = Formatting.Indented;<br />
dokumentXml.Save(writer);<br />
writer.Close();
Best way to learn this is MSDN like http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vbcon/html/vborixmlschemadesignerwalkthroughs.asp
|
|
|
|
|
I want to write an application that will enable me to chat between the PC and mobile phone. I want to write the PC app in C# and the mobile app will have to be written in J2ME. I can setup a normal bluetooth link between the phone and PC in windows, so I don't think I'll have to do device discovery in C#.
I'm pretty new to bluetooth development so any help / ideas will be appreciated.
|
|
|
|
|
It took no more than 30 seconds to google Bluetooth SDK[^] and get an answer. Since the technology is proprietary you are reliant upon having an external resource make it a C#-accessible resource.
|
|
|
|
|
Hi all,
i have a URL and i want to get the html from that location.
then i want to be able to get the BODY part and look for something there.. if posible (using some parsers) i want to get the links there and other stuff too.
but how do i connect from HTMLdocument and downloading the url?
Thanks alot,
Ran.Z.
R.Z
|
|
|
|
|
The only parser that I've come across built into the framework is the System.Windows.Forms.WebBrowser control where you can navigate to a page and then use the WebBrowser.Document property to retrieve the HTMLDocument.
If this is OTT then the only other solution would be to write a simple parser, maybe use some Regular Expressions but at least the WebBrowser will take into consideration some badly formatted HTML.
If only everyone wrote in XHTML then we could use the XmlDocument class...
Ed
|
|
|
|
|
|
thanks alot.
haven't tried it yet but it may do the job.
also the message posted before that.
thank you both
Ran.Z.
R.Z
|
|
|
|
|
Also see this[^] article which is a framework for retrieving information from the web, which seems like what you appear to be doing.
(Its MFC analog can be found here[^] and several applications of this class can be found here[^].)
/ravi
My new year's resolution: 2048 x 1536
Home | Music | Articles | Freeware | Trips
ravib(at)ravib(dot)com
|
|
|
|
|
I've got a problem.
How can I pass variables from ReadInput function to ReadOutput function via struct?
Please help.
using System;
using System.Collections.Generic;
using System.Text;
using System.Threading;
namespace ConsoleApplication9
{
class Program
{
static string m1 = "\nType a string of text then press Enter. " +
"Type '+' anywhere in the text to quit:\n";
static string m2 = "Character '{0}'";
static string m3 = "Character ";
public struct ThreadFuncParameters
{
public char ch;
public int x;
public bool isM1 ;
public bool isM2 ;
public bool isM3 ;
}
static void Main(string[] args)
{
Console.WriteLine(m1);
ThreadFuncParameters pas = new ThreadFuncParameters();
pas.ch = 'a' ;
pas.x = 0;
pas.isM1 = false;
pas.isM2 = false;
pas.isM3 = false;
Thread t1 = new Thread(new ParameterizedThreadStart(Program.ReadInput));
Thread t2 = new Thread(new ParameterizedThreadStart(Program.ReadOutput));
Console.WriteLine("Thread 1 starting...");
t1.Start(pas);
Console.WriteLine("Thread 2 starting...");
t2.Start(pas);
}
public static void ReadInput(object paramALL)
{
ThreadFuncParameters par = (ThreadFuncParameters)paramALL;
char p1 = par.ch;
int p2 = par.x;
bool p3 = par.isM1;
bool p4 = par.isM2;
bool p5 = par.isM3;
do
{
p2 = Console.Read();
try
{
p1 = Convert.ToChar(p2);
if (Char.IsWhiteSpace(p1))
{
p5 = true;
if (p1== 0x0a)
p3= true;
}
else
p4 = true;
}
catch (OverflowException e)
{
Console.WriteLine("{0} Value read = {1}.", e.Message, p2);
p1 = Char.MinValue;
Console.WriteLine(m1);
}
} while (p1!= '+');
ch = p1;
x = p2;
isM1 = p3;
isM2 = p4;
isM3 = p5;
}
public static void ReadOutput(object paramALL)
{
ThreadFuncParameters par = (ThreadFuncParameters)paramALL;
char p1 = par.ch;
int p2 = par.x;
bool p3 = par.isM1;
bool p4 = par.isM2;
bool p5 = par.isM3;
if (p5)
{
Console.WriteLine(m3, p2);
}
if (p3)
{
Console.WriteLine(m1);
}
if (p4)
{
Console.WriteLine(m2, p1, p2);
}
}
}
}
eric
-- modified at 7:54 Wednesday 19th April, 2006
|
|
|
|
|
I'd say your ReadInput thread would end as soon as someone types '+'.
Your ReadOutput thread would end almost as soon as you started it.
To keep your threads alive you need to keep them doing something. So once your thread is initialized, you need to manage it with a while loop:
bool notTerminated = true;
public bool NotTerminated { get; set; }
while ( NotTerminated )
{
Threading.Thread.Sleep(50);
}
Your loader program (containing Main()) would handle the passage of data.
So it would sit in a while loop looking to see if there is something to move out of the first thread. If there is, then it moves it to the second thread and that thread does it's thing.
You could use the get; set; logic for the payload in thread one to change the state for notifying the Main() process.
private bool dataAvailable;
private DataClass mydataload;
public DataClass PayLoad
{
get {
if (dataAvailable)
{
dataAvailable = false;
return mydataload;
} else return null;
set {
dataAvailable=true;
PayLoad = value; }
}
This snippet can be supported in both threads. Your Main() thread checks the state of available data in thread one. Thread two in it's main loop checks it's own state for DataAvailable.
-- modified at 11:26 Wednesday 19th April, 2006
|
|
|
|
|
Thanks so much
I try now
eric
|
|
|
|
|
Hello everyone!
I've finished a windows application and started creating a setup project (VS 2005). Everything works fine: application gets installed and links in startmenu are created. But I don't know how to create a link for uninstallation of my application in the startmenu.? Searched MSDN but without any luck.
Thanks in advance!
www.troschuetz.de
|
|
|
|
|
hi
can anyone help in providing sample code in asp.net1.1 or 2.0 and c# for a discussion forum
|
|
|
|
|
Are you serious? You expect the full code for a discussion forum to be posted here in this message??
There are literally hundreds (if not thousands) of examples of discussion forums, many of which will be open source, if you search the web.
|
|
|
|
|