小男孩‘自慰网亚洲一区二区,亚洲一级在线播放毛片,亚洲中文字幕av每天更新,黄aⅴ永久免费无码,91成人午夜在线精品,色网站免费在线观看,亚洲欧洲wwwww在线观看

分享

navBarControl xtratabbedmanager

 北方的白樺林 2017-06-24
1. form 設(shè)置為 private 始終 只打開(kāi)一個(gè) 2.NavBarControl嘗試設(shè)置Item的屬性LargeImageIndex的值,則發(fā)現(xiàn)沒(méi)有任何變化,這是為什么呢?原來(lái)在設(shè)置這個(gè)屬性之前還需要設(shè)置此Item所在Group的屬性GroupStyle的值為L(zhǎng)argeImageText。 3. xtraTabbedMdiManager1.SelectedPage = xtraTabbedMdiManager1.Pages[f1]; // 選中page xtraTabbedMdiManager1.Pages[f1].Image = navBarItem1.SmallImage;// page設(shè)置圖片 this.xtraTabbedMdiManager1.ClosePageButtonShowMode = DevExpress.XtraTab.ClosePageButtonShowMode.InAllTabPagesAndTabControlHeader; 4. 雙擊保存 using DevExpress.XtraTabbedMdi; using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Linq; using System.Text; using System.Threading.Tasks; using System.Windows.Forms; namespace WindowsFormsApplication15 { public partial class Form1 : Form { public Form1() { InitializeComponent(); xtraTabbedMdiManager1.MdiParent = this; } private void navBarControl1_Click(object sender, EventArgs e) { Form2 f1 = Form2.CreateFrom(); f1.MdiParent = this; f1.Show(); xtraTabbedMdiManager1.SelectedPage = xtraTabbedMdiManager1.Pages[f1]; xtraTabbedMdiManager1.Pages[f1].Image = navBarItem1.SmallImage; } private void navBarItem2_LinkClicked(object sender, DevExpress.XtraNavBar.NavBarLinkEventArgs e) { Form3 f1 = Form3.CreateForm(); f1.MdiParent = this; f1.Show(); xtraTabbedMdiManager1.SelectedPage = xtraTabbedMdiManager1.Pages[f1]; xtraTabbedMdiManager1.Pages[f1].Image = navBarItem1.SmallImage; } private DateTime m_LastClick = System.DateTime.Now; private XtraMdiTabPage m_lastPage = null; private void xtraTabbedMdiManager1_MouseDown(object sender, MouseEventArgs e) { XtraMdiTabPage curPage = (sender as XtraTabbedMdiManager).SelectedPage; if (e.Button == MouseButtons.Left) { DateTime dt = DateTime.Now; TimeSpan span = dt.Subtract(m_LastClick); if (span.TotalMilliseconds < 300) //如果兩次點(diǎn)擊的時(shí)間間隔小于300毫秒,則認(rèn)為是雙擊 { if (this.MdiChildren.Length > 1) { // 限制只有在同一個(gè)頁(yè)簽上雙擊才能關(guān)閉.(規(guī)避兩個(gè)頁(yè)簽切換時(shí)點(diǎn)太快導(dǎo)致意外關(guān)閉頁(yè)簽) if (curPage.Equals(m_lastPage)) { //if (this.ActiveMdiChild != m_MapForm) //{ //this.ActiveMdiChild.Close(); curPage.MdiChild.Close(); //} } } m_LastClick = dt.AddMinutes(-1); } else { m_LastClick = dt; m_lastPage = curPage; } } } private void Form1_Load(object sender, EventArgs e) { } } } /*************/ form using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Linq; using System.Text; using System.Threading.Tasks; using System.Windows.Forms; namespace WindowsFormsApplication15 { public partial class Form2 : Form { private Form2() { InitializeComponent(); } private static Form2 instance; public static Form2 CreateFrom() { //判斷是否存在該窗體,或時(shí)候該字窗體是否被釋放過(guò),如果不存在該窗體,則 new 一個(gè)字窗體 if (instance == null || instance.IsDisposed) { instance = new Form2(); } return instance; } private void Form2_Load(object sender, EventArgs e) { } } }

    本站是提供個(gè)人知識(shí)管理的網(wǎng)絡(luò)存儲(chǔ)空間,所有內(nèi)容均由用戶發(fā)布,不代表本站觀點(diǎn)。請(qǐng)注意甄別內(nèi)容中的聯(lián)系方式、誘導(dǎo)購(gòu)買等信息,謹(jǐn)防詐騙。如發(fā)現(xiàn)有害或侵權(quán)內(nèi)容,請(qǐng)點(diǎn)擊一鍵舉報(bào)。
    轉(zhuǎn)藏 分享 獻(xiàn)花(0

    0條評(píng)論

    發(fā)表

    請(qǐng)遵守用戶 評(píng)論公約

    類似文章 更多