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(); }; }
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; }