电脑广告拦截器怎么关闭
我们在日常的电脑使用中,总是会有弹窗广告的存在,一次两次可以忍受,但总是出现就非常影响电脑的使用体验,那么究竟要怎么做才能彻底关闭弹窗广告呢?小A今天来给大家整理了以下几个办法,看能不能帮到你!1、卸...
2024.11.211、取消播放器的自动播放功能
2、播放或者暂停按钮
3、下一曲、上一曲
4、多选删除
5、静音和放音
6、选择列表中的音乐文件,单击播放按钮直接播放
7、自动进行下一曲
15秒 44秒 当我和世界不一样
44.--47 那就让我不一样
lblInfomation.Text = musicPlayer.currentMedia.duration.ToString() + "\r\n" + musicPlayer.currentMedia.durationString + "\r\n" + musicPlayer.Ctlcontrols.currentPosition.ToString() + "\r\n" + musicPlayer.Ctlcontrols.currentPositionString;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.IO;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
namespace 播放器项目
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
private void button1_Click(object sender, EventArgs e)
{
musicPlayer.Ctlcontrols.play();
}
private void button2_Click(object sender, EventArgs e)
{
musicPlayer.Ctlcontrols.pause();
}
private void button3_Click(object sender, EventArgs e)
{
musicPlayer.Ctlcontrols.stop();
}
private void Form1_Load(object sender, EventArgs e)
{
//在程序加载的时候 取消播放器的自动播放功能
musicPlayer.settings.autoStart = false;
// musicPlayer.URL = @"C:\Users\SpringRain\Desktop\NewMusic\倔强.mp3";
label1.Image = Image.FromFile(@"C:\Users\SpringRain\Desktop\放音.jpg");
}
///
/// 播放或者暂停
///
///
///
///
bool b = true;
private void btnPlayorPause_Click(object sender, EventArgs e)
{
if (btnPlayorPause.Text == "播放")
{
if (b)
{
//获得选中的歌曲 让音乐从头播放
musicPlayer.URL = listPath[listBox1.SelectedIndex];
}
musicPlayer.Ctlcontrols.play();
btnPlayorPause.Text = "暂停";
}
else if (btnPlayorPause.Text == "暂停")
{
musicPlayer.Ctlcontrols.pause();
btnPlayorPause.Text = "播放";
b = false;
}
}
private void button3_Click_1(object sender, EventArgs e)
{
musicPlayer.Ctlcontrols.stop();
}
//存储音乐文件的全路径
List listPath = new List();
///
/// 打开对话框 选择音乐
///
///
///
private void button4_Click(object sender, EventArgs e)
{
OpenFileDialog ofd = new OpenFileDialog();
ofd.InitialDirectory = @"F:\老赵生活\music";
ofd.Filter = "音乐文件|*.wav|MP3文件|*.mp3|所有文件|*.*";
ofd.Title = "请选择音乐文件哟亲o(^▽^)o";
ofd.Multiselect = true;
ofd.ShowDialog();
//获得在文本框中选择文件的全路径
string[] path = ofd.FileNames;
for (int i = 0; i < path.Length; i++)
{
//将音乐文件的全路径存储到泛型集合中
listPath.Add(path[i]);
//将音乐文件的文件名存储到ListBox中
listBox1.Items.Add(Path.GetFileName(path[i]));
}
}
///
/// 双击播放对应的音乐
///
///
///
private void listBox1_DoubleClick(object sender, EventArgs e)
{
if (listBox1.Items.Count == 0)
{
MessageBox.Show("请首先选择音乐文件");
return;
}
try
{
musicPlayer.URL = listPath[listBox1.SelectedIndex];
musicPlayer.Ctlcontrols.play();
btnPlayorPause.Text = "暂停";
// lblInformation.Text = musicPlayer.currentMedia.duration.ToString();
IsExistLrc(listPath[listBox1.SelectedIndex]);
}
catch { }
}
///
/// 点击下一曲
///
///
///
private void button6_Click(object sender, EventArgs e)
{
//获得当前选中项的索引
int index = listBox1.SelectedIndex;
//清空所有选中项的索引
listBox1.SelectedIndices.Clear();
index++;
if (index == listBox1.Items.Count)
{
index = 0;
}
//将改变后的索引重新的赋值给当前选中项的索引
listBox1.SelectedIndex = index;
musicPlayer.URL = listPath[index];
musicPlayer.Ctlcontrols.play();
}
///
/// 点击上一曲
///
///
///
private void button5_Click(object sender, EventArgs e)
{
int index = listBox1.SelectedIndex;
listBox1.SelectedIndices.Clear();
index--;
if (index < 0)
{
index = listBox1.Items.Count - 1;
}
listBox1.SelectedIndex = index;
musicPlayer.URL = listPath[index];
musicPlayer.Ctlcontrols.play();
}
///
/// 点击删除 选中项
///
///
///
private void 删除ToolStripMenuItem_Click(object sender, EventArgs e)
{
//先删列表还是先删集合?
//首先获得要删除的歌曲的数量
int count = listBox1.SelectedItems.Count;
for (int i = 0; i < count; i++)
{
//先删集合
listPath.RemoveAt(listBox1.SelectedIndex);
//再删列表
listBox1.Items.RemoveAt(listBox1.SelectedIndex);
}
}
///
/// 点击放音或者静音
///
///
///
private void label1_Click(object sender, EventArgs e)
{
if (label1.Tag.ToString() == "1")
{
//目的:让你静音
musicPlayer.settings.mute = true;
//显示静音的图片
label1.Image = Image.FromFile(@"C:\Users\SpringRain\Desktop\静音.jpg");
label1.Tag = "2";
}
else if (label1.Tag.ToString() == "2")
{
//放音
musicPlayer.settings.mute = false;
//显示放音的图片
label1.Image = Image.FromFile(@"C:\Users\SpringRain\Desktop\放音.jpg");
label1.Tag = "1";
}
}
///
/// 放大音量
///
///
///
private void button7_Click(object sender, EventArgs e)
{
musicPlayer.settings.volume += 5;
// MessageBox.Show(musicPlayer.settings.volume.ToString());
}
///
/// 减小声音
///
///
///
private void button8_Click(object sender, EventArgs e)
{
musicPlayer.settings.volume -= 5;
}
private void timer1_Tick(object sender, EventArgs e)
{
//如果播放器的状态等于正在播放中
if (musicPlayer.playState == WMPLib.WMPPlayState.wmppsPlaying)
{
lblInformation.Text = musicPlayer.currentMedia.duration.ToString() + "\r\n" + musicPlayer.currentMedia.durationString + "\r\n" + musicPlayer.Ctlcontrols.currentPosition.ToString() + "\r\n" + musicPlayer.Ctlcontrols.currentPositionString;
}
#region 方法1
//if (musicPlayer.playState == WMPLib.WMPPlayState.wmppsPlaying)
//{
// lblInformation.Text = musicPlayer.currentMedia.duration.ToString() + "\r\n" + musicPlayer.currentMedia.durationString + "\r\n" + musicPlayer.Ctlcontrols.currentPosition.ToString() + "\r\n" + musicPlayer.Ctlcontrols.currentPositionString;
// double d1 = double.Parse(musicPlayer.currentMedia.duration.ToString());
// double d2 = double.Parse(musicPlayer.Ctlcontrols.currentPosition.ToString()) + 1;
// if (d1 = listTime[i] && musicPlayer.Ctlcontrols.currentPosition < listTime[i + 1])
{
label2.Text = listLrcText[i];
}
}
}
}
}
我们在日常的电脑使用中,总是会有弹窗广告的存在,一次两次可以忍受,但总是出现就非常影响电脑的使用体验,那么究竟要怎么做才能彻底关闭弹窗广告呢?小A今天来给大家整理了以下几个办法,看能不能帮到你!1、卸...
2024.11.21三年疫情爆发使得远程办公概念被不断提及,对远程桌面的软件需求也不断爆发,谁也无法保证自己会不会有突发情况无法来公司,需要远程控制电脑。很多人默认会使用QQ等软件自带的远程控制功能,但这些软件延迟高,不...
2024.11.20在电脑上观看视频的时候,除了视频播放的需求,有的时候很多朋友还会有视频下载的需求,而目前很多视频播放软件也可以做到既能播放视频内容也可以进行视频内容的下载,就比如大家通常会用到的迅雷看看、暴风影音等播...
2024.11.22爱奇艺会员再度涨价。12月15日爱奇艺发布调价通知VIP涨价连续包月将涨至25元。这才隔了一年时间,爱奇艺就再次涨价,说实话挺离谱,具体调整就是黄金VIP连续包月由22元提至25元,连续包季由63元提...
2024.11.22看视频NEW VIEW今天小泽给大家推荐五款纯净、无广告、极速、功能强大的播放器不同于各种商业性质的播放器不会浮现“一刀999级,是兄弟就来砍我”的广告更不会突如其来的播放什么美女在线直播软件界面看上...
2024.11.20