private void BtnBaseControl_MouseMove(object sender, DuiMouseEventArgs e) { Point ms = Control.MousePosition; x = ms.X; y = ms.Y; }
/// <summary> /// 搜索按钮事件 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void Btn_search_MouseClick(object sender, DuiMouseEventArgs e) { foreach (var item in BaseControl_Search.DUIControls) { if (item is DuiButton) { DuiButton btn_search = item as DuiButton; foreach (var citem in btn_search.Controls) { if (citem is DuiTextBox) { DuiTextBox searchText = citem as DuiTextBox; if (!string.IsNullOrEmpty(searchText.Text) && searchText.Text != "输入关键字进行搜索") { isSearch = true; startNo = "1"; userEntity.menuName = searchText.Text; Thread thread = new Thread(() => updateImgList(searchText.Text, startNo)); thread.Start(); } else { MessageForm mf = new MessageForm("请输入关键字进行搜索"); mf.ShowDialog(); } } } } } }
/// <summary> /// 播放按钮点击事件 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void Btn_Download_MouseClick(object sender, DuiMouseEventArgs e) { //播放视频 DuiButton dbn = sender as DuiButton; Entity.MovieListEntity.DataItem moveInfo = new Entity.MovieListEntity.DataItem(); if (dbn.Tag != null) { moveInfo = dbn.Tag as Entity.MovieListEntity.DataItem; } string url = ""; try { API.TvAPI tva = new API.TvAPI(); Entity.MovePlayEntity plav = tva.getVideoUrl(userEntity.email, userEntity.psw, moveInfo.videoID.ToString(), "all", userEntity.imei); Console.WriteLine(plav.toJsonString()); Console.WriteLine(plav.data); PlayerForm plF = new PlayerForm(); url = plav.data.ToString(); plF.tvUrl = plav.data.ToString(); plF.tvName = moveInfo.videoName; plF.Show(); plF.AxPlayer_PlayOrPause(url); } catch (Exception ex) { Logger.Singleton.Error("name:" + moveInfo.videoName + "---地址:" + url, ex); throw; } }
private void ListMusicMenuTemplate_MouseDown(object sender, DuiMouseEventArgs e) { isSelected = true; this.BackgroundImage = Image.FromFile("../pic/音乐栏背景3.png", false); duiPictureBox1.Image = Image.FromFile("../pic/音乐001.png", false); Tg1 = true; }
private void Listx_MouseClick(object sender, DuiMouseEventArgs e) { if (IsSelect != ((DuiBaseControl)sender).Name) { IsSelect = ((DuiBaseControl)sender).Name; for (int i = 0; i < Items.Count; i++) { if (Items[i].Name != IsPlaying && Items[i].Name != IsSelect) { Items[i].BackColor = Color.Transparent; } } ((DuiBaseControl)sender).BackColor = Color.FromArgb(100, 255, 255, 255); } else { if (((DuiBaseControl)sender).Name != IsPlaying && ((DuiBaseControl)sender).Name != IsSelect) { ((DuiBaseControl)sender).BackColor = Color.Transparent; } IsSelect = ""; } if (e.Button == System.Windows.Forms.MouseButtons.Right) { ir(new ClickArgs(((DuiBaseControl)sender).Name, ((DuiBaseControl)sender).Tag.ToString())); } }
private void cantractBtn_MouseClick(object sender, DuiMouseEventArgs e) { if (SelectTab != null) { SelectTab(1); } }
private void groupBtn_MouseClick(object sender, DuiMouseEventArgs e) { if (SelectTab != null) { SelectTab(2); } }
private void dlTag_MouseClick(object sender, DuiMouseEventArgs e) { DuiLabel dlb = sender as DuiLabel; string tidsStr = dlb.Tag.ToString(); if (!String.IsNullOrEmpty(tidsStr)) { if (tidsStr.Contains("-")) { userEntity.menuName = dlb.Tag.ToString().Split('-')[1]; startNo = "1"; SumPage = "N"; isSearch = false; Thread thread = new Thread(() => updateImgList(dlb.Tag.ToString().Split('-')[1], startNo)); thread.Start(); } else { userEntity.menuName = dlb.Tag.ToString(); startNo = "1"; SumPage = "N"; isSearch = false; Thread thread = new Thread(() => updateImgList(dlb.Tag.ToString().Split('-')[1], startNo)); thread.Start(); } } }
void add_MouseClick(object sender, DuiMouseEventArgs e) { var index = dSkinTabBar1.Items.IndexOf(addButton); TabrisTabItem item = new TabrisTabItem() { Text = "new " + (index + 1), Image = Properties.Resources.JSS }; dSkinTabBar1.Items.Insert(index, item); //item.SendToBack(); //DSkin.Controls.DSkinBaseControl db = new DSkin.Controls.DSkinBaseControl { Dock = DockStyle.Fill }; DSkin.Controls.DSkinBrowser brower = new DSkin.Controls.DSkinBrowser { Dock = DockStyle.Fill, Url = tabrisUrl, ContextMenuStrip = this.codemirrowMenu }; //db.DUIControls.Add(d); TabPage page = new TabPage(); page.Controls.Add(brower); item.TabPage = page; dSkinTabControl1.TabPages.Add(page); dSkinTabBar1.LayoutContent(); dSkinTabBar1.SetSelect(item); LogPannel logPannel = new LogPannel(); ButtonPannel buttonPannel = new ButtonPannel(brower, logPannel.Log) { Index = index, OnTitleChange = s => { item.Text = s; var tag = item.Tag as TabrisControlContainer; if (tag != null) { tag.TagName = s; } }, OnModify = () => { var tag = item.Tag as TabrisControlContainer; if (tag != null) { item.Text = " * " + tag.TagName; } } }; this.dSkinPanel3.Controls.Add(buttonPannel); this.dSkinPanel1.Controls.Add(logPannel); item.Tag = new TabrisControlContainer { ButtonPannel = buttonPannel, LogPannel = logPannel, TagName = item.Text }; }
private void Pb_sinerimg_MouseDown(object sender, DuiMouseEventArgs e) { if (e.Button == MouseButtons.Left) { Moveing = true; MovePoint = PointToClient(MousePosition); } }
private void Listx_MouseDown(object sender, DuiMouseEventArgs e) { if (e.Button == System.Windows.Forms.MouseButtons.Left) { t1.Stop(); t1.Start(); } }
private void Dl_TvName_MouseDown(object sender, DuiMouseEventArgs e) { //为当前的应用程序释放鼠标捕获 ReleaseCapture(); //发送消息﹐让系統误以为在标题栏上按下鼠标 SendMessage((int)this.Handle, WM_NCLBUTTONDOWN, HTCAPTION, 0); dl_TvName.Cursor = Cursors.Arrow; }
private void Dlbe_MouseEnter(object sender, DuiMouseEventArgs e) { skinLine_Update(); DuiBaseControl lbbtn = sender as DuiBaseControl; string vtag = ""; foreach (var vitem in lbbtn.Controls) { DuiLabel lb = vitem as DuiLabel; vtag = lb.Tag.ToString(); if (lb.Name.Contains("ImageTypeName_")) { lb.ForeColor = defaultColor; } else { lb.BackColor = defaultColor; } } DuiBaseControl bControl = lbbtn.Parent as DuiBaseControl; foreach (var item in bControl.FindControl("ImageTypeGrid_" + vtag)) { if (item is DuiBaseControl && item.Controls.Count > 0 && Panel_TypeMess.DUIControls.Count <= 0) { DuiBaseControl newpm = new DuiBaseControl(); newpm.Size = item.Size; newpm.Visible = true; newpm.Location = new Point(0, 0); newpm.BackColor = item.BackColor; newpm.Borders = item.Borders; newpm.ShowBorder = item.ShowBorder; foreach (var vitem in item.Controls) { if (vitem is DuiLabel) { DuiLabel dl = vitem as DuiLabel; dl.Cursor = Cursors.Hand; dl.MouseEnter += dlTag_MouseEnter; dl.MouseLeave += dlTag_MouseLeave; newpm.Controls.Add(dl); } } newpm.Dock = DockStyle.Fill; Panel_TypeMess.DUIControls.Add(newpm); Panel_TypeMess.Size = item.Size; Panel_TypeMess.Location = new Point(item.Location.X, layeredPanel_top.Height + Panel_Type.Height - 5); Utils.AnimationControl.ShowControl(Panel_TypeMess, true, AnchorStyles.Right); } } Point ms = Control.MousePosition; x = ms.X; y = ms.Y; //NowNum = int.Parse(btn.Tag.ToString()); //LoadSliderImg(NowNum); Panel_Type.Refresh(); }
private void Dlc_MouseClick(object sender, DuiMouseEventArgs e) { DuiLabel dlc = sender as DuiLabel; cpes.BackGroundSkin = null; cpes.pes.BackImg = ""; cpes.pes.BackColor = Color.FromArgb((int)(255 * (tkb_skin.Value)), dlc.BackColor); cpes.pes.Opacity = tkb_skin.Value.ToString(); cpes.setSkinStyle(); }
private void duiPie1_MouseClick(object sender, DuiMouseEventArgs e) { if (!urer.urer.login) { new login().ShowDialog(); dSkinLabel1.Text = urer.urer.name + "-" + dSkinLabel1.Text; DSkin.Controls.DSkinBrush a = new c(); a.Brush = new TextureBrush(new Bitmap(urer.urer.img, 100, 100)); duiPie1.EllipseBrush = a; } }
/// <summary> /// 清理缓存事件 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void Lb_clearCache_MouseClick(object sender, DuiMouseEventArgs e) { if (Directory.Exists(lb_cachePath.Text)) { DelectDir(lb_cachePath.Text); string messageStr = "已成功清理" + lb_nowCacheSize.Text.Replace("当前缓存:", "") + "MB缓存文件!"; MessageForm mf = new MessageForm(messageStr); mf.Show(); lb_nowCacheSize.Text = "当前缓存:" + GetDirectoryLength(lb_cachePath.Text) / (1024 * 1024) + "MB"; } }
private void duiGridList1_MouseClick(object sender, DuiMouseEventArgs e) { if (e.Button == MouseButtons.Right) { if (model.is_admin == 2 && model.is_menager == 2) { return; } skinContextMenuStrip1.Items.Clear(); if (duiGridList1.SelectedItem == null) { skinContextMenuStrip1.Items.Add(邀请群成员ToolStripMenuItem); skinContextMenuStrip1.Show(new Point(e.X + duiGridList1.LocationToScreen.X, e.Y + duiGridList1.LocationToScreen.Y)); return; } var data = duiGridList1.SelectedItem.RowData as GroupMemberViewModel; rightIndex = menbers.IndexOf(data); int viewIndex = duiGridList1.VisibleControls.IndexOf(duiGridList1.SelectedItem.RowControl); if (model.is_menager == 1) { var member = data.user; if (member.is_administrator == 1 || member.is_manager == 1) { return; } if (member.is_shield == 1) { skinContextMenuStrip1.Items.Add(unShelidToolStripMenuItem); } else { skinContextMenuStrip1.Items.Add(shelidToolStripMenuItem); } skinContextMenuStrip1.Items.Add(tickOutToolStripMenuItem); skinContextMenuStrip1.Items.Add(邀请群成员ToolStripMenuItem); skinContextMenuStrip1.Show(new Point(e.X + duiGridList1.LocationToScreen.X, e.Y + duiGridList1.LocationToScreen.Y)); } else if (model.is_admin == 1) { var me = data.user; if (me.is_shield == 1) { skinContextMenuStrip1.Items.Add(unShelidToolStripMenuItem); } else { skinContextMenuStrip1.Items.Add(shelidToolStripMenuItem); } skinContextMenuStrip1.Items.Add(tickOutToolStripMenuItem); skinContextMenuStrip1.Items.Add(邀请群成员ToolStripMenuItem); skinContextMenuStrip1.Show(new Point(e.X + duiGridList1.LocationToScreen.X, e.Y + duiGridList1.LocationToScreen.Y)); } } }
private void Btn_MouseClick(object sender, DuiMouseEventArgs e) { var btn = sender as DuiButton; if (btn != null) { EmotionModel model = btn.Tag as EmotionModel; if (model != null) { click(model); } } }
private void BtnPlayControl_MouseClick(object sender, DuiMouseEventArgs e) { DuiButton mbu = sender as DuiButton; switch (mbu.Name) { case "btnStop": //停止按钮 lw.axPlayer.Close(); lw.Hide(); BaseControl.BackColor = defaultSkinColor; BaseControl.BackgroundImage = Properties.Resources._5; Thread thread = new Thread(() => convertCacheFileToOther()); thread.Start(); break; case "btnPrev": //上一个 break; case "btnPlay": //播放或暂停 AxPlayer_PlayOrPause(tvUrl); break; case "btnNext": //下一个 break; case "btnOpenFile": //打开文件 break; case "btnVolume": //静音 break; case "btnScreenShot": //截图 break; case "btnFullScreen": //全屏 fullScreen(); break; case "btnList": //列表 isShowList(); break; default: break; } }
private void Buttonbase_MouseClick(object sender, DuiMouseEventArgs e) { if (_ChengeOnClick) { if (Checked) { Checked = false; } else { Checked = true; } } }
/// <summary> /// 鸣谢内容点击事件 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void Lb_mxnr1_MouseClick(object sender, DuiMouseEventArgs e) { DuiLabel cdl = sender as DuiLabel; string wsite = ""; if (cdl.Name == "lb_mxnr2") { wsite = "http://www.52pojie.cn"; } else { wsite = "http://bbs.cskin.net"; } System.Diagnostics.Process.Start(wsite); }
private void Listx_MouseMove(object sender, DuiMouseEventArgs e) { if (moveing) { Cursor = cs; movec = e.Y; } else { if (Cursor != System.Windows.Forms.Cursors.Default) { Cursor = System.Windows.Forms.Cursors.Default; } } }
/// <summary> /// 收藏按钮点击事件 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void Btn_Sc_MouseClick(object sender, DuiMouseEventArgs e) { DuiButton btn = sender as DuiButton; if (btn.Tag.ToString().Split('|')[0].ToString() == "收藏") { btn.BackgroundImage = Properties.Resources.sc1; btn.Tag = "取消收藏|" + btn.Tag.ToString().Split('|')[1].ToString(); } else { btn.BackgroundImage = Properties.Resources.sc0; btn.Tag = "收藏|" + btn.Tag.ToString().Split('|')[1].ToString(); } }
private void More_MouseClick(object sender, DuiMouseEventArgs e) { if (((DuiBaseControl)sender).Tag.ToString() == "Close") { if (OpenedList != "") { closeopenedlist(); } ((DuiBaseControl)sender).Tag = "Open"; ((DuiPictureBox)sender).Image = Properties.Resources.btn_more_close; int a = 0; for (int i = 0; i < Items.Count; i++) { if (Items[i].Tag != null) { if (Items[i].Tag.ToString() == ((DuiBaseControl)((DuiPictureBox)sender).Parent).Name.Replace("list_", "")) { Items[i].Visible = true; a = a + 1; } } } OpenedList = ((DuiBaseControl)((DuiPictureBox)sender).Parent).Name.Replace("list_", ""); } else { if (OpenedList == ((DuiBaseControl)((DuiPictureBox)sender).Parent).Name.Replace("list_", "")) { ((DuiBaseControl)sender).Tag = "Close"; ((DuiPictureBox)sender).Image = Properties.Resources.btn_more_open; for (int i = 0; i < Items.Count; i++) { if (Items[i].Tag != null) { if (Items[i].Tag.ToString() == ((DuiBaseControl)((DuiPictureBox)sender).Parent).Name.Replace("list_", "")) { Items[i].Visible = false; } } } OpenedList = ""; } } RefreshList(); }
protected override void OnMouseClick(DuiMouseEventArgs e) { base.OnMouseClick(e); this.BackColor = selectedColor; DuiBaseControl parent = Parent as DuiBaseControl; if (parent != null) { foreach (DuiBaseControl item in parent.Controls) { UserItem i = item as UserItem; if (i != null && i != this) { i.BackColor = Color.Transparent; } } } }
private void Btnplay_MouseDown(object sender, DuiMouseEventArgs e) { if (e.Button == System.Windows.Forms.MouseButtons.Left) { if (((DuiBaseControl)((DuiBaseControl)sender).Parent).Name == IsPlaying && ((DuiBaseControl)((DuiBaseControl)sender).Parent).Tag.ToString() == IsPlayingList) { playMusic(new MusicListArgs("", ((DuiBaseControl)sender).Tag.ToString(), true)); } else { //System.Windows.Forms.MessageBox.Show(((DuiBaseControl)((DuiBaseControl)sender).Parent).Tag.ToString()); playMusic(new MusicListArgs(((DuiBaseControl)((DuiBaseControl)sender).Parent).Name, ((DuiBaseControl)((DuiBaseControl)sender).Parent).Tag.ToString(), false)); } } tx.Stop(); t1.Stop(); moveing = false; }
/// <summary> /// 图片类型点击事件 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void Dlbe_MouseClick(object sender, DuiMouseEventArgs e) { DuiLabel dlbe = sender as DuiLabel; if (dlbe.Tag != null) { Entity.MenuEntity.DataItem dt = (Entity.MenuEntity.DataItem)dlbe.Tag; if (dt.MenuName != userEntity.menuName) { userEntity.menuName = dt.MenuVal.Replace("categoryID=", ""); startNo = "1"; nCount = "0"; SumPage = "N"; isSearch = false; Thread thread = new Thread(() => updateImgList(dt.MenuVal.Replace("categoryID=", ""), startNo)); thread.Start(); } } }
private void ImgTag_MouseClick(object sender, DuiMouseEventArgs e) { DuiLabel dlt = sender as DuiLabel; if (dlt.Name.Contains("ps-")) { API.Mmtv llys = new API.Mmtv(); string tvUrl = dlt.Name.Replace("imgTag_", ""); tvUrl = llys.getMmUrl(tvUrl.Split('-')[0], tvUrl.Split('-')[1]); plf.tvUrl = tvUrl; plf.tvName = dlt.Text.Trim(); plf.Axplayer_Play(tvUrl); } else { plf.tvUrl = dlt.Name.Replace("imgTag_", ""); plf.tvName = dlt.Text.Trim(); plf.Axplayer_Play(dlt.Name.Replace("imgTag_", "")); } }
private void Listx_MouseUp(object sender, DuiMouseEventArgs e) { t1.Stop(); moveing = false; //moveto(((DuiBaseControl)sender), oldtop); //System.Windows.Forms.MessageBox.Show(movec.ToString()); if (movec > 25 || movec < -25) { int b = (int)(((double)movec - 12) / 25); int c = Math.Abs((int)(((double)movec - 12) / 25)); //System.Windows.Forms.MessageBox.Show(c.ToString()); int d = (Items.IndexOf((DuiBaseControl)sender) + b + 1); //System.Windows.Forms.MessageBox.Show(d.ToString()); if (d > 0 && d < Items.Count && c > 0) { MusicListItem m = FindGroup(((DuiBaseControl)sender).Tag.ToString()); DuiBaseControl m2 = FindGroupEx(((DuiBaseControl)sender).Tag.ToString()); MusicItem m1 = null; foreach (MusicItem ic in m.musics) { if (ic.Path == ((DuiBaseControl)sender).Name || ic.URL == ((DuiBaseControl)sender).Name) { m1 = ic; } } int f = m.musics.IndexOf(m1) + b + 1; //System.Windows.Forms.MessageBox.Show(m.musics.IndexOf(m1)+"\n"+b+"\n" + f.ToString()); if (f > 0 && f < m.musics.Count) { DuiBaseControl m0 = (DuiBaseControl)sender; Items.Remove(m0); Items.Insert(d, m0); RefreshList(); m.musics.Remove(m1); m.musics.Insert(f, m1); } } } Cursor = System.Windows.Forms.Cursors.Default; }
private void Btndel_MouseClick(object sender, DuiMouseEventArgs e) { t1.Stop(); tx.Stop(); moveing = false; string a = ((DuiBaseControl)((DuiBaseControl)sender).Parent).Name; string b = ((DuiBaseControl)((DuiBaseControl)sender).Parent).Tag.ToString(); if (a == IsPlaying && b == IsPlayingList) { stopmusic(); } foreach (MusicListItem iy in Groups) { if (iy.Name == b) { for (int i = 0; i < iy.musics.Count; i++) { if (iy.musics[i].Name == a || iy.musics[i].Hash == a || iy.musics[i].Path == a) { iy.musics.Remove(iy.musics[i]); } } int c = iy.musics.Count; ((DuiLabel)FindGroupEx(b).FindControl("Count")[0]).Text = "[" + c.ToString() + "]"; FindGroupEx(b).FindControl("Count")[0].Tag = (Items.IndexOf(FindGroupEx(b)) + 1).ToString(); } } Items.Remove(((DuiBaseControl)((DuiBaseControl)sender).Parent)); RefreshList(); t1.Stop(); tx.Stop(); moveing = false; }