示例#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";
        }
示例#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";
        }