Click here to Skip to main content
16,004,927 members
Home / Discussions / C#
   

C#

 
GeneralRe: Outlook Birthday Reminders Pin
zevman16-Sep-07 9:08
zevman16-Sep-07 9:08 
QuestionOnly look in subfolders.. Pin
andredani16-Sep-07 6:35
andredani16-Sep-07 6:35 
AnswerRe: Only look in subfolders.. Pin
Lutosław16-Sep-07 8:46
Lutosław16-Sep-07 8:46 
GeneralRe: Only look in subfolders.. Pin
andredani16-Sep-07 9:03
andredani16-Sep-07 9:03 
GeneralRe: Only look in subfolders.. Pin
Lutosław16-Sep-07 9:37
Lutosław16-Sep-07 9:37 
GeneralRe: Only look in subfolders.. Pin
andredani16-Sep-07 19:17
andredani16-Sep-07 19:17 
GeneralRe: Only look in subfolders.. [modified] Pin
Lutosław17-Sep-07 2:02
Lutosław17-Sep-07 2:02 
GeneralRe: Only look in subfolders.. Pin
andredani17-Sep-07 2:22
andredani17-Sep-07 2:22 
tnx man.. but i did like this:
System.IO.DirectoryInfo subDI = new System.IO.DirectoryInfo(path);
foreach (String sub in Directory.GetDirectories(path))
{
foreach (String file in Directory.GetFiles(sub, "*.dat"))
{
listView2.Items.Clear();
this.toolStripProgressBar1.Value += 10;
System.Threading.Thread.Sleep(dimension);
int fileCount = System.IO.Directory.GetFiles(sub, "*.*", SearchOption.AllDirectories).Length;
String subName = sub.Substring(sub.LastIndexOf(@"\") + 1);
DateTime time = DateTime.Now;
ListViewItem item = new ListViewItem(new string[] { sort, subName, time.ToString(), "", fileCount.ToString(), "", pris, appl });
this.listView2.Items.Add(item);
ListViewItem item2 = new ListViewItem(new string[] { sort, subName, time.ToString(), "", fileCount.ToString(), "", pris, appl });
this.listView3.Items.Add(item2);

works just fine.. yet..=)

But i got another problem:Cry | :((

i start a timer with button1 and want to stop it with button2
i thought it could be like this:
private void button1_Click(object sender, EventArgs e)
{
string[] lines1 = System.IO.File.ReadAllLines("inställningar.txt");
string path1 = lines1[8];
string tid = lines1[0];
int dimension = Convert.ToInt32(tid);
Timer oT = new Timer();
oT.Tick += new System.EventHandler(TimerFunction);
oT.Interval = dimension;
oT.Start();
}

private void button2_Click(object sender, EventArgs e)
{
Timer oT = new Timer();
oT.Tick += new System.EventHandler(Timerfunction);
oT.Stop();
}
But i where wrong!! How would u do it??
tnx!;)
GeneralRe: Only look in subfolders.. Pin
Lutosław17-Sep-07 3:21
Lutosław17-Sep-07 3:21 
GeneralRe: Only look in subfolders.. Pin
Lutosław17-Sep-07 3:34
Lutosław17-Sep-07 3:34 
QuestionThe type or namespace name could not be found Pin
Lutosław16-Sep-07 4:53
Lutosław16-Sep-07 4:53 
AnswerRe: The type or namespace name could not be found Pin
PIEBALDconsult16-Sep-07 5:10
mvePIEBALDconsult16-Sep-07 5:10 
GeneralRe: The type or namespace name could not be found Pin
Lutosław16-Sep-07 8:34
Lutosław16-Sep-07 8:34 
GeneralRe: The type or namespace name could not be found Pin
PIEBALDconsult16-Sep-07 11:09
mvePIEBALDconsult16-Sep-07 11:09 
GeneralRe: The type or namespace name could not be found Pin
PIEBALDconsult16-Sep-07 11:11
mvePIEBALDconsult16-Sep-07 11:11 
GeneralRe: The type or namespace name could not be found Pin
Lutosław16-Sep-07 11:20
Lutosław16-Sep-07 11:20 
GeneralRe: The type or namespace name could not be found Pin
PIEBALDconsult16-Sep-07 15:05
mvePIEBALDconsult16-Sep-07 15:05 
GeneralRe: The type or namespace name could not be found Pin
Lutosław16-Sep-07 8:48
Lutosław16-Sep-07 8:48 
GeneralRe: The type or namespace name could not be found Pin
Lutosław16-Sep-07 9:13
Lutosław16-Sep-07 9:13 
QuestionAdd connection Pin
Assaf8216-Sep-07 4:42
Assaf8216-Sep-07 4:42 
AnswerRe: Add connection Pin
PIEBALDconsult16-Sep-07 5:12
mvePIEBALDconsult16-Sep-07 5:12 
GeneralRe: Add connection Pin
Assaf8216-Sep-07 5:53
Assaf8216-Sep-07 5:53 
AnswerRe: Add connection Pin
Paul Conrad16-Sep-07 6:44
professionalPaul Conrad16-Sep-07 6:44 
GeneralRe: Add connection Pin
Assaf8216-Sep-07 6:50
Assaf8216-Sep-07 6:50 
GeneralRe: Add connection Pin
Paul Conrad16-Sep-07 7:00
professionalPaul Conrad16-Sep-07 7:00 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.