Beispiel #1
0
        private void Download()
        {
            toolStatus.Text = "Connecting...";
            this.Refresh();
            settings.ReadSettings();
            TelnetHandler telnet = new TelnetHandler(settings);

            toolProgress.Value = 10;
            this.Refresh();
            telnet.Connect(toolStatus, toolProgress);
            this.Refresh();

            toolProgress.Value = 85;
            toolStatus.Text = "Parsing file...";
            this.Refresh();

            RecordingList list = new RecordingList();
            RecordFileReader reader = new RecordFileReader(list);
            RecList = list;

            if (reader.CheckFile(@".\AutomaattiOut.py"))
            {
                reader.ReadRecords(@".\AutomaattiOut.py");

                this.ShowRecordings(list);
            }
            else
            {
                MessageBox.Show("File download failed", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
            }

            toolProgress.Value = 0;
            toolStatus.Text = "Ready";
        }
Beispiel #2
0
        private void Download()
        {
            toolStatus.Text = "Connecting...";
            this.Refresh();
            settings.ReadSettings();
            TelnetHandler telnet = new TelnetHandler(settings);

            toolProgress.Value = 10;
            this.Refresh();
            telnet.Connect(toolStatus, toolProgress);
            this.Refresh();

            toolProgress.Value = 85;
            toolStatus.Text    = "Parsing file...";
            this.Refresh();

            RecordingList    list   = new RecordingList();
            RecordFileReader reader = new RecordFileReader(list);

            RecList = list;

            if (reader.CheckFile(@".\AutomaattiOut.py"))
            {
                reader.ReadRecords(@".\AutomaattiOut.py");

                this.ShowRecordings(list);
            }
            else
            {
                MessageBox.Show("File download failed", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
            }

            toolProgress.Value = 0;
            toolStatus.Text    = "Ready";
        }
Beispiel #3
0
 private void ShowRecordings(RecordingList list)
 {
     listView.Clear();
     listView.Update();
     this.AddColumns();
     listView.Update();
     foreach (Recording record in list.Records)
     {
         String[] row = { Convert.ToString(record.Enabled), record.DayNames, record.TimeString, record.Channel, record.Directory };
         listView.Items.Add(record.Title).SubItems.AddRange(row);
     }
     listView.Update();
 }
 public AddEditForm(bool editIn, List<String> channels, RecordingList list)
 {
     InitializeComponent();
     PopulateBasics(channels);
     this.list = list;
 }
 public RecordFileReader(RecordingList recordList)
 {
     this.list = recordList;
 }
Beispiel #6
0
 private void ShowRecordings(RecordingList list)
 {
     listView.Clear();
     listView.Update();
     this.AddColumns();
     listView.Update();
     foreach (Recording record in list.Records)
     {
         String[] row = { Convert.ToString(record.Enabled), record.DayNames, record.TimeString, record.Channel, record.Directory };
         listView.Items.Add(record.Title).SubItems.AddRange(row);
     }
     listView.Update();
 }
Beispiel #7
0
 public RecordFileReader(RecordingList recordList)
 {
     this.list = recordList;
 }
 public AddEditForm(bool editIn, List <String> channels, RecordingList list)
 {
     InitializeComponent();
     PopulateBasics(channels);
     this.list = list;
 }
 public RecordFileWriter(string fileName, RecordingList recordings)
 {
     this.file = fileName;
     this.list = recordings;
 }
 public RecordFileWriter(string fileName, RecordingList recordings)
 {
     this.file = fileName;
     this.list = recordings;
 }