Exemplo n.º 1
0
        public ToastForm()
        {
            InitializeComponent();

            // Create rounded corners
            this.Region = System.Drawing.Region.FromHrgn(createRoundRectRgn(0, 0, Width, Height, 20, 20));

            // Initialize user options and settings
            myOptions = new Options();

            // Initialize our form's appearance from user settings
            initializeFromSettings();

            // Create overlay so that our text isn't transparent and difficult to read
            initializeOverlay();

            // Create tray icon
            createTrayIconAndMenu();

            // Create and run timer for animation
            timer = new Timer();
            timer.Interval = myOptions.ToastMovementSpeed;
            timer.Tick += new EventHandler(timerTick);

            // Now let's setup our Spotify Window tracker
            nct = new NameChangeTracker(this);
        }
Exemplo n.º 2
0
 public OptionsForm(Options options)
 {
     InitializeComponent();
     this.myOptions = options;
     setFieldsFromOptions();
 }
Exemplo n.º 3
0
 internal void initializeFormSettings(Options myOptions)
 {
     albumBox.ForeColor = myOptions.ToastForegroundColor;
     artistBox.ForeColor = myOptions.ToastForegroundColor;
     trackBox.ForeColor = myOptions.ToastForegroundColor;
 }