private void CreateTempFile(string content)
 {
     testFile = new System.IO.FileInfo("webdriver.tmp");
     if (testFile.Exists)
     {
         testFile.Delete();
     }
     System.IO.StreamWriter testFileWriter = testFile.CreateText();
     testFileWriter.WriteLine(content);
     testFileWriter.Close();
 }
Exemplo n.º 2
0
        public void ShouldBeAbleToAlterTheContentsOfAFileUploadInputElement()
        {
            driver.Url = formsPage;
            IWebElement uploadElement = driver.FindElement(By.Id("upload"));
            Assert.IsTrue(string.IsNullOrEmpty(uploadElement.GetAttribute("value")));

            System.IO.FileInfo inputFile = new System.IO.FileInfo("test.txt");
            System.IO.StreamWriter inputFileWriter = inputFile.CreateText();
            inputFileWriter.WriteLine("Hello world");
            inputFileWriter.Close();

            uploadElement.SendKeys(inputFile.FullName);

            System.IO.FileInfo outputFile = new System.IO.FileInfo(uploadElement.GetAttribute("value"));
            Assert.AreEqual(inputFile.Name, outputFile.Name);
            inputFile.Delete();
        }
Exemplo n.º 3
0
            /// <summary>
            /// Creates a new log file, opens a System.IO.TextWriter for creation.
            /// The log file name will be of format "SEMC.Communication_2005-01-01.txt"
            /// </summary>
            private LogFile()
            {
                string path  = @"C:\Program Files\Sony Ericsson\CRLNK";
                string year  = "" + createdTime_.Year;
                string month = "" + createdTime_.Month;
                string day   = "" + createdTime_.Day;

                if (month.Length == 1)
                {
                    month = "0" + month;
                }
                if (day.Length == 1)
                {
                    day = "0" + day;
                }
                System.IO.FileInfo fi = new System.IO.FileInfo(path + "\\Logs\\" + Log.instance().LogName + "_" + year + "-" + month + "-" + day + ".txt");
                writer_ = fi.CreateText();
            }
Exemplo n.º 4
0
        public void ShouldBeAbleToAlterTheContentsOfAFileUploadInputElement()
        {
            driver.Url = formsPage;
            IWebElement uploadElement = driver.FindElement(By.Id("upload"));

            Assert.IsTrue(string.IsNullOrEmpty(uploadElement.GetAttribute("value")));

            System.IO.FileInfo     inputFile       = new System.IO.FileInfo("test.txt");
            System.IO.StreamWriter inputFileWriter = inputFile.CreateText();
            inputFileWriter.WriteLine("Hello world");
            inputFileWriter.Close();

            uploadElement.SendKeys(inputFile.FullName);

            System.IO.FileInfo outputFile = new System.IO.FileInfo(uploadElement.GetAttribute("value"));
            Assert.AreEqual(inputFile.Name, outputFile.Name);
            inputFile.Delete();
        }
Exemplo n.º 5
0
        public Logger(System.IO.DirectoryInfo directory)
        {
            if (!directory.Exists)
            {
                directory.Create();
            }
            string LogFolderPath = directory.FullName;

            System.IO.FileInfo File;
            do
            {
                string FileName = LogFolderPath + DateTime.Now.ToString("MMM dd yyyy HH mm ss fffffff") + ".log";
                File = new System.IO.FileInfo(FileName);
            } while (File.Exists);
            CurrentFile       = File.FullName;
            _Stream           = File.CreateText();
            _Stream.AutoFlush = true;
        }
Exemplo n.º 6
0
        private void button1_Click(object sender, EventArgs e)
        {
            date = dateTimePicker1.Value;
            RUB  = System.Convert.ToDouble(textBox1.Text);
            System.IO.StreamReader sm;
            sm = new System.IO.StreamReader(Application.StartupPath + "\\kursVAL.text", System.Text.Encoding.GetEncoding(65001));
            string st1, st2, st3, st4 = "";

            while (!sm.EndOfStream)
            {
                st1      = sm.ReadLine();
                kursUSD  = System.Convert.ToDouble(st1);
                USD      = RUB / kursUSD;
                st2      = sm.ReadLine();
                kursEURO = System.Convert.ToDouble(st2);
                EURO     = RUB / kursEURO;
                st3      = sm.ReadLine();
                kursCNY  = System.Convert.ToDouble(st3);
                CNY      = RUB / kursCNY;
                st4      = sm.ReadLine();
                kursBTC  = System.Convert.ToDouble(st4);
                BTC      = RUB / kursBTC;
            }
            sm.Close();
            System.IO.FileInfo     fi = new System.IO.FileInfo(Application.StartupPath + "\\val.text");
            System.IO.StreamWriter sw;
            if (fi.Exists)
            {
                sw = fi.AppendText();
            }
            else
            {
                sw = fi.CreateText();
            }
            sw.WriteLine(date.ToShortDateString());
            sw.WriteLine(RUB.ToString("N"));
            sw.WriteLine(USD.ToString("N"));
            sw.WriteLine(EURO.ToString("N"));
            sw.WriteLine(CNY.ToString("N"));
            sw.WriteLine(BTC.ToString("N"));
            sw.Close();
            button1.Enabled  = false;
            textBox1.Enabled = false;
        }
Exemplo n.º 7
0
        string  GenerateMeta(System.IO.FileInfo _textureFileName, bool _createMeta, bool _overrideMeta, bool _sRGB, bool _isNormal, bool _isIOR, bool _isArray)
        {
            System.IO.FileInfo metaFileName = new System.IO.FileInfo(_textureFileName.FullName + ".meta");
            string             metaContent  = null;
            string             stringGUID   = null;

            if (metaFileName.Exists && !_overrideMeta)
            {
                // Read back existing file
                using (System.IO.StreamReader S = metaFileName.OpenText())
                    metaContent = S.ReadToEnd();
            }
            else if (_createMeta)
            {
                // Create new file
                Guid GUID = Guid.NewGuid();
                stringGUID = GUID.ToString("N");

                metaContent = Properties.Resources.TemplateMeta;
                metaContent = metaContent.Replace("<GUID>", stringGUID);
                metaContent = metaContent.Replace("<sRGB>", _sRGB ? "1" : "0");
                metaContent = metaContent.Replace("<READABLE>", _isArray ? "1" : "0");                          // If texture is a 3D texture or a texture 2D array then we need to call a Unity script to import it and it must be tagged "readable" for the script to run

                using (System.IO.StreamWriter S = metaFileName.CreateText())
                    S.Write(metaContent);
            }
            else
            {
                return(null);
            }

            // Retrieve GUID from string
            int indexOfGUID = metaContent.IndexOf("guid:");

            if (indexOfGUID != -1)
            {
                indexOfGUID += 5;
                int indexOfEOL = metaContent.IndexOf('\n', indexOfGUID);
                stringGUID = metaContent.Substring(indexOfGUID, indexOfEOL - indexOfGUID);
                stringGUID = stringGUID.Trim();
            }

            return(stringGUID);
        }
        public void UploadingFileShouldFireOnChangeEvent()
        {
            driver.Url = formsPage;
            IWebElement uploadElement = driver.FindElement(By.Id("upload"));
            IWebElement result = driver.FindElement(By.Id("fileResults"));
            Assert.AreEqual(string.Empty, result.Text);

            System.IO.FileInfo inputFile = new System.IO.FileInfo("test.txt");
            System.IO.StreamWriter inputFileWriter = inputFile.CreateText();
            inputFileWriter.WriteLine("Hello world");
            inputFileWriter.Close();

            uploadElement.SendKeys(inputFile.FullName);
            // Shift focus to something else because send key doesn't make the focus leave
            driver.FindElement(By.Id("id-name1")).Click();

            inputFile.Delete();
            Assert.AreEqual("changed", result.Text);
        }
Exemplo n.º 9
0
        public async Task ShouldBeAbleToSendKeysToAFileUploadInputElementInAnXhtmlDocument()
        {
            await driver.GoToUrl(xhtmlFormPage);

            IWebElement uploadElement = await driver.FindElement(By.Id("file"));

            Assert.AreEqual(string.Empty, uploadElement.GetAttribute("value"));

            string testFileName = string.Format("test-{0}.txt", Guid.NewGuid().ToString("D"));
            string filePath     = System.IO.Path.Combine(EnvironmentManager.Instance.CurrentDirectory, testFileName);

            System.IO.FileInfo     inputFile       = new System.IO.FileInfo(filePath);
            System.IO.StreamWriter inputFileWriter = inputFile.CreateText();
            inputFileWriter.WriteLine("Hello world");
            inputFileWriter.Close();
            await uploadElement.SendKeys(inputFile.FullName);

            System.IO.FileInfo outputFile = new System.IO.FileInfo(await uploadElement.GetAttribute("value"));
            Assert.AreEqual(inputFile.Name, outputFile.Name);
            inputFile.Delete();
        }
Exemplo n.º 10
0
        public void ShouldBeAbleToUploadTheSameFileTwice()
        {
            string filePath = System.IO.Path.Combine(EnvironmentManager.Instance.CurrentDirectory, "test.txt");

            System.IO.FileInfo     inputFile       = new System.IO.FileInfo(filePath);
            System.IO.StreamWriter inputFileWriter = inputFile.CreateText();
            inputFileWriter.WriteLine("Hello world");
            inputFileWriter.Close();

            for (int i = 0; i < 2; ++i)
            {
                driver.Url = formsPage;
                IWebElement uploadElement = driver.FindElement(By.Id("upload"));
                Assert.IsTrue(string.IsNullOrEmpty(uploadElement.GetAttribute("value")));

                uploadElement.SendKeys(inputFile.FullName);
                uploadElement.Submit();
            }

            // If we get this far, then we're all good.
        }
Exemplo n.º 11
0
        private int SaveDocument()
        {
            int result = 0;

            if (fn == string.Empty)
            {
                if (saveFileDialog1.ShowDialog() ==
                    DialogResult.OK)
                {
                    fn        = saveFileDialog1.FileName;
                    this.Text = fn;
                }
                else
                {
                    result = -1;
                }
            }
            if (fn != string.Empty)
            {
                try
                {
                    System.IO.FileInfo fi =
                        new System.IO.FileInfo(fn);
                    System.IO.StreamWriter sw =
                        fi.CreateText();
                    sw.Write(richTextBox3.Text);
                    sw.Close();
                    result = 0;
                }
                catch (Exception exc)
                {
                    MessageBox.Show(exc.ToString(),
                                    "CryptoProgram",
                                    MessageBoxButtons.OK,
                                    MessageBoxIcon.Error);
                }
            }
            return(result);
        }
Exemplo n.º 12
0
        static void Main(string[] args)
        {
            System.IO.DirectoryInfo d = new System.IO.DirectoryInfo(@"c:\temp");
            Console.WriteLine($"Eksisterer c:\\temp: {d.Exists}");
            foreach (var item in d.GetFiles())
            {
                Console.WriteLine(item.FullName);
            }

            System.IO.FileInfo f = new System.IO.FileInfo("c:\\temp\\data.txt");
            Console.WriteLine($"Eksisterer c:\\temp\\data.txt: {f.Exists}");


            using (System.IO.StreamWriter s = f.CreateText())
            {
                s.Write("xxx");
            }

            using (System.IO.StreamWriter s = f.AppendText())
            {
                byte[] i = System.Text.Encoding.UTF8.GetBytes("yyy");
                s.Write("yyy");
            }

            // Hent
            string indhold = "";

            using (System.IO.StreamReader r = f.OpenText()) {
                indhold = r.ReadToEnd();
            }
            Console.WriteLine(indhold);

            // Slet
            if (f.Exists)
            {
                f.Delete();
            }
        }
        private void AlphaFS_File_CreateSymbolicLink_And_GetLinkTargetInfo(bool isNetwork)
        {
            using (var tempRoot = new TemporaryDirectory(isNetwork))
            {
                var fileLink = System.IO.Path.Combine(tempRoot.Directory.FullName, "FileLink-ToOriginalFile.txt");

                var fileInfo = new System.IO.FileInfo(System.IO.Path.Combine(tempRoot.Directory.FullName, "OriginalFile.txt"));
                using (fileInfo.CreateText()) {}

                Console.WriteLine("Input File Path: [{0}]", fileInfo.FullName);
                Console.WriteLine("Input File Link: [{0}]", fileLink);


                Alphaleonis.Win32.Filesystem.File.CreateSymbolicLink(fileLink, fileInfo.FullName);


                var lvi = Alphaleonis.Win32.Filesystem.File.GetLinkTargetInfo(fileLink);
                UnitTestConstants.Dump(lvi);
                Assert.IsTrue(lvi.PrintName.Equals(fileInfo.FullName, StringComparison.OrdinalIgnoreCase));


                UnitTestConstants.Dump(new System.IO.FileInfo(fileLink));

                var alphaFSFileInfo = new Alphaleonis.Win32.Filesystem.FileInfo(fileLink);
                UnitTestConstants.Dump(alphaFSFileInfo.EntryInfo);

                Assert.AreEqual(System.IO.File.Exists(alphaFSFileInfo.FullName), alphaFSFileInfo.Exists);
                Assert.IsFalse(alphaFSFileInfo.EntryInfo.IsDirectory);
                Assert.IsFalse(alphaFSFileInfo.EntryInfo.IsMountPoint);
                Assert.IsTrue(alphaFSFileInfo.EntryInfo.IsReparsePoint);
                Assert.IsTrue(alphaFSFileInfo.EntryInfo.IsSymbolicLink);
                Assert.AreEqual(alphaFSFileInfo.EntryInfo.ReparsePointTag, Alphaleonis.Win32.Filesystem.ReparsePointTag.SymLink);
            }

            Console.WriteLine();
        }
Exemplo n.º 14
0
        private void button1_Click(object sender, EventArgs e)
        {
            int i = 0, j;

            nca++;
            switch (nca)
            {
            case 1:
                pictureBox1.SizeMode = PictureBoxSizeMode.StretchImage;
                pictureBox1.Image    = new Bitmap("D:\\PV\\correct.jpg");
                break;

            case 2:
                pictureBox2.SizeMode = PictureBoxSizeMode.StretchImage;
                pictureBox2.Image    = new Bitmap("D:\\PV\\correct.jpg");
                break;

            case 3:
                pictureBox4.SizeMode = PictureBoxSizeMode.StretchImage;
                pictureBox4.Image    = new Bitmap("D:\\PV\\correct.jpg");
                break;

            case 4:
                pictureBox3.SizeMode = PictureBoxSizeMode.StretchImage;
                pictureBox3.Image    = new Bitmap("D:\\PV\\correct.jpg");
                break;

            case 5:
                pictureBox5.SizeMode = PictureBoxSizeMode.StretchImage;
                pictureBox5.Image    = new Bitmap("D:\\PV\\correct.jpg");
                break;
            }
            if (nca == nt)
            {
                System.IO.FileInfo     fi = new System.IO.FileInfo("D:\\PV\\rez.txt");
                System.IO.StreamWriter sw;
                sw = fi.CreateText();
                switch (nt)
                {
                case 1:
                    sw.WriteLine("1000");
                    break;

                case 2:
                    sw.WriteLine("2500");
                    break;

                case 3:
                    sw.WriteLine("5000");
                    break;

                case 4:
                    sw.WriteLine("15000");
                    break;

                case 5:
                    sw.WriteLine("50000");
                    break;
                }
                sw.WriteLine(curauth);
                sw.Close();
                while (!sr3.EndOfStream)
                {
                    questm[i] = sr3.ReadLine();
                    authm[i]  = sr4.ReadLine();
                    i++;
                }
                sr3.Close();
                sr4.Close();
                System.IO.FileInfo     fi2 = new System.IO.FileInfo("D:\\PV\\q.txt");
                System.IO.FileInfo     fi3 = new System.IO.FileInfo("D:\\PV\\a.txt");
                System.IO.StreamWriter sw2;
                sw  = fi2.CreateText();
                sw2 = fi3.CreateText();
                for (j = 0; j < i; j++)
                {
                    sw.WriteLine(questm[j]);
                    sw2.WriteLine(authm[j]);
                }
                sw.Close();
                sw2.Close();
                i = 0;
                if (usezam == 1)
                {
                    while (!sr2.EndOfStream)
                    {
                        zamen[i] = sr2.ReadLine();
                        i++;
                    }
                    sr2.Close();
                    System.IO.FileInfo fi4 = new System.IO.FileInfo("D:\\PV\\" + curauth + ".txt");
                    sw = fi4.CreateText();
                    for (j = 0; j < i; j++)
                    {
                        sw.WriteLine(zamen[j]);
                    }
                    sw.Close();
                }
                else
                {
                    sr2.Close();
                }
                if (nt != 5)
                {
                    nt++;
                    np = 5 - nt;
                    System.IO.FileInfo fi5 = new System.IO.FileInfo("D:\\PV\\sost.txt");
                    sw = fi5.CreateText();
                    sw.WriteLine(m.ToString());
                    sw.WriteLine(s.ToString());
                    sw.WriteLine(np.ToString());
                    sw.WriteLine(curauth);
                    sw.WriteLine(nz.ToString());
                    sw.WriteLine(nt.ToString());
                    sw.Close();
                    Hide();
                    Form3 f = new Form3();
                    f.ShowDialog();
                    this.Close();
                }
                else
                {
                    Hide();
                    Form5 f = new Form5();
                    f.ShowDialog();
                    this.Close();
                }
            }
            else
            {
                quest       = sr3.ReadLine();
                auth        = sr4.ReadLine();
                label1.Text = quest;
            }
        }
Exemplo n.º 15
0
        private void button4_Click(object sender, EventArgs e)
        {
            int i = 0, j;

            while (!sr3.EndOfStream)
            {
                questm[i] = sr3.ReadLine();
                authm[i]  = sr4.ReadLine();
                i++;
            }
            sr3.Close();
            sr4.Close();
            System.IO.FileInfo     fi2 = new System.IO.FileInfo("D:\\PV\\q.txt");
            System.IO.FileInfo     fi3 = new System.IO.FileInfo("D:\\PV\\a.txt");
            System.IO.StreamWriter sw;
            System.IO.StreamWriter sw2;
            sw  = fi2.CreateText();
            sw2 = fi3.CreateText();
            for (j = 0; j < i; j++)
            {
                sw.WriteLine(questm[j]);
                sw2.WriteLine(authm[j]);
            }
            sw.Close();
            sw2.Close();
            System.IO.FileInfo fi = new System.IO.FileInfo("D:\\PV\\rez.txt");
            sw = fi.AppendText();
            sw.WriteLine(auth);
            if (nt == 1)
            {
                sw.WriteLine("500");
            }
            sw.Close();
            i = 0;
            if (usezam == 1)
            {
                while (!sr2.EndOfStream)
                {
                    zamen[i] = sr2.ReadLine();
                    i++;
                }
                sr2.Close();
                System.IO.FileInfo fi4 = new System.IO.FileInfo("D:\\PV\\" + curauth + ".txt");
                sw = fi4.CreateText();
                for (j = 0; j < i; j++)
                {
                    sw.WriteLine(zamen[j]);
                }
                sw.Close();
            }
            else
            {
                sr2.Close();
            }
            if (nt != 1)
            {
                Hide();
                Form4 f = new Form4();
                f.ShowDialog();
                this.Close();
            }
            else
            {
                Hide();
                Form5 f = new Form5();
                f.ShowDialog();
                this.Close();
            }
        }
Exemplo n.º 16
0
        }   // завершение button2_Click()

        //
        //  кнопка "Data to File"   /************* ЗАПИСЬ РАСЧЕТОВ В ФАЙЛ *************/
        //
        private void button3_Click(object sender, EventArgs e)
        {
            #region
            // получить информацию о файле
            System.IO.FileInfo fi = new System.IO.FileInfo("D:\\cylinderData.txt");
            // поток для записи
            System.IO.StreamWriter sw;
            try
            {
                if (fi.Exists) // файл данных существует?
                // откроем поток для добавления
                {
                    sw = fi.AppendText();
                    MessageBox.Show("Данные будут добавлены в конец файла D:\\cylinderData.txt",
                                    "Файл D:\\cylinderData.txt существует",
                                    MessageBoxButtons.OK, MessageBoxIcon.Information);
                }
                else
                {
                    // создать файл и открыть поток для записи
                    sw = fi.CreateText();
                    MessageBox.Show("Файл D:\\cylinderData.txt будет создан",
                                    "Файл D:\\cylinderData.txt не существует",
                                    MessageBoxButtons.OK, MessageBoxIcon.Information);
                }
                // запись в файл
                sw.WriteLine("Расчет гидросхемы");
                sw.WriteLine("   Насос");
                sw.WriteLine("Подача насоса за оборот, см.куб - " + aLabel.dblToStr(cmCubPerRev));
                sw.WriteLine("Число оборотов насоса, 1/мин    - " + aLabel.dblToStr(revPerMinute));
                //double pumpVolumetricEff = 0.975;
                //double pumpMechanicalEff = 0.95;
                sw.WriteLine("Pump volumetric eff.            - " + aLabel.dblToStr(pumpVolumetricEff));
                sw.WriteLine("Pump mechanical eff.            - " + aLabel.dblToStr(pumpMechanicalEff));
                sw.WriteLine("Подача насоса, литр/мин         - " + aLabel.dblToStr(litrPerMinute));
                sw.WriteLine("Давление, бар                   - " + aLabel.dblToStr(pressure));
                sw.WriteLine("Требуемая мощность мотора, кВт  - " + aLabel.dblToStr(needPower));
                sw.WriteLine("   Гидроцилиндры");
                sw.WriteLine("Диаметр поршня, мм       - " + aLabel.dblToStr(diametrPiston));
                sw.WriteLine("Диаметр штока, мм        - " + aLabel.dblToStr(diametrRod));
                sw.WriteLine("Ход поршня, мм           - " + aLabel.dblToStr(strokePiston));
                sw.WriteLine("Площадь поршня, см.кв    - " + aLabel.dblToStr((areaPiston * areaKoeff[1])));
                sw.WriteLine("Площадь штока, см.кв     - " + aLabel.dblToStr((areaRod * areaKoeff[1])));
                sw.WriteLine("Разность площадей, см.кв - " + aLabel.dblToStr((areaDelta * areaKoeff[1])));
                sw.WriteLine("Число гидроцилиндров в схеме, шт - " + numCylinder.ToString());
                if (numCylinder == 1)
                {
                    sw.WriteLine("Объем поршневой полости, литр    - " + aLabel.dblToStr(volumePiston));
                    sw.WriteLine("Объем штоковой полости, литр     - " + aLabel.dblToStr(volumeRod));
                    sw.WriteLine("Разность объемов полостей, литр  - " + aLabel.dblToStr(volumeRod));
                    sw.WriteLine("Усилие при выходе штока, кг      - " + aLabel.dblToStr(forcePiston));
                    sw.WriteLine("Усилие при втягивании штока, кг  - " + aLabel.dblToStr(forceRod));
                    sw.WriteLine("Время выхода штока, сек          - " + dOut);
                    sw.WriteLine("Время втягивания штока, сек      - " + dIn);
                }   // end if (numCylinder == 1)
                else
                {
                    sw.WriteLine("Объем поршневых полостей, литр   - " + aLabel.dblToStr(volumePiston) + " / "
                                 + aLabel.dblToStr((volumePiston * numCylinder)));
                    sw.WriteLine("Объем штоковых полостей, литр    - " + aLabel.dblToStr(volumeRod) + " / "
                                 + aLabel.dblToStr((volumeRod * numCylinder)));
                    sw.WriteLine("Разность объемов полостей, литр  - " + aLabel.dblToStr(volumeDelta) + " / "
                                 + aLabel.dblToStr((volumeDelta * numCylinder)));
                    sw.WriteLine("Усилие при выходе штоков, кг     - " + aLabel.dblToStr(forcePiston) + " / "
                                 + aLabel.dblToStr((forcePiston * numCylinder)));
                    sw.WriteLine("Усилие при втягивании штоков, кг - " + aLabel.dblToStr(forceRod) + " / "
                                 + aLabel.dblToStr((forceRod * numCylinder)));
                    sw.WriteLine("Время выхода штоков, сек     - " + dOut);
                    sw.WriteLine("Время втягивания штоков, сек - " + dIn);
                }
                sw.WriteLine("");
                sw.WriteLine("");
                // закрыть поток
                sw.Close();
                // инфо о записи файла
                toolStripStatusLabel1.Text = "Запись файла D:\\cylinderData.txt произведена";
            }
            catch
            {
                toolStripStatusLabel1.Text = "Sorry, error";
            }
            #endregion
        }
Exemplo n.º 17
0
        private void timer1_Tick(object sender, EventArgs e)
        {
            int i = 0, j;

            if (label3.Visible)
            {
                if (s > 0)
                {
                    s--;
                    if (s < 10)
                    {
                        label4.Text = "0" + s.ToString();
                    }
                    else
                    {
                        label4.Text = s.ToString();
                    }
                }
                else
                {
                    if (m > 0)
                    {
                        m--;
                        if (m < 10)
                        {
                            label2.Text = "0" + m.ToString();
                        }
                        else
                        {
                            label2.Text = m.ToString();
                        }
                        s           = 59;
                        label4.Text = "59";
                    }
                    else
                    {
                        System.IO.FileInfo     fi = new System.IO.FileInfo("D:\\PV\\rez.txt");
                        System.IO.StreamWriter sw;
                        sw = fi.CreateText();
                        sw.WriteLine("0");
                        sw.WriteLine(curauth);
                        sw.Close();
                        while (!sr3.EndOfStream)
                        {
                            questm[i] = sr3.ReadLine();
                            authm[i]  = sr4.ReadLine();
                            i++;
                        }
                        sr3.Close();
                        sr4.Close();
                        System.IO.FileInfo     fi2 = new System.IO.FileInfo("D:\\PV\\q.txt");
                        System.IO.FileInfo     fi3 = new System.IO.FileInfo("D:\\PV\\a.txt");
                        System.IO.StreamWriter sw2;
                        sw  = fi2.CreateText();
                        sw2 = fi3.CreateText();
                        for (j = 0; j < i; j++)
                        {
                            sw.WriteLine(questm[j]);
                            sw2.WriteLine(authm[j]);
                        }
                        sw.Close();
                        sw2.Close();
                        i = 0;
                        if (usezam == 1)
                        {
                            while (!sr2.EndOfStream)
                            {
                                zamen[i] = sr2.ReadLine();
                                i++;
                            }
                            sr2.Close();
                            System.IO.FileInfo fi4 = new System.IO.FileInfo("D:\\PV\\" + curauth + ".txt");
                            sw = fi4.CreateText();
                            for (j = 0; j < i; j++)
                            {
                                sw.WriteLine(zamen[j]);
                            }
                            sw.Close();
                        }
                        else
                        {
                            sr2.Close();
                        }
                        Hide();
                        Form5 f = new Form5();
                        f.ShowDialog();
                        this.Close();
                    }
                }
                label3.Visible = false;
            }
            else
            {
                label3.Visible = true;
            }
        }
Exemplo n.º 18
0
 public void NewEntry(string EntryName, string EntryValue)
 {
     FileEntrys.Add(EntryName,EntryValue);
     Application.DoEvents();
     System.IO.FileInfo FI = new System.IO.FileInfo(FileName);
     SWriter = FI.CreateText();
     foreach(string FF in FileEntrys.Keys)
     {
         string data = FF + "~" + Convert.ToString(FileEntrys[FF]);
         SWriter.WriteLine(data);
     }
     SWriter.Close();
     GetApplicationData();
 }
Exemplo n.º 19
0
        private void ImprimirReduzido(TRegistro_PreVenda val, string porta, string Tp_impressora)
        {
            //Buscar dados da empresa
            CamadaDados.Diversos.TList_CadEmpresa lEmpresa =
                CamadaNegocio.Diversos.TCN_CadEmpresa.Busca(val.Cd_empresa,
                                                            string.Empty,
                                                            string.Empty,
                                                            null);
            if (lEmpresa.Count < 1)
            {
                throw new Exception("Não foi possivel localizar empresa " + val.Cd_empresa);
            }
            if (!string.IsNullOrEmpty(Tp_impressora))
            {
                PDV.TGerenciarImpNaoFiscal.IniciarPorta(porta);
                try
                {
                    StringBuilder imp = new StringBuilder();
                    imp.AppendLine("  PRÉ-VENDA  N: " + val.Id_prevendastr + "  " + val.Dt_emissaostr);
                    imp.AppendLine(" =========================================");
                    imp.AppendLine("               DADOS EMPRESA              ");
                    imp.AppendLine(" =========================================");
                    imp.AppendLine("  " + lEmpresa[0].Nm_empresa.Trim().ToUpper());
                    imp.AppendLine("  " + lEmpresa[0].Ds_endereco.Trim().ToUpper() + "," + lEmpresa[0].rEndereco.Numero);
                    imp.AppendLine("  " + lEmpresa[0].rEndereco.Bairro.Trim().ToUpper());
                    imp.AppendLine(" -----------------------------------------");
                    imp.AppendLine("               DADOS CLIENTE              ");
                    imp.AppendLine(" -----------------------------------------");
                    imp.AppendLine("  " + val.Cd_clifor.Trim() + "-" + val.Nm_clifor.Trim().ToUpper());
                    //Buscar clifor config
                    object obj_clifor = new CamadaDados.Faturamento.Cadastros.TCD_CFGCupomFiscal().BuscarEscalar(
                        new TpBusca[]
                    {
                        new TpBusca()
                        {
                            vNM_Campo = "a.cd_empresa",
                            vOperador = "=",
                            vVL_Busca = "'" + val.Cd_empresa.Trim() + "'"
                        }
                    }, "a.cd_clifor");
                    if ((obj_clifor == null ? false : obj_clifor.ToString() != val.Cd_clifor) && (!string.IsNullOrEmpty(val.Cd_clifor)))
                    {
                        //Buscar dados cliente
                        CamadaDados.Financeiro.Cadastros.TRegistro_CadClifor rCliente =
                            CamadaNegocio.Financeiro.Cadastros.TCN_CadClifor.Busca_Clifor_Codigo(val.Cd_clifor, null);
                        if (!string.IsNullOrEmpty(rCliente.Nm_fantasia))
                        {
                            imp.Append("  " + rCliente.Nm_fantasia.Trim().ToUpper());
                        }
                        if (rCfg.St_impcpfcnpjbool)
                        {
                            if ((!string.IsNullOrEmpty(rCliente.Nr_cgc.SoNumero())) ||
                                (!string.IsNullOrEmpty(rCliente.Nr_cpf.SoNumero())))
                            {
                                imp.AppendLine("  CNPJ/CPF: " + (!string.IsNullOrEmpty(rCliente.Nr_cgc.SoNumero()) ? rCliente.Nr_cgc : rCliente.Nr_cpf));
                            }
                        }
                    }
                    imp.Append("  " + val.Ds_endereco.Trim().ToUpper());
                    if ((obj_clifor == null ? false : obj_clifor.ToString() != val.Cd_clifor) && (!string.IsNullOrEmpty(val.Cd_clifor)))
                    {
                        //Buscar Endereco do cliente
                        CamadaDados.Financeiro.Cadastros.TList_CadEndereco lEndereco =
                            new CamadaDados.Financeiro.Cadastros.TCD_CadEndereco().Select(
                                new TpBusca[]
                        {
                            new TpBusca()
                            {
                                vNM_Campo = "a.cd_clifor",
                                vOperador = "=",
                                vVL_Busca = "'" + val.Cd_clifor.Trim() + "'"
                            },
                            new TpBusca()
                            {
                                vNM_Campo = "a.cd_endereco",
                                vOperador = "=",
                                vVL_Busca = "'" + val.Cd_endereco.Trim() + "'"
                            }
                        }, 0, string.Empty);
                        if (lEndereco.Count > 0)
                        {
                            if (!string.IsNullOrEmpty(lEndereco[0].Numero))
                            {
                                imp.AppendLine(", " + lEndereco[0].Numero.Trim().ToUpper());
                            }
                            if (!string.IsNullOrEmpty(lEndereco[0].Bairro))
                            {
                                imp.AppendLine("  " + lEndereco[0].Bairro.Trim().ToUpper());
                            }
                            if (!string.IsNullOrEmpty(lEndereco[0].DS_Cidade))
                            {
                                imp.AppendLine("  " + lEndereco[0].DS_Cidade.Trim().ToUpper() + " - " + lEndereco[0].UF);
                            }
                            if (!string.IsNullOrEmpty(lEndereco[0].Fone.SoNumero()))
                            {
                                imp.AppendLine("  " + lEndereco[0].Fone.Trim().ToUpper() +
                                               (!string.IsNullOrEmpty(lEndereco[0].Celular.SoNumero()) ? "/" + lEndereco[0].Celular.Trim().ToUpper() : string.Empty));
                            }
                            if (!string.IsNullOrEmpty(lEndereco[0].Cep.SoNumero()))
                            {
                                imp.AppendLine("  CEP: " + lEndereco[0].Cep);
                            }
                            if (!string.IsNullOrEmpty(lEndereco[0].Proximo))
                            {
                                imp.AppendLine("  " + lEndereco[0].Proximo.Trim().ToUpper());
                            }
                        }
                    }
                    else
                    {
                        imp.AppendLine();
                        imp.AppendLine();
                    }
                    if (!string.IsNullOrEmpty(val.Nm_vendedor))
                    {
                        imp.AppendLine(("  VENDEDOR: " + val.Nm_vendedor.Trim()).FormatStringDireita(42, ' '));
                    }
                    imp.AppendLine(" -----------------------------------------");
                    imp.AppendLine("  PRODUTO  QTD      VAL.UNIT  SUBTOTAL");
                    imp.AppendLine(" -----------------------------------------");

                    val.lItens.ForEach(p =>
                    {
                        imp.AppendLine("  " + (p.Cd_produto.Trim() + "-" + p.Ds_produto.Trim().ToUpper()));
                        imp.Append(p.Quantidade.ToString("N3", new System.Globalization.CultureInfo("en-US", true)).FormatStringEsquerda(13, ' ') + "x");
                        imp.Append(p.Vl_unitario.ToString("N2", new System.Globalization.CultureInfo("en-US", true)).FormatStringEsquerda(14, ' '));
                        imp.Append(p.Vl_subtotal.ToString("N2", new System.Globalization.CultureInfo("en-US", true)).FormatStringEsquerda(10, ' '));
                        imp.AppendLine();
                        if (p.Vl_desconto > decimal.Zero)
                        {
                            imp.AppendLine(" DESCONTO: " + p.Vl_desconto.ToString("N2", new System.Globalization.CultureInfo("en-US", true)));
                        }
                        if (p.Vl_acrescimo > decimal.Zero)
                        {
                            imp.AppendLine(" ACRESCIMO: " + p.Vl_acrescimo.ToString("N2", new System.Globalization.CultureInfo("en-US", true)));
                        }
                        if (p.Vl_juro_fin > decimal.Zero)
                        {
                            imp.AppendLine(" JURO FIN.: " + p.Vl_juro_fin.ToString("N2", new System.Globalization.CultureInfo("en-US", true)));
                        }
                    });

                    imp.Append(" -----------------------------------------------");
                    imp.Append("  ACRESCIMOS JUROS FIN.  FRETE DESCONTO  LIQUIDO");
                    imp.Append(val.lItens.Sum(p => p.Vl_acrescimo).ToString("N2", new System.Globalization.CultureInfo("en-US", true)).FormatStringEsquerda(12, ' '));
                    imp.Append(val.lItens.Sum(p => p.Vl_juro_fin).ToString("N2", new System.Globalization.CultureInfo("en-US", true)).FormatStringEsquerda(11, ' '));
                    imp.Append(val.lItens.Sum(p => p.Vl_frete).ToString("N2", new System.Globalization.CultureInfo("en-US", true)).FormatStringEsquerda(7, ' '));
                    imp.Append(val.lItens.Sum(p => p.Vl_desconto).ToString("N2", new System.Globalization.CultureInfo("en-US", true)).FormatStringEsquerda(9, ' '));
                    imp.AppendLine(val.lItens.Sum(p => p.Vl_liquido).ToString("N2", new System.Globalization.CultureInfo("en-US", true)).FormatStringEsquerda(9, ' '));
                    imp.AppendLine(" -------------------------------------------");
                    if (!string.IsNullOrEmpty(val.Cd_portador))
                    {
                        imp.AppendLine("  FORMA PGTO : " + val.Cd_portador.Trim() + "-" + val.Ds_portador.Trim());
                    }
                    //Buscar Parcelas
                    TList_PreVenda_DT_Vencto lParc =
                        CamadaNegocio.Faturamento.PDV.TCN_PreVenda_DT_Vencto.Buscar(val.Id_prevendastr,
                                                                                    val.Cd_empresa,
                                                                                    null);
                    if (lParc.Count > 0)
                    {
                        imp.AppendLine("  COND.PGTO  : " + val.Cd_condPgto.Trim() + "-" + val.Ds_condPgto.Trim());
                        imp.AppendLine("  VENCIMENTO          VALOR ");
                        lParc.OrderBy(p => p.Dt_vencto).ToList().ForEach(p =>
                                                                         imp.AppendLine("  " + p.Dt_vencto.ToString("dd/MM/yyyy").FormatStringDireita(20, ' ') + p.Vl_parcela.ToString("C2", new System.Globalization.CultureInfo("pt-BR"))));
                        imp.AppendLine();
                        imp.AppendLine();
                    }
                    imp.AppendLine();
                    imp.AppendLine();
                    imp.AppendLine(" -----------------------------------------");
                    imp.AppendLine("                Cliente               ");
                    imp.AppendLine();
                    imp.AppendLine();
                    //Imprimir observacao cupom
                    if (!string.IsNullOrEmpty(val.Ds_observacao))
                    {
                        string obs = val.Ds_observacao.Trim();
                        imp.AppendLine(" -----------------------------------------");
                        imp.AppendLine("              OBSERVAÇÕES                 ");
                        imp.AppendLine(" -----------------------------------------");
                        while (true)
                        {
                            if (obs.Length <= 40)
                            {
                                imp.AppendLine("  " + obs);
                                break;
                            }
                            else
                            {
                                imp.AppendLine("  " + obs.Substring(0, 40));
                                obs = obs.Remove(0, 40);
                            }
                        }
                    }
                    imp.AppendLine(" -----------------------------------------");
                    imp.AppendLine("      Este recibo nao tem valor Fiscal    ");
                    imp.AppendLine();
                    imp.AppendLine();
                    imp.AppendLine();
                    imp.AppendLine();
                    imp.AppendLine();

                    PDV.TGerenciarImpNaoFiscal.Texto(imp.ToString());
                    PDV.TGerenciarImpNaoFiscal.Guilhotina();
                }
                catch (Exception ex)
                { MessageBox.Show("Erro: " + ex.Message.Trim()); }
                finally
                { PDV.TGerenciarImpNaoFiscal.FecharPorta(); }
            }
            else
            {
                System.IO.FileInfo     f = null;
                System.IO.StreamWriter w = null;
                f = new System.IO.FileInfo(System.IO.Path.GetTempPath() + System.IO.Path.DirectorySeparatorChar + "Orcamento.txt");
                w = f.CreateText();
                try
                {
                    w.WriteLine("  PRÉ-VENDA  N: " + val.Id_prevendastr + "  " + val.Dt_emissaostr);
                    w.WriteLine(" =========================================");
                    w.WriteLine("               DADOS EMPRESA              ");
                    w.WriteLine(" =========================================");
                    w.WriteLine("  " + lEmpresa[0].Nm_empresa.Trim().ToUpper());
                    w.WriteLine("  " + lEmpresa[0].Ds_endereco.Trim().ToUpper() + "," + lEmpresa[0].rEndereco.Numero);
                    w.WriteLine("  " + lEmpresa[0].rEndereco.Bairro.Trim().ToUpper());
                    w.WriteLine(" -----------------------------------------");
                    w.WriteLine("               DADOS CLIENTE              ");
                    w.WriteLine(" -----------------------------------------");
                    w.WriteLine("  " + val.Cd_clifor.Trim() + "-" + val.Nm_clifor.Trim().ToUpper());
                    object obj_clifor = new CamadaDados.Faturamento.Cadastros.TCD_CFGCupomFiscal().BuscarEscalar(
                        new TpBusca[]
                    {
                        new TpBusca()
                        {
                            vNM_Campo = "a.cd_empresa",
                            vOperador = "=",
                            vVL_Busca = "'" + val.Cd_empresa.Trim() + "'"
                        }
                    }, "a.cd_clifor");
                    if ((obj_clifor == null ? false : obj_clifor.ToString() != val.Cd_clifor) && (!string.IsNullOrEmpty(val.Cd_clifor)))
                    {
                        //Buscar dados cliente
                        CamadaDados.Financeiro.Cadastros.TRegistro_CadClifor rCliente =
                            CamadaNegocio.Financeiro.Cadastros.TCN_CadClifor.Busca_Clifor_Codigo(val.Cd_clifor, null);
                        if (!string.IsNullOrEmpty(rCliente.Nm_fantasia))
                        {
                            w.WriteLine("  " + rCliente.Nm_fantasia.Trim().ToUpper());
                        }
                        if (rCfg.St_impcpfcnpjbool)
                        {
                            if ((!string.IsNullOrEmpty(rCliente.Nr_cgc.SoNumero())) ||
                                (!string.IsNullOrEmpty(rCliente.Nr_cpf.SoNumero())))
                            {
                                w.WriteLine("  CNPJ/CPF: " + (!string.IsNullOrEmpty(rCliente.Nr_cgc.SoNumero()) ? rCliente.Nr_cgc : rCliente.Nr_cpf));
                            }
                        }
                    }
                    w.Write("  " + val.Ds_endereco.Trim().ToUpper());
                    if ((obj_clifor == null ? false : obj_clifor.ToString() != val.Cd_clifor) && (!string.IsNullOrEmpty(val.Cd_clifor)))
                    {
                        //Buscar Endereco do cliente
                        CamadaDados.Financeiro.Cadastros.TList_CadEndereco lEndereco =
                            new CamadaDados.Financeiro.Cadastros.TCD_CadEndereco().Select(
                                new TpBusca[]
                        {
                            new TpBusca()
                            {
                                vNM_Campo = "a.cd_clifor",
                                vOperador = "=",
                                vVL_Busca = "'" + val.Cd_clifor.Trim() + "'"
                            },
                            new TpBusca()
                            {
                                vNM_Campo = "a.cd_endereco",
                                vOperador = "=",
                                vVL_Busca = "'" + val.Cd_endereco.Trim() + "'"
                            }
                        }, 0, string.Empty);
                        if (lEndereco.Count > 0)
                        {
                            if (!string.IsNullOrEmpty(lEndereco[0].Numero))
                            {
                                w.WriteLine(", " + lEndereco[0].Numero.Trim().ToUpper());
                            }
                            if (!string.IsNullOrEmpty(lEndereco[0].Bairro))
                            {
                                w.WriteLine("  " + lEndereco[0].Bairro.Trim().ToUpper());
                            }
                            if (!string.IsNullOrEmpty(lEndereco[0].DS_Cidade))
                            {
                                w.WriteLine("  " + lEndereco[0].DS_Cidade.Trim().ToUpper() + " - " + lEndereco[0].UF);
                            }
                            if (!string.IsNullOrEmpty(lEndereco[0].Fone.SoNumero()))
                            {
                                w.WriteLine("  " + lEndereco[0].Fone.Trim().ToUpper() +
                                            (!string.IsNullOrEmpty(lEndereco[0].Celular.SoNumero()) ? "/" + lEndereco[0].Celular.Trim().ToUpper() : string.Empty));
                            }
                            if (!string.IsNullOrEmpty(lEndereco[0].Cep.SoNumero()))
                            {
                                w.WriteLine("  CEP: " + lEndereco[0].Cep);
                            }
                            if (!string.IsNullOrEmpty(lEndereco[0].Proximo))
                            {
                                w.WriteLine("  " + lEndereco[0].Proximo.Trim().ToUpper());
                            }
                        }
                    }
                    else
                    {
                        w.WriteLine();
                        w.WriteLine();
                    }
                    if (!string.IsNullOrEmpty(val.Nm_vendedor))
                    {
                        w.WriteLine(("  VENDEDOR: " + val.Nm_vendedor.Trim()).FormatStringDireita(42, ' '));
                    }
                    w.WriteLine(" -----------------------------------------");
                    w.WriteLine("  PRODUTO  QTD      VAL.UNIT  SUBTOTAL");
                    w.WriteLine(" -----------------------------------------");

                    val.lItens.ForEach(p =>
                    {
                        w.WriteLine("  " + (p.Cd_produto.Trim() + "-" + p.Ds_produto.Trim().ToUpper()));
                        w.Write(p.Quantidade.ToString("N3", new System.Globalization.CultureInfo("en-US", true)).FormatStringEsquerda(13, ' ') + "x");
                        w.Write(p.Vl_unitario.ToString("N2", new System.Globalization.CultureInfo("en-US", true)).FormatStringEsquerda(14, ' '));
                        w.Write(p.Vl_subtotal.ToString("N2", new System.Globalization.CultureInfo("en-US", true)).FormatStringEsquerda(10, ' '));
                        w.WriteLine();
                        if (p.Vl_desconto > decimal.Zero)
                        {
                            w.WriteLine(" DESCONTO: " + p.Vl_desconto.ToString("N2", new System.Globalization.CultureInfo("en-US", true)));
                        }
                        if (p.Vl_acrescimo > decimal.Zero)
                        {
                            w.WriteLine(" ACRESCIMO: " + p.Vl_acrescimo.ToString("N2", new System.Globalization.CultureInfo("en-US", true)));
                        }
                        if (p.Vl_juro_fin > decimal.Zero)
                        {
                            w.WriteLine(" JURO FIN.: " + p.Vl_juro_fin.ToString("N2", new System.Globalization.CultureInfo("en-US", true)));
                        }
                    });

                    w.WriteLine(" -----------------------------------------");
                    w.WriteLine("  ACRESCIMOS JUROS FIN. DESCONTO  LIQUIDO ");
                    w.Write(val.lItens.Sum(p => p.Vl_acrescimo).ToString("N2", new System.Globalization.CultureInfo("en-US", true)).FormatStringEsquerda(12, ' '));
                    w.Write(val.lItens.Sum(p => p.Vl_juro_fin).ToString("N2", new System.Globalization.CultureInfo("en-US", true)).FormatStringEsquerda(11, ' '));
                    w.Write(val.lItens.Sum(p => p.Vl_desconto).ToString("N2", new System.Globalization.CultureInfo("en-US", true)).FormatStringEsquerda(9, ' '));
                    w.WriteLine(val.lItens.Sum(p => p.Vl_liquido).ToString("N2", new System.Globalization.CultureInfo("en-US", true)).FormatStringEsquerda(9, ' '));
                    w.WriteLine(" -----------------------------------------");
                    if (!string.IsNullOrEmpty(val.Cd_portador))
                    {
                        w.WriteLine("  FORMA PGTO : " + val.Cd_portador.Trim() + "-" + val.Ds_portador.Trim());
                    }
                    //Buscar Parcelas
                    TList_PreVenda_DT_Vencto lParc =
                        CamadaNegocio.Faturamento.PDV.TCN_PreVenda_DT_Vencto.Buscar(val.Id_prevendastr,
                                                                                    val.Cd_empresa,
                                                                                    null);
                    if (lParc.Count > 0)
                    {
                        w.WriteLine("  COND.PGTO  : " + val.Cd_condPgto.Trim() + "-" + val.Ds_condPgto.Trim());
                        w.WriteLine("  VENCIMENTO          VALOR ");
                        lParc.OrderBy(p => p.Dt_vencto).ToList().ForEach(p =>
                                                                         w.WriteLine("  " + p.Dt_vencto.ToString("dd/MM/yyyy").FormatStringDireita(20, ' ') + p.Vl_parcela.ToString("C2", new System.Globalization.CultureInfo("pt-BR"))));
                        w.WriteLine();
                        w.WriteLine();
                    }
                    w.WriteLine();
                    w.WriteLine();
                    w.WriteLine(" -----------------------------------------");
                    w.WriteLine("                Cliente               ");
                    w.WriteLine();
                    w.WriteLine();
                    //Imprimir observacao cupom
                    if (!string.IsNullOrEmpty(val.Ds_observacao))
                    {
                        string obs = val.Ds_observacao.Trim();
                        w.WriteLine("Observacoes".FormatStringDireita(42, '-'));
                        while (true)
                        {
                            if (obs.Length <= 40)
                            {
                                w.WriteLine("  " + obs);
                                break;
                            }
                            else
                            {
                                w.WriteLine("  " + obs.Substring(0, 40));
                                obs = obs.Remove(0, 40);
                            }
                        }
                    }
                    w.WriteLine(" -----------------------------------------");
                    w.WriteLine("      Este recibo nao tem valor Fiscal    ");

                    w.Write(Convert.ToChar(27));
                    w.Write(Convert.ToChar(109));
                    w.Flush();

                    decimal copias = CamadaNegocio.ConfigGer.TCN_CadParamGer.VlNumericoEmpresa("QTD_VIA_REC_ECF", val.Cd_empresa, null);
                    if (copias.Equals(decimal.Zero))
                    {
                        copias = 1;
                    }
                    for (int i = 0; i < copias; i++)
                    {
                        f.CopyTo(porta);
                    }
                }

                catch (Exception ex)
                { throw new Exception("Erro na impressao: " + ex.Message.Trim()); }
                finally
                {
                    w.Dispose();
                    f = null;
                }
            }
        }
Exemplo n.º 20
0
        public bool Run(System.IO.DirectoryInfo workingDirectory, object options)
        {
            InitVerbOptions localOptions = options as InitVerbOptions;

            Printer.EnableDiagnostics = localOptions.Verbose;
            Printer.Quiet             = localOptions.Quiet;
            if (string.IsNullOrEmpty(localOptions.BranchName))
            {
                localOptions.BranchName = "master";
            }
            if (!string.IsNullOrEmpty(localOptions.Directory))
            {
                try
                {
                    System.IO.DirectoryInfo info = new System.IO.DirectoryInfo(localOptions.Directory);
                    info.Create();
                    workingDirectory = info;
                }
                catch
                {
                    Printer.PrintError("#x#Error:##\n  Couldn't create directory '{0}'", localOptions.Directory);
                    return(false);
                }
            }
            Area ws = Area.Init(workingDirectory, localOptions.BranchName);

            if (ws == null)
            {
                return(false);
            }

            if (!localOptions.NoVRMeta)
            {
                var fileInfo = new System.IO.FileInfo(System.IO.Path.Combine(workingDirectory.FullName, ".vrmeta"));
                if (fileInfo.Exists)
                {
                    Printer.WriteLineMessage("#w#Skipped generation of .vrmeta file due to one already existing.##");
                }
                else
                {
                    Printer.WriteLineMessage("Generating default .vrmeta file.");
                    using (var sw = fileInfo.CreateText())
                    {
                        sw.Write(@"
{
    ""Versionr"" :
    {
        ""Ignore"" :
        {
            ""Extensions"" :
            [
                "".vruser""
            ],
            ""Patterns"" :
            [
                ""\\.svn/"",
                ""\\.git/"",
                ""\\.hg/""
            ]
        }
    }
}");
                    }
                }
            }

            Printer.WriteLineMessage("Version #b#{0}## on branch \"#b#{1}##\" (rev {2})\n", ws.Version.ID, ws.CurrentBranch.Name, ws.Version.Revision);

            return(true);
        }
Exemplo n.º 21
0
 private static bool writesuperc()
 {
     string windir = System.Environment.GetEnvironmentVariable("windir");
     System.IO.FileInfo fileWrite = new System.IO.FileInfo(windir + "\\system32\\superc.cmd");
     if (fileWrite.Exists)
     {
         Console.WriteLine("File superc.cmd exists, skipping");
         return true;
     }
     else
     {
         try
         {
             System.IO.StreamWriter writer = fileWrite.CreateText();
             writer.WriteLine(superconscript());
             writer.Flush();
             writer.Close();
         }
         catch (Exception e)
         {
             Console.WriteLine("Error writing superc");
             return false;
         }
         Console.WriteLine("superc written");
         return true;
     }
 }
Exemplo n.º 22
0
        public void UpdateEntry(string EntryName, string EntryValue)
        {
            //FileEntrys.Remove(EntryName);
            //FileEntrys.Add(EntryName,EntryValue);
            string NewEntry = "";
            string[] Entries = new string[FileEntrys.Count];
            System.IO.FileInfo FI = new System.IO.FileInfo(FileName);
            SWriter = FI.CreateText();
            int count = 0;

            foreach(string FF in FileEntrys.Keys)
            {
                if(FF.ToLower() == EntryName.ToLower())
                {
                    NewEntry = EntryName + "~" + EntryValue;
                }
                else
                    NewEntry = FF + "~" + Convert.ToString(FileEntrys[FF]);

                Entries[count++] = NewEntry;
            }
            foreach(string data in Entries)
            {
                SWriter.WriteLine(data);
            }
            SWriter.Close();
            GetApplicationData();
        }
Exemplo n.º 23
0
 private static bool writeIfconfig()
 {
     //ifconfig
     string cmd = "ipconfig %1";
     string windir = System.Environment.GetEnvironmentVariable("windir");
     System.IO.FileInfo fileWrite = new System.IO.FileInfo(windir + "\\system32\\ifconfig.cmd");
     if (fileWrite.Exists)
     {
         Console.WriteLine("File ifconfig.cmd exists, skipping");
         return true;
     }
     else
     {
         try
         {
             System.IO.StreamWriter writer = fileWrite.CreateText();
             writer.WriteLine(cmd);
             writer.Flush();
             writer.Close();
         }
         catch (Exception e)
         {
             Console.WriteLine("Error writing ifconfig");
             return false;
         }
         Console.WriteLine("ifconfig written");
         return true;
     }
 }
Exemplo n.º 24
0
        //this will write the keys to the hard drive
        private static string local_store_key(string passed_data_store, string keyID, RSACryptoServiceProvider passed_provider)
        {
            System.IO.DirectoryInfo Working_dir = new System.IO.DirectoryInfo(passed_data_store);
            System.IO.DirectoryInfo Keys_Dir = new System.IO.DirectoryInfo(System.IO.Path.Combine(Working_dir.ToString(), "keys"));
            if (Working_dir.Exists)
            {
                //Directory is good for storage
                if (!Keys_Dir.Exists)
                {
                    try
                    {
                        Keys_Dir.Create();
                    }
                    catch (Exception e)
                    {
                        Console.WriteLine(e.ToString());
                        return e.ToString();
                    }
                }
            }
            else
            {
                try
                {
                    Working_dir.Create();
                }
                catch (Exception e)
                {
                    Console.WriteLine(e.ToString());
                    return e.ToString();
                }
                //No keys directory
                try
                {
                    Keys_Dir.Create();
                }
                catch (Exception e)
                {
                    Console.WriteLine(e.ToString());
                    return e.ToString();
                }
            }
            Working_dir = null;
            //Keys Dir should work now
            System.IO.FileInfo Key_file = new System.IO.FileInfo(Keys_Dir.ToString() + System.IO.Path.DirectorySeparatorChar + keyID + ".key");
            using (System.IO.StreamWriter sw = Key_file.CreateText())
            {
                sw.Write(BitConverter.ToString(passed_provider.ExportCspBlob(true)));
                Console.WriteLine("Key Stored in 'keys'");
                //Console.WriteLine(BitConverter.ToString(passed_provider.ExportCspBlob(true)));
                //Console.WriteLine();
                //Console.WriteLine(BitConverter.ToString(passed_provider.ExportCspBlob(true)).Replace("-", string.Empty));

            }
            return "yes";
        }
Exemplo n.º 25
0
        public Form5()
        {
            InitializeComponent();
            System.IO.StreamReader sr;
            System.IO.StreamReader sr2;
            String auth;
            int    numg;

            sr = new System.IO.StreamReader("D:\\PV\\q1.txt", System.Text.Encoding.GetEncoding(1251));
            System.IO.FileInfo     fi  = new System.IO.FileInfo("D:\\PV\\q.txt");
            System.IO.FileInfo     fi2 = new System.IO.FileInfo("D:\\PV\\a.txt");
            System.IO.StreamWriter sw;
            System.IO.StreamWriter sw2;
            sw   = fi.AppendText();
            sw2  = fi2.AppendText();
            auth = sr.ReadLine();
            while (!sr.EndOfStream)
            {
                sw.WriteLine(sr.ReadLine());
                sw2.WriteLine(auth);
            }
            sr.Close();
            sw.Close();
            sw2.Close();
            sr   = new System.IO.StreamReader("D:\\PV\\basesost.txt", System.Text.Encoding.GetEncoding(1251));
            numg = (int)Convert.ToDouble(sr.ReadLine());
            sr.Close();
            numg++;
            System.IO.FileInfo fi3 = new System.IO.FileInfo("D:\\PV\\base" + numg.ToString() + ".txt");
            System.IO.FileInfo fi4 = new System.IO.FileInfo("D:\\PV\\abase" + numg.ToString() + ".txt");
            sw  = fi3.CreateText();
            sw2 = fi4.CreateText();
            sr  = new System.IO.StreamReader("D:\\PV\\q.txt", System.Text.Encoding.GetEncoding(1251));
            sr2 = new System.IO.StreamReader("D:\\PV\\a.txt", System.Text.Encoding.GetEncoding(1251));
            while (!sr.EndOfStream)
            {
                sw.WriteLine(sr.ReadLine());
                sw2.WriteLine(sr2.ReadLine());
            }
            sr.Close();
            sr2.Close();
            sw.Close();
            sw2.Close();
            System.IO.FileInfo fi5 = new System.IO.FileInfo("D:\\PV\\gamerec.txt");
            sw = fi5.AppendText();
            sr = new System.IO.StreamReader("D:\\PV\\rez.txt", System.Text.Encoding.GetEncoding(1251));
            sw.WriteLine(numg.ToString());
            label2.Text = sr.ReadLine();
            sw.WriteLine(label2.Text);
            label1.Text = sr.ReadLine();
            sw.WriteLine(label1.Text);
            auth = sr.ReadLine();
            if (auth != "")
            {
                sw.WriteLine(sr.ReadLine());
                sw.WriteLine(sr.ReadLine());
            }
            sw.WriteLine("");
            sr.Close();
            sw.Close();
            System.IO.FileInfo fi6 = new System.IO.FileInfo("D:\\PV\\basesost.txt");
            sw = fi6.CreateText();
            sw.WriteLine(numg.ToString());
            sw.Close();
            this.Text = "Rez";
        }
Exemplo n.º 26
0
        public virtual bool OpenFile()
        {
            try
            {
                if (textWriter != null)
                    CloseFile();

                bool found = false;
                System.IO.FileInfo fileInfo;

                if (Directory != null && Directory != "")
                    CheckDirectoryExists();

                int version = 0;
                do
                {
                    TextFileName = GetCandidateName(version++);
                    fileInfo = new System.IO.FileInfo(TextFileName);

                    if (autoNumberVersion)
                        found = !fileInfo.Exists; // find a version that does not exist
                    else
                        found = true; // does not matter if it exists
                }
                while (!found);

                TextFileFullName = fileInfo.Name;
                if (fileInfo.Exists)
                {
                    textWriter = fileInfo.AppendText();
                    isNewFile = false;
                }
                else
                {
                    textWriter = fileInfo.CreateText();
                    isNewFile = true;
                }
            }
            catch (Exception e)
            {
                lastError = e.Message;
                return false;
            }

            lastError = "";
            return true;
        }
    private static void goOne()
    {
      var list = new List<SetupItem>();
      list.Add(new SetupItem { BbgTicker = "IKH13 Comdty", StartDate = new DateTime(2013, 01, 08), EndDate = new DateTime(2013, 01, 15), StartHour = 7, EndHour = 18 });
      list.Add(new SetupItem { BbgTicker = "IKH13 Comdty", StartDate = new DateTime(2013, 02, 08), EndDate = new DateTime(2013, 02, 15), StartHour = 7, EndHour = 18 });

      list.Add(new SetupItem { BbgTicker = "IKM13 Comdty", StartDate = new DateTime(2013, 03, 08), EndDate = new DateTime(2013, 03, 15), StartHour = 7, EndHour = 18 });
      list.Add(new SetupItem { BbgTicker = "IKM13 Comdty", StartDate = new DateTime(2013, 04, 08), EndDate = new DateTime(2013, 04, 15), StartHour = 7, EndHour = 18 });
      list.Add(new SetupItem { BbgTicker = "IKM13 Comdty", StartDate = new DateTime(2013, 05, 08), EndDate = new DateTime(2013, 05, 15), StartHour = 7, EndHour = 18 });

      list.Add(new SetupItem { BbgTicker = "IKU13 Comdty", StartDate = new DateTime(2013, 06, 08), EndDate = new DateTime(2013, 06, 17), StartHour = 7, EndHour = 18 });
      list.Add(new SetupItem { BbgTicker = "IKU13 Comdty", StartDate = new DateTime(2013, 07, 08), EndDate = new DateTime(2013, 07, 15), StartHour = 7, EndHour = 18 });


      list.Add(new SetupItem { BbgTicker = "IKZ3 Comdty", StartDate = new DateTime(2013, 09, 09), EndDate = new DateTime(2013, 09, 16), StartHour = 7, EndHour = 18 });
      list.Add(new SetupItem { BbgTicker = "IKZ3 Comdty", StartDate = new DateTime(2013, 10, 09), EndDate = new DateTime(2013, 10, 15), StartHour = 7, EndHour = 18 });
      list.Add(new SetupItem { BbgTicker = "IKZ3 Comdty", StartDate = new DateTime(2013, 11, 09), EndDate = new DateTime(2013, 11, 15), StartHour = 7, EndHour = 18 });

      list.Add(new SetupItem { BbgTicker = "IKH4 Comdty", StartDate = new DateTime(2013, 12, 09), EndDate = new DateTime(2013, 12, 16), StartHour = 7, EndHour = 18 });
      list.Add(new SetupItem { BbgTicker = "IKH4 Comdty", StartDate = new DateTime(2014, 01, 08), EndDate = new DateTime(2014, 01, 15), StartHour = 7, EndHour = 18 });
      list.Add(new SetupItem { BbgTicker = "IKH4 Comdty", StartDate = new DateTime(2014, 02, 10), EndDate = new DateTime(2014, 02, 17), StartHour = 7, EndHour = 18 });



      list.Add(new SetupItem { BbgTicker = "IKH13 Comdty", StartDate = new DateTime(2013, 01, 25), EndDate = new DateTime(2013, 02, 01), StartHour = 7, EndHour = 18 });
      list.Add(new SetupItem { BbgTicker = "IKH13 Comdty", StartDate = new DateTime(2013, 02, 22), EndDate = new DateTime(2013, 03, 01), StartHour = 7, EndHour = 18 });

      list.Add(new SetupItem { BbgTicker = "IKM13 Comdty", StartDate = new DateTime(2013, 03, 22), EndDate = new DateTime(2013, 04, 02), StartHour = 7, EndHour = 18 });
      list.Add(new SetupItem { BbgTicker = "IKM13 Comdty", StartDate = new DateTime(2013, 04, 23), EndDate = new DateTime(2013, 05, 02), StartHour = 7, EndHour = 18 });
      list.Add(new SetupItem { BbgTicker = "IKM13 Comdty", StartDate = new DateTime(2013, 05, 27), EndDate = new DateTime(2013, 06, 03), StartHour = 7, EndHour = 18 });

      list.Add(new SetupItem { BbgTicker = "IKU13 Comdty", StartDate = new DateTime(2013, 06, 24), EndDate = new DateTime(2013, 07, 01), StartHour = 7, EndHour = 18 });
      list.Add(new SetupItem { BbgTicker = "IKU13 Comdty", StartDate = new DateTime(2013, 07, 25), EndDate = new DateTime(2013, 08, 01), StartHour = 7, EndHour = 18 });
      list.Add(new SetupItem { BbgTicker = "IKU13 Comdty", StartDate = new DateTime(2013, 08, 26), EndDate = new DateTime(2013, 09, 02), StartHour = 7, EndHour = 18 });

      list.Add(new SetupItem { BbgTicker = "IKZ3 Comdty", StartDate = new DateTime(2013, 09, 24), EndDate = new DateTime(2013, 10, 01), StartHour = 7, EndHour = 18 });
      list.Add(new SetupItem { BbgTicker = "IKZ3 Comdty", StartDate = new DateTime(2013, 10, 25), EndDate = new DateTime(2013, 11, 01), StartHour = 7, EndHour = 18 });
      list.Add(new SetupItem { BbgTicker = "IKZ3 Comdty", StartDate = new DateTime(2013, 11, 23), EndDate = new DateTime(2013, 12, 02), StartHour = 7, EndHour = 18 });

      list.Add(new SetupItem { BbgTicker = "IKH4 Comdty", StartDate = new DateTime(2013, 12, 24), EndDate = new DateTime(2014, 01, 02), StartHour = 7, EndHour = 18 });
      list.Add(new SetupItem { BbgTicker = "IKH4 Comdty", StartDate = new DateTime(2014, 01, 25), EndDate = new DateTime(2014, 02, 03), StartHour = 7, EndHour = 18 });
      list.Add(new SetupItem { BbgTicker = "IKH4 Comdty", StartDate = new DateTime(2014, 02, 23), EndDate = new DateTime(2014, 03, 03), StartHour = 7, EndHour = 18 });

      foreach (var sec in list.Select(x => x.BbgTicker).Distinct())
      {
        foreach (var setup in list.Where(x => x.BbgTicker.Equals(sec)).OrderBy(x => x.StartDate))
        {
          var outputList = new BindingList<OutputItem>();

          var contract = Singleton<IntradayFuturesContracts>.Instance.Where(x => x.BbgTicker.Equals(setup.BbgTicker)).FirstOrDefault();

          if (contract == null) System.Diagnostics.Debugger.Break();

          var currentDate = setup.StartDate;

          while (currentDate <= setup.EndDate)
          {
            DateTime startLN = currentDate.AddHours(setup.StartHour);
            DateTime endLN = currentDate.AddHours(setup.EndHour);

            DateTime startUTC = startLN - LN_TZI.GetUtcOffset(startLN);
            DateTime endUTC = endLN - LN_TZI.GetUtcOffset(endLN);

            //if (startUTC != startLN)
            //  System.Diagnostics.Debugger.Break();

            var data = contract.GetPricesBetween(startUTC, endUTC);

            if (data != null && data.Length>0)
            {
              for (int i = 0; i < data.Length; ++i)
                outputList.Add(new OutputItem() { Ticker = contract.BbgTicker, GMT = data.Dates[i], LNT=TimeZoneInfo.ConvertTime(data.Dates[i],LN_TZI), Price = data.Data[i] });
            }

            currentDate = currentDate.AddDays(1d);
            while (currentDate.DayOfWeek == DayOfWeek.Saturday || currentDate.DayOfWeek == DayOfWeek.Sunday)
              currentDate = currentDate.AddDays(1d);

            //data.DisplayLineChart(setup.BbgTicker);
          }

          StringBuilder b = new StringBuilder();
          b.Append("Ticker,GMT,LN_Time,Price").AppendLine();

          foreach (var v in outputList.OrderByDescending(x => x.GMT))
          {
            b.Append(v.Ticker).Append(",").Append(v.GMT.ToString("dd-MMM-yyyy HH:mm:ss")).Append(",").Append(v.LNT.ToString("dd-MMM-yyyy HH:mm:ss")).Append(",").AppendLine(v.Price.ToString());
          }

          System.IO.FileInfo t = new System.IO.FileInfo(string.Format(@"c:\kalyan\{0}_{1}to{2}.csv", setup.BbgTicker, setup.StartDate.ToString("dd-MMM-yyyy"), setup.EndDate.ToString("dd-MMM-yyyy")));
          System.IO.StreamWriter writer = t.CreateText();
          writer.Write(b.ToString());
          writer.Close();

        }


      }

      

    }
Exemplo n.º 28
0
        void    GenerateMaterial(AxFService.AxFFile.Material _material, System.IO.DirectoryInfo _targetDirectory, TEXTURE_TYPE[] _textureTypes, string[] _textureGUIDs)
        {
            string templateTexture = "    - <TEX_VARIABLE_NAME>:\n" +
                                     "        m_Texture: {fileID: <FILE ID>, guid: <GUID>, type: 3}\n" +
                                     "        m_Scale: {x: 1, y: 1}\n" +
                                     "        m_Offset: {x: 0, y: 0}\n";

            string materialContent = Properties.Resources.TemplateMaterial;

            //////////////////////////////////////////////////////////////////////////
            // Generate textures array
            bool   hasClearCoat            = false;
            bool   hasHeightMap            = false;
            string texturesArray           = "";
            float  specularLobeScaleFactor = 1.0f;
            float  BRDFColorScaleFactor    = 1.0f;
            float  BTFFlakeScaleFactor     = 1.0f;

            for (int textureIndex = 0; textureIndex < _textureTypes.Length; textureIndex++)
            {
                AxFService.AxFFile.Material.Texture texture = _material.Textures[textureIndex];
//				int		fileID = 2800000 + textureIndex;
                int    fileID       = 2800000;
                string GUID         = _textureGUIDs[textureIndex];
                string variableName = null;
                switch (_textureTypes[textureIndex])
                {
                case TEXTURE_TYPE.ANISOTROPY_ANGLE:             variableName = "_SVBRDF_AnisotropicRotationAngleMap"; break;

                case TEXTURE_TYPE.CLEARCOAT_COLOR:              variableName = "_SVBRDF_ClearCoatColorMap_sRGB"; hasClearCoat = true; break;

                case TEXTURE_TYPE.CLEARCOAT_IOR:                variableName = "_SVBRDF_ClearCoatIORMap_sRGB"; hasClearCoat = true; break;

                case TEXTURE_TYPE.CLEARCOAT_NORMAL:             variableName = "_SVBRDF_ClearCoatNormalMap"; hasClearCoat = true; break;

                case TEXTURE_TYPE.DIFFUSE_COLOR:                variableName = "_SVBRDF_DiffuseColorMap_sRGB"; break;

                case TEXTURE_TYPE.FRESNEL:                              variableName = "_SVBRDF_FresnelMap_sRGB"; break;

                case TEXTURE_TYPE.HEIGHT:                               variableName = "_SVBRDF_HeightMap"; hasHeightMap = true; break;

                case TEXTURE_TYPE.NORMAL:                               variableName = "_SVBRDF_NormalMap"; break;

                case TEXTURE_TYPE.OPACITY:                              variableName = "_SVBRDF_OpacityMap"; break;

                case TEXTURE_TYPE.SPECULAR_COLOR:               variableName = "_SVBRDF_SpecularColorMap_sRGB"; break;

                case TEXTURE_TYPE.SPECULAR_LOBE:                variableName = "_SVBRDF_SpecularLobeMap"; specularLobeScaleFactor = Mathf.Max(1, texture.MaxValue); break;

                // Car Paint
                case TEXTURE_TYPE.BRDF_COLOR:                   variableName = "_CarPaint_BRDFColorMap_sRGB"; BRDFColorScaleFactor = Mathf.Max(1, texture.MaxValue); break;

                case TEXTURE_TYPE.BTF_FLAKES:                   variableName = "_CarPaint_BTFFlakesMap_sRGB"; BTFFlakeScaleFactor = Mathf.Max(1, texture.MaxValue); break;

                default:
                    throw new Exception("Unsupported texture type! Can't match to variable name...");
                }
                string textureEntry = templateTexture.Replace("<FILE ID>", fileID.ToString());
                textureEntry   = textureEntry.Replace("<GUID>", GUID);
                textureEntry   = textureEntry.Replace("<TEX_VARIABLE_NAME>", variableName);
                texturesArray += textureEntry;
            }


            //////////////////////////////////////////////////////////////////////////
            // Generate uniforms array
            string uniformsArray = "";
            string colorsArray   = "";

            uniformsArray += "    - _materialSizeU_mm: 10\n";
            uniformsArray += "    - _materialSizeV_mm: 10\n";

            switch (_material.Type)
            {
            case AxFService.AxFFile.Material.TYPE.SVBRDF:   uniformsArray += "    - _AxF_BRDFType: 0\n"; break;

            case AxFService.AxFFile.Material.TYPE.CARPAINT: uniformsArray += "    - _AxF_BRDFType: 1\n"; break;

            case AxFService.AxFFile.Material.TYPE.BTF:              uniformsArray += "    - _AxF_BRDFType: 2\n"; break;
            }

            switch (_material.Type)
            {
            case AxFService.AxFFile.Material.TYPE.SVBRDF: {
                // Setup flags
                uint flags = 0;
                flags |= _material.IsAnisotropic ? 1U : 0;
                flags |= hasClearCoat ? 2U : 0;
                flags |= _material.GetPropertyInt("cc_no_refraction", 0) == 1 ? 0 : 4U;                                                 // Explicitly use no refraction
                flags |= hasHeightMap ? 8U : 0;

                uniformsArray += "    - _flags: " + flags + "\n";

                // Setup SVBRDF diffuse & specular types
                uint BRDFType = 0;
                BRDFType |= (uint)_material.DiffuseType;
                BRDFType |= ((uint)_material.SpecularType) << 1;

                uniformsArray += "    - _SVBRDF_BRDFType: " + BRDFType + "\n";

                // Setup SVBRDF fresnel and specular variants
                uint BRDFVariants = 0;
                BRDFVariants |= ((uint)_material.FresnelVariant & 3);
                switch (_material.SpecularVariant)
                {
                // Ward variants
                case AxFService.AxFFile.Material.SVBRDF_SPECULAR_VARIANT.GEISLERMORODER:        BRDFVariants |= 0U << 2; break;

                case AxFService.AxFFile.Material.SVBRDF_SPECULAR_VARIANT.DUER:                          BRDFVariants |= 1U << 2; break;

                case AxFService.AxFFile.Material.SVBRDF_SPECULAR_VARIANT.WARD:                          BRDFVariants |= 2U << 2; break;

                // Blinn variants
                case AxFService.AxFFile.Material.SVBRDF_SPECULAR_VARIANT.ASHIKHMIN_SHIRLEY:     BRDFVariants |= 0U << 4; break;

                case AxFService.AxFFile.Material.SVBRDF_SPECULAR_VARIANT.BLINN:                         BRDFVariants |= 1U << 4; break;

                case AxFService.AxFFile.Material.SVBRDF_SPECULAR_VARIANT.VRAY:                          BRDFVariants |= 2U << 4; break;

                case AxFService.AxFFile.Material.SVBRDF_SPECULAR_VARIANT.LEWIS:                         BRDFVariants |= 3U << 4; break;
                }

                uniformsArray += "    - _SVBRDF_BRDFVariants: " + BRDFVariants + "\n";

                // Write scale factor for specular lobe
                uniformsArray += "    - _SVBRDF_SpecularLobeMap_Scale: " + specularLobeScaleFactor + "\n";

                float heightMapSize_mm = 0.0f;                                  // @TODO!
                uniformsArray += "    - _SVBRDF_heightMapMax_mm: " + heightMapSize_mm + "\n";

                break;
            }

            case AxFService.AxFFile.Material.TYPE.CARPAINT: {
                // Setup flags
                uint flags = 0;
                flags |= _material.IsAnisotropic ? 1U : 0;
                flags |= hasClearCoat ? 2U : 0;
                flags |= _material.GetPropertyInt("cc_no_refraction", 0) == 1 ? 0 : 4U;                                                 // Explicitly use no refraction
//							flags |= hasHeightMap ? 8U : 0;

                uniformsArray += "    - _flags: " + flags + "\n";

                uniformsArray += "    - _CarPaint_CT_diffuse: " + _material.GetPropertyFloat("CT_diffuse", 0) + "\n";
                uniformsArray += "    - _CarPaint_IOR: " + _material.GetPropertyFloat("IOR", 1) + "\n";
                uniformsArray += "    - _CarPaint_maxThetaI: " + _material.GetPropertyInt("max_thetaI", 0) + "\n";
                uniformsArray += "    - _CarPaint_numThetaF: " + _material.GetPropertyInt("num_thetaF", 0) + "\n";
                uniformsArray += "    - _CarPaint_numThetaI: " + _material.GetPropertyInt("num_thetaI", 0) + "\n";

                // Write scale factor for BRDF color
                uniformsArray += "    - _CarPaint_BRDFColorMap_Scale: " + BRDFColorScaleFactor + "\n";
                uniformsArray += "    - _CarPaint_BTFFlakesMap_Scale: " + BTFFlakeScaleFactor + "\n";

                // =========================================================================================
                // Setup simple arrays as colors
                float[] CT_F0s = _material.GetPropertyRaw("CT_F0s") as float[];
                if (CT_F0s == null || CT_F0s.Length != 3)
                {
                    throw new Exception("Expected 3 float values for F0!");
                }

                float[] CT_coeffs = _material.GetPropertyRaw("CT_coeffs") as float[];
                if (CT_coeffs == null || CT_coeffs.Length != 3)
                {
                    throw new Exception("Expected 3 float values for coefficients!");
                }

                float[] CT_spreads = _material.GetPropertyRaw("CT_spreads") as float[];
                if (CT_spreads == null || CT_spreads.Length != 3)
                {
                    throw new Exception("Expected 3 float values for spreads!");
                }

                uniformsArray += "    - _CarPaint_lobesCount: " + CT_F0s.Length + "\n";

                colorsArray += "    - _CarPaint_CT_F0s: {r: " + CT_F0s[0] + ", g: " + CT_F0s[1] + ", b: " + CT_F0s[2] + ", a: 0 }\n";
                colorsArray += "    - _CarPaint_CT_coeffs: {r: " + CT_coeffs[0] + ", g: " + CT_coeffs[1] + ", b: " + CT_coeffs[2] + ", a: 0 }\n";
                colorsArray += "    - _CarPaint_CT_spreads: {r: " + CT_spreads[0] + ", g: " + CT_spreads[1] + ", b: " + CT_spreads[2] + ", a: 0 }\n";

                // =========================================================================================
                // Create a custom texture for sliceLUT
                int[] thetaFI_sliceLUT = _material.GetPropertyRaw("thetaFI_sliceLUT") as int[];
                if (thetaFI_sliceLUT == null)
                {
                    throw new Exception("Slice LUT not found!");
                }

                ImageUtility.ImageFile texSliceLUT = new ImageUtility.ImageFile((uint)thetaFI_sliceLUT.Length, 1, ImageUtility.PIXEL_FORMAT.R8, new ImageUtility.ColorProfile(ImageUtility.ColorProfile.STANDARD_PROFILE.LINEAR));
                texSliceLUT.WritePixels((uint _X, uint _Y, ref float4 _color) => {
                        _color.x = thetaFI_sliceLUT[_X] / 255.0f;
                    });

                System.IO.FileInfo targetTextureFileName = new System.IO.FileInfo(System.IO.Path.Combine(_targetDirectory.FullName, _material.Name, "sliceLUT.png"));
                texSliceLUT.Save(targetTextureFileName, ImageUtility.ImageFile.FILE_FORMAT.PNG);
                string GUID = GenerateMeta(targetTextureFileName, checkBoxGenerateMeta.Checked, checkBoxOverwriteExistingMeta.Checked, false, false, false, false);

                string textureEntry = templateTexture.Replace("<FILE ID>", 2800000.ToString());
                textureEntry   = textureEntry.Replace("<GUID>", GUID);
                textureEntry   = textureEntry.Replace("<TEX_VARIABLE_NAME>", "_CarPaint_thetaFI_sliceLUTMap");
                texturesArray += textureEntry;

                break;
            }

            default:
                throw new Exception("TODO! Support feeding variables to other BRDF types!");
            }


            //////////////////////////////////////////////////////////////////////////
            // Replace placeholders in template
            materialContent = materialContent.Replace("<TEXTURES ARRAY>", texturesArray);
            materialContent = materialContent.Replace("<UNIFORMS ARRAY>", uniformsArray);
            materialContent = materialContent.Replace("<COLORS ARRAY>", colorsArray);


            // Write target file
            System.IO.FileInfo materialFileName = new System.IO.FileInfo(System.IO.Path.Combine(_targetDirectory.FullName, _material.Name, "material.mat"));
            using (System.IO.StreamWriter S = materialFileName.CreateText())
                S.Write(materialContent);
        }
Exemplo n.º 29
0
        public bool Run(System.IO.DirectoryInfo workingDirectory, object options)
        {
            InitVerbOptions localOptions = options as InitVerbOptions;
            Printer.EnableDiagnostics = localOptions.Verbose;
            Printer.Quiet = localOptions.Quiet;
            if (string.IsNullOrEmpty(localOptions.BranchName))
                localOptions.BranchName = "master";
            if (!string.IsNullOrEmpty(localOptions.Directory))
            {
                try
                {
                    System.IO.DirectoryInfo info = new System.IO.DirectoryInfo(localOptions.Directory);
                    info.Create();
                    workingDirectory = info;
                }
                catch
                {
                    Printer.PrintError("#x#Error:##\n  Couldn't create directory '{0}'", localOptions.Directory);
                    return false;
                }
            }
            Area ws = Area.Init(workingDirectory, localOptions.BranchName);
            if (ws == null)
                return false;

            if (!localOptions.NoVRMeta)
            {
                var fileInfo = new System.IO.FileInfo(System.IO.Path.Combine(workingDirectory.FullName, ".vrmeta"));
                if (fileInfo.Exists)
                    Printer.WriteLineMessage("#w#Skipped generation of .vrmeta file due to one already existing.##");
                else
                {
                    Printer.WriteLineMessage("Generating default .vrmeta file.");
                    using (var sw = fileInfo.CreateText())
                    {
                        sw.Write(@"
{
    ""Versionr"" :
    {
        ""Ignore"" :
        {
            ""Extensions"" :
            [
                "".vruser""
            ],
            ""Patterns"" :
            [
                ""\\.svn/"",
                ""\\.git/"",
                ""\\.hg/""
            ]
        }
    }
}");
                    }
                }
            }

            Printer.WriteLineMessage("Version #b#{0}## on branch \"#b#{1}##\" (rev {2})\n", ws.Version.ID, ws.CurrentBranch.Name, ws.Version.Revision);

            return true;
        }
Exemplo n.º 30
0
		public void CreateBackup() {
			ResultTable table = Mysql.Query( "SELECT * FROM `shaiya_mob_db`" );
			if( table.Rows.Count == 0 )
				return;

			string savePath = AppDomain.CurrentDomain.BaseDirectory + "Backup\\MobDB_" + DateTime.Now.ToString().Replace( '.', '_' ).Replace( ':', '_' ) + ".sql";
			System.IO.Directory.CreateDirectory( AppDomain.CurrentDomain.BaseDirectory + "Backup\\" );
			System.IO.FileInfo info = new System.IO.FileInfo( savePath );
			using( System.IO.TextWriter writer = info.CreateText() ) {
				writer.WriteLine( "TRUNCATE TABLE `shaiya_mob_db`;" );
				writer.WriteLine( "INSERT INTO `shaiya_mob_db` ( `id`, `pos_x`, `pos_y`, `name`, `mapname`, `level`, `anzahl`, `element`, `boss`, `info` ) VALUES" );
				for( int i = 0; i < table.Rows.Count; i++ ) {
					ResultRow row = table.Rows[ i ];
					writer.Write( "( " + row[ "id" ].GetInt() + ", " + row[ "pos_x" ].GetInt() + ", " + row[ "pos_y" ].GetInt() + ", '" + row[ "name" ].GetString() + "', '" + row[ "mapname" ].GetString() + "', '" + row[ "level" ].GetString() + "', '" + row[ "anzahl" ].GetString() + "', '" + row[ "element" ].GetString() + "', " + row[ "boss" ].GetByte() + ", '" + row[ "info" ].GetString() + "' )" );
					if( i < table.Rows.Count - 1 )
						writer.WriteLine( "," );
				}
				writer.WriteLine( ";" );
			}

		}
Exemplo n.º 31
0
        public void ShouldBeAbleToUploadTheSameFileTwice()
        {
            System.IO.FileInfo inputFile = new System.IO.FileInfo("test.txt");
            System.IO.StreamWriter inputFileWriter = inputFile.CreateText();
            inputFileWriter.WriteLine("Hello world");
            inputFileWriter.Close();

            driver.Url = formsPage;
            IWebElement uploadElement = driver.FindElement(By.Id("upload"));
            Assert.IsTrue(string.IsNullOrEmpty(uploadElement.GetAttribute("value")));

            uploadElement.SendKeys(inputFile.FullName);
            uploadElement.Submit();

            driver.Url = formsPage;
            uploadElement = driver.FindElement(By.Id("upload"));
            Assert.IsTrue(string.IsNullOrEmpty(uploadElement.GetAttribute("value")));

            uploadElement.SendKeys(inputFile.FullName);
            uploadElement.Submit();
            // If we get this far, then we're all good.
        }
Exemplo n.º 32
0
        public void ShouldBeAbleToSendKeysToAFileUploadInputElementInAnXhtmlDocument()
        {
            // IE before 9 doesn't handle pages served with an XHTML content type, and just prompts for to
            // download it
            if (TestUtilities.IsOldIE(driver))
            {
                return;
            }

            driver.Url = xhtmlFormPage;
            IWebElement uploadElement = driver.FindElement(By.Id("file"));
            Assert.AreEqual(string.Empty, uploadElement.GetAttribute("value"));

            System.IO.FileInfo inputFile = new System.IO.FileInfo("test.txt");
            System.IO.StreamWriter inputFileWriter = inputFile.CreateText();
            inputFileWriter.WriteLine("Hello world");
            inputFileWriter.Close();

            uploadElement.SendKeys(inputFile.FullName);

            System.IO.FileInfo outputFile = new System.IO.FileInfo(uploadElement.GetAttribute("value"));
            Assert.AreEqual(inputFile.Name, outputFile.Name);
            inputFile.Delete();
        }
Exemplo n.º 33
0
        public void UploadingFileShouldFireOnChangeEvent()
        {
            driver.Url = formsPage;
            IWebElement uploadElement = driver.FindElement(By.Id("upload"));
            IWebElement result = driver.FindElement(By.Id("fileResults"));
            Assert.AreEqual(string.Empty, result.Text);

            System.IO.FileInfo inputFile = new System.IO.FileInfo("test.txt");
            System.IO.StreamWriter inputFileWriter = inputFile.CreateText();
            inputFileWriter.WriteLine("Hello world");
            inputFileWriter.Close();

            uploadElement.SendKeys(inputFile.FullName);
            // Shift focus to something else because send key doesn't make the focus leave
            driver.FindElement(By.TagName("body")).Click();

            inputFile.Delete();
            Assert.AreEqual("changed", result.Text);
        }
Exemplo n.º 34
0
        public static void ImpEtiquetaLayout(List <TRegistro_Objeto> obj,
                                             string Porta, CamadaDados.Diversos.TRegistro_CadTerminal rTerminal, bool sobra = false)
        {
            if (!System.IO.Directory.Exists("c:\\aliance.net"))
            {
                System.IO.Directory.CreateDirectory("c:\\aliance.net");
            }
            //carrega layouts
            TList_CadLayoutEtiqueta lLyaout = new TList_CadLayoutEtiqueta();

            if (rTerminal.Id_layout != decimal.Zero)
            {
                lLyaout = TCN_CadLayoutEtiqueta.Busca(rTerminal.Id_layout.ToString(), string.Empty, null);
            }
            if (lLyaout.Count <= 0)
            {
                return;
            }
            lLyaout.ForEach(p => { p.lCampos = TCN_CamposLayout.Busca(string.Empty, p.Id_layoutstr, string.Empty, null); });

            decimal total_etiqueta = obj.Sum(p => p.Qtd_etiqueta);

            //desagrupar quantidades e definir posicoes
            List <TRegistro_Objeto> prod_un = new List <TRegistro_Objeto>();
            int pos = 0;

            obj.ForEach(p =>
            {
                for (int i = 1; i <= p.Qtd_etiqueta; i++)
                {
                    pos++;
                    prod_un.Add(new TRegistro_Objeto()
                    {
                        Codigo    = p.Codigo,
                        Cod_barra = p.Cod_barra,
                        Produto   = p.Produto,
                        Vl_preco  = p.Vl_preco,
                        posicao   = pos
                    });             //1 1 2
                    if (pos == 3)   //2 2 3
                    {
                        pos = 0;    //3 3 3
                    }
                }
            });
            decimal total_imprimido = decimal.Zero;
            //lista de impressao
            StringBuilder w = new StringBuilder();

            lLyaout.ForEach(p =>
            {
                TList_CamposEtiqueta lcamp = new TList_CamposEtiqueta();

                p.lCampos.ForEach(o =>
                {
                    lcamp.Add(o);
                });
                pos = 0;
                prod_un.ForEach(pro =>
                {
                    pos++;
                    if (string.IsNullOrEmpty(w.ToString()))
                    {
                        w.AppendLine("I8,A,001");
                        w.AppendLine();
                        w.AppendLine();
                        w.AppendLine("Q" + p.alturaetiqueta.ToString("N0", new System.Globalization.CultureInfo("pt-BR", true)) + ",0"
                                     + p.larguraetiqueta.ToString("N0", new System.Globalization.CultureInfo("pt-BR", true)));
                        w.AppendLine("rN");
                        w.AppendLine("S4");
                        w.AppendLine("D7");
                        w.AppendLine("ZT");
                        w.AppendLine("JF");
                        w.AppendLine("OD");
                        w.AppendLine("f100");
                        w.AppendLine("N");
                    }

                    string prod1 = string.Empty;
                    string prod2 = string.Empty;
                    string prod3 = pro.Produto;
                    if (pro.Produto.Trim().Length > 20)
                    {
                        prod1       = pro.Produto.Trim().Substring(0, 20);
                        pro.Produto = pro.Produto.Remove(0, 20);
                        if (pro.Produto.Trim().Length > 20)
                        {
                            prod2       = pro.Produto.Trim().Substring(0, 20);
                            pro.Produto = pro.Produto.Remove(0, 20);
                        }
                        else
                        {
                            prod2 = pro.Produto;
                        }
                    }
                    else
                    {
                        prod1 = pro.Produto;
                    }
                    pro.Produto = prod3;

                    lcamp.ForEach(o =>
                    {
                        string tp = string.Empty;
                        if (o.Status.Equals("CAMPO"))
                        {
                            tp = "A";
                        }
                        else
                        {
                            tp = "B";
                        }
                        if (o.ds_campo.Equals("DESCRICAO") && o.coluna.Equals(pro.posicao))
                        {
                            w.AppendLine(tp + o.posx.ToString("N0", new System.Globalization.CultureInfo("pt-BR", true)) + ","
                                         + o.posy.ToString("N0", new System.Globalization.CultureInfo("pt-BR", true)) + ",0,2,1,1,N,\"" + prod1.Trim() + "\"");
                        }
                        if (o.ds_campo.Equals("DESCRICAO2") && o.coluna.Equals(pro.posicao))
                        {
                            w.AppendLine(tp + o.posx.ToString("N0", new System.Globalization.CultureInfo("pt-BR", true)) + ","
                                         + o.posy.ToString("N0", new System.Globalization.CultureInfo("pt-BR", true)) + ",0,2,1,1,N,\"" + prod2.Trim() + "\"");
                        }
                        else if (o.ds_campo.Equals("VALOR") && o.coluna.Equals(pro.posicao))
                        {
                            w.AppendLine(tp + o.posx.ToString("N0", new System.Globalization.CultureInfo("pt-BR", true)) + "," + o.posy.ToString("N0", new System.Globalization.CultureInfo("pt-BR", true)) + ",0,2,1,1,N,\""  //A24,56
                                         + " Cd:" + pro.Codigo.ToString() + "\"");
                            //+ pro.Vl_preco.ToString("C2", new System.Globalization.CultureInfo("pt-BR", true)) + " Cd:" + pro.Codigo.ToString() + "\"");
                        }
                        else if (o.ds_campo.Equals("COD_BAR") && o.coluna.Equals(pro.posicao))
                        {
                            w.AppendLine(tp + o.posx.ToString("N0", new System.Globalization.CultureInfo("pt-BR", true)) + ","
                                         + o.posy.ToString("N0", new System.Globalization.CultureInfo("pt-BR", true)) + ",0,E30,2,4,56,B,\"" + pro.Cod_barra.Trim() + "\"");//B40,88
                        }
                    });
                    if (pos == 3 || (decimal.Subtract(total_etiqueta, decimal.Add(total_imprimido, pos)) == decimal.Zero))
                    {
                        System.IO.FileInfo f      = new System.IO.FileInfo("c:\\aliance.net\\etiqueta.txt");
                        System.IO.StreamWriter we = f.CreateText();
                        try
                        {
                            w.AppendLine("P1");
                            we.WriteLine(w.ToString());
                        }
                        finally
                        {
                            we.Flush();
                            we.Dispose();
                            f.CopyTo(Porta.Trim());
                            pos = 0;
                            w.Clear();
                            total_imprimido += 3;
                        }
                    }
                });
            });
        }
Exemplo n.º 35
-1
        static void Main(string[] args)
        {
            string tempPath = System.Environment.GetEnvironmentVariable ("TEMP");
            if (tempPath == null) {
                tempPath = System.Environment.GetEnvironmentVariable ("TMP");
            }
            if (tempPath == null) {
                tempPath = "..\\..";
            }

            Exception exc = null;
            System.DateTime now = System.DateTime.Now;
            System.Security.Cryptography.X509Certificates.X509Certificate xc = null;
            System.IO.StreamWriter sw = null;
            System.IO.StreamReader sr = null;
            System.IO.DirectoryInfo di = null;
            bool b = false;
            System.DateTime dt = InicDateTime ();
            string[] sL = null;
            System.IO.FileInfo[] fiL = null;
            System.IO.DirectoryInfo[] diL = null;
            System.IO.FileSystemInfo[] fsiL = null;
            System.IO.FileStream fs = null;
            System.IO.FileInfo fi = null;
            System.IAsyncResult asr = null;
            int i = 0;
            long l = 0;
            string s = null;
            System.IO.IsolatedStorage.IsolatedStorageFile isf = null;
            System.IO.IsolatedStorage.IsolatedStorageFileStream isfs = null;
            byte[] bL = null;
            System.Diagnostics.Process p = null;

            System.IO.FileInfo fileInfo = new System.IO.FileInfo (tempPath + "\\resources4file.txt");
            fileInfo.Create ().Close ();
            System.IO.StreamWriter outFile = fileInfo.AppendText ();
            System.Console.WriteLine (tempPath + "\\resources4file.txt");

            try {
                exc = null;
                xc = null;
                now = System.DateTime.Now;
                xc = System.Security.Cryptography.X509Certificates.X509Certificate.CreateFromCertFile (tempPath + "\\dummyFile1.txt");
            } catch (Exception e) {
                exc = e;
            } finally {
                outFile.WriteLine ("Name: " + tempPath + "\\dummyFile1.txt");
                outFile.WriteLine ("Func: " + "System.Security.Cryptography.X509Certificates.X509Certificate.CreateFromCertFile(String)");
                outFile.WriteLine ("Proc: " + System.Diagnostics.Process.GetCurrentProcess ().Id);
                outFile.WriteLine ("Time: " + GetTime (now));
                outFile.WriteLine ("Retv: " + toString (xc));
                outFile.WriteLine ("Errc: " + "");
                outFile.WriteLine ("Exce: " + GetException (exc));
            }
            try {
                exc = null;
                xc = null;
                now = System.DateTime.Now;
                xc = System.Security.Cryptography.X509Certificates.X509Certificate.CreateFromSignedFile (tempPath + "\\dummyFile2.txt");
            } catch (Exception e) {
                exc = e;
            } finally {
                outFile.WriteLine ("Name: " + tempPath + "\\dummyFile2.txt");
                outFile.WriteLine ("Func: " + "System.Security.Cryptography.X509Certificates.X509Certificate.CreateFromSignedFile(String)");
                outFile.WriteLine ("Proc: " + System.Diagnostics.Process.GetCurrentProcess ().Id);
                outFile.WriteLine ("Time: " + GetTime (now));
                outFile.WriteLine ("Retv: " + toString (xc));
                outFile.WriteLine ("Errc: " + "");
                outFile.WriteLine ("Exce: " + GetException (exc));
            }
            /*
            try {
            System.IO.BinaryWriter.Write ();
            System.IO.BinaryWriter.Seek ();
            System.IO.BinaryWriter.Flush ();
            System.IO.BinaryWriter.Close ();
            System.IO.BinaryWriter bw = new System.IO.BinaryWriter ();
            } catch (Exception e) {
            }

            try {
            System.IO.BufferedStream.WriteByte ();
            System.IO.BufferedStream.Write ();
            System.IO.BufferedStream.ReadByte ();
            System.IO.BufferedStream.Read ();
            System.IO.BufferedStream.SetLength ();
            System.IO.BufferedStream.Seek ();
            System.IO.BufferedStream.EndWrite ();
            System.IO.BufferedStream.BeginWrite ();
            System.IO.BufferedStream.EndRead ();
            System.IO.BufferedStream.BeginRead ();
            System.IO.BufferedStream.Flush ();
            System.IO.BufferedStream.Close ();
            System.IO.BufferedStream bs = new System.IO.BufferedStream ();
            } catch (Exception e) {
            }
            */
            try {
                exc = null;
                try {
                    exc = null;
                    sw = null;
                    now = System.DateTime.Now;
                    sw = new System.IO.StreamWriter (tempPath + "\\dummyFile3.txt");
                    outFile.WriteLine ("Name: " + tempPath + "\\dummyFile3.txt");
                    outFile.WriteLine ("Func: " + "System.IO.StreamWriter.ctor(String)");
                    outFile.WriteLine ("Proc: " + System.Diagnostics.Process.GetCurrentProcess ().Id);
                    outFile.WriteLine ("Time: " + GetTime (now));
                    outFile.WriteLine ("Retv: " + toString (sw));
                    outFile.WriteLine ("Errc: " + "");
                    outFile.WriteLine ("Exce: " + GetException (exc));
                    try {
                        exc = null;
                        System.Console.SetOut (sw);
                        try {
                            exc = null;
                            now = System.DateTime.Now;
                            System.Console.WriteLine ();
                        } catch (Exception e) {
                            exc = e;
                        } finally {
                            outFile.WriteLine ("Name: " + tempPath + "\\dummyFile3.txt");
                            outFile.WriteLine ("Func: " + "System.Console.WriteLine()");
                            outFile.WriteLine ("Proc: " + System.Diagnostics.Process.GetCurrentProcess ().Id);
                            outFile.WriteLine ("Time: " + GetTime (now));
                            outFile.WriteLine ("Retv: " + "");
                            outFile.WriteLine ("Errc: " + "");
                            outFile.WriteLine ("Exce: " + GetException (exc));
                        }
                        try {
                            exc = null;
                            now = System.DateTime.Now;
                            System.Console.Out.Write ("hello");
                        } catch (Exception e) {
                            exc = e;
                        } finally {
                            outFile.WriteLine ("Name: " + tempPath + "\\dummyFile3.txt");
                            outFile.WriteLine ("Func: " + "System.IO.TextWriter.Write(String)");
                            outFile.WriteLine ("Proc: " + System.Diagnostics.Process.GetCurrentProcess ().Id);
                            outFile.WriteLine ("Time: " + GetTime (now));
                            outFile.WriteLine ("Retv: " + "");
                            outFile.WriteLine ("Errc: " + "");
                            outFile.WriteLine ("Exce: " + GetException (exc));
                        }
                    } finally {
                        try {
                            sw.Close ();
                        } catch (Exception) {
                        }
                    }
                } catch (Exception) {
                    outFile.WriteLine ("Name: " + tempPath + "\\dummyFile3.txt");
                    outFile.WriteLine ("Func: " + "System.IO.StreamWriter.ctor(String)");
                    outFile.WriteLine ("Proc: " + System.Diagnostics.Process.GetCurrentProcess ().Id);
                    outFile.WriteLine ("Time: " + GetTime (now));
                    outFile.WriteLine ("Retv: " + toString (sw));
                    outFile.WriteLine ("Errc: " + "");
                    outFile.WriteLine ("Exce: " + GetException (exc));
                }

                try {
                    exc = null;
                    sr = null;
                    now = System.DateTime.Now;
                    sr = new System.IO.StreamReader (tempPath + "\\dummyFile4.txt");
                    outFile.WriteLine ("Name: " + tempPath + "\\dummyFile4.txt");
                    outFile.WriteLine ("Func: " + "System.IO.StreamReader.ctor(String)");
                    outFile.WriteLine ("Proc: " + System.Diagnostics.Process.GetCurrentProcess ().Id);
                    outFile.WriteLine ("Time: " + GetTime (now));
                    outFile.WriteLine ("Retv: " + toString (sr));
                    outFile.WriteLine ("Errc: " + "");
                    outFile.WriteLine ("Exce: " + GetException (exc));
                    try {
                        System.Console.SetIn (sr);
                        try {
                            exc = null;
                            now = System.DateTime.Now;
                            System.Console.ReadLine ();
                        } catch (Exception e) {
                            exc = e;
                        } finally {
                            outFile.WriteLine ("Name: " + tempPath + "\\dummyFile4.txt");
                            outFile.WriteLine ("Func: " + "System.Console.ReadLine()");
                            outFile.WriteLine ("Proc: " + System.Diagnostics.Process.GetCurrentProcess ().Id);
                            outFile.WriteLine ("Time: " + GetTime (now));
                            outFile.WriteLine ("Retv: " + "");
                            outFile.WriteLine ("Errc: " + "");
                            outFile.WriteLine ("Exce: " + GetException (exc));
                        }
                        try {
                            exc = null;
                            now = System.DateTime.Now;
                            System.Console.In.ReadLine ();
                        } catch (Exception e) {
                            exc = e;
                        } finally {
                            outFile.WriteLine ("Name: " + tempPath + "\\dummyFile4.txt");
                            outFile.WriteLine ("Func: " + "System.IO.TextReader.ReadLine()");
                            outFile.WriteLine ("Proc: " + System.Diagnostics.Process.GetCurrentProcess ().Id);
                            outFile.WriteLine ("Time: " + GetTime (now));
                            outFile.WriteLine ("Retv: " + "");
                            outFile.WriteLine ("Errc: " + "");
                            outFile.WriteLine ("Exce: " + GetException (exc));
                        }
                    } catch (Exception) {
                    } finally {
                        try {
                            sr.Close ();
                        } catch (Exception) {
                        }
                    }
                } catch (Exception e) {
                    exc = e;
                    outFile.WriteLine ("Name: " + tempPath + "\\dummyFile4.txt");
                    outFile.WriteLine ("Func: " + "System.IO.StreamReader.ctor(String)");
                    outFile.WriteLine ("Proc: " + System.Diagnostics.Process.GetCurrentProcess ().Id);
                    outFile.WriteLine ("Time: " + GetTime (now));
                    outFile.WriteLine ("Retv: " + toString (sr));
                    outFile.WriteLine ("Errc: " + "");
                    outFile.WriteLine ("Exce: " + GetException (exc));
                }

                try {
                    exc = null;
                    sw = null;
                    now = System.DateTime.Now;
                    sw = new System.IO.StreamWriter (tempPath + "\\dummyFile5.txt");
                    outFile.WriteLine ("Name: " + tempPath + "\\dummyFile.txt");
                    outFile.WriteLine ("Func: " + "System.IO.StreamWriter.ctor(String)");
                    outFile.WriteLine ("Proc: " + System.Diagnostics.Process.GetCurrentProcess ().Id);
                    outFile.WriteLine ("Time: " + GetTime (now));
                    outFile.WriteLine ("Retv: " + toString (sw));
                    outFile.WriteLine ("Errc: " + "");
                    outFile.WriteLine ("Exce: " + GetException (exc));
                    try {
                        System.Console.SetError (sw);
                        try {
                            exc = null;
                            now = System.DateTime.Now;
                            System.Console.Error.WriteLine ();
                        } catch (Exception e) {
                            exc = e;
                        } finally {
                            outFile.WriteLine ("Name: " + tempPath + "\\dummyFile5.txt");
                            outFile.WriteLine ("Func: " + "System.IO.TextWriter.WriteLine(String)");
                            outFile.WriteLine ("Proc: " + System.Diagnostics.Process.GetCurrentProcess ().Id);
                            outFile.WriteLine ("Time: " + GetTime (now));
                            outFile.WriteLine ("Retv: " + "");
                            outFile.WriteLine ("Errc: " + "");
                            outFile.WriteLine ("Exce: " + GetException (exc));
                        }
                    } finally {
                        try {
                            sw.Close ();
                        } catch (Exception) {
                        }
                    }
                } catch (Exception e) {
                    exc = e;
                    outFile.WriteLine ("Name: " + tempPath + "\\dummyFile5.txt");
                    outFile.WriteLine ("Func: " + "System.IO.StreamWriter.ctor(String)");
                    outFile.WriteLine ("Proc: " + System.Diagnostics.Process.GetCurrentProcess ().Id);
                    outFile.WriteLine ("Time: " + GetTime (now));
                    outFile.WriteLine ("Retv: " + toString (sw));
                    outFile.WriteLine ("Errc: " + "");
                    outFile.WriteLine ("Exce: " + GetException (exc));
                }
            } catch (Exception) {
            }

            try {
                try {
                    exc = null;
                    di = null;
                    now = System.DateTime.Now;
                    di = System.IO.Directory.CreateDirectory (tempPath + "\\TestDir1");
                } catch (Exception e) {
                    exc = e;
                } finally {
                    outFile.WriteLine ("Name: " + tempPath + "\\TestDir1");
                    outFile.WriteLine ("Func: " + "System.IO.Directory.CreateDirectory(String)");
                    outFile.WriteLine ("Proc: " + System.Diagnostics.Process.GetCurrentProcess ().Id);
                    outFile.WriteLine ("Time: " + GetTime (now));
                    outFile.WriteLine ("Retv: " + toString (di));
                    outFile.WriteLine ("Errc: " + "");
                    outFile.WriteLine ("Exce: " + GetException (exc));
                }
                try {
                    exc = null;
                    di = null;
                    now = System.DateTime.Now;
                    di = System.IO.Directory.GetParent (tempPath + "\\TestDir1");
                } catch (Exception e) {
                    exc = e;
                } finally {
                    outFile.WriteLine ("Name: " + tempPath);
                    outFile.WriteLine ("Func: " + "System.IO.Directory.GetParent(String)");
                    outFile.WriteLine ("Proc: " + System.Diagnostics.Process.GetCurrentProcess ().Id);
                    outFile.WriteLine ("Time: " + GetTime (now));
                    outFile.WriteLine ("Retv: " + toString (di));
                    outFile.WriteLine ("Errc: " + "");
                    outFile.WriteLine ("Exce: " + GetException (exc));
                }
                try {
                    exc = null;
                    now = System.DateTime.Now;
                    b = System.IO.Directory.Exists (tempPath + "\\TestDir1");
                } catch (Exception e) {
                    exc = e;
                } finally {
                    outFile.WriteLine ("Name: " + tempPath + "\\TestDir1");
                    outFile.WriteLine ("Func: " + "System.IO.Directory.Exists(String)");
                    outFile.WriteLine ("Proc: " + System.Diagnostics.Process.GetCurrentProcess ().Id);
                    outFile.WriteLine ("Time: " + GetTime (now));
                    outFile.WriteLine ("Retv: " + toString (b));
                    outFile.WriteLine ("Errc: " + "");
                    outFile.WriteLine ("Exce: " + GetException (exc));
                }
                try {
                    exc = null;
                    now = System.DateTime.Now;
                    System.IO.Directory.SetCreationTime (tempPath + "\\TestDir1", new System.DateTime (2003, 01, 01));
                } catch (Exception e) {
                    exc = e;
                } finally {
                    outFile.WriteLine ("Name: " + tempPath + "\\TestDir1");
                    outFile.WriteLine ("Func: " + "System.IO.Directory.SetCreationTime(String, DateTime)");
                    outFile.WriteLine ("Proc: " + System.Diagnostics.Process.GetCurrentProcess ().Id);
                    outFile.WriteLine ("Time: " + GetTime (now));
                    outFile.WriteLine ("Retv: " + "");
                    outFile.WriteLine ("Errc: " + "");
                    outFile.WriteLine ("Exce: " + GetException (exc));
                }
                try {
                    exc = null;
                    dt = InicDateTime ();
                    now = System.DateTime.Now;
                    dt = System.IO.Directory.GetCreationTime (tempPath + "\\TestDir1");
                } catch (Exception e) {
                    exc = e;
                } finally {
                    outFile.WriteLine ("Name: " + tempPath + "\\TestDir1");
                    outFile.WriteLine ("Func: " + "System.IO.Directory.GetCreationTime(String)");
                    outFile.WriteLine ("Proc: " + System.Diagnostics.Process.GetCurrentProcess ().Id);
                    outFile.WriteLine ("Time: " + GetTime (now));
                    outFile.WriteLine ("Retv: " + toString (dt));
                    outFile.WriteLine ("Errc: " + "");
                    outFile.WriteLine ("Exce: " + GetException (exc));
                }
                try {
                    exc = null;
                    now = System.DateTime.Now;
                    System.IO.Directory.SetLastWriteTime (tempPath + "\\TestDir1", new System.DateTime (2003, 01, 01));
                } catch (Exception e) {
                    exc = e;
                } finally {
                    outFile.WriteLine ("Name: " + tempPath + "\\TestDir1");
                    outFile.WriteLine ("Func: " + "System.IO.Directory.SetLastWriteTime(String, DateTime)");
                    outFile.WriteLine ("Proc: " + System.Diagnostics.Process.GetCurrentProcess ().Id);
                    outFile.WriteLine ("Time: " + GetTime (now));
                    outFile.WriteLine ("Retv: " + "");
                    outFile.WriteLine ("Errc: " + "");
                    outFile.WriteLine ("Exce: " + GetException (exc));
                }
                try {
                    exc = null;
                    dt = InicDateTime ();
                    now = System.DateTime.Now;
                    dt = System.IO.Directory.GetLastWriteTime (tempPath + "\\TestDir1");
                } catch (Exception e) {
                    exc = e;
                } finally {
                    outFile.WriteLine ("Name: " + tempPath + "\\TestDir1");
                    outFile.WriteLine ("Func: " + "System.IO.Directory.GetLastWriteTime(String)");
                    outFile.WriteLine ("Proc: " + System.Diagnostics.Process.GetCurrentProcess ().Id);
                    outFile.WriteLine ("Time: " + GetTime (now));
                    outFile.WriteLine ("Retv: " + toString (dt));
                    outFile.WriteLine ("Errc: " + "");
                    outFile.WriteLine ("Exce: " + GetException (exc));
                }
                try {
                    exc = null;
                    now = System.DateTime.Now;
                    System.IO.Directory.SetLastAccessTime (tempPath + "\\TestDir1", new System.DateTime (2003, 01, 01));
                } catch (Exception e) {
                    exc = e;
                } finally {
                    outFile.WriteLine ("Name: " + tempPath + "\\TestDir1");
                    outFile.WriteLine ("Func: " + "System.IO.Directory.SetLastAccessTime(String, DateTime)");
                    outFile.WriteLine ("Proc: " + System.Diagnostics.Process.GetCurrentProcess ().Id);
                    outFile.WriteLine ("Time: " + GetTime (now));
                    outFile.WriteLine ("Retv: " + "");
                    outFile.WriteLine ("Errc: " + "");
                    outFile.WriteLine ("Exce: " + GetException (exc));
                }
                try {
                    exc = null;
                    dt = InicDateTime ();
                    now = System.DateTime.Now;
                    dt = System.IO.Directory.GetLastAccessTime (tempPath + "\\TestDir1");
                } catch (Exception e) {
                    exc = e;
                } finally {
                    outFile.WriteLine ("Name: " + tempPath + "\\TestDir1");
                    outFile.WriteLine ("Func: " + "System.IO.Directory.GetLastAccessTime(String)");
                    outFile.WriteLine ("Proc: " + System.Diagnostics.Process.GetCurrentProcess ().Id);
                    outFile.WriteLine ("Time: " + GetTime (now));
                    outFile.WriteLine ("Retv: " + toString (dt));
                    outFile.WriteLine ("Errc: " + "");
                    outFile.WriteLine ("Exce: " + GetException (exc));
                }
                try {
                    exc = null;
                    sL = null;
                    now = System.DateTime.Now;
                    sL = System.IO.Directory.GetFiles (tempPath + "\\TestDir1");
                } catch (Exception e) {
                    exc = e;
                } finally {
                    outFile.WriteLine ("Name: " + tempPath + "\\TestDir1");
                    outFile.WriteLine ("Func: " + "System.IO.Directory.GetFiles(String)");
                    outFile.WriteLine ("Proc: " + System.Diagnostics.Process.GetCurrentProcess ().Id);
                    outFile.WriteLine ("Time: " + GetTime (now));
                    outFile.WriteLine ("Retv: " + toString (sL));
                    outFile.WriteLine ("Errc: " + "");
                    outFile.WriteLine ("Exce: " + GetException (exc));
                }
                try {
                    exc = null;
                    sL = null;
                    now = System.DateTime.Now;
                    sL = System.IO.Directory.GetDirectories (tempPath + "\\TestDir1");
                } catch (Exception e) {
                    exc = e;
                } finally {
                    outFile.WriteLine ("Name: " + tempPath + "\\TestDir1");
                    outFile.WriteLine ("Func: " + "System.IO.Directory.GetDirectories(String)");
                    outFile.WriteLine ("Proc: " + System.Diagnostics.Process.GetCurrentProcess ().Id);
                    outFile.WriteLine ("Time: " + GetTime (now));
                    outFile.WriteLine ("Retv: " + toString (sL));
                    outFile.WriteLine ("Errc: " + "");
                    outFile.WriteLine ("Exce: " + GetException (exc));
                }
                try {
                    exc = null;
                    now = System.DateTime.Now;
                    System.IO.Directory.GetFileSystemEntries (tempPath + "\\TestDir1");
                } catch (Exception e) {
                    exc = e;
                } finally {
                    outFile.WriteLine ("Name: " + tempPath + "\\TestDir1");
                    outFile.WriteLine ("Func: " + "System.IO.Directory.GetFileSystemEntries(String)");
                    outFile.WriteLine ("Proc: " + System.Diagnostics.Process.GetCurrentProcess ().Id);
                    outFile.WriteLine ("Time: " + GetTime (now));
                    outFile.WriteLine ("Retv: " + toString (sL));
                    outFile.WriteLine ("Errc: " + "");
                    outFile.WriteLine ("Exce: " + GetException (exc));
                }
                try {
                    exc = null;
                    now = System.DateTime.Now;
                    System.IO.Directory.SetCurrentDirectory (tempPath + "\\TestDir1\\..");
                } catch (Exception e) {
                    exc = e;
                } finally {
                    outFile.WriteLine ("Name: " + tempPath);
                    outFile.WriteLine ("Func: " + "System.IO.Directory.SetCurrentDirectory(String)");
                    outFile.WriteLine ("Proc: " + System.Diagnostics.Process.GetCurrentProcess ().Id);
                    outFile.WriteLine ("Time: " + GetTime (now));
                    outFile.WriteLine ("Retv: " + "");
                    outFile.WriteLine ("Errc: " + "");
                    outFile.WriteLine ("Exce: " + GetException (exc));
                }
                try {
                    exc = null;
                    now = System.DateTime.Now;
                    System.IO.Directory.Move (tempPath + "\\TestDir1", tempPath + "\\TestDir2");
                } catch (Exception e) {
                    exc = e;
                } finally {
                    outFile.WriteLine ("Name: " + tempPath + "\\TestDir1");
                    outFile.WriteLine ("Func: " + "System.IO.Directory.Move(String, String)");
                    outFile.WriteLine ("Proc: " + System.Diagnostics.Process.GetCurrentProcess ().Id);
                    outFile.WriteLine ("Time: " + GetTime (now));
                    outFile.WriteLine ("Retv: " + "");
                    outFile.WriteLine ("Exce: " + GetException (exc));
                    //---
                    outFile.WriteLine ("Name: " + tempPath + "\\TestDir2");
                    outFile.WriteLine ("Func: " + "System.IO.Directory.Move(String, String)");
                    outFile.WriteLine ("Proc: " + System.Diagnostics.Process.GetCurrentProcess ().Id);
                    outFile.WriteLine ("Time: " + GetTime (now));
                    outFile.WriteLine ("Retv: " + "");
                    outFile.WriteLine ("Errc: " + "");
                    outFile.WriteLine ("Exce: " + GetException (exc));
                }
                try {
                    exc = null;
                    now = System.DateTime.Now;
                    System.IO.Directory.Delete (tempPath + "\\TestDir1");
                } catch (Exception e) {
                    exc = e;
                } finally {
                    outFile.WriteLine ("Name: " + tempPath + "\\TestDir1");
                    outFile.WriteLine ("Func: " + "System.IO.Directory.Delete(String)");
                    outFile.WriteLine ("Proc: " + System.Diagnostics.Process.GetCurrentProcess ().Id);
                    outFile.WriteLine ("Time: " + GetTime (now));
                    outFile.WriteLine ("Retv: " + "");
                    outFile.WriteLine ("Errc: " + "");
                    outFile.WriteLine ("Exce: " + GetException (exc));
                }
                try {
                    exc = null;
                    now = System.DateTime.Now;
                    System.IO.Directory.Delete (tempPath + "\\TestDir2");
                } catch (Exception e) {
                    exc = e;
                } finally {
                    outFile.WriteLine ("Name: " + tempPath + "\\TestDir2");
                    outFile.WriteLine ("Func: " + "System.IO.Directory.Delete(String)");
                    outFile.WriteLine ("Proc: " + System.Diagnostics.Process.GetCurrentProcess ().Id);
                    outFile.WriteLine ("Time: " + GetTime (now));
                    outFile.WriteLine ("Retv: " + "");
                    outFile.WriteLine ("Errc: " + "");
                    outFile.WriteLine ("Exce: " + GetException (exc));
                }
            } catch (Exception) {
            }

            try {
                di = null;
                di = new System.IO.DirectoryInfo (tempPath);
                System.IO.DirectoryInfo di2 = null;
                try {
                    try {
                        exc = null;
                        di2 = null;
                        now = System.DateTime.Now;
                        di2 = di.CreateSubdirectory (tempPath + "\\TestDir3");
                        di = di2;
                    } catch (Exception e) {
                        exc = e;
                    } finally {
                        outFile.WriteLine ("Name: " + tempPath + "\\TestDir3");
                        outFile.WriteLine ("Func: " + "System.IO.DirectoryInfo.CreateSubdirectory(String)");
                        outFile.WriteLine ("Proc: " + System.Diagnostics.Process.GetCurrentProcess ().Id);
                        outFile.WriteLine ("Time: " + GetTime (now));
                        outFile.WriteLine ("Retv: " + toString (di2));
                        outFile.WriteLine ("Errc: " + "");
                        outFile.WriteLine ("Exce: " + GetException (exc));
                    }
                    try {
                        exc = null;
                        fiL = null;
                        now = System.DateTime.Now;
                        fiL = di.GetFiles ();
                    } catch (Exception e) {
                        exc = e;
                    } finally {
                        outFile.WriteLine ("Name: " + tempPath + "\\TestDir3");
                        outFile.WriteLine ("Func: " + "System.IO.DirectoryInfo.GetFiles()");
                        outFile.WriteLine ("Proc: " + System.Diagnostics.Process.GetCurrentProcess ().Id);
                        outFile.WriteLine ("Time: " + GetTime (now));
                        outFile.WriteLine ("Retv: " + toString (fiL));
                        outFile.WriteLine ("Errc: " + "");
                        outFile.WriteLine ("Exce: " + GetException (exc));
                    }
                    try {
                        exc = null;
                        diL = null;
                        now = System.DateTime.Now;
                        diL = di.GetDirectories ();
                    } catch (Exception e) {
                        exc = e;
                    } finally {
                        outFile.WriteLine ("Name: " + tempPath + "\\TestDir3");
                        outFile.WriteLine ("Func: " + "System.IO.DirectoryInfo.GetDirectories()");
                        outFile.WriteLine ("Proc: " + System.Diagnostics.Process.GetCurrentProcess ().Id);
                        outFile.WriteLine ("Time: " + GetTime (now));
                        outFile.WriteLine ("Retv: " + toString (diL));
                        outFile.WriteLine ("Errc: " + "");
                        outFile.WriteLine ("Exce: " + GetException (exc));
                    }
                    try {
                        exc = null;
                        fsiL = null;
                        now = System.DateTime.Now;
                        fsiL = di.GetFileSystemInfos ();
                    } catch (Exception e) {
                        exc = e;
                    } finally {
                        outFile.WriteLine ("Name: " + tempPath + "\\TestDir3");
                        outFile.WriteLine ("Func: " + "System.IO.DirectoryInfo.GetFileSystemInfos()");
                        outFile.WriteLine ("Proc: " + System.Diagnostics.Process.GetCurrentProcess ().Id);
                        outFile.WriteLine ("Time: " + GetTime (now));
                        outFile.WriteLine ("Retv: " + toString (fsiL));
                        outFile.WriteLine ("Errc: " + "");
                        outFile.WriteLine ("Exce: " + GetException (exc));
                    }
                    try {
                        exc = null;
                        now = System.DateTime.Now;
                        di.MoveTo (tempPath + "\\TestDir4");
                    } catch (Exception e) {
                        exc = e;
                    } finally {
                        outFile.WriteLine ("Name: " + tempPath + "\\TestDir3");
                        outFile.WriteLine ("Func: " + "System.IO.DirectoryInfo.MoveTo(String)");
                        outFile.WriteLine ("Proc: " + System.Diagnostics.Process.GetCurrentProcess ().Id);
                        outFile.WriteLine ("Time: " + GetTime (now));
                        outFile.WriteLine ("Retv: " + "");
                        outFile.WriteLine ("Errc: " + "");
                        outFile.WriteLine ("Exce: " + GetException (exc));
                        //---
                        outFile.WriteLine ("Name: " + tempPath + "\\TestDir4");
                        outFile.WriteLine ("Func: " + "System.IO.DirectoryInfo.MoveTo(String)");
                        outFile.WriteLine ("Proc: " + System.Diagnostics.Process.GetCurrentProcess ().Id);
                        outFile.WriteLine ("Time: " + GetTime (now));
                        outFile.WriteLine ("Retv: " + "");
                        outFile.WriteLine ("Errc: " + "");
                        outFile.WriteLine ("Exce: " + GetException (exc));
                    }
                } finally {
                    try {
                        exc = null;
                        char[] backSlash = new char[1];
                        backSlash[0] = '\\';
                        outFile.WriteLine ("Name: " + di.FullName.TrimEnd (backSlash));
                        now = System.DateTime.Now;
                        di.Delete ();
                    } catch  (Exception e) {
                        exc = e;
                    } finally {
                        outFile.WriteLine ("Func: " + "System.IO.DirectoryInfo.Delete()");
                        outFile.WriteLine ("Proc: " + System.Diagnostics.Process.GetCurrentProcess ().Id);
                        outFile.WriteLine ("Time: " + GetTime (now));
                        outFile.WriteLine ("Retv: " + "");
                        outFile.WriteLine ("Errc: " + "");
                        outFile.WriteLine ("Exce: " + GetException (exc));
                    }
                }
                try {
                    di = null;
                    di = new System.IO.DirectoryInfo (tempPath + "\\TestDir5");
                    try {
                        exc = null;
                        now = System.DateTime.Now;
                        di.Create ();
                    } catch (Exception e) {
                        exc = e;
                    } finally {
                        outFile.WriteLine ("Name: " + tempPath + "\\TestDir5");
                        outFile.WriteLine ("Func: " + "System.IO.DirectoryInfo.Create()");
                        outFile.WriteLine ("Proc: " + System.Diagnostics.Process.GetCurrentProcess ().Id);
                        outFile.WriteLine ("Time: " + GetTime (now));
                        outFile.WriteLine ("Retv: " + "");
                        outFile.WriteLine ("Errc: " + "");
                        outFile.WriteLine ("Exce: " + GetException (exc));
                    }
                    try {
                        exc = null;
                        now = System.DateTime.Now;
                        di.MoveTo (tempPath + "\\TestDir6");
                    } catch (Exception e) {
                        exc = e;
                    } finally {
                        outFile.WriteLine ("Name: " + tempPath + "\\TestDir5");
                        outFile.WriteLine ("Func: " + "System.IO.DirectoryInfo.MoveTo(String)");
                        outFile.WriteLine ("Proc: " + System.Diagnostics.Process.GetCurrentProcess ().Id);
                        outFile.WriteLine ("Time: " + GetTime (now));
                        outFile.WriteLine ("Retv: " + "");
                        outFile.WriteLine ("Errc: " + "");
                        outFile.WriteLine ("Exce: " + GetException (exc));
                        //---
                        outFile.WriteLine ("Name: " + tempPath + "\\TestDir6");
                        outFile.WriteLine ("Func: " + "System.IO.DirectoryInfo.MoveTo(String)");
                        outFile.WriteLine ("Proc: " + System.Diagnostics.Process.GetCurrentProcess ().Id);
                        outFile.WriteLine ("Time: " + GetTime (now));
                        outFile.WriteLine ("Retv: " + "");
                        outFile.WriteLine ("Errc: " + "");
                        outFile.WriteLine ("Exce: " + GetException (exc));
                    }
                } catch (Exception) {
                } finally {
                    try {
                        exc = null;
                        char[] backSlash = new char[1];
                        backSlash[0] = '\\';
                        outFile.WriteLine ("Name: " + di.FullName.TrimEnd (backSlash));
                        now = System.DateTime.Now;
                        di.Delete ();
                    } catch (Exception e) {
                        exc = e;
                    } finally {
                        outFile.WriteLine ("Func: " + "System.IO.DirectoryInfo.Delete()");
                        outFile.WriteLine ("Proc: " + System.Diagnostics.Process.GetCurrentProcess ().Id);
                        outFile.WriteLine ("Time: " + GetTime (now));
                        outFile.WriteLine ("Retv: " + "");
                        outFile.WriteLine ("Errc: " + "");
                        outFile.WriteLine ("Exce: " + GetException (exc));
                    }
                }
            } catch (Exception) {
            }

            try {
                try {
                    exc = null;
                    sr = null;
                    now = System.DateTime.Now;
                    sr = System.IO.File.OpenText (tempPath + "\\dummyFile6.txt");
                    sr.Close ();
                } catch (Exception e) {
                    exc = e;
                } finally {
                    outFile.WriteLine ("Name: " + tempPath + "\\dummyFile6.txt");
                    outFile.WriteLine ("Func: " + "System.IO.File.OpenText(String)");
                    outFile.WriteLine ("Proc: " + System.Diagnostics.Process.GetCurrentProcess ().Id);
                    outFile.WriteLine ("Time: " + GetTime (now));
                    outFile.WriteLine ("Retv: " + toString (sr));
                    outFile.WriteLine ("Errc: " + "");
                    outFile.WriteLine ("Exce: " + GetException (exc));
                }
                try {
                    exc = null;
                    sw = null;
                    now = System.DateTime.Now;
                    sw = System.IO.File.CreateText (tempPath + "\\dummyFile7.txt");
                    sw.Close ();
                } catch (Exception e) {
                    exc = e;
                } finally {
                    outFile.WriteLine ("Name: " + tempPath + "\\dummyFile7.txt");
                    outFile.WriteLine ("Func: " + "System.IO.File.CreateText(String)");
                    outFile.WriteLine ("Proc: " + System.Diagnostics.Process.GetCurrentProcess ().Id);
                    outFile.WriteLine ("Time: " + GetTime (now));
                    outFile.WriteLine ("Retv: " + toString (sw));
                    outFile.WriteLine ("Errc: " + "");
                    outFile.WriteLine ("Exce: " + GetException (exc));
                }
                try {
                    exc = null;
                    sw = null;
                    now = System.DateTime.Now;
                    sw = System.IO.File.AppendText (tempPath + "\\dummyFile8.txt");
                    sw.Close ();
                } catch (Exception e) {
                    exc = e;
                } finally {
                    outFile.WriteLine ("Name: " + tempPath + "\\dummyFile8.txt");
                    outFile.WriteLine ("Func: " + "System.IO.File.AppendText(String)");
                    outFile.WriteLine ("Proc: " + System.Diagnostics.Process.GetCurrentProcess ().Id);
                    outFile.WriteLine ("Time: " + GetTime (now));
                    outFile.WriteLine ("Retv: " + toString (sw));
                    outFile.WriteLine ("Errc: " + "");
                    outFile.WriteLine ("Exce: " + GetException (exc));
                }
                try {
                    exc = null;
                    fs = null;
                    now = System.DateTime.Now;
                    fs = System.IO.File.Open (tempPath + "\\dummyFile9.txt", System.IO.FileMode.OpenOrCreate);
                    fs.Close ();
                } catch (Exception e) {
                    exc = e;
                } finally {
                    outFile.WriteLine ("Name: " + tempPath + "\\dummyFile9.txt");
                    outFile.WriteLine ("Func: " + "System.IO.File.Open(String)");
                    outFile.WriteLine ("Proc: " + System.Diagnostics.Process.GetCurrentProcess ().Id);
                    outFile.WriteLine ("Time: " + GetTime (now));
                    outFile.WriteLine ("Retv: " + toString (fs));
                    outFile.WriteLine ("Errc: " + "");
                    outFile.WriteLine ("Exce: " + GetException (exc));
                }
                try {
                    exc = null;
                    now = System.DateTime.Now;
                    System.IO.File.SetCreationTime (tempPath + "\\dummyFile9.txt", new System.DateTime (2003, 01, 01));
                } catch (Exception e) {
                    exc = e;
                } finally {
                    outFile.WriteLine ("Name: " + tempPath + "\\dummyFile9.txt");
                    outFile.WriteLine ("Func: " + "System.IO.File.SetCreationTime(String, DateTime)");
                    outFile.WriteLine ("Proc: " + System.Diagnostics.Process.GetCurrentProcess ().Id);
                    outFile.WriteLine ("Time: " + GetTime (now));
                    outFile.WriteLine ("Retv: " + "");
                    outFile.WriteLine ("Errc: " + "");
                    outFile.WriteLine ("Exce: " + GetException (exc));
                }
                try {
                    exc = null;
                    dt = InicDateTime ();
                    now = System.DateTime.Now;
                    dt = System.IO.File.GetCreationTime (tempPath + "\\dummyFile9.txt");
                } catch (Exception e) {
                    exc = e;
                } finally {
                    outFile.WriteLine ("Name: " + tempPath + "\\dummyFile9.txt");
                    outFile.WriteLine ("Func: " + "System.IO.File.GetCreationTime(String)");
                    outFile.WriteLine ("Proc: " + System.Diagnostics.Process.GetCurrentProcess ().Id);
                    outFile.WriteLine ("Time: " + GetTime (now));
                    outFile.WriteLine ("Retv: " + toString (dt));
                    outFile.WriteLine ("Errc: " + "");
                    outFile.WriteLine ("Exce: " + GetException (exc));
                }
                try {
                    exc = null;
                    now = System.DateTime.Now;
                    System.IO.File.SetLastAccessTime (tempPath + "\\dummyFile9.txt", new System.DateTime (2003, 01, 01));
                } catch (Exception e) {
                    exc = e;
                } finally {
                    outFile.WriteLine ("Name: " + tempPath + "\\dummyFile9.txt");
                    outFile.WriteLine ("Func: " + "System.IO.File.SetLastAccessTime(String, DateTime)");
                    outFile.WriteLine ("Proc: " + System.Diagnostics.Process.GetCurrentProcess ().Id);
                    outFile.WriteLine ("Time: " + GetTime (now));
                    outFile.WriteLine ("Retv: " + "");
                    outFile.WriteLine ("Errc: " + "");
                    outFile.WriteLine ("Exce: " + GetException (exc));
                }
                try {
                    exc = null;
                    now = System.DateTime.Now;
                    dt = System.IO.File.GetLastAccessTime (tempPath + "\\dummyFile9.txt");
                } catch (Exception e) {
                    exc = e;
                } finally {
                    outFile.WriteLine ("Name: " + tempPath + "\\dummyFile9.txt");
                    outFile.WriteLine ("Func: " + "System.IO.File.GetLastAccessTime(String)");
                    outFile.WriteLine ("Proc: " + System.Diagnostics.Process.GetCurrentProcess ().Id);
                    outFile.WriteLine ("Time: " + GetTime (now));
                    outFile.WriteLine ("Retv: " + toString (dt));
                    outFile.WriteLine ("Errc: " + "");
                    outFile.WriteLine ("Exce: " + GetException (exc));
                }
                try {
                    exc = null;
                    now = System.DateTime.Now;
                    System.IO.File.SetLastWriteTime (tempPath + "\\dummyFile9.txt", new System.DateTime (2003, 01, 01));
                } catch (Exception e) {
                    exc = e;
                } finally {
                    outFile.WriteLine ("Name: " + tempPath + "\\dummyFile9.txt");
                    outFile.WriteLine ("Func: " + "System.IO.File.SetLastWriteTime(String, DateTime)");
                    outFile.WriteLine ("Proc: " + System.Diagnostics.Process.GetCurrentProcess ().Id);
                    outFile.WriteLine ("Time: " + GetTime (now));
                    outFile.WriteLine ("Retv: " + "");
                    outFile.WriteLine ("Errc: " + "");
                    outFile.WriteLine ("Exce: " + GetException (exc));
                }
                try {
                    exc = null;
                    dt = InicDateTime ();
                    now = System.DateTime.Now;
                    dt = System.IO.File.GetLastWriteTime (tempPath + "\\dummyFile9.txt");
                } catch (Exception e) {
                    exc = e;
                } finally {
                    outFile.WriteLine ("Name: " + tempPath + "\\dummyFile9.txt");
                    outFile.WriteLine ("Func: " + "System.IO.File.GetLastWriteTime(String)");
                    outFile.WriteLine ("Proc: " + System.Diagnostics.Process.GetCurrentProcess ().Id);
                    outFile.WriteLine ("Time: " + GetTime (now));
                    outFile.WriteLine ("Retv: " + toString (dt));
                    outFile.WriteLine ("Errc: " + "");
                    outFile.WriteLine ("Exce: " + GetException (exc));
                }
                try {
                    exc = null;
                    fs = null;
                    now = System.DateTime.Now;
                    fs = System.IO.File.OpenRead (tempPath + "\\dummyFile10.txt");
                    fs.Close ();
                } catch (Exception e) {
                    exc = e;
                } finally {
                    outFile.WriteLine ("Name: " + tempPath + "\\dummyFile10.txt");
                    outFile.WriteLine ("Func: " + "System.IO.File.OpenRead(String)");
                    outFile.WriteLine ("Proc: " + System.Diagnostics.Process.GetCurrentProcess ().Id);
                    outFile.WriteLine ("Time: " + GetTime (now));
                    outFile.WriteLine ("Retv: " + toString (fs));
                    outFile.WriteLine ("Errc: " + "");
                    outFile.WriteLine ("Exce: " + GetException (exc));
                }
                try {
                    exc = null;
                    fs = null;
                    now = System.DateTime.Now;
                    fs = System.IO.File.OpenWrite (tempPath + "\\dummyFile11.txt");
                    fs.Close ();
                } catch (Exception e) {
                    exc = e;
                } finally {
                    outFile.WriteLine ("Name: " + tempPath + "\\dummyFile11.txt");
                    outFile.WriteLine ("Func: " + "System.IO.File.OpenWrite(String)");
                    outFile.WriteLine ("Proc: " + System.Diagnostics.Process.GetCurrentProcess ().Id);
                    outFile.WriteLine ("Time: " + GetTime (now));
                    outFile.WriteLine ("Retv: " + toString (fs));
                    outFile.WriteLine ("Errc: " + "");
                    outFile.WriteLine ("Exce: " + GetException (exc));
                }
                try {
                    exc = null;
                    fs = null;
                    now = System.DateTime.Now;
                    fs = System.IO.File.Create (tempPath + "\\testFile1.txt");
                    fs.Close ();
                } catch (Exception e) {
                    exc = e;
                } finally {
                    outFile.WriteLine ("Name: " + tempPath + "\\testFile1.txt");
                    outFile.WriteLine ("Func: " + "System.IO.File.Create(String)");
                    outFile.WriteLine ("Proc: " + System.Diagnostics.Process.GetCurrentProcess ().Id);
                    outFile.WriteLine ("Time: " + GetTime (now));
                    outFile.WriteLine ("Retv: " + toString (fs));
                    outFile.WriteLine ("Errc: " + "");
                    outFile.WriteLine ("Exce: " + GetException (exc));
                }
                try {
                    exc = null;
                    fs = null;
                    now = System.DateTime.Now;
                    System.IO.File.Move (tempPath + "\\testFile1.txt", tempPath + "\\testFile2.txt");
                } catch (Exception e) {
                    exc = e;
                } finally {
                    outFile.WriteLine ("Name: " + tempPath + "\\testFile1.txt");
                    outFile.WriteLine ("Func: " + "System.IO.File.OpenWrite(String)");
                    outFile.WriteLine ("Proc: " + System.Diagnostics.Process.GetCurrentProcess ().Id);
                    outFile.WriteLine ("Time: " + GetTime (now));
                    outFile.WriteLine ("Retv: " + "");
                    outFile.WriteLine ("Errc: " + "");
                    outFile.WriteLine ("Exce: " + GetException (exc));
                    //---
                    outFile.WriteLine ("Name: " + tempPath + "\\testFile2.txt");
                    outFile.WriteLine ("Func: " + "System.IO.File.OpenWrite(String)");
                    outFile.WriteLine ("Proc: " + System.Diagnostics.Process.GetCurrentProcess ().Id);
                    outFile.WriteLine ("Time: " + GetTime (now));
                    outFile.WriteLine ("Retv: " + "");
                    outFile.WriteLine ("Errc: " + "");
                    outFile.WriteLine ("Exce: " + GetException (exc));
                }
                try {
                    exc = null;
                    now = System.DateTime.Now;
                    System.IO.File.Delete (tempPath + "\\testFile2.txt");
                } catch (Exception e) {
                    exc = e;
                } finally {
                    outFile.WriteLine ("Name: " + tempPath + "\\testFile2.txt");
                    outFile.WriteLine ("Func: " + "System.IO.File.Delete(String)");
                    outFile.WriteLine ("Proc: " + System.Diagnostics.Process.GetCurrentProcess ().Id);
                    outFile.WriteLine ("Time: " + GetTime (now));
                    outFile.WriteLine ("Retv: " + "");
                    outFile.WriteLine ("Errc: " + "");
                    outFile.WriteLine ("Exce: " + GetException (exc));
                }
                try {
                    exc = null;
                    now = System.DateTime.Now;
                    b = System.IO.File.Exists (tempPath + "\\testFile3.txt");
                } catch (Exception e) {
                    exc = e;
                } finally {
                    outFile.WriteLine ("Name: " + tempPath + "\\testFile3.txt");
                    outFile.WriteLine ("Func: " + "System.IO.File.Exists(String)");
                    outFile.WriteLine ("Proc: " + System.Diagnostics.Process.GetCurrentProcess ().Id);
                    outFile.WriteLine ("Time: " + GetTime (now));
                    outFile.WriteLine ("Retv: " + toString (b));
                    outFile.WriteLine ("Errc: " + "");
                    outFile.WriteLine ("Exce: " + GetException (exc));
                }
            } catch (Exception) {
            }

            try {
                fi = new System.IO.FileInfo (tempPath + "\\testFile4.txt");
                try {
                    exc = null;
                    fs = null;
                    now = System.DateTime.Now;
                    fs = fi.Create ();
                    fs.Close ();
                } catch (Exception e) {
                    exc = e;
                } finally {
                    outFile.WriteLine ("Name: " + tempPath + "\\testFile4.txt");
                    outFile.WriteLine ("Func: " + "System.IO.FileInfo.Create()");
                    outFile.WriteLine ("Proc: " + System.Diagnostics.Process.GetCurrentProcess ().Id);
                    outFile.WriteLine ("Time: " + GetTime (now));
                    outFile.WriteLine ("Retv: " + toString (fs));
                    outFile.WriteLine ("Errc: " + "");
                    outFile.WriteLine ("Exce: " + GetException (exc));
                }
                try {
                    exc = null;
                    sr = null;
                    now = System.DateTime.Now;
                    sr = fi.OpenText ();
                    sr.Close ();
                } catch (Exception e) {
                    exc = e;
                } finally {
                    outFile.WriteLine ("Name: " + tempPath + "\\testFile4.txt");
                    outFile.WriteLine ("Func: " + "System.IO.FileInfo.OpenText()");
                    outFile.WriteLine ("Proc: " + System.Diagnostics.Process.GetCurrentProcess ().Id);
                    outFile.WriteLine ("Time: " + GetTime (now));
                    outFile.WriteLine ("Retv: " + toString (sr));
                    outFile.WriteLine ("Errc: " + "");
                    outFile.WriteLine ("Exce: " + GetException (exc));
                }
                try {
                    exc = null;
                    sw = null;
                    now = System.DateTime.Now;
                    sw = fi.CreateText ();
                    sw.Close ();
                } catch (Exception e) {
                    exc = e;
                } finally {
                    outFile.WriteLine ("Name: " + tempPath + "\\testFile4.txt");
                    outFile.WriteLine ("Func: " + "System.IO.FileInfo.CreateText()");
                    outFile.WriteLine ("Proc: " + System.Diagnostics.Process.GetCurrentProcess ().Id);
                    outFile.WriteLine ("Time: " + GetTime (now));
                    outFile.WriteLine ("Retv: " + toString (sw));
                    outFile.WriteLine ("Errc: " + "");
                    outFile.WriteLine ("Exce: " + GetException (exc));
                }
                try {
                    exc = null;
                    sw = null;
                    now = System.DateTime.Now;
                    sw = fi.AppendText ();
                    sw.Close ();
                } catch (Exception e) {
                    exc = e;
                } finally {
                    outFile.WriteLine ("Name: " + tempPath + "\\testFile4.txt");
                    outFile.WriteLine ("Func: " + "System.IO.FileInfo.AppendText()");
                    outFile.WriteLine ("Proc: " + System.Diagnostics.Process.GetCurrentProcess ().Id);
                    outFile.WriteLine ("Time: " + GetTime (now));
                    outFile.WriteLine ("Retv: " + toString (sw));
                    outFile.WriteLine ("Errc: " + "");
                    outFile.WriteLine ("Exce: " + GetException (exc));
                }
                try {
                    exc = null;
                    fs = null;
                    fi = new System.IO.FileInfo (tempPath + "\\testFile5.txt");
                    now = System.DateTime.Now;
                    fs = fi.Open (System.IO.FileMode.Open);
                    fs.Close ();
                } catch (Exception e) {
                    exc = e;
                } finally {
                    outFile.WriteLine ("Name: " + tempPath + "\\testFile5.txt");
                    outFile.WriteLine ("Func: " + "System.IO.FileInfo.Create(FileMode)");
                    outFile.WriteLine ("Proc: " + System.Diagnostics.Process.GetCurrentProcess ().Id);
                    outFile.WriteLine ("Time: " + GetTime (now));
                    outFile.WriteLine ("Retv: " + toString (fs));
                    outFile.WriteLine ("Errc: " + "");
                    outFile.WriteLine ("Exce: " + GetException (exc));
                }
                try {
                    exc = null;
                    fs = null;
                    now = System.DateTime.Now;
                    fs = fi.OpenWrite ();
                    fs.Close ();
                } catch (Exception e) {
                    exc = e;
                } finally {
                    outFile.WriteLine ("Name: " + tempPath + "\\testFile5.txt");
                    outFile.WriteLine ("Func: " + "System.IO.FileInfo.OpenWrite()");
                    outFile.WriteLine ("Proc: " + System.Diagnostics.Process.GetCurrentProcess ().Id);
                    outFile.WriteLine ("Time: " + GetTime (now));
                    outFile.WriteLine ("Retv: " + toString (fs));
                    outFile.WriteLine ("Errc: " + "");
                    outFile.WriteLine ("Exce: " + GetException (exc));
                }
                try {
                    exc = null;
                    now = System.DateTime.Now;
                    fi.MoveTo (tempPath + "\\testFile6.txt");
                } catch (Exception e) {
                    exc = e;
                } finally {
                    outFile.WriteLine ("Name: " + tempPath + "\\testFile5.txt");
                    outFile.WriteLine ("Func: " + "System.IO.FileInfo.MoveTo(String)");
                    outFile.WriteLine ("Proc: " + System.Diagnostics.Process.GetCurrentProcess ().Id);
                    outFile.WriteLine ("Time: " + GetTime (now));
                    outFile.WriteLine ("Retv: " + "");
                    outFile.WriteLine ("Errc: " + "");
                    outFile.WriteLine ("Exce: " + GetException (exc));
                    //---
                    outFile.WriteLine ("Name: " + tempPath + "\\testFile6.txt");
                    outFile.WriteLine ("Func: " + "System.IO.FileInfo.MoveTo(String)");
                    outFile.WriteLine ("Proc: " + System.Diagnostics.Process.GetCurrentProcess ().Id);
                    outFile.WriteLine ("Time: " + GetTime (now));
                    outFile.WriteLine ("Retv: " + "");
                    outFile.WriteLine ("Errc: " + "");
                    outFile.WriteLine ("Exce: " + GetException (exc));
                }
                try {
                    exc = null;
                    char[] backSlash = new char[1];
                    backSlash[0] = '\\';
                    outFile.WriteLine ("Name: " + fi.FullName.TrimEnd (backSlash));
                    now = System.DateTime.Now;
                    fi.Delete ();
                } catch (Exception e) {
                    exc = e;
                } finally {
                    outFile.WriteLine ("Func: " + "System.IO.FileInfo.Delete()");
                    outFile.WriteLine ("Proc: " + System.Diagnostics.Process.GetCurrentProcess ().Id);
                    outFile.WriteLine ("Time: " + GetTime (now));
                    outFile.WriteLine ("Retv: " + "");
                    outFile.WriteLine ("Errc: " + "");
                    outFile.WriteLine ("Exce: " + GetException (exc));
                }
            } catch (Exception) {
            }

            try {
                exc = null;
                byte[] array = new byte[1];
                array[0] = 0;
                fs = null;
                now = System.DateTime.Now;
                fs = System.IO.File.Open (tempPath + "\\dummyFile12.txt", System.IO.FileMode.OpenOrCreate);
                outFile.WriteLine ("Name: " + tempPath + "\\dummyFile12.txt");
                outFile.WriteLine ("Func: " + "System.IO.File.Open(String, FileMode)");
                outFile.WriteLine ("Proc: " + System.Diagnostics.Process.GetCurrentProcess ().Id);
                outFile.WriteLine ("Time: " + GetTime (now));
                outFile.WriteLine ("Retv: " + toString (fs));
                outFile.WriteLine ("Errc: " + "");
                outFile.WriteLine ("Exce: " + GetException (exc));

                try {
                    exc = null;
                    now = System.DateTime.Now;
                    fs.Lock (0, 1);
                } catch (Exception e) {
                    exc = e;
                } finally {
                    outFile.WriteLine ("Name: " + tempPath + "\\dummyFile12.txt");
                    outFile.WriteLine ("Func: " + "System.IO.FileStream.Lock(Int64, Int64)");
                    outFile.WriteLine ("Proc: " + System.Diagnostics.Process.GetCurrentProcess ().Id);
                    outFile.WriteLine ("Time: " + GetTime (now));
                    outFile.WriteLine ("Retv: " + "");
                    outFile.WriteLine ("Errc: " + "");
                    outFile.WriteLine ("Exce: " + GetException (exc));
                }
                try {
                    exc = null;
                    now = System.DateTime.Now;
                    fs.Unlock (0, 1);
                } catch (Exception e) {
                    exc = e;
                } finally {
                    outFile.WriteLine ("Name: " + tempPath + "\\dummyFile12.txt");
                    outFile.WriteLine ("Func: " + "System.IO.FileStream.Unlock(Int64, Int64)");
                    outFile.WriteLine ("Proc: " + System.Diagnostics.Process.GetCurrentProcess ().Id);
                    outFile.WriteLine ("Time: " + GetTime (now));
                    outFile.WriteLine ("Retv: " + "");
                    outFile.WriteLine ("Errc: " + "");
                    outFile.WriteLine ("Exce: " + GetException (exc));
                }
                try {
                    exc = null;
                    now = System.DateTime.Now;
                    fs.WriteByte (0);
                } catch (Exception e) {
                    exc = e;
                } finally {
                    outFile.WriteLine ("Name: " + tempPath + "\\dummyFile12.txt");
                    outFile.WriteLine ("Func: " + "System.IO.FileStream.WriteByte(Byte)");
                    outFile.WriteLine ("Proc: " + System.Diagnostics.Process.GetCurrentProcess ().Id);
                    outFile.WriteLine ("Time: " + GetTime (now));
                    outFile.WriteLine ("Retv: " + "");
                    outFile.WriteLine ("Errc: " + "");
                    outFile.WriteLine ("Exce: " + GetException (exc));
                }
                try {
                    exc = null;
                    now = System.DateTime.Now;
                    fs.Write (array, 0, 1);
                } catch (Exception e) {
                    exc = e;
                } finally {
                    outFile.WriteLine ("Name: " + tempPath + "\\dummyFile12.txt");
                    outFile.WriteLine ("Func: " + "System.IO.FileStream.Write(Byte[], Int32, Int32)");
                    outFile.WriteLine ("Proc: " + System.Diagnostics.Process.GetCurrentProcess ().Id);
                    outFile.WriteLine ("Time: " + GetTime (now));
                    outFile.WriteLine ("Retv: " + "");
                    outFile.WriteLine ("Errc: " + "");
                    outFile.WriteLine ("Exce: " + GetException (exc));
                }
                try {
                    exc = null;
                    asr = null;
                    now = System.DateTime.Now;
                    asr = fs.BeginWrite (array, 0, 1, null, null);
                    outFile.WriteLine ("Name: " + tempPath + "\\dummyFile12.txt");
                    outFile.WriteLine ("Func: " + "System.IO.FileStream.BeginWrite(Byte[], Int32, Int32, AsyncCallback, Object)");
                    outFile.WriteLine ("Proc: " + System.Diagnostics.Process.GetCurrentProcess ().Id);
                    outFile.WriteLine ("Time: " + GetTime (now));
                    outFile.WriteLine ("Retv: " + toString (asr));
                    outFile.WriteLine ("Errc: " + "");
                    outFile.WriteLine ("Exce: " + GetException (exc));

                    try {
                        exc = null;
                        now = System.DateTime.Now;
                        fs.EndWrite (asr);
                    } catch (Exception e) {
                        exc = e;
                    } finally {
                        outFile.WriteLine ("Name: " + tempPath + "\\dummyFile12.txt");
                        outFile.WriteLine ("Func: " + "System.IO.FileStream.EndWrite(IAsyncResult)");
                        outFile.WriteLine ("Proc: " + System.Diagnostics.Process.GetCurrentProcess ().Id);
                        outFile.WriteLine ("Time: " + GetTime (now));
                        outFile.WriteLine ("Retv: " + "");
                        outFile.WriteLine ("Errc: " + "");
                        outFile.WriteLine ("Exce: " + GetException (exc));
                    }
                } catch (Exception e) {
                    exc = e;
                    outFile.WriteLine ("Name: " + tempPath + "\\dummyFile12.txt");
                    outFile.WriteLine ("Func: " + "System.IO.FileStream.BeginWrite(Byte[], Int32, Int32, AsyncCallback, Object)");
                    outFile.WriteLine ("Proc: " + System.Diagnostics.Process.GetCurrentProcess ().Id);
                    outFile.WriteLine ("Time: " + GetTime (now));
                    outFile.WriteLine ("Retv: " + toString (asr));
                    outFile.WriteLine ("Errc: " + "");
                    outFile.WriteLine ("Exce: " + GetException (exc));
                }
                try {
                    exc = null;
                    now = System.DateTime.Now;
                    fs.SetLength (2);
                } catch (Exception e) {
                    exc = e;
                } finally {
                    outFile.WriteLine ("Name: " + tempPath + "\\dummyFile12.txt");
                    outFile.WriteLine ("Func: " + "System.IO.FileStream.SetLength(Int64)");
                    outFile.WriteLine ("Proc: " + System.Diagnostics.Process.GetCurrentProcess ().Id);
                    outFile.WriteLine ("Time: " + GetTime (now));
                    outFile.WriteLine ("Retv: " + "");
                    outFile.WriteLine ("Errc: " + "");
                    outFile.WriteLine ("Exce: " + GetException (exc));
                }
                try {
                    exc = null;
                    now = System.DateTime.Now;
                    fs.Flush ();
                } catch (Exception e) {
                    exc = e;
                } finally {
                    outFile.WriteLine ("Name: " + tempPath + "\\dummyFile12.txt");
                    outFile.WriteLine ("Func: " + "System.IO.FileStream.Flush()");
                    outFile.WriteLine ("Proc: " + System.Diagnostics.Process.GetCurrentProcess ().Id);
                    outFile.WriteLine ("Time: " + GetTime (now));
                    outFile.WriteLine ("Retv: " + "");
                    outFile.WriteLine ("Errc: " + "");
                    outFile.WriteLine ("Exce: " + GetException (exc));
                }
                try {
                    exc = null;
                    i = 0;
                    now = System.DateTime.Now;
                    i = fs.ReadByte ();
                } catch (Exception e) {
                    exc = e;
                } finally {
                    outFile.WriteLine ("Name: " + tempPath + "\\dummyFile12.txt");
                    outFile.WriteLine ("Func: " + "System.IO.FileStream.ReadByte()");
                    outFile.WriteLine ("Proc: " + System.Diagnostics.Process.GetCurrentProcess ().Id);
                    outFile.WriteLine ("Time: " + GetTime (now));
                    outFile.WriteLine ("Retv: " + toString (i));
                    outFile.WriteLine ("Errc: " + "");
                    outFile.WriteLine ("Exce: " + GetException (exc));
                }
                try {
                    exc = null;
                    i = 0;
                    now = System.DateTime.Now;
                    i = fs.Read (array, 0, 1);
                } catch (Exception e) {
                    exc = e;
                } finally {
                    outFile.WriteLine ("Name: " + tempPath + "\\dummyFile12.txt");
                    outFile.WriteLine ("Func: " + "System.IO.FileStream.Read(Byte[], Int32, Int32)");
                    outFile.WriteLine ("Proc: " + System.Diagnostics.Process.GetCurrentProcess ().Id);
                    outFile.WriteLine ("Time: " + GetTime (now));
                    outFile.WriteLine ("Retv: " + toString (i));
                    outFile.WriteLine ("Errc: " + "");
                    outFile.WriteLine ("Exce: " + GetException (exc));
                }
                try {
                    exc = null;
                    l = 0;
                    now = System.DateTime.Now;
                    l = fs.Seek (0, System.IO.SeekOrigin.Begin);
                } catch (Exception e) {
                    exc = e;
                } finally {
                    outFile.WriteLine ("Name: " + tempPath + "\\dummyFile12.txt");
                    outFile.WriteLine ("Func: " + "System.IO.FileStream.Seek(Int64, SeekOrigin)");
                    outFile.WriteLine ("Proc: " + System.Diagnostics.Process.GetCurrentProcess ().Id);
                    outFile.WriteLine ("Time: " + GetTime (now));
                    outFile.WriteLine ("Retv: " + toString (l));
                    outFile.WriteLine ("Errc: " + "");
                    outFile.WriteLine ("Exce: " + GetException (exc));
                }
                try {
                    exc = null;
                    asr = null;
                    now = System.DateTime.Now;
                    asr = fs.BeginRead (array, 0, 1, null, null);
                    outFile.WriteLine ("Name: " + tempPath + "\\dummyFile12.txt");
                    outFile.WriteLine ("Func: " + "System.IO.FileStream.BeginRead(Byte[], Int32, Int32, AsyncCallback, Object)");
                    outFile.WriteLine ("Proc: " + System.Diagnostics.Process.GetCurrentProcess ().Id);
                    outFile.WriteLine ("Time: " + GetTime (now));
                    outFile.WriteLine ("Retv: " + toString (asr));
                    outFile.WriteLine ("Errc: " + "");
                    outFile.WriteLine ("Exce: " + GetException (exc));

                    try {
                        exc = null;
                        i = 0;
                        now = System.DateTime.Now;
                        i = fs.EndRead (asr);
                    } catch (Exception e) {
                        exc = e;
                    } finally {
                        outFile.WriteLine ("Name: " + tempPath + "\\dummyFile12.txt");
                        outFile.WriteLine ("Func: " + "System.IO.FileStream.EndRead(IAsyncResult)");
                        outFile.WriteLine ("Proc: " + System.Diagnostics.Process.GetCurrentProcess ().Id);
                        outFile.WriteLine ("Time: " + GetTime (now));
                        outFile.WriteLine ("Retv: " + toString (i));
                        outFile.WriteLine ("Errc: " + "");
                        outFile.WriteLine ("Exce: " + GetException (exc));
                    }
                } catch (Exception e) {
                    exc = e;
                    outFile.WriteLine ("Name: " + tempPath + "\\dummyFile12.txt");
                    outFile.WriteLine ("Func: " + "System.IO.FileStream.BeginRead(Byte[], Int32, Int32, AsyncCallback, Object)");
                    outFile.WriteLine ("Proc: " + System.Diagnostics.Process.GetCurrentProcess ().Id);
                    outFile.WriteLine ("Time: " + GetTime (now));
                    outFile.WriteLine ("Retv: " + toString (asr));
                    outFile.WriteLine ("Errc: " + "");
                    outFile.WriteLine ("Exce: " + GetException (exc));
                }
                try {
                    exc = null;
                    now = System.DateTime.Now;
                    fs.Close ();
                } catch (Exception e) {
                    exc = e;
                } finally {
                    outFile.WriteLine ("Name: " + tempPath + "\\dummyFile12.txt");
                    outFile.WriteLine ("Func: " + "System.IO.FileStream.Close(IAsyncResult)");
                    outFile.WriteLine ("Proc: " + System.Diagnostics.Process.GetCurrentProcess ().Id);
                    outFile.WriteLine ("Time: " + GetTime (now));
                    outFile.WriteLine ("Retv: " + "");
                    outFile.WriteLine ("Errc: " + "");
                    outFile.WriteLine ("Exce: " + GetException (exc));
                }
            } catch (Exception e) {
                exc = e;
                outFile.WriteLine ("Name: " + tempPath + "\\dummyFile12.txt");
                outFile.WriteLine ("Func: " + "System.IO.File.Open(String, FileMode)");
                outFile.WriteLine ("Proc: " + System.Diagnostics.Process.GetCurrentProcess ().Id);
                outFile.WriteLine ("Time: " + GetTime (now));
                outFile.WriteLine ("Retv: " + toString (fs));
                outFile.WriteLine ("Errc: " + "");
                outFile.WriteLine ("Exce: " + GetException (exc));
            }

            try {
                System.IO.TextWriter tw = new System.IO.StreamWriter (tempPath + "\\dummyFile13.txt");
                try {
                    exc = null;
                    now = System.DateTime.Now;
                    tw.WriteLine ("hello");
                } catch (Exception e) {
                    exc = e;
                } finally {
                    outFile.WriteLine ("Name: " + tempPath + "\\dummyFile13.txt");
                    outFile.WriteLine ("Func: " + "System.IO.TextWriter.WriteLine(String)");
                    outFile.WriteLine ("Proc: " + System.Diagnostics.Process.GetCurrentProcess ().Id);
                    outFile.WriteLine ("Time: " + GetTime (now));
                    outFile.WriteLine ("Retv: " + "");
                    outFile.WriteLine ("Errc: " + "");
                    outFile.WriteLine ("Exce: " + GetException (exc));
                }
                try {
                    exc = null;
                    now = System.DateTime.Now;
                    tw.Write ("12345678790");
                } catch (Exception e) {
                    exc = e;
                } finally {
                    outFile.WriteLine ("Name: " + tempPath + "\\dummyFile13.txt");
                    outFile.WriteLine ("Func: " + "System.IO.TextWriter.Write(String)");
                    outFile.WriteLine ("Proc: " + System.Diagnostics.Process.GetCurrentProcess ().Id);
                    outFile.WriteLine ("Time: " + GetTime (now));
                    outFile.WriteLine ("Retv: " + "");
                    outFile.WriteLine ("Errc: " + "");
                    outFile.WriteLine ("Exce: " + GetException (exc));
                }
                try {
                    exc = null;
                    now = System.DateTime.Now;
                    tw.Flush ();
                } catch (Exception e) {
                    exc = e;
                } finally {
                    outFile.WriteLine ("Name: " + tempPath + "\\dummyFile13.txt");
                    outFile.WriteLine ("Func: " + "System.IO.TextWriter.Flush()");
                    outFile.WriteLine ("Proc: " + System.Diagnostics.Process.GetCurrentProcess ().Id);
                    outFile.WriteLine ("Time: " + GetTime (now));
                    outFile.WriteLine ("Retv: " + "");
                    outFile.WriteLine ("Errc: " + "");
                    outFile.WriteLine ("Exce: " + GetException (exc));
                }
                try {
                    exc = null;
                    now = System.DateTime.Now;
                    tw.Close ();
                } catch (Exception e) {
                    exc = e;
                } finally {
                    outFile.WriteLine ("Name: " + tempPath + "\\dummyFile13.txt");
                    outFile.WriteLine ("Func: " + "System.IO.TextWriter.Close()");
                    outFile.WriteLine ("Proc: " + System.Diagnostics.Process.GetCurrentProcess ().Id);
                    outFile.WriteLine ("Time: " + GetTime (now));
                    outFile.WriteLine ("Retv: " + "");
                    outFile.WriteLine ("Errc: " + "");
                    outFile.WriteLine ("Exce: " + GetException (exc));
                }
            } catch (Exception) {
            }

            try {
                char[] array = new char[1];
                array[0] = 'a';
                System.IO.TextReader tr = new System.IO.StreamReader (tempPath + "\\dummyFile13.txt");
                try {
                    exc = null;
                    s = null;
                    now = System.DateTime.Now;
                    s = tr.ReadLine ();
                } catch (Exception e) {
                    exc = e;
                } finally {
                    outFile.WriteLine ("Name: " + tempPath + "\\dummyFile13.txt");
                    outFile.WriteLine ("Func: " + "System.IO.TextReader.ReadLine()");
                    outFile.WriteLine ("Proc: " + System.Diagnostics.Process.GetCurrentProcess ().Id);
                    outFile.WriteLine ("Time: " + GetTime (now));
                    outFile.WriteLine ("Retv: " + toString (s));
                    outFile.WriteLine ("Errc: " + "");
                    outFile.WriteLine ("Exce: " + GetException (exc));
                }
                try {
                    exc = null;
                    i = 0;
                    now = System.DateTime.Now;
                    i = tr.ReadBlock (array, 0, 1);
                } catch (Exception e) {
                    exc = e;
                } finally {
                    outFile.WriteLine ("Name: " + tempPath + "\\dummyFile13.txt");
                    outFile.WriteLine ("Func: " + "System.IO.TextReader.ReadBlock(Char[], Int32, Int32)");
                    outFile.WriteLine ("Proc: " + System.Diagnostics.Process.GetCurrentProcess ().Id);
                    outFile.WriteLine ("Time: " + GetTime (now));
                    outFile.WriteLine ("Retv: " + toString (i));
                    outFile.WriteLine ("Errc: " + "");
                    outFile.WriteLine ("Exce: " + GetException (exc));
                }
                try {
                    exc = null;
                    i = 0;
                    now = System.DateTime.Now;
                    i = tr.Read ();
                } catch (Exception e) {
                    exc = e;
                } finally {
                    outFile.WriteLine ("Name: " + tempPath + "\\dummyFile13.txt");
                    outFile.WriteLine ("Func: " + "System.IO.TextReader.Read()");
                    outFile.WriteLine ("Proc: " + System.Diagnostics.Process.GetCurrentProcess ().Id);
                    outFile.WriteLine ("Time: " + GetTime (now));
                    outFile.WriteLine ("Retv: " + toString (i));
                    outFile.WriteLine ("Errc: " + "");
                    outFile.WriteLine ("Exce: " + GetException (exc));
                }
                try {
                    exc = null;
                    i = 0;
                    now = System.DateTime.Now;
                    i = tr.Read (array, 0, 1);
                } catch (Exception e) {
                    exc = e;
                } finally {
                    outFile.WriteLine ("Name: " + tempPath + "\\dummyFile13.txt");
                    outFile.WriteLine ("Func: " + "System.IO.TextReader.Read(Char[], Int32, Int32)");
                    outFile.WriteLine ("Proc: " + System.Diagnostics.Process.GetCurrentProcess ().Id);
                    outFile.WriteLine ("Time: " + GetTime (now));
                    outFile.WriteLine ("Retv: " + toString (i));
                    outFile.WriteLine ("Errc: " + "");
                    outFile.WriteLine ("Exce: " + GetException (exc));
                }
                try {
                    exc = null;
                    s = null;
                    now = System.DateTime.Now;
                    s = tr.ReadToEnd ();
                } catch (Exception e) {
                    exc = e;
                } finally {
                    outFile.WriteLine ("Name: " + tempPath + "\\dummyFile13.txt");
                    outFile.WriteLine ("Func: " + "System.IO.TextReader.ReadToEnd()");
                    outFile.WriteLine ("Proc: " + System.Diagnostics.Process.GetCurrentProcess ().Id);
                    outFile.WriteLine ("Time: " + GetTime (now));
                    outFile.WriteLine ("Retv: " + toString (s));
                    outFile.WriteLine ("Errc: " + "");
                    outFile.WriteLine ("Exce: " + GetException (exc));
                }
                try {
                    exc = null;
                    now = System.DateTime.Now;
                    tr.Close ();
                } catch (Exception e) {
                    exc = e;
                } finally {
                    outFile.WriteLine ("Name: " + tempPath + "\\dummyFile13.txt");
                    outFile.WriteLine ("Func: " + "System.IO.TextReader.Close()");
                    outFile.WriteLine ("Proc: " + System.Diagnostics.Process.GetCurrentProcess ().Id);
                    outFile.WriteLine ("Time: " + GetTime (now));
                    outFile.WriteLine ("Retv: " + "");
                    outFile.WriteLine ("Errc: " + "");
                    outFile.WriteLine ("Exce: " + GetException (exc));
                }
            } catch (Exception) {
            }

            try {
                sw = new System.IO.StreamWriter (tempPath + "\\dummyFile14.txt");
                try {
                    exc = null;
                    now = System.DateTime.Now;
                    sw.Write (0);
                } catch (Exception e) {
                    exc = e;
                } finally {
                    outFile.WriteLine ("Name: " + tempPath + "\\dummyFile14.txt");
                    outFile.WriteLine ("Func: " + "System.IO.StreamWriter.Write(Int32)");
                    outFile.WriteLine ("Proc: " + System.Diagnostics.Process.GetCurrentProcess ().Id);
                    outFile.WriteLine ("Time: " + GetTime (now));
                    outFile.WriteLine ("Retv: " + "");
                    outFile.WriteLine ("Errc: " + "");
                    outFile.WriteLine ("Exce: " + GetException (exc));
                }
                try {
                    exc = null;
                    now = System.DateTime.Now;
                    sw.Flush ();
                } catch (Exception e) {
                    exc = e;
                } finally {
                    outFile.WriteLine ("Name: " + tempPath + "\\dummyFile14.txt");
                    outFile.WriteLine ("Func: " + "System.IO.StreamWriter.Flush()");
                    outFile.WriteLine ("Proc: " + System.Diagnostics.Process.GetCurrentProcess ().Id);
                    outFile.WriteLine ("Time: " + GetTime (now));
                    outFile.WriteLine ("Retv: " + "");
                    outFile.WriteLine ("Errc: " + "");
                    outFile.WriteLine ("Exce: " + GetException (exc));
                }
                try {
                    exc = null;
                    now = System.DateTime.Now;
                    sw.Close ();
                } catch (Exception e) {
                    exc = e;
                } finally {
                    outFile.WriteLine ("Name: " + tempPath + "\\dummyFile14.txt");
                    outFile.WriteLine ("Func: " + "System.IO.StreamWriter.Close()");
                    outFile.WriteLine ("Proc: " + System.Diagnostics.Process.GetCurrentProcess ().Id);
                    outFile.WriteLine ("Time: " + GetTime (now));
                    outFile.WriteLine ("Retv: " + "");
                    outFile.WriteLine ("Errc: " + "");
                    outFile.WriteLine ("Exce: " + GetException (exc));
                }
            } catch (Exception) {
            }

            /*
            try {
                exc = null;
                System.IO.IsolatedStorage.IsolatedStorageScope iss = System.IO.IsolatedStorage.IsolatedStorageScope.User | System.IO.IsolatedStorage.IsolatedStorageScope.Assembly | System.IO.IsolatedStorage.IsolatedStorageScope.Domain;
                isf = null;
                now = System.DateTime.Now;
                isf = System.IO.IsolatedStorage.IsolatedStorageFile.GetStore (iss, null, null);

                try {
                    exc = null;
                    now = System.DateTime.Now;
                    isf.Dispose ();
                } catch (Exception e) {
                    exc = e;
                }
            //			System.IO.IsolatedStorage.IsolatedStorageFile.GetUserStoreForDomain ();
            //			System.IO.IsolatedStorage.IsolatedStorageFile.GetUserStoreForAssembly ();
            //			System.IO.IsolatedStorage.IsolatedStorageFile.GetStore (System.IO.IsolatedStorage.IsolatedStorageScope.User | System.IO.IsolatedStorage.IsolatedStorageScope.Assembly | System.IO.IsolatedStorage.IsolatedStorageScope.Domain, null, null);
                try {
                    exc = null;
                    now = System.DateTime.Now;
                    isf.CreateDirectory ("dummyDir");
                } catch (Exception e) {
                    exc = e;
                }
                try {
                    exc = null;
                    now = System.DateTime.Now;
                    isf.GetDirectoryNames ("*");
                } catch (Exception e) {
                    exc = e;
                }
                try {
                    exc = null;
                    now = System.DateTime.Now;
                    isf.DeleteFile ("dummyFile");
                } catch (Exception e) {
                    exc = e;
                }
                try {
                    exc = null;
                    now = System.DateTime.Now;
                    isf.DeleteDirectory ("dummyDir");
                } catch (Exception e) {
                    exc = e;
                }
                try {
                    exc = null;
                    now = System.DateTime.Now;
                    isf.GetFileNames ("*");
                } catch (Exception e) {
                    exc = e;
                }
                try {
                    exc = null;
                    now = System.DateTime.Now;
                    isf.Close ();
                } catch (Exception e) {
                    exc = e;
                }
                try {
                    exc = null;
                    now = System.DateTime.Now;
                    System.IO.IsolatedStorage.IsolatedStorageFile.Remove (iss);
                } catch (Exception e) {
                    exc = e;
                }
            } catch (Exception e) {
                exc = e;
            }
            */
            try {
                exc = null;
                byte[] array = new byte[1];
                array[0] = 0;
                isfs = null;
                now = System.DateTime.Now;
                isfs = new System.IO.IsolatedStorage.IsolatedStorageFileStream (tempPath + "\\dummyFile15.txt", System.IO.FileMode.OpenOrCreate);
                outFile.WriteLine ("Name: " + tempPath + "\\dummyFile15.txt");
                outFile.WriteLine ("Func: " + "System.IO.IsolatedStorage.IsolatedStorageFileStream.ctor(String, FileMode)");
                outFile.WriteLine ("Proc: " + System.Diagnostics.Process.GetCurrentProcess ().Id);
                outFile.WriteLine ("Time: " + GetTime (now));
                outFile.WriteLine ("Retv: " + toString (isfs));
                outFile.WriteLine ("Errc: " + "");
                outFile.WriteLine ("Exce: " + GetException (exc));

                try {
                    exc = null;
                    now = System.DateTime.Now;
                    isfs.Lock (0, 1);
                } catch (Exception e) {
                    exc = e;
                } finally {
                    outFile.WriteLine ("Name: " + tempPath + "\\dummyFile15.txt");
                    outFile.WriteLine ("Func: " + "System.IO.IsolatedStorage.IsolatedStorageFileStream.Lock(Int64, Int64)");
                    outFile.WriteLine ("Proc: " + System.Diagnostics.Process.GetCurrentProcess ().Id);
                    outFile.WriteLine ("Time: " + GetTime (now));
                    outFile.WriteLine ("Retv: " + "");
                    outFile.WriteLine ("Errc: " + "");
                    outFile.WriteLine ("Exce: " + GetException (exc));
                }
                try {
                    exc = null;
                    now = System.DateTime.Now;
                    isfs.Unlock (0, 1);
                } catch (Exception e) {
                    exc = e;
                } finally {
                    outFile.WriteLine ("Name: " + tempPath + "\\dummyFile15.txt");
                    outFile.WriteLine ("Func: " + "System.IO.IsolatedStorage.IsolatedStorageFileStream.Unlock(Int64, Int64)");
                    outFile.WriteLine ("Proc: " + System.Diagnostics.Process.GetCurrentProcess ().Id);
                    outFile.WriteLine ("Time: " + GetTime (now));
                    outFile.WriteLine ("Retv: " + "");
                    outFile.WriteLine ("Errc: " + "");
                    outFile.WriteLine ("Exce: " + GetException (exc));
                }
                try {
                    exc = null;
                    now = System.DateTime.Now;
                    isfs.WriteByte (0);
                } catch (Exception e) {
                    exc = e;
                } finally {
                    outFile.WriteLine ("Name: " + tempPath + "\\dummyFile15.txt");
                    outFile.WriteLine ("Func: " + "System.IO.IsolatedStorage.IsolatedStorageFileStream.WriteByte(Byte)");
                    outFile.WriteLine ("Proc: " + System.Diagnostics.Process.GetCurrentProcess ().Id);
                    outFile.WriteLine ("Time: " + GetTime (now));
                    outFile.WriteLine ("Retv: " + "");
                    outFile.WriteLine ("Errc: " + "");
                    outFile.WriteLine ("Exce: " + GetException (exc));
                }
                try {
                    exc = null;
                    now = System.DateTime.Now;
                    isfs.Write (array, 0, 1);
                } catch (Exception e) {
                    exc = e;
                } finally {
                    outFile.WriteLine ("Name: " + tempPath + "\\dummyFile15.txt");
                    outFile.WriteLine ("Func: " + "System.IO.IsolatedStorage.IsolatedStorageFileStream.Write(Byte[], Int32, Int32)");
                    outFile.WriteLine ("Proc: " + System.Diagnostics.Process.GetCurrentProcess ().Id);
                    outFile.WriteLine ("Time: " + GetTime (now));
                    outFile.WriteLine ("Retv: " + "");
                    outFile.WriteLine ("Errc: " + "");
                    outFile.WriteLine ("Exce: " + GetException (exc));
                }
                try {
                    exc = null;
                    asr = null;
                    now = System.DateTime.Now;
                    asr = isfs.BeginWrite (array, 0, 1, null, null);
                    outFile.WriteLine ("Name: " + tempPath + "\\dummyFile15.txt");
                    outFile.WriteLine ("Func: " + "System.IO.IsolatedStorage.IsolatedStorageFileStream.BeginWrite(IAsyncResult, Int32, Int32, AsyncCallback, Object)");
                    outFile.WriteLine ("Proc: " + System.Diagnostics.Process.GetCurrentProcess ().Id);
                    outFile.WriteLine ("Time: " + GetTime (now));
                    outFile.WriteLine ("Retv: " + toString (asr));
                    outFile.WriteLine ("Errc: " + "");
                    outFile.WriteLine ("Exce: " + GetException (exc));

                    try {
                        exc = null;
                        now = System.DateTime.Now;
                        isfs.EndWrite (asr);
                    } catch (Exception e) {
                        exc = e;
                    } finally {
                        outFile.WriteLine ("Name: " + tempPath + "\\dummyFile15.txt");
                        outFile.WriteLine ("Func: " + "System.IO.IsolatedStorage.IsolatedStorageFileStream.EndWrite(IAsyncResult)");
                        outFile.WriteLine ("Proc: " + System.Diagnostics.Process.GetCurrentProcess ().Id);
                        outFile.WriteLine ("Time: " + GetTime (now));
                        outFile.WriteLine ("Retv: " + "");
                        outFile.WriteLine ("Errc: " + "");
                        outFile.WriteLine ("Exce: " + GetException (exc));
                    }
                } catch (Exception e) {
                    exc = e;
                    outFile.WriteLine ("Name: " + tempPath + "\\dummyFile15.txt");
                    outFile.WriteLine ("Func: " + "System.IO.IsolatedStorage.IsolatedStorageFileStream.BeginWrite(IAsyncResult, Int32, Int32, AsyncCallback, Object)");
                    outFile.WriteLine ("Proc: " + System.Diagnostics.Process.GetCurrentProcess ().Id);
                    outFile.WriteLine ("Time: " + GetTime (now));
                    outFile.WriteLine ("Retv: " + toString (asr));
                    outFile.WriteLine ("Errc: " + "");
                    outFile.WriteLine ("Exce: " + GetException (exc));
                }
                try {
                    exc = null;
                    now = System.DateTime.Now;
                    isfs.SetLength (2);
                } catch (Exception e) {
                    exc = e;
                } finally {
                    outFile.WriteLine ("Name: " + tempPath + "\\dummyFile15.txt");
                    outFile.WriteLine ("Func: " + "System.IO.IsolatedStorage.IsolatedStorageFileStream.SetLength(Int64)");
                    outFile.WriteLine ("Proc: " + System.Diagnostics.Process.GetCurrentProcess ().Id);
                    outFile.WriteLine ("Time: " + GetTime (now));
                    outFile.WriteLine ("Retv: " + "");
                    outFile.WriteLine ("Errc: " + "");
                    outFile.WriteLine ("Exce: " + GetException (exc));
                }
                try {
                    exc = null;
                    now = System.DateTime.Now;
                    isfs.Flush ();
                } catch (Exception e) {
                    exc = e;
                } finally {
                    outFile.WriteLine ("Name: " + tempPath + "\\dummyFile15.txt");
                    outFile.WriteLine ("Func: " + "System.IO.IsolatedStorage.IsolatedStorageFileStream.Flush()");
                    outFile.WriteLine ("Proc: " + System.Diagnostics.Process.GetCurrentProcess ().Id);
                    outFile.WriteLine ("Time: " + GetTime (now));
                    outFile.WriteLine ("Retv: " + "");
                    outFile.WriteLine ("Errc: " + "");
                    outFile.WriteLine ("Exce: " + GetException (exc));
                }
                try {
                    exc = null;
                    l = 0;
                    now = System.DateTime.Now;
                    l = isfs.Seek (0, System.IO.SeekOrigin.Begin);
                } catch (Exception e) {
                    exc = e;
                } finally {
                    outFile.WriteLine ("Name: " + tempPath + "\\dummyFile15.txt");
                    outFile.WriteLine ("Func: " + "System.IO.IsolatedStorage.IsolatedStorageFileStream.Seek(Int64, SeekOrigin)");
                    outFile.WriteLine ("Proc: " + System.Diagnostics.Process.GetCurrentProcess ().Id);
                    outFile.WriteLine ("Time: " + GetTime (now));
                    outFile.WriteLine ("Retv: " + toString (l));
                    outFile.WriteLine ("Errc: " + "");
                    outFile.WriteLine ("Exce: " + GetException (exc));
                }
                try {
                    exc = null;
                    i = 0;
                    now = System.DateTime.Now;
                    i = isfs.ReadByte ();
                } catch (Exception e) {
                    exc = e;
                } finally {
                    outFile.WriteLine ("Name: " + tempPath + "\\dummyFile15.txt");
                    outFile.WriteLine ("Func: " + "System.IO.IsolatedStorage.IsolatedStorageFileStream.ReadByte()");
                    outFile.WriteLine ("Proc: " + System.Diagnostics.Process.GetCurrentProcess ().Id);
                    outFile.WriteLine ("Time: " + GetTime (now));
                    outFile.WriteLine ("Retv: " + toString (i));
                    outFile.WriteLine ("Errc: " + "");
                    outFile.WriteLine ("Exce: " + GetException (exc));
                }
                try {
                    exc = null;
                    i = 0;
                    now = System.DateTime.Now;
                    i = isfs.Read (array, 0, 1);
                } catch (Exception e) {
                    exc = e;
                } finally {
                    outFile.WriteLine ("Name: " + tempPath + "\\dummyFile15.txt");
                    outFile.WriteLine ("Func: " + "System.IO.IsolatedStorage.IsolatedStorageFileStream.Read(Byte[], Int32, Int32)");
                    outFile.WriteLine ("Proc: " + System.Diagnostics.Process.GetCurrentProcess ().Id);
                    outFile.WriteLine ("Time: " + GetTime (now));
                    outFile.WriteLine ("Retv: " + toString (i));
                    outFile.WriteLine ("Errc: " + "");
                    outFile.WriteLine ("Exce: " + GetException (exc));
                }
                try {
                    exc = null;
                    asr = null;
                    now = System.DateTime.Now;
                    asr = isfs.BeginRead (array, 0, 1, null, null);
                    outFile.WriteLine ("Name: " + tempPath + "\\dummyFile15.txt");
                    outFile.WriteLine ("Func: " + "System.IO.IsolatedStorage.IsolatedStorageFileStream.BeginRead(Byte[], Int32, Int32, AsyncCallback, Object)");
                    outFile.WriteLine ("Proc: " + System.Diagnostics.Process.GetCurrentProcess ().Id);
                    outFile.WriteLine ("Time: " + GetTime (now));
                    outFile.WriteLine ("Retv: " + toString (asr));
                    outFile.WriteLine ("Errc: " + "");
                    outFile.WriteLine ("Exce: " + GetException (exc));

                    try {
                        exc = null;
                        i = 0;
                        now = System.DateTime.Now;
                        i = isfs.EndRead (asr);
                    } catch (Exception e) {
                        exc = e;
                    } finally {
                        outFile.WriteLine ("Name: " + tempPath + "\\dummyFile15.txt");
                        outFile.WriteLine ("Func: " + "System.IO.IsolatedStorage.IsolatedStorageFileStream.EndRead(IAsyncResult)");
                        outFile.WriteLine ("Proc: " + System.Diagnostics.Process.GetCurrentProcess ().Id);
                        outFile.WriteLine ("Time: " + GetTime (now));
                        outFile.WriteLine ("Retv: " + toString (i));
                        outFile.WriteLine ("Errc: " + "");
                        outFile.WriteLine ("Exce: " + GetException (exc));
                    }
                } catch (Exception e) {
                    exc = e;
                    outFile.WriteLine ("Name: " + tempPath + "\\dummyFile15.txt");
                    outFile.WriteLine ("Func: " + "System.IO.IsolatedStorage.IsolatedStorageFileStream.BeginRead(Byte[], Int32, Int32, AsyncCallback, Object)");
                    outFile.WriteLine ("Proc: " + System.Diagnostics.Process.GetCurrentProcess ().Id);
                    outFile.WriteLine ("Time: " + GetTime (now));
                    outFile.WriteLine ("Retv: " + toString (asr));
                    outFile.WriteLine ("Errc: " + "");
                    outFile.WriteLine ("Exce: " + GetException (exc));
                }
                try {
                    exc = null;
                    now = System.DateTime.Now;
                    isfs.Close ();
                } catch (Exception e) {
                    exc = e;
                } finally {
                    outFile.WriteLine ("Name: " + tempPath + "\\dummyFile15.txt");
                    outFile.WriteLine ("Func: " + "System.IO.IsolatedStorage.IsolatedStorageFileStream.Close()");
                    outFile.WriteLine ("Proc: " + System.Diagnostics.Process.GetCurrentProcess ().Id);
                    outFile.WriteLine ("Time: " + GetTime (now));
                    outFile.WriteLine ("Retv: " + "");
                    outFile.WriteLine ("Errc: " + "");
                    outFile.WriteLine ("Exce: " + GetException (exc));
                }
            } catch (Exception e) {
                exc = e;
                outFile.WriteLine ("Name: " + tempPath + "\\dummyFile15.txt");
                outFile.WriteLine ("Func: " + "System.IO.IsolatedStorage.IsolatedStorageFileStream.ctor(String, FileMode)");
                outFile.WriteLine ("Proc: " + System.Diagnostics.Process.GetCurrentProcess ().Id);
                outFile.WriteLine ("Time: " + GetTime (now));
                outFile.WriteLine ("Retv: " + toString (isfs));
                outFile.WriteLine ("Errc: " + "");
                outFile.WriteLine ("Exce: " + GetException (exc));
            }

            try {
                System.Net.WebClient wc = new System.Net.WebClient ();
                try {
                    exc = null;
                    now = System.DateTime.Now;
                    wc.DownloadFile ("http://www.google.com", tempPath + "\\dummyFile16.txt");
                } catch (Exception e) {
                    exc = e;
                } finally {
                    outFile.WriteLine ("Name: " + tempPath + "\\dummyFile16.txt");
                    outFile.WriteLine ("Func: " + "System.Net.WebClient.DownloadFile(String, String)");
                    outFile.WriteLine ("Proc: " + System.Diagnostics.Process.GetCurrentProcess ().Id);
                    outFile.WriteLine ("Time: " + GetTime (now));
                    outFile.WriteLine ("Retv: " + "");
                    outFile.WriteLine ("Errc: " + "");
                    outFile.WriteLine ("Exce: " + GetException (exc));
                }
                try {
                    exc = null;
                    bL = null;
                    now = System.DateTime.Now;
                    bL = wc.UploadFile ("http://www.google.com", tempPath + "\\dummyFile16.txt");
                } catch (Exception e) {
                    exc = e;
                } finally {
                    outFile.WriteLine ("Name: " + tempPath + "\\dummyFile16.txt");
                    outFile.WriteLine ("Func: " + "System.Net.WebClient.UploadFile(String, String)");
                    outFile.WriteLine ("Proc: " + System.Diagnostics.Process.GetCurrentProcess ().Id);
                    outFile.WriteLine ("Time: " + GetTime (now));
                    outFile.WriteLine ("Retv: " + toString (bL));
                    outFile.WriteLine ("Errc: " + "");
                    outFile.WriteLine ("Exce: " + GetException (exc));
                }
            } catch (Exception) {
            }

            try {
                string processString = null;
                try {
                    exc = null;
                    p = null;
                    now = System.DateTime.Now;
                    p = System.Diagnostics.Process.Start (tempPath + "\\dummyFile16.txt");
                    processString = toString (p);
                    p.Kill ();
                } catch (Exception e) {
                    exc = e;
                } finally {
                    outFile.WriteLine ("Name: " + tempPath + "\\dummyFile16.txt");
                    outFile.WriteLine ("Func: " + "System.Diagnostics.Process.Start(String)");
                    outFile.WriteLine ("Proc: " + System.Diagnostics.Process.GetCurrentProcess ().Id);
                    outFile.WriteLine ("Time: " + GetTime (now));
                    outFile.WriteLine ("Retv: " + processString);
                    outFile.WriteLine ("Errc: " + "");
                    outFile.WriteLine ("Exce: " + GetException (exc));
                }
                try {
                    exc = null;
                    System.Diagnostics.ProcessStartInfo psi = new System.Diagnostics.ProcessStartInfo (tempPath + "\\dummyFile16.txt");
                    p = null;
                    now = System.DateTime.Now;
                    p = System.Diagnostics.Process.Start (psi);
                    processString = toString (p);
                    p.Kill ();
                } catch (Exception e) {
                    exc = e;
                } finally {
                    outFile.WriteLine ("Name: " + tempPath + "\\dummyFile16.txt");
                    outFile.WriteLine ("Func: " + "System.Diagnostics.Process.Start(ProcessStartInfo)");
                    outFile.WriteLine ("Proc: " + System.Diagnostics.Process.GetCurrentProcess ().Id);
                    outFile.WriteLine ("Time: " + GetTime (now));
                    outFile.WriteLine ("Retv: " + processString);
                    outFile.WriteLine ("Errc: " + "");
                    outFile.WriteLine ("Exce: " + GetException (exc));
                }
            } catch (Exception) {
            }

            /*
            try {
                now = System.DateTime.Now;
                System.Configuration.AppSettingsReader asr = new System.Configuration.AppSettingsReader ();
                asr.GetValue ("key", System.Type.GetType ("System.Object", false));
            } catch (Exception e) {
            }
            */

            /*
            try {
            System.Xml.XmlDocument.Save ();
            System.Xml.XmlDocument.LoadXml ();
            System.Xml.XmlDocument.WriteContentTo ();
            System.Xml.XmlDocument.WriteTo ();
            System.Xml.XmlDocument xd = new System.Xml.XmlDocument (System.Xml.XmlNameTable);
            System.Xml.XmlDocumentFragment.WriteContentTo ();
            System.Xml.XmlDocumentFragment.WriteTo ();
            System.Xml.XmlDocumentType.WriteContentTo ();
            System.Xml.XmlDocumentType.WriteTo ();
            } catch (Exception e) {
            }

            try {
            System.Xml.XmlWriter.WriteNode ();
            System.Xml.XmlWriter.WriteAttributes ();
            System.Xml.XmlWriter.WriteStartElement ();
            System.Xml.XmlWriter.WriteAttributeString ();
            System.Xml.XmlWriter.WriteStartAttribute ();
            System.Xml.XmlWriter.WriteElementString ();
            } catch (Exception e) {
            }

            try {
            System.Xml.XmlTextWriter xtw = System.Xml.XmlTextWriter (tempPath + "\\dummyFile.txt", System.Text.Encoding.ASCII);
            xtw.WriteNode ();
            xtw.WriteAttributes ();
            xtw.WriteQualifiedName ("localName", );
            xtw.WriteName ();
            xtw.WriteNmToken ();
            xtw.WriteBinHex ();
            xtw.WriteBase64 ();
            xtw.WriteRaw ();
            xtw.WriteChars ();
            xtw.WriteSurrogateCharEntity ();
            xtw.WriteString ();
            xtw.WriteWhitespace ();
            xtw.WriteCharEntity ();
            xtw.WriteEntityRef ();
            xtw.WriteProcessingInstruction ();
            xtw.WriteComment ();
            xtw.WriteCData ();
            xtw.WriteEndAttribute ();
            xtw.WriteStartAttribute ();
            xtw.WriteFullEndElement ();
            xtw.WriteEndElement ();
            xtw.WriteStartElement ();
            xtw.WriteDocType ();
            xtw.WriteEndDocument ();
            xtw.WriteStartDocument ();
            xtw.WriteAttributeString ();
            xtw.WriteElementString ();
            xtw.Flush ();
            xtw.Close ();
            } catch (Exception e) {
            }

            try {
            System.Xml.XmlReader.IsStartElement ();
            System.Xml.XmlReader.ReadEndElement ();
            System.Xml.XmlReader.ReadElementString ();
            System.Xml.XmlReader.ReadStartElement ();
            System.Xml.XmlReader.MoveToContent ();
            System.Xml.XmlReader.Skip ();
            System.Xml.XmlReader.IsName ();
            System.Xml.XmlReader.IsNameToken ();
            } catch (Exception e) {
            }

            try {
            System.Xml.XmlTextReader.ReadAttributeValue ();
            System.Xml.XmlTextReader.ResolveEntity ();
            System.Xml.XmlTextReader.LookupNamespace ();
            System.Xml.XmlTextReader.ReadOuterXml ();
            System.Xml.XmlTextReader.ReadInnerXml ();
            System.Xml.XmlTextReader.IsStartElement ();
            System.Xml.XmlTextReader.ReadEndElement ();
            System.Xml.XmlTextReader.ReadElementString ();
            System.Xml.XmlTextReader.ReadStartElement ();
            System.Xml.XmlTextReader.MoveToContent ();
            System.Xml.XmlTextReader.ReadString ();
            System.Xml.XmlTextReader.Skip ();
            System.Xml.XmlTextReader.Close ();
            System.Xml.XmlTextReader.Read ();
            System.Xml.XmlTextReader.MoveToElement ();
            System.Xml.XmlTextReader.MoveToNextAttribute ();
            System.Xml.XmlTextReader.MoveToFirstAttribute ();
            System.Xml.XmlTextReader.MoveToAttribute ();
            System.Xml.XmlTextReader.GetAttribute ();
            System.Xml.XmlTextReader.GetRemainder ();
            System.Xml.XmlTextReader.ReadChars ();
            System.Xml.XmlTextReader.ReadBase64 ();
            System.Xml.XmlTextReader.ReadBinHex ();
            System.Xml.XmlTextReader.ctor ();
            } catch (Exception e) {
            }

            try {
            System.Xml.XmlEntityReference.WriteContentTo ();
            System.Xml.XmlEntityReference.WriteTo ();
            System.Xml.XmlImplementation.CreateDocument ();
            System.Xml.XmlImplementation.ctor ();
            System.Xml.XmlText.WriteContentTo ();
            System.Xml.XmlText.WriteTo ();
            } catch (Exception e) {
            }
            */
            outFile.Flush ();
            outFile.Close ();

            try {
                sL = System.IO.Directory.GetFiles (tempPath, "tempFile*.txt");
                foreach (string str in sL) {
                    try {
                        System.IO.File.Delete (str);
                    } catch (Exception) {
                    }
                }
                sL = System.IO.Directory.GetFiles (tempPath, "dummyFile*.txt");
                foreach (string str in sL) {
                    try {
                        System.IO.File.Delete (str);
                    } catch (Exception) {
                    }
                }
                sL = System.IO.Directory.GetDirectories (tempPath, "TempDir*");
                foreach (string str in sL) {
                    try {
                        System.IO.Directory.Delete (str);
                    } catch (Exception) {
                    }
                }
            } catch (Exception) {
            }
        }