Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using System.IO;
- using System.Collections.Generic;
- using System.ComponentModel;
- using System.Data;
- using System.Drawing;
- using System.Linq;
- using System.Text;
- using System.Windows.Forms;
- namespace AX_Heuristic
- {
- public partial class Form1 : Form
- {
- public Form1()
- {
- InitializeComponent();
- }
- private void OpenCSVButton_Click(object sender, EventArgs e)
- {
- string CSV_Path = "";
- OpenCSVDialog.FileName = "";
- OpenCSVDialog.ShowDialog();
- CSV_Path = OpenCSVDialog.FileName;
- CSVtextBox.Text = "";
- CSVtextBox.Text = CSV_Path;
- }
- private void exitToolStripMenuItem_Click(object sender, EventArgs e)
- {
- Application.Exit();
- }
- private void OutputPathbutton_Click(object sender, EventArgs e)
- {
- string Save_Path = "";
- OutputDialog.ShowDialog();
- Save_Path = OutputDialog.FileName;
- OutputtextBox.Text = "";
- OutputtextBox.Text = Save_Path;
- }
- private void ClearOutputbutton_Click(object sender, EventArgs e)
- {
- OutputrichTextBox.ResetText();
- }
- private void Writebutton_Click(object sender, EventArgs e)
- {
- if (OutputtextBox.Text == "")
- {
- DialogResult NoOutput = MessageBox.Show("Output path not Specified. Continue?","Warning",MessageBoxButtons.YesNo);
- if (NoOutput == DialogResult.Yes)
- {
- if (CSVtextBox.Text == "")
- {
- MessageBox.Show("No CSV File Selected.", "Error");
- }
- else
- {
- Program Pgm1 = new Program();
- Pgm1.AX1Program(CSVtextBox.Text);
- //StreamReader objstream = new StreamReader(CSVtextBox.Text);
- //OutputrichTextBox.Text = objstream.ReadToEnd();
- }
- }
- }
- else
- {
- if (CSVtextBox.Text == "")
- {
- MessageBox.Show("No CSV File Selected.", "Error");
- }
- else
- {
- Program Pgm1 = new Program();
- Pgm1.AX1Program(CSVtextBox.Text);
- //StreamReader objstream = new StreamReader(CSVtextBox.Text);
- //OutputrichTextBox.Text = objstream.ReadToEnd();
- }
- File.WriteAllLines(OutputtextBox.Text, OutputrichTextBox.Lines);
- }
- }
- public void UpdateStatusBar(string status)
- {
- this.toolStripStatusLabel1.Text = status;
- this.Refresh
- }
- private void toolStripStatusLabel1_Click(object sender, EventArgs e)
- {
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement