Exemplo n.º 1
0
 public ServerForm()
 {
     InitializeComponent();
     UIDispatcher = new MyDispatcher();
     AppDomain.CurrentDomain.UnhandledException += CommonBehavior.OnUnhandledException;
     TbIp.Text        = CommonBehavior.GetLocalIPAddress().ToString();
     BtnBrowse.Click += (s, e) =>
     {
         CommonBehavior.BrowseHandler(TbPath, LvTracks.Items);
         Dispatcher.Set();
         Dispatcher.Reset();
     };
 }
Exemplo n.º 2
0
        public ClientForm()
        {
            Dispatcher = new MyDispatcher();
            AppDomain.CurrentDomain.UnhandledException += CommonBehavior.OnUnhandledException;

            InitializeComponent();
            BtnBrowse.Click       += (s, e) => RefreshLocalTracks();
            TbIp.Text              = CommonBehavior.GetLocalIPAddress().ToString();
            Playlist               = new PlayListViewItemCollection(LvLocalList, Wmp);
            CbRepeat.SelectedIndex = 0;

            InitializeRepeatTypeCombobox();

            Wmp.currentPlaylist    = Wmp.newPlaylist("no title", "");
            Wmp.CurrentItemChange += OnWmpMediaChange;
            Wmp.PlayStateChange   += OnWmpPlayStateChange;
            Wmp.MediaError        += OnWmpMediaError;
            TrackBarTimer.Tick    += TrackBarUpdateTick;
        }