|
You may want to start by having a quick read of the article[^] I wrote a while back on using Twitter from a WPF application using REST."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
|
|
|
|
|
|
Madhu2010Feb wrote: Can you please send sample questions to REMOVED E-MAIL.
Many of us have never used ASP.NET nor went to that exam, so whe do not know what kind of these question will be. The best bet is to know ASP.NET inside and out. And congratiolation for posting your email here, you yust got on a spam list.
Edit: I edited post, so that your email is not here, because you removed postmodified on Friday, February 26, 2010 2:36 AM
|
|
|
|
|
how to write data into a text file from a console application?
|
|
|
|
|
Maybe by using StreamWriter. On Codeproject there are a lot of articles with file reading and writing. Go out and search this site and if you can't find then start searching by using google.
|
|
|
|
|
sir/madam,
we are doing project on "DESKTOP TWITTER ACCESS".please post your suggestions on how to create it.
Thank you.
|
|
|
|
|
System.LiquidNitrogen Harvey Saayman - South Africa
Software Developer
.Net, C#, SQL
you.suck = (you.Occupation == jobTitles.Programmer && you.Passion != Programming)
1000100 1101111 1100101 1110011 100000 1110100 1101000 1101001 1110011 100000 1101101 1100101 1100001 1101110 100000 1101001 1101101 100000 1100001 100000 1100111 1100101 1100101 1101011 111111
|
|
|
|
|
code for how to read a html file into console
|
|
|
|
|
ramyakrishna k wrote: code for how to read a html file into console
what? Why would you read html with graphic content and display into graphicless console
|
|
|
|
|
Console.WriteLine("a html file"); Harvey Saayman - South Africa
Software Developer
.Net, C#, SQL
you.suck = (you.Occupation == jobTitles.Programmer && you.Passion != Programming)
1000100 1101111 1100101 1110011 100000 1110100 1101000 1101001 1110011 100000 1101101 1100101 1100001 1101110 100000 1101001 1101101 100000 1100001 100000 1100111 1100101 1100101 1101011 111111
|
|
|
|
|
Console.WriteLine(File.ReadAllText(filepath));
Luc Pattyn [Forum Guidelines] [Why QA sucks] [My Articles]
I only read code that is properly formatted, adding PRE tags is the easiest way to obtain that. All Toronto weekends should be extremely wet until we get it automated in regular forums, not just QA.
|
|
|
|
|
Hi
I have 1 User Control (With 10 Labels)
when i click on each label i want to open different forms with same Mdi Parent..
i am using Usercontrol in eg(Root form)
when i click on Root form's Usercontrol (label1,2,3......and 10)
i want Mdi Parent as (Root - Mdi parent) for all lable clicks
Even though we are able to open different forms, but it is not opening as single form within a single MDI.
Thanks in advance..
-- Modified Friday, February 26, 2010 2:28 AM
|
|
|
|
|
|
I have a DataTable that has three columns, named “Department”, “Manager”, “Employee”
The data looks like:
Accounting – John M – Mark E
Accounting – John M – Jane E
Accounting – Tim M – Bob E
Sales – Tom M – Matt E
Sales – Phil M – Jill E
And I have three combo boxes that represent each column in the DataTable:
departmentComboBox
managerComboBox
employeeComboBox
and finally I have a BindingSource that is being bound to each combo box, with each combo box’s .DisplayMember set to the proper column name
My issue: Each combo box displays 5 items... meaning the departmentComboBox shows “Accounting” three times and “Sales” twice, and similar for the other two ComboBoxes.
How can I have each ComboBox display only the unique and appropriate items based on the BindingSource’s current position? So if the first row is my current position in the DataTable, the combo boxes should have:
departmentComboBox = {“Accounting”, “Sales” } (with “Accounting” selected)
managerComboBox = {“John M”, “Tim M”} (with “John M”) selected)
employeeComboBox = {“Mark E”, “Jane E”} (with “Mark E” selected)
The only way I’ve seen that I might be able to do this is by having three DataTables and create a relationship between each of them, but I was hoping there was a more direct way...
Thank you all for your time,
Matt
|
|
|
|
|
write your unique data display logic in event handler of DataBinding event. Thanks,
Arindam D Tewary
|
|
|
|
|
Are there any methods available in Diagnostics or other class that will output the function name when it is entered/left? I need to trace execution through some spaghetti code I've inherited, and I'm hoping to avoid hand-coding enter/leave WriteLines.
|
|
|
|
|
You could use the debug method.
For more information, see here[^].Me, I'm dishonest. And a dishonest man you can always trust to be dishonest. Honestly. It's the honest ones you want to watch out for...
|
|
|
|
|
|
Hi,
Something like this should do the trick;
System.Diagnostics.Debug.WriteLine(
new System.Diagnostics.StackTrace().GetFrame(0).GetMethod().Name);
or, if you wanted to put this in a utility funtion;
public static string GetCurrentMethodName()
{
return new System.Diagnostics.StackTrace().GetFrame(1).GetMethod().Name;
}
You've already looked at log4net? I found it to be a real help, combined with OneNote I are Troll
|
|
|
|
|
You might find Spring.NET's AOP support useful. I've used the Java equivalent, but not the .NET version. It allows you to instrument existing code to add functionality such as you describe, without having to change the existing source.
I don't really like AOP but it can be useful for situations like this.
|
|
|
|
|
Hi,
I previously created clickable thumbnails by assigning them to a picturebox instance and
then adding them to the flowlayoutpanel.
So i now i decided to experiment with listview control and ImageList control. I would like to display the thumbnail and the image title. Then once you click on the thumbnail the image appears at its original resolution.
But i'm having some issues and I would appreciate if you could help me please regarding this?
Firstly, I am trying to use an exisiting class that I created which would take in the filepath of the selected image which would then allow me to view the image at its original resolution.
Intially the problem i had regarding the listview was when i click on an image, the selected image didnt come up, another image came up.
For example i loaded 2 images. One called GoldFish.jpg and the other Rabbit.jpg. But when i click on Goldfish, rabbit appears instead.
When i click on Rabbit, Rabbit appears as expected. I think it is something to do with the index possibly?
I have now modified the code so that the in the ImageList i add the key and the actual image. So i decided to store the filepath and the thumbnail.
Regarding the ListView i decided to store the filename along with the filePath e.g "rabbit.jpg", "c:\\sample\\rabbit.jpg"
I then used the mouse click event to access the filePath and pass it into another form.
The following snippet is also causing an issue too:
/if i take this code out, the thumbnails are not displayed but if i click on
for (int j = 0; j < pathes.Length; j++)
{
this.listView1.Items[j].ImageIndex = j;
}
But if i use the above code then the thumbnails appear but when i click on the image i get the following error message on the click event of the list view.
"Path is not of legal form".
I just want to display the thumbnail images with the filename and when you click on the image you can view the image at
its original resolution.
Here is my full code.
private void Form1_Load(object sender, EventArgs e)
{
imageList1.ImageSize = new Size(108, 108);
imageList1.ColorDepth = ColorDepth.Depth24Bit;
string[] pathes = new string [] { @"c:\\sample\\Goldfish.jpg", @"c:\\sample\\Rabbit.jpg" };
foreach (string path in pathes)
{
string[] currentPath = path.Split(new char[] { '\\' });
string fileName = currentPath[currentPath.Length - 1];
Image thumbnail = ThumbnailCreator(path);
imageList1.Images.Add(path,thumbnail);
listView1.Items.Add(fileName,path);
}
for (int j = 0; j < pathes.Length; j++)
{
this.listView1.Items[j].ImageIndex = j;
}
this.listView1.View = View.LargeIcon;
this.listView1.LargeImageList = imageList1;
}
private void Image_click(object sender, EventArgs e)
{
listView1 = (ListView)sender;
String thePath = ((string)((Control)sender).Tag);
ImageViewer imageViewer = new ImageViewer(thePath);
imageViewer.Show();
}
private void listView1_MouseClick(object sender, MouseEventArgs e)
{
try
{
ListView.SelectedListViewItemCollection slvc = listView1.SelectedItems;
string apath = slvc[0].ImageKey;
ImageViewer iv = new ImageViewer(apath);
iv.Show();
}
catch (Exception ex)
{
MessageBox.Show(ex.Message);
}
}
I would also like to draw the thumbnails whilst maintaining the aspect ratio.Any advice on this please?
Thanks in advance.
|
|
|
|
|
you used line:
string[] pathes = new string [] { @"c:\\sample\\Goldfish.jpg", @"c:\\sample\\Rabbit.jpg" };
Lose either @ or replace '\\' to '\'. If you use @, then string will ignore escape characters.
|
|
|
|
|
Hi, thanks for the advice. I amended the file path as you advised by using just '\' and it appears to be working. I had to set to the listview properties such as View and LargeIcon before the creation of the images.
|
|
|
|
|
Hello,
I build a service in c# .Net and I also build setup for my service.
I install the service and i add that service to my service windows.
When i try to start the service i get a message that the process don't have job to do.
What can be the problem? Somebody knows maybe?this is known error?
Thank you.
|
|
|
|
|
noamtzu00 wrote: What can be the problem? Somebody knows maybe?this is known error?
Don't Know., Nope and nope
That is bad question. Does it throw exception? also did you consider remote debug?
|
|
|
|
|
i get a message that the process don't have job to do.
|
|
|
|