Esempio n. 1
0
        public MainForm()
        {
            InitializeComponent();
            SettingsManager.Load();

            this.Icon = Properties.Resources.logo1;

            wplayer                          = new WindowsMediaPlayer();
            wplayerSongCalls                 = new WindowsMediaPlayer();
            wplayer.settings.volume          = SettingsManager.VolumeMain;
            wplayerSongCalls.settings.volume = SettingsManager.VolumeSpeech;
            trackBar1.Value                  = SettingsManager.VolumeMain;
            trackBar2.Value                  = SettingsManager.VolumeSpeech;


            notifyIcon1.Icon         = this.Icon;
            notifyIcon1.Visible      = true;
            notifyIcon1.Text         = "WeAreOne Infos";
            notifyIcon1.DoubleClick += notifyIcon1_DoubleClick;
            notifyIcon1.ContextMenu  = new ContextMenu();
            notifyIcon1.ContextMenu.MenuItems.Add(new MenuItem("Erstellt von Johnny")
            {
                Enabled = false
            });

            notifyIcon1.ContextMenu.MenuItems.Add(new MenuItem("-"));
            notifyIcon1.ContextMenu.MenuItems.Add(new MenuItem("Beenden", (sender, e) => this.Close())
            {
                DefaultItem = true
            });


            timer                     = new Timer();
            timer.Interval            = 3000;
            timer.SynchronizingObject = this;
            timer.Elapsed            += timer_callback;
            timer.AutoReset           = true;
            timer.Start();

            icontimer                     = new Timer();
            icontimer.Interval            = 500;
            icontimer.SynchronizingObject = this;
            icontimer.Elapsed            += icontimer_Elapsed;
            icontimer.AutoReset           = true;
            icontimer.Start();

            wao = new WeAreOne();
            wao.OnResponseReceived += wao_OnResponseReceived;
            wao.OnImageReceived    += wao_OnImageReceived;

            linkLabel1.Click += (sender, e) => Process.Start(current.release);

            loadingscreen = new LoadingForm();
            loadingscreen.ShowDialog();
        }
Esempio n. 2
0
        public MainForm()
        {
            InitializeComponent();
            SettingsManager.Load();

            this.Icon = Properties.Resources.logo1;

            wplayer = new WindowsMediaPlayer();
            wplayerSongCalls = new WindowsMediaPlayer();
            wplayer.settings.volume = SettingsManager.VolumeMain;
            wplayerSongCalls.settings.volume = SettingsManager.VolumeSpeech;
            trackBar1.Value = SettingsManager.VolumeMain;
            trackBar2.Value = SettingsManager.VolumeSpeech;

            notifyIcon1.Icon = this.Icon;
            notifyIcon1.Visible = true;
            notifyIcon1.Text = "WeAreOne Infos";
            notifyIcon1.DoubleClick += notifyIcon1_DoubleClick;
            notifyIcon1.ContextMenu = new ContextMenu();
            notifyIcon1.ContextMenu.MenuItems.Add(new MenuItem("Erstellt von Johnny")
            {
                Enabled = false
            });

            notifyIcon1.ContextMenu.MenuItems.Add(new MenuItem("-"));
            notifyIcon1.ContextMenu.MenuItems.Add(new MenuItem("Beenden", (sender, e) => this.Close())
                {
                    DefaultItem = true
                });

            timer = new Timer();
            timer.Interval = 3000;
            timer.SynchronizingObject = this;
            timer.Elapsed += timer_callback;
            timer.AutoReset = true;
            timer.Start();

            icontimer = new Timer();
            icontimer.Interval = 500;
            icontimer.SynchronizingObject = this;
            icontimer.Elapsed += icontimer_Elapsed;
            icontimer.AutoReset = true;
            icontimer.Start();

            wao = new WeAreOne();
            wao.OnResponseReceived += wao_OnResponseReceived;
            wao.OnImageReceived += wao_OnImageReceived;

            linkLabel1.Click += (sender, e) => Process.Start(current.release);

            loadingscreen = new LoadingForm();
            loadingscreen.ShowDialog();
        }