private void Form1_Load(object sender, EventArgs e) { axPlayer1.ContextMenuStrip = Menu; Play_Listen.Interval = 1; Play_Listen.Tick += new EventHandler(Play_Listen_event); Play_Listen.Start(); if (!Directory.Exists(rootPath)) { Directory.CreateDirectory(rootPath); } if (!Directory.Exists(audioPath)) { Directory.CreateDirectory(audioPath); } if (!Directory.Exists(lrcPath)) { Directory.CreateDirectory(lrcPath); } if (!Directory.Exists(SingerPath)) { Directory.CreateDirectory(SingerPath); } List <UserItem> userData = new List <UserItem>();//创建《我的好友里面的用户数据》 foreach (Song item in h.LoadSong(audioPath)) { userData.Add(new UserItem(null, item.Filename)); } GroupItem pengyous = new GroupItem("我的歌曲", userData); listGroup1.AddItem(pengyous); listGroup1.AddItem(pengyous); listGroup1.AddItem(pengyous); listGroup1.AddItem(pengyous); listGroup1.AddItem(pengyous); listGroup1.AddItem(pengyous); lrcPanel.ClickLrcEvent += new EventHandler(changePostion); volume1.VolumeChange += new Volume.VolumeChanged(sizeChange); Set_volume(50); lrcPanel.Dock = DockStyle.Fill; lrcPanel.BackColor = Color.Transparent; LrcView.Controls.Add(lrcPanel); FormFade.FadeIn(this, 1); down.Path = audioPath; LrcView.Visible = false; LrcView.AutoScroll = true; SearchModel(); Songerimg.Image = null; txt_Songname.Text = "抖音"; try { // button1_Click(null, null); } catch (Exception ex) { Console.WriteLine(ex.Message); this.Close(); } }
private void DialogSuccess_Load(object sender, EventArgs e) { FormFade.ShowAsyc(this); picIcon.Visible = true; picIcon.Enabled = true; }
private void Closes_Click(object sender, EventArgs e) { FormFade.FadeOut(this, 1); FormFade.FadeDone += close; }
public MainWindow() { InitializeComponent(); _timer = new Timer(); _timer.Interval = DispayTimeOut; _timer.Tick += (s, o) => { FadeOut(); _timer.Enabled = false; }; _context = new ConnectionsViewModel(); FormFadeOut.Completed += (s, o) => Hide(); _notify = new NotifyIcon { Text = "VPN Client", Icon = Properties.Resources.disconnected, Visible = true }; _notify.MouseClick += (pS, pArg) => { if (!_aboutShowing && pArg.Button == MouseButtons.Left) { _timer.Enabled = false; if (!IsVisible) { Show(); Activate(); FormFade.Begin(); } else { FadeOut(); } } }; _notify.ContextMenu = new ContextMenu(new[] { new MenuItem("&About", (pS, pE) => ShowAboutDialog()), new MenuItem("-"), new MenuItem("&Exit", (pS, pE) => Application.Current.Shutdown()) }); _context.NewConnection += pCon => UpdateNotifyIcon(); _context.Connecting += pCon => UpdateNotifyIcon(); DataContext = _context; _context.Connected += pCon => Dispatcher.BeginInvoke( new Action(() => { if (!IsActive) { _notify.ShowBalloonTip(2000, "OpenVPN", "You are connected to " + pCon.Name, ToolTipIcon.Info); } UpdateNotifyIcon(); })); _context.Disconnected += pCon => Dispatcher.BeginInvoke( new Action( () => { if (!IsActive) { _notify.ShowBalloonTip(2000, "OpenVPN", "You are disconnected from " + pCon.Name, ToolTipIcon.Info); } UpdateNotifyIcon(); })); }