示例#1
0
        private void button1_Click(object sender, EventArgs e)
        {
            mCode       = (ManuFactureCode)cbManufacture.SelectedItem;
            sTitle      = tbHTMLTitle.Text;
            sFolderPath = mCode.sCode + @"\" + tbModel.Text + @"\" + mCode.sCode + "_" + tbModel.Text + @".html";
            sWebPath    = mCode.sCode + @"/" + tbModel.Text + @"/" + tbModel.Text;

            if (File.Exists(@"D:\Data\Shared\Ecommerce\WebData\" + sFolderPath))
            {
                File.Delete(@"D:\Data\Shared\Ecommerce\WebData\" + sFolderPath);
            }
            if (Directory.Exists(@"D:\Data\Shared\Ecommerce\WebData\" + mCode.sCode + @"\" + tbModel.Text))
            {
                oFile = File.Create(@"D:\Data\Shared\Ecommerce\WebData\" + sFolderPath);
                oFile.Close();
            }
            else
            {
                Directory.CreateDirectory(@"D:\Data\Shared\Ecommerce\WebData\" + mCode.sCode + @"\" + tbModel.Text);
                oFile = File.Create(@"D:\Data\Shared\Ecommerce\WebData\" + sFolderPath);
                oFile.Close();
            }
            oFileStream = new StreamWriter(oFile.Name);

            makeTXT();

            Process.Start("Notepad.exe", oFile.Name);
        }
示例#2
0
        //       private String googleAPIKey = "AIzaSyCfZ3iSlDmSwhgtEdcsbzBpHx - FZwwvRJI";


        public eBayHTMLBuilder()
        {
            string path;
            string DirPath;
            string line;


            path = System.IO.Path.GetDirectoryName(
                System.Reflection.Assembly.GetExecutingAssembly().GetName().CodeBase);
            DirPath  = path.Substring(6);
            ManuFile = new StreamReader(DirPath + @"\Manufacture\ManuCode.txt");


            InitializeComponent();
            this.Text = "eBay HTML Builder v1";

            formHTML.Text   = "form HTML";
            LHTMLTitle.Text = "Title";

            LProductGoodness.Text = "Type";
            cProductGoodness.Items.Add("Good");
            cProductGoodness.Items.Add("Better");
            cProductGoodness.Items.Add("Best");

            LDescriptionBox.Text = "Description";

            LManufactor.Text = "Manufacturer";
            while ((line = ManuFile.ReadLine()) != null)
            {
                mCode = new ManuFactureCode(line.Substring(0, line.IndexOf(@"\")), line.Substring(line.IndexOf(@"\") + 1));
                cbManufacture.Items.Add(mCode);
            }

            LModel.Text = "Model #";

            LLeaseAmount.Text     = "Lease Amount:";
            tbLeaseAmount.Enabled = false;
            LLeaseAmount.Enabled  = false;

            cbDiscountedUnit.Text = "Discounted Unit";
            cbHasLeasing.Text     = "Lease This Item";
            cbHasShipping.Text    = "Big Equipment";

            cbHasWarranty.Text = "Does this Item Have Warranty";

            cbPartsWarranty.Text    = "Parts and Labor Warranty";
            cbPartsWarranty.Enabled = false;
            tbPartsWarranty.Enabled = false;
            LPartsYears.Text        = "Years";
            LPartsYears.Enabled     = false;

            cbCompressorWarranty.Text    = "Compressor Warranty";
            cbCompressorWarranty.Enabled = false;
            tbCompressorWarranty.Enabled = false;
            LCompYears.Text    = "Years";
            LCompYears.Enabled = false;

            tbLiftRes.Enabled = false;
            LLiftRes.Text     = "LiftGate/Residental Fee";
            LLiftRes.Enabled  = false;

            cbSalesFloor.Text    = "Sales Floor";
            cbSalesFloor.Enabled = false;
            cbSND.Text           = "Scratch and Dent";
            cbSND.Enabled        = false;
        }