Beispiel #1
0
            void GetFolder(string Folder, StringBuilder Output)
            {
                HTMLBlock1 HTMLblock;

                try
                {
                    if (System.IO.Directory.Exists(Folder))
                    {
                        string[] files = System.IO.Directory.GetFiles(Folder);
                        int      Count = File.Count;
                        foreach (string s in files)
                        {
                            if (cancellationToken.IsCancellationRequested)
                            {
                                break;
                            }
                            this.File.Add(new FileInfo(s, BaseFolderLenght));
                            HTMLblock = new HTMLBlock1("file." + Count);
                            HTMLblock.Label.InnerHtml(File[Count].Path + File[Count].File);
                            Count++;
                            Output.Append(HTMLblock.ToString());//                            divFile.InnerHtml += HTMLblock.ToString();//                                s + HTMLBuilder.TagBuilder._BR;
                        }
                        string[] dirs = System.IO.Directory.GetDirectories(Folder);
                        foreach (string s in dirs)
                        {
                            if (cancellationToken.IsCancellationRequested)
                            {
                                break;
                            }
                            GetFolder(s, Output);
                        }
                    }
                }
                catch { }
            }
Beispiel #2
0
            void GetHost(CheckedListBox chkList)
            {
                HTMLBlock1    HTMLblock;
                StringBuilder Output = new StringBuilder();
                string        s;
                int           Counter = 0;

                foreach (int indexChecked in chkList.CheckedIndices)
                {
                    if (cancellationToken.IsCancellationRequested)
                    {
                        break;
                    }
                    s         = chkList.Items[indexChecked].ToString();
                    HTMLblock = new HTMLBlock1("HOST." + Counter);
                    HTMLblock.Label.InnerHtml(s);
                    Output.Append(HTMLblock.ToString());//                    divHost.InnerHtml += HTMLblock.ToString();// s + HTMLBuilder.TagBuilder._BR;
                    this.Host.Add(new HostInfo(s));
                    Counter++;
                }
                divHost.InnerHtml += Output.ToString();
                //CountDone = Host.Count;
            }