Пример #1
0
        private void PriceReminderTriggered(IPriceReminder obj)
        {
            if (InvokeRequired)
            {
                BeginInvoke((Action <IPriceReminder>)PriceReminderTriggered, obj);
                return;
            }

            ShowWindow();
            notifyIcon1.ShowBalloonTip(int.MaxValue, "Exchange Rate Reminder Alert", $"{obj.Retriever.CurrencyFrom}-->{obj.Retriever.CurrencyTo}: {obj.Retriever.ExchangeRate.New}", ToolTipIcon.Info);
        }
Пример #2
0
 private void _newPriceReminder2_ReminderSet(IPriceReminder reminder, bool isSet)
 {
     if (isSet)
     {
         reminder.ReminderTriggered += PriceReminderTriggered;
     }
     else
     {
         reminder.ReminderTriggered -= PriceReminderTriggered;
     }
     btnCancelAlert2.Enabled = isSet;
     btnSetAlert2.Enabled    = cbAlertCondition2.Enabled = tbAlertPrice2.Enabled = !isSet;
 }
Пример #3
0
        public Form1()
        {
            InitializeComponent();

            notifyIcon1.Icon                = Icon = Resources.logo;
            cbbLeft.SelectedIndex           = 1;
            cbbRight.SelectedIndex          = 2;
            cbAlertCondition1.SelectedIndex = 2;
            cbAlertCondition2.SelectedIndex = 4;

            _newPriceReminder1              = Factory.NewPriceReminder();
            _newPriceReminder1.ReminderSet += _newPriceReminder1_ReminderSet;
            _newPriceReminder2              = Factory.NewPriceReminder();
            _newPriceReminder2.ReminderSet += _newPriceReminder2_ReminderSet;
        }