Exemplo n.º 1
0
 //  Класс запуска советчика по времени выхода новостей
 public Activator(Decryptor decryptor, Parser parser, Writer writer)
 {
     this.decryptor = decryptor;
     this.parser = parser;
     this.writer = writer;
     setTimer(parser.parse());
 }
Exemplo n.º 2
0
 public Form1()
 {
     directory = AppDomain.CurrentDomain.BaseDirectory;
     advisePath = directory + "advise.txt";
     InitializeComponent();
     Application.ApplicationExit += onApplicationExit;
     filter = new Filter(this);
     parser = new Parser();
     decryptor = new Decryptor(filter);
     writer = new Writer(advisePath);
     activator = new Activator(decryptor, parser, writer);
     ReadData();
     checkUpdates(null, null);
     //System.Timers.Timer updateTimer = new System.Timers.Timer(15 * 60 * 60 * 1000);
     //updateTimer.Elapsed += new System.Timers.ElapsedEventHandler(checkUpdates);
     poolNewsListBox.DoubleClick += addActualNews;
     actualNewsListBox.DoubleClick += removeActualNews;
     actualNewsListBox.SelectedIndexChanged += newsListBox_SelectedIndexChanged;
     poolSymbolListBox.DoubleClick += addActualSymbol;
     actualSymbolListBox.DoubleClick += removeActualSymbol;
     highRadioButton.CheckedChanged += radioButton_CheckedChanged;
     midRadioButton.CheckedChanged += radioButton_CheckedChanged;
     lowRadioButton.CheckedChanged += radioButton_CheckedChanged;
     reverse_checkBox.CheckedChanged += reverse_checkBox_CheckedChanged;
     button2.Click += new_terminal_path;
 }