|
thanks for the solution 
|
|
|
|
|
hi every one ,
if i have any combobox filled with column in any table (MemeberValue, DataSource, DisplayName)
and i need to change the text of this combo if i know the MemeberValue(ID).
how can i do that ??
|
|
|
|
|
That will depend on what UI you are using, winforms/wpf/silverlight/asp and that is just the common ones.
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
|
When you want to change the text? When _SelectedIndexChanged event fired?
|
|
|
|
|
hello i am writing an that application that can read a pdf file, get values from a pdf file and display in the application. . sofar i cannot retrive it on the pdf controler. please help
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
namespace WindowsFormsApplication13
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
private void button1_Click(object sender, EventArgs e)
{
OpenFileDialog dialog = new OpenFileDialog();
dialog.Filter = "PDF document (*.pdf)|*.pdf";
DialogResult result = dialog.ShowDialog();
if (result == DialogResult.OK)
{
try
{
string pdfFile = dialog.FileName;
//this.axFoxitReaderOCX1.LoadFromFile(javascript.pdf);
}
catch (Exception exe)
{
MessageBox.Show(exe.Message, "Spire.PdfViewer Demo", MessageBoxButtons.OK, MessageBoxIcon.Error);
string path = @"C:\users\library\livhuwani\Documents\books.pdf";
System.Diagnostics.Process.Start("", path);
}
}
}
}
}
|
|
|
|
|
So, basically, you haven't done anything?
Start here: Extract Text from PDF in C# (100% .NET)[^] and come back when you have a specific problem - we aren't going to do it all for you!
Those who fail to learn history are doomed to repeat it. --- George Santayana (December 16, 1863 – September 26, 1952)
Those who fail to clear history are doomed to explain it. --- OriginalGriff (February 24, 1959 – ∞)
|
|
|
|
|
livhuone wrote: sofar i cannot retrive it on the pdf controler. please help I'm sorry but you need to give specific details of where in your code the errors occur, and exactly what they are.
|
|
|
|
|
Hello,
I am writing a lengthy list of all of the folders to a List<string>. I am doing that on BackgroundWorker1. I have a second background worker that sleeps for one minute and then starts pulling the information to the list. My problem is that I do not know how to keep the loop going until the List created in the first Background Worker has ended. This is what I have and I know it is wrong.
<pre lang="c#"> private void backgroundWorker2_DoWork(object sender, DoWorkEventArgs e)
{
System.Threading.Thread.Sleep(60000);
int KeepCounting=0;
listBox1.Invoke((Action)(() => listBox1.Items.Add("Starting Scan : " + DateTime.Now.ToString())));
while (KeepCounting < variables.foldersToSearch.Count)
{
listBox1.Invoke((Action)(() => listBox1.Items.Add(variables.foldersToSearch[KeepCounting])));
KeepCounting++;
toolStripStatusLabel1.Text = " Searched " + KeepCounting.ToString() + " folders.";
}
}</pre>
|
|
|
|
|
The biggest problem with doing what you're doing is that List<t> isn't thread safe. You really shouldn't be trying to Add and Remove items from the List<t> without synchronization in place to avoid nasty little bugs that you're going to have a hell of a time reproducing.
Read:
Quote: Public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.
It is safe to perform multiple read operations on a List<t>, but issues can occur if the collection is modified while it’s being read. To ensure thread safety, lock the collection during a read or write operation. To enable a collection to be accessed by multiple threads for reading and writing, you must implement your own synchronization. For collections with built-in synchronization, see the classes in the System.Collections.Concurrent namespace. For an inherently thread–safe alternative, see the ImmutableList class.
A better alternative would be to use a ConcurrentQueue<t>[^] instead.
|
|
|
|
|
Hi.
I need a tutorial about how to make a Custom Autoupdater cuz i can do 1 by myself :I
no clickonce pls it ins't customizable
someone can help me plz
|
|
|
|
|
The best way for you to tackle this is for you to start defining your requirements. Saying you want an autoupdater is only the start - you need to break that down. For instance, do you want it to be updated from a local network only, or should it be available via the Internet as well? Does the update process require authentication or a license? You need to get a full list of your desired features, and then you start by breaking each part down into manageable tasks.
|
|
|
|
|
|
GuyThiebaut wrote: Here is some codez 4 U 2 look @:
Are you OK? Did you hit your head on something? How many fingers am I holding up ?
|
|
|
|
|
Beeer!
Cue the music to "Our Tune" from Radio 1...
I confess, I am a reformed teenager, a teenager who could not be arsed to spell correctly.
I get triggered every so often when I see a 'plz' and return to my terrible habits.
“That which can be asserted without evidence, can be dismissed without evidence.”
― Christopher Hitchens
|
|
|
|
|
im sorry but english is not my native language so in my language (Spanish) "plz" is usually used so i use it just for bad habit.
im quiet new in c# would you pls give me a list of what do i need to define first before all? cuz right now i just want a updater that update my app via Internet and should be licensed
|
|
|
|
|
Member 10928084 wrote: pls give me a list of what do i need to define first before all? To quote Pete "The best way for you to tackle this is for you to start defining your requirements."
Member 10928084 wrote: i just want a updater that update my app via Internet and should be licensed Sure I get that - I think the article will give you everything you need to create an updater that takes update information off an FTP site on the 'internet'.
I don't know what you mean by "should be licensed".
“That which can be asserted without evidence, can be dismissed without evidence.”
― Christopher Hitchens
|
|
|
|
|
Hi..
i tried to implement the updater but... i got so many errors and i think that you can help me with this..
this is my patch.cs
http://upaste.me/5604135604bcb815a[^]
the last error that i got was this "the calling thread must be sta because many ui components require this"
can you pls help me with this :S?
|
|
|
|
|
Can I use a .txt file with a delimiter as an input file to a C# program from a network folder? And if so are there any examples of this?
|
|
|
|
|
Yes, you can. It's not that hard.
Normally, this would be a console application and you just use the StandardInput stream like it was a text file. You can get the StandardInput stream by calling Console.OpenStandardInput(). You can send the text file to the application with a simple command line:
C:\>myapp.exe < someTextFile.txt
Simple.
using System;
using System.IO;
namespace StandardInputSnadbox
{
class Program
{
static void Main(string[] args)
{
using (StreamReader inStream = new StreamReader(Console.OpenStandardInput()))
{
while (!inStream.EndOfStream)
{
string inLine = inStream.ReadLine();
Console.WriteLine(inLine);
}
}
}
}
}
|
|
|
|
|
|
a
modified 10-Jul-14 13:22pm.
|
|
|
|
|
I don't see any question here.
Just a code dump...
A positive attitude may not solve every problem, but it will annoy enough people to be worth the effort.
|
|
|
|
|
As has been mentioned, there doesn't appear to be any question here - and in the absence of any other explanation, I can only assume you are proud of the code and want to share this with the rest of us.
We have an area for that, but there are rules: posting code with no explanation is not allowed - we need to know what they are, what they do, and how they do it. We also need to know how these are better than the alternatives, and why we would want to use them. A nicely packaged download helps as well.
There are two ways to post such info: as a Tip or an Article.
A Tip is single task focussed; an Article is much more in depth.
This is probably Tip material as it is hard to see how you would get a reasonable article out of stuff that (for the most part) has been covered numerous times.
To try writing this up as a Tip (or an article, but it's less likely to get published) start here: http://www.codeproject.com/script/Articles/Submit.aspx[^]
When you are happy (and it can take a long time to get it right) you can submit it for publication, at which point it enters moderation and is reviewed for quality and acceptability before either being rejected or accepted, either way you will probably get comments on ways to improve it.
But this forum is not the right place!
Those who fail to learn history are doomed to repeat it. --- George Santayana (December 16, 1863 – September 26, 1952)
Those who fail to clear history are doomed to explain it. --- OriginalGriff (February 24, 1959 – ∞)
|
|
|
|
|
I have one file xml with one header and n body
<Header>
<C></C>
<D></D>
</Header>
<Body>
<F></F>
</Body>
<Body>
<G></G>
</Body>
<Body>
<H></H>
</Body>
I must create n new file xml with and one For example:
First.xml
<Header>
<B>
<C></C>
<D></D>
</B>
</Header>
<Body>
<F></F>
</Body>
Second.xml
<Header>
<B>
<C></C>
<D></D>
</B>
</Header>
<Body>
<G></G>
</Body>
Third.xml
<Header>
<B>
<C></C>
<D></D>
</B>
</Header>
<Body>
<H></H>
</Body>
Initially I tried to create new n documents equal to the original. After I take First.xml and I keep the first block Body and delete the other Body With Second.xml I keep the second block of the Body and delete the other I also accept any other suggestion.
Thanks
modified 9-Jul-14 5:06am.
|
|
|
|