Exemple #1
0
        public Form1()
        {
            if (!PlayerClient.IsServerRunning(22613))
            {
                MessageBox.Show(
                    caption: "TomiSoft MP3 Player",
                    text: "A TomiSoft MP3 Player nem fut.",
                    buttons: MessageBoxButtons.OK,
                    icon: MessageBoxIcon.Error
                    );

                Environment.Exit(0);
            }

            InitializeComponent();
            Client = new PlayerClient(22613);
            Client.KeepAlive();

            this.DoubleBuffered = true;

            this.Timer = new Timer()
            {
                Enabled  = true,
                Interval = 25
            };

            this.Timer.Tick += (o, e) => {
                this.GetNextPeak();
                this.Invalidate();
            };
        }