Ejemplo n.º 1
0
        private void xMLToolStripMenuItem_Click(object sender, EventArgs e)
        {
            saveFileDialog1.Filter           = "XML files (*.xml)|*.xml";
            saveFileDialog1.InitialDirectory = Application.StartupPath;// + "\\ SavedTest\\";

            DialogResult d  = DialogResult.Cancel;
            FileInfo     fi = new FileInfo(Application.StartupPath + "\\SavedTest\\" + "temp");

            // amend the above line to whatever the file name should be
            if (fi.Exists)
            {
                d = DialogResult.OK;
            }
            else
            {
                d = saveFileDialog1.ShowDialog();
            }
            if (d == DialogResult.OK)
            {
                string pathholder = saveFileDialog1.FileName;
                saveFileDialog1.Reset();
                //LogMessage("Saving " + file + "...");
                ExFUNC_C1.Export2File(textBox1.Text, pathholder);
                //XMLFMS.WriteToXmlFile<TextBox>(pathholder, textBox1, false);
                XMLFMS.WriteToXmlFile(pathholder, textBox1.Text);
                //LogMessage("Saved Successfully.");
                Variables.IsData_saved = true;
            }
        }
Ejemplo n.º 2
0
        private void scriptToolStripMenuItem_Click(object sender, EventArgs e)
        {
            saveFileDialog1.Filter           = "Batch script files (*.bat)|*.bat";
            saveFileDialog1.InitialDirectory = Application.StartupPath;// + "\\ SavedTest\\";

            DialogResult d  = DialogResult.Cancel;
            FileInfo     fi = new FileInfo(Application.StartupPath + "\\SavedTest\\" + "temp");

            // amend the above line to whatever the file name should be
            if (fi.Exists)
            {
                d = DialogResult.OK;
            }
            else
            {
                d = saveFileDialog1.ShowDialog();
            }
            if (d == DialogResult.OK)
            {
                string pathholder = saveFileDialog1.FileName;
                saveFileDialog1.Reset();
                //LogMessage("Saving " + file + "...");
                ExFUNC_C1.Export2File(textBox1.Text, pathholder);

                if (MessageBox.Show("Do you want to execute the windows script command?", "RUN PROMPT", MessageBoxButtons.YesNo) == System.Windows.Forms.DialogResult.Yes)
                {
                    ExFUNC_C1.ExecuteCommand(pathholder);
                }

                //LogMessage("Saved Successfully.");
                Variables.IsData_saved = true;
            }
        }
Ejemplo n.º 3
0
 private void fTPToolStripMenuItem_Click(object sender, EventArgs e)
 {
     //string input = Microsoft.VisualBasic.Interaction.InputBox("Please enter the ftp address:", "FTPSet", "SET", 0, 0);
     toolStripMenuItem6_Click(this, e);
     ExFUNC_C1.Export2File(textBox1.Text, Variables.TempFilePath);
     FTPSet.ftpTransfer(Variables.TempFilePath, Variables.FTPAdd, Variables.FTPUser, Variables.FTPPass);
 }
Ejemplo n.º 4
0
        private void saveAsToolStripMenuItem_Click(object sender, EventArgs e)
        {
            saveFileDialog1.Filter           = "TEXT files (*.txt)|*.txt";
            saveFileDialog1.InitialDirectory = Application.StartupPath;// + "\\ SavedTest\\";

            DialogResult d = DialogResult.Cancel;

            d = saveFileDialog1.ShowDialog();
            if (d == DialogResult.OK)
            {
                string pathholder = saveFileDialog1.FileName;
                saveFileDialog1.Reset();
                //LogMessage("Saving " + file + "...");
                ExFUNC_C1.Export2File(textBox1.Text, pathholder);
                //LogMessage("Saved Successfully.");
                Variables.IsData_saved = true;
            }
        }
Ejemplo n.º 5
0
        private void saveToolStripMenuItem_Click(object sender, EventArgs e)
        {
            //if (File.Exists(Variables.MEMO_PATH))
            //{
            /// Just clear already present message
            //LogMessage(String.Empty);
            saveFileDialog1.Filter           = "TEXT files (*.txt)|*.txt";
            saveFileDialog1.InitialDirectory = Application.StartupPath;// + "\\ SavedTest\\";

            DialogResult d = DialogResult.Cancel;
            FileInfo     fi;

            if (string.IsNullOrEmpty(Variables.MEMO_PATH.Trim()))
            {
                fi = new FileInfo(Application.StartupPath + "\\SavedTest\\" + "temp");
            }
            else
            {
                fi = new FileInfo(Variables.MEMO_PATH);
            }
            // amend the above line to whatever the file name should be
            if (fi.Exists)
            {
                d = DialogResult.OK;
            }
            else
            {
                d = saveFileDialog1.ShowDialog();
            }
            if (d == DialogResult.OK)
            {
                string pathholder = saveFileDialog1.FileName;
                saveFileDialog1.Reset();
                //LogMessage("Saving " + file + "...");
                ExFUNC_C1.Export2File(textBox1.Text, pathholder);
                //LogMessage("Saved Successfully.");
                Variables.IsData_saved = true;
            }
            //}
        }