public Level(QuoteCurrency price) { Price = price; Strength = 0; Average = new Avr(); }
// Triggered when application starts. Do initialization. private void Application_Startup(object sender, StartupEventArgs e) { // Check if an instance is already runnin by checking a named mutex owned by the first instance catspawInstance = new Mutex(true, "CatspawInstance", out bool IsNewInstance); if (!IsNewInstance) { #pragma warning disable CA1303 // Ne pas passer de littéraux en paramètres localisés _ = MessageBox.Show("Catspaw is already running...", "Catspaw", MessageBoxButton.OK, MessageBoxImage.Information); #pragma warning restore CA1303 // Ne pas passer de littéraux en paramètres localisés Shutdown(); return; } // Initialize application logger with log file in local AppData path for non roaming user LogInit(); // Create main window and add timer for closing MainWindow = new MainWindow(); mainWindowTimer.Tick += (object sender, EventArgs e) => { MainWindow.Hide(); mainWindowTimer.Stop(); }; // Create Notify icon with handler for double click and context menu NotifyIconInit(); // Add the power events handler to the system power events queue SystemEvents.PowerModeChanged += new PowerModeChangedEventHandler(PowerEventHandler); // Initialize Pioneer AVR with Volume Popup try { PioneerAvr = new Avr(Settings.Default.AvrHostname); PioneerAvr.InitVolume(); } catch (AvrException err) { Log.Error(Catspaw.Properties.Resources.ErrorCommunicationAvr, err); Log.Information("Oups! Sorry we can't connect to the Audio Video Reciever :-("); } if (PioneerAvr != null) { Log.Debug("Adding Pioneer Avr component"); Log.Information("Cool! We've just added the Pioneer Audio Video Reciever as an HTPC component."); } //Initialize Samsung TV try { SamsungTv = new Tv(); } catch (CecException err) { Log.Debug(Catspaw.Properties.Resources.ErrorNoCecController, err); Log.Information("Oups! Sorry we can't connect the CeC bus controller :-("); } if (SamsungTv != null) { Log.Debug("Adding Pioneer Tv component"); Log.Information("Even cooler! We've just added the Samsung TV as an HTPC component."); } // Initialize Api server apiServer = new ApiServer(); // Show main window MainWindowShow(); }
public FervourData() { BuyPeriod = new Avr(); SellPeriod = new Avr(); }
/// <summary> /// Returns a <see cref="T:System.String"/> that represents the current <see cref="T:System.Object"/>. /// </summary> /// <returns> /// A <see cref="T:System.String"/> that represents the current <see cref="T:System.Object"/>. /// </returns> public override string ToString() { return(Min.ToString() + "\\" + Avr.ToString() + "\\" + Max.ToString() + "(Mn\\Av\\Mx)"); }