private void drawMenuBar() { BarManager barManager1 = ((IMainForm)this.mainForm).GetBarManager(); ((System.ComponentModel.ISupportInitialize)(barManager1)).BeginInit(); barManager1.Bars.Clear(); Bar menuBar = new Bar(); barManager1.Bars.Add(menuBar); barManager1.Form = mainForm; barManager1.MainMenu = menuBar; menuBar.BarName = "Menu Bar"; menuBar.DockCol = 0; menuBar.DockRow = 0; menuBar.DockStyle = BarDockStyle.Top; menuBar.OptionsBar.AllowQuickCustomization = false; menuBar.OptionsBar.DisableClose = true; menuBar.OptionsBar.DisableCustomization = true; menuBar.OptionsBar.UseWholeRow = true; menuBar.OptionsBar.DrawDragBorder = false; menuBar.Text = "Menu Bar"; //Lấy ra các parent foreach (DataRow dr in ds.Tables[0].Select("Parents=''")) { string strMenu = dr[0].ToString(); if (strMenu.Equals("WINDOW")) { BarMdiChildrenListItem barMdi = new BarMdiChildrenListItem(); barMdi.Caption = base.getName(strMenu); barMdi.Enabled = base.getEnable(strMenu); menuBar.LinksPersistInfo.Add(new LinkPersistInfo(barMdi)); barManager1.Items.Add(barMdi); //PHUOC TODO Thêm vào menu "CLOSE ALL" } else { BarSubItem barSubItem = new BarSubItem(); barSubItem.Caption = base.getName(strMenu); barSubItem.Enabled = base.getEnable(strMenu); menuBar.LinksPersistInfo.Add(new LinkPersistInfo(barSubItem)); barManager1.Items.Add(barSubItem); if (ds.Tables[0].Select("Parents='" + strMenu + "'").Length > 0) { foreach (DataRow dr1 in ds.Tables[0].Select("Parents='" + strMenu + "'")) { createMenuItems(barSubItem, dr1[0].ToString()); } } } } ((System.ComponentModel.ISupportInitialize)(barManager1)).EndInit(); }
public void perf() { var foo = new Foo(); var sw = Stopwatch.StartNew(); for (var i = 0; i < 100 * 1000; i++) { new Foo().Merge(foo); foo.Id++; } Console.WriteLine(sw.ElapsedMilliseconds); sw.Stop(); sw = Stopwatch.StartNew(); for (var i = 0; i < 100 * 1000; i++) { foo.MemberwiseClone(); foo.Id++; } Console.WriteLine(sw.ElapsedMilliseconds); sw.Stop(); sw = Stopwatch.StartNew(); for (var i = 0; i < 100 * 1000; i++) { foo.Clone(); foo.Id++; } Console.WriteLine(sw.ElapsedMilliseconds); var bar = new Bar(); var barz = new Bar(); sw.Stop(); sw = Stopwatch.StartNew(); for (var i = 0; i < 100 * 1000; i++) { barz = bar; barz.Id++; } Console.WriteLine(sw.ElapsedMilliseconds); }
public void CompiledCast () { var p = Expression.Parameter (typeof (IFoo), "foo"); var c = Expression.Lambda<Func<IFoo, Bar>> ( Expression.Convert (p, typeof (Bar)), p).Compile (); IFoo foo = new Bar (); Bar b = c (foo); Assert.AreEqual (b, foo); }
private static void RefCountWithPost_(IEnumerable<Tuple<int, int>> parameters) { var worker = new Thread(() => { SynchronizationContext.SetSynchronizationContext(new MySyncCtx()); foreach (var p in parameters) { var N = p.Item1; var M = p.Item2; Console.Write("N = {0}, M = {1} - ", N, M); var bar = new Bar(); var foo = Observable.FromEventPattern<FooEventArgs>(h => { /*Console.Write("+");*/ bar.Foo += h; }, h => { bar.Foo -= h; /*Console.Write("-"); */}); var e = new ManualResetEvent(false); var cd = new CountdownEvent(M * 2); for (int i = 0; i < M; i++) { var f = new SingleAssignmentDisposable(); ThreadPool.QueueUserWorkItem(_ => { f.Disposable = foo.Subscribe(__ => { /*Console.Write("!");*/ }); cd.Signal(); }); ThreadPool.QueueUserWorkItem(_ => { f.Dispose(); cd.Signal(); }); } var hasObserved = 0; Console.Write("{SB}"); var d = foo.Subscribe(x => { // // [on BARTDE-M6500 with CPU and RAM pressure] // // Up to 8K concurrent observers, we typically don't see a time gap (expected worst-case behavior). // The code below uses an event to check the desired behavior of eventually tuning in to the event stream. // Console.Write("&" + x.EventArgs.Qux); e.Set(); Interlocked.Exchange(ref hasObserved, 1); }); Console.Write("{SE}"); var t = new Thread(() => { Console.Write("{TB}"); var i = 0; while (Thread.VolatileRead(ref hasObserved) == 0) bar.OnFoo(i++); Console.Write("{TE}"); }); t.Start(); t.Join(); cd.Wait(); e.WaitOne(); d.Dispose(); Console.WriteLine("."); } }); worker.Start(); worker.Join(); }
private static void RefCount_(IEnumerable<Tuple<int, int>> parameters) { foreach (var p in parameters) { var N = p.Item1; var M = p.Item2; Console.Write("N = {0}, M = {1} - ", N, M); var bar = new Bar(); var foo = Observable.FromEventPattern<FooEventArgs>(h => { Console.Write("+"); bar.Foo += h; }, h => { bar.Foo -= h; Console.Write("-"); }); var res = new List<int>(); var n = 0; var e = new ManualResetEvent(false); var cd = new CountdownEvent(M * 2); for (int i = 0; i < M; i++) { var f = new SingleAssignmentDisposable(); ThreadPool.QueueUserWorkItem(_ => { f.Disposable = foo.Subscribe(__ => { Console.Write("!"); }); cd.Signal(); }); ThreadPool.QueueUserWorkItem(_ => { f.Dispose(); cd.Signal(); }); } Console.Write("{SB}"); var d = foo.Subscribe(x => { //Console.Write("&"); if (++n == N) e.Set(); res.Add(x.EventArgs.Qux); }); Console.Write("{SE}"); var t = new Thread(() => { Console.Write("{TB}"); for (int i = 0; i < N; i++) bar.OnFoo(i); Console.Write("{TE}"); }); t.Start(); t.Join(); cd.Wait(); e.WaitOne(); d.Dispose(); if (!res.SequenceEqual(Enumerable.Range(0, N))) { Console.WriteLine("Panic!"); break; } Console.WriteLine("."); } }
public void GlobalsInScope () { var foo = new Foo { gazonk = "gazonk" }; var bar = new Bar { baz = 42 }; var l = Expression.Lambda<Func<string>> ( Expression.Call ( typeof (string).GetMethod ("Concat", new [] { typeof (string), typeof (string) }), Expression.Field (Expression.Constant (foo), typeof (Foo).GetField ("gazonk")), Expression.Call (Expression.Constant (bar), typeof (Bar).GetMethod ("ToString")))); var del = l.Compile (); var scope = del.Target as ExecutionScope; Assert.IsNotNull (scope); var globals = scope.Globals; Assert.IsNotNull (globals); Assert.AreEqual (2, globals.Length); Assert.AreEqual (typeof (StrongBox<Foo>), globals [0].GetType ()); Assert.AreEqual (typeof (StrongBox<Bar>), globals [1].GetType ()); Assert.AreEqual (foo, ((StrongBox<Foo>) globals [0]).Value); Assert.AreEqual (bar, ((StrongBox<Bar>) globals [1]).Value); Assert.AreEqual ("gazonk42", del ()); }
public void DemoAction(Foo foo, Bar bar, Baz baz) { }
public override void OnBar(Bar bar) { Monitor monitor = GetMonitor(string.Format("{0}.{1}", bar.exchange, bar.sec_id)); if (monitor != null) { monitor.OnBar(bar); } }
public void DemoAction([ModelBinder(typeof(BazModelBinder))]Foo foo, Bar bar, Baz baz) { }
/// <summary> /// Required method for Designer support - do not modify /// the contents of this method with the code editor. /// </summary> private void InitializeComponent() { this.components = new System.ComponentModel.Container(); System.Resources.ResourceManager resources = new System.Resources.ResourceManager(typeof(MainForm)); this.barDockMgr = new DevExpress.XtraBars.BarAndDockingController(this.components); this.dockMgr = new DevExpress.XtraBars.Docking.DockManager(); this.pnlCountersTree = new DevExpress.XtraBars.Docking.DockPanel(); this.dockPanel1_Container = new DevExpress.XtraBars.Docking.ControlContainer(); this.cmdNewTab = new DevExpress.XtraBars.BarButtonItem(); this.barSubItem1 = new DevExpress.XtraBars.BarSubItem(); this.barButtonItem1 = new DevExpress.XtraBars.BarButtonItem(); this.barSubItem2 = new DevExpress.XtraBars.BarSubItem(); this.lsttopToolbarImages = new DevExpress.Utils.ImageCollection(this.components); this.tabsMgr = new DevExpress.XtraTabbedMdi.XtraTabbedMdiManager(this.components); this.defaultLookAndFeel1 = new DevExpress.LookAndFeel.DefaultLookAndFeel(this.components); this.imgRibbon = new DevExpress.Utils.ImageCollection(this.components); this.bar4 = new DevExpress.XtraBars.Bar(); this.ribbonMain = new DevExpress.XtraBars.Ribbon.RibbonControl(); this.barButtonGroup1 = new DevExpress.XtraBars.BarButtonGroup(); this.chkPanelCounters = new DevExpress.XtraBars.BarCheckItem(); this.barStaticItem1 = new DevExpress.XtraBars.BarStaticItem(); this.cmdScaleUp = new DevExpress.XtraBars.BarButtonItem(); this.cmdScaleDown = new DevExpress.XtraBars.BarButtonItem(); this.cmdAddCounters = new DevExpress.XtraBars.BarButtonItem(); this.cmdCreateRootNode = new DevExpress.XtraBars.BarButtonItem(); this.cmdCreateChildNode = new DevExpress.XtraBars.BarButtonItem(); this.cmdRemoveNode = new DevExpress.XtraBars.BarButtonItem(); this.cmdCreateFolderFromActiveMonitor = new DevExpress.XtraBars.BarButtonItem(); this.cmdSaveCountersToCurrentFolder = new DevExpress.XtraBars.BarButtonItem(); this.cmdSetCounterMachineNames = new DevExpress.XtraBars.BarButtonItem(); this.cmdAddNodeToNewTab = new DevExpress.XtraBars.BarButtonItem(); this.barButtonItem13 = new DevExpress.XtraBars.BarButtonItem(); this.chkTextReport = new DevExpress.XtraBars.BarCheckItem(); this.chkShowToolbar = new DevExpress.XtraBars.BarCheckItem(); this.chkLegend = new DevExpress.XtraBars.BarCheckItem(); this.chkShowVGrid = new DevExpress.XtraBars.BarCheckItem(); this.chkShowHGrid = new DevExpress.XtraBars.BarCheckItem(); this.barStaticItem2 = new DevExpress.XtraBars.BarStaticItem(); this.cmdRenameFolder = new DevExpress.XtraBars.BarButtonItem(); this.cmdRenameTab = new DevExpress.XtraBars.BarButtonItem(); this.barButtonGroup2 = new DevExpress.XtraBars.BarButtonGroup(); this.cmdImport = new DevExpress.XtraBars.BarButtonItem(); this.cmdExport = new DevExpress.XtraBars.BarButtonItem(); this.barButtonGroup3 = new DevExpress.XtraBars.BarButtonGroup(); this.barButtonGroup4 = new DevExpress.XtraBars.BarButtonGroup(); this.barButtonGroup5 = new DevExpress.XtraBars.BarButtonGroup(); this.barButtonItem2 = new DevExpress.XtraBars.BarButtonItem(); this.barButtonItem3 = new DevExpress.XtraBars.BarButtonItem(); this.barButtonItem4 = new DevExpress.XtraBars.BarButtonItem(); this.barButtonItem5 = new DevExpress.XtraBars.BarButtonItem(); this.barButtonItem6 = new DevExpress.XtraBars.BarButtonItem(); this.barButtonItem7 = new DevExpress.XtraBars.BarButtonItem(); this.lblVersionCaption = new DevExpress.XtraBars.BarStaticItem(); this.lblVersion = new DevExpress.XtraBars.BarStaticItem(); this.cmdCloseTab = new DevExpress.XtraBars.BarButtonItem(); this.cmdSetInstanceName = new DevExpress.XtraBars.BarButtonItem(); this.ribPageGeneral = new DevExpress.XtraBars.Ribbon.RibbonPage(); this.ribbonPageGroup1 = new DevExpress.XtraBars.Ribbon.RibbonPageGroup(); this.ribbonPageGroup2 = new DevExpress.XtraBars.Ribbon.RibbonPageGroup(); this.ribbonPageGroup4 = new DevExpress.XtraBars.Ribbon.RibbonPageGroup(); this.ribbonPageGroup16 = new DevExpress.XtraBars.Ribbon.RibbonPageGroup(); this.ribPageActiveMonitor = new DevExpress.XtraBars.Ribbon.RibbonPage(); this.ribbonPageGroup5 = new DevExpress.XtraBars.Ribbon.RibbonPageGroup(); this.ribbonPageGroup6 = new DevExpress.XtraBars.Ribbon.RibbonPageGroup(); this.ribbonPageGroup3 = new DevExpress.XtraBars.Ribbon.RibbonPageGroup(); this.ribbonPageGroup15 = new DevExpress.XtraBars.Ribbon.RibbonPageGroup(); this.ribPageLibFolder = new DevExpress.XtraBars.Ribbon.RibbonPage(); this.ribbonPageGroup7 = new DevExpress.XtraBars.Ribbon.RibbonPageGroup(); this.ribbonPageGroup12 = new DevExpress.XtraBars.Ribbon.RibbonPageGroup(); this.ribbonPageGroup10 = new DevExpress.XtraBars.Ribbon.RibbonPageGroup(); this.ribbonPageGroup11 = new DevExpress.XtraBars.Ribbon.RibbonPageGroup(); this.ribPageLibCounter = new DevExpress.XtraBars.Ribbon.RibbonPage(); this.ribbonPageGroup13 = new DevExpress.XtraBars.Ribbon.RibbonPageGroup(); this.ribbonPageGroup14 = new DevExpress.XtraBars.Ribbon.RibbonPageGroup(); this.ribbonPage1 = new DevExpress.XtraBars.Ribbon.RibbonPage(); this.ribbonPageGroup17 = new DevExpress.XtraBars.Ribbon.RibbonPageGroup(); this.ribbonPageGroup18 = new DevExpress.XtraBars.Ribbon.RibbonPageGroup(); this.ribbonPageGroup19 = new DevExpress.XtraBars.Ribbon.RibbonPageGroup(); this.ribbonPageGroup20 = new DevExpress.XtraBars.Ribbon.RibbonPageGroup(); this.ribbonStatusBar1 = new DevExpress.XtraBars.Ribbon.RibbonStatusBar(); this.ribbonPageGroup8 = new DevExpress.XtraBars.Ribbon.RibbonPageGroup(); this.ribbonPageGroup9 = new DevExpress.XtraBars.Ribbon.RibbonPageGroup(); this.popupMenu1 = new DevExpress.XtraBars.PopupMenu(this.components); this.popupMenu2 = new DevExpress.XtraBars.PopupMenu(this.components); this.popupMenu3 = new DevExpress.XtraBars.PopupMenu(this.components); this.toolTipController1 = new DevExpress.Utils.ToolTipController(this.components); ((System.ComponentModel.ISupportInitialize)(this.barDockMgr)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.dockMgr)).BeginInit(); this.pnlCountersTree.SuspendLayout(); ((System.ComponentModel.ISupportInitialize)(this.lsttopToolbarImages)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.tabsMgr)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.imgRibbon)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.popupMenu1)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.popupMenu2)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.popupMenu3)).BeginInit(); this.SuspendLayout(); // // barDockMgr // this.barDockMgr.AppearancesRibbon.PageHeader.BackColor = System.Drawing.Color.FromArgb(((System.Byte)(224)), ((System.Byte)(224)), ((System.Byte)(224))); this.barDockMgr.AppearancesRibbon.PageHeader.BackColor2 = System.Drawing.Color.FromArgb(((System.Byte)(255)), ((System.Byte)(192)), ((System.Byte)(192))); this.barDockMgr.AppearancesRibbon.PageHeader.Options.UseBackColor = true; this.barDockMgr.LookAndFeel.Style = DevExpress.LookAndFeel.LookAndFeelStyle.Flat; this.barDockMgr.PaintStyleName = "Skin"; this.barDockMgr.PropertiesBar.AllowLinkLighting = false; // // dockMgr // this.dockMgr.Controller = this.barDockMgr; this.dockMgr.Form = this; this.dockMgr.RootPanels.AddRange(new DevExpress.XtraBars.Docking.DockPanel[] { this.pnlCountersTree}); this.dockMgr.TopZIndexControls.AddRange(new string[] { "DevExpress.XtraBars.BarDockControl", "System.Windows.Forms.StatusBar", "DevExpress.XtraBars.Ribbon.RibbonStatusBar", "DevExpress.XtraBars.Ribbon.RibbonControl"}); // // pnlCountersTree // this.pnlCountersTree.Controls.Add(this.dockPanel1_Container); this.pnlCountersTree.Dock = DevExpress.XtraBars.Docking.DockingStyle.Left; this.pnlCountersTree.ID = new System.Guid("67d03641-787f-4ee4-abc7-e67c35e02bd4"); this.pnlCountersTree.Location = new System.Drawing.Point(0, 144); this.pnlCountersTree.Name = "pnlCountersTree"; this.pnlCountersTree.Size = new System.Drawing.Size(206, 326); this.pnlCountersTree.Text = "Counter Library"; // // dockPanel1_Container // this.dockPanel1_Container.Location = new System.Drawing.Point(3, 25); this.dockPanel1_Container.Name = "dockPanel1_Container"; this.dockPanel1_Container.Size = new System.Drawing.Size(200, 298); this.dockPanel1_Container.TabIndex = 0; // // cmdNewTab // this.cmdNewTab.Caption = "&New tab"; this.cmdNewTab.Glyph = ((System.Drawing.Image)(resources.GetObject("cmdNewTab.Glyph"))); this.cmdNewTab.Hint = "New Tab"; this.cmdNewTab.Id = 3; this.cmdNewTab.ImageIndex = 0; this.cmdNewTab.ItemShortcut = new DevExpress.XtraBars.BarShortcut((System.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.N)); this.cmdNewTab.Name = "cmdNewTab"; this.cmdNewTab.ItemClick += new DevExpress.XtraBars.ItemClickEventHandler(this.cmdNewTab_ItemClick); // // barSubItem1 // this.barSubItem1.Caption = "&File"; this.barSubItem1.Id = 0; this.barSubItem1.LinksPersistInfo.AddRange(new DevExpress.XtraBars.LinkPersistInfo[] { new DevExpress.XtraBars.LinkPersistInfo(this.barButtonItem1)}); this.barSubItem1.Name = "barSubItem1"; // // barButtonItem1 // this.barButtonItem1.Caption = "E&xit"; this.barButtonItem1.Glyph = ((System.Drawing.Image)(resources.GetObject("barButtonItem1.Glyph"))); this.barButtonItem1.Hint = "Exit"; this.barButtonItem1.Id = 1; this.barButtonItem1.ImageIndex = 1; this.barButtonItem1.Name = "barButtonItem1"; // // barSubItem2 // this.barSubItem2.Caption = "&Tabs"; this.barSubItem2.Id = 2; this.barSubItem2.LinksPersistInfo.AddRange(new DevExpress.XtraBars.LinkPersistInfo[] { new DevExpress.XtraBars.LinkPersistInfo(this.cmdNewTab)}); this.barSubItem2.Name = "barSubItem2"; // // lsttopToolbarImages // this.lsttopToolbarImages.ImageStream = ((DevExpress.Utils.ImageCollectionStreamer)(resources.GetObject("lsttopToolbarImages.ImageStream"))); // // tabsMgr // this.tabsMgr.AllowDragDrop = DevExpress.Utils.DefaultBoolean.True; this.tabsMgr.AppearancePage.HeaderActive.BackColor = System.Drawing.Color.FromArgb(((System.Byte)(255)), ((System.Byte)(255)), ((System.Byte)(192))); this.tabsMgr.AppearancePage.HeaderActive.BorderColor = System.Drawing.Color.Red; this.tabsMgr.AppearancePage.HeaderActive.Font = new System.Drawing.Font("Tahoma", 8.25F, System.Drawing.FontStyle.Bold); this.tabsMgr.AppearancePage.HeaderActive.Options.UseBackColor = true; this.tabsMgr.AppearancePage.HeaderActive.Options.UseBorderColor = true; this.tabsMgr.AppearancePage.HeaderActive.Options.UseFont = true; this.tabsMgr.Controller = this.barDockMgr; this.tabsMgr.HeaderButtons = ((DevExpress.XtraTab.TabButtons)(((DevExpress.XtraTab.TabButtons.Prev | DevExpress.XtraTab.TabButtons.Next) | DevExpress.XtraTab.TabButtons.Close))); this.tabsMgr.MdiParent = this; this.tabsMgr.SelectedPageChanged += new System.EventHandler(this.tabsMgr_SelectedPageChanged); this.tabsMgr.MouseDown += new System.Windows.Forms.MouseEventHandler(this.tabsMgr_MouseDown); // // defaultLookAndFeel1 // this.defaultLookAndFeel1.LookAndFeel.SkinName = "The Asphalt World"; // // imgRibbon // this.imgRibbon.ImageStream = ((DevExpress.Utils.ImageCollectionStreamer)(resources.GetObject("imgRibbon.ImageStream"))); // // bar4 // this.bar4.BarName = "barActions"; this.bar4.DockCol = 0; this.bar4.DockRow = 0; this.bar4.DockStyle = DevExpress.XtraBars.BarDockStyle.Top; this.bar4.FloatLocation = new System.Drawing.Point(229, 161); this.bar4.LinksPersistInfo.AddRange(new DevExpress.XtraBars.LinkPersistInfo[] { new DevExpress.XtraBars.LinkPersistInfo(this.barButtonItem1)}); this.bar4.OptionsBar.AllowDelete = true; this.bar4.OptionsBar.AllowQuickCustomization = false; this.bar4.OptionsBar.DisableClose = true; this.bar4.OptionsBar.DisableCustomization = true; this.bar4.OptionsBar.DrawDragBorder = false; this.bar4.OptionsBar.UseWholeRow = true; this.bar4.Text = "Actions"; // // ribbonMain // this.ribbonMain.Images = this.imgRibbon; this.ribbonMain.Items.AddRange(new DevExpress.XtraBars.BarItem[] { this.barSubItem1, this.barButtonItem1, this.barSubItem2, this.cmdNewTab, this.barButtonGroup1, this.chkPanelCounters, this.barStaticItem1, this.cmdScaleUp, this.cmdScaleDown, this.cmdAddCounters, this.cmdCreateRootNode, this.cmdCreateChildNode, this.cmdRemoveNode, this.cmdCreateFolderFromActiveMonitor, this.cmdSaveCountersToCurrentFolder, this.cmdSetCounterMachineNames, this.cmdAddNodeToNewTab, this.barButtonItem13, this.chkTextReport, this.chkShowToolbar, this.chkLegend, this.chkShowVGrid, this.chkShowHGrid, this.barStaticItem2, this.cmdRenameFolder, this.cmdRenameTab, this.barButtonGroup2, this.cmdImport, this.cmdExport, this.barButtonGroup3, this.barButtonGroup4, this.barButtonGroup5, this.barButtonItem2, this.barButtonItem3, this.barButtonItem4, this.barButtonItem5, this.barButtonItem6, this.barButtonItem7, this.lblVersionCaption, this.lblVersion, this.cmdCloseTab, this.cmdSetInstanceName}); this.ribbonMain.Location = new System.Drawing.Point(0, 0); this.ribbonMain.MaxItemId = 42; this.ribbonMain.Name = "ribbonMain"; this.ribbonMain.Pages.AddRange(new DevExpress.XtraBars.Ribbon.RibbonPage[] { this.ribPageGeneral, this.ribPageActiveMonitor, this.ribPageLibFolder, this.ribPageLibCounter, this.ribbonPage1}); this.ribbonMain.SelectedPage = this.ribPageActiveMonitor; this.ribbonMain.Size = new System.Drawing.Size(712, 144); this.ribbonMain.Toolbar.ItemLinks.Add(this.barButtonItem1); this.ribbonMain.Toolbar.ItemLinks.Add(this.cmdNewTab, true); this.ribbonMain.Toolbar.ItemLinks.Add(this.cmdRenameTab); this.ribbonMain.Toolbar.ItemLinks.Add(this.cmdAddCounters, true); this.ribbonMain.ToolbarLocation = DevExpress.XtraBars.Ribbon.RibbonQuickAccessToolbarLocation.Below; this.ribbonMain.SelectedPageChanged += new System.EventHandler(this.ribbonMain_SelectedPageChanged); // // barButtonGroup1 // this.barButtonGroup1.Caption = "barButtonGroup1"; this.barButtonGroup1.Id = 0; this.barButtonGroup1.Name = "barButtonGroup1"; // // chkPanelCounters // this.chkPanelCounters.Caption = "Show Counter Library"; this.chkPanelCounters.Checked = true; this.chkPanelCounters.Glyph = ((System.Drawing.Image)(resources.GetObject("chkPanelCounters.Glyph"))); this.chkPanelCounters.Hint = "Show counter library panel"; this.chkPanelCounters.Id = 1; this.chkPanelCounters.ItemShortcut = new DevExpress.XtraBars.BarShortcut((System.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.L)); this.chkPanelCounters.LargeGlyph = ((System.Drawing.Image)(resources.GetObject("chkPanelCounters.LargeGlyph"))); this.chkPanelCounters.Name = "chkPanelCounters"; this.chkPanelCounters.PaintStyle = DevExpress.XtraBars.BarItemPaintStyle.Caption; this.chkPanelCounters.CheckedChanged += new DevExpress.XtraBars.ItemClickEventHandler(this.chkPanelCounters_CheckedChanged); // // barStaticItem1 // this.barStaticItem1.Caption = "Actions on the active perfomance monitor"; this.barStaticItem1.Glyph = ((System.Drawing.Image)(resources.GetObject("barStaticItem1.Glyph"))); this.barStaticItem1.Id = 2; this.barStaticItem1.Name = "barStaticItem1"; this.barStaticItem1.RibbonStyle = DevExpress.XtraBars.Ribbon.RibbonItemStyles.Large; this.barStaticItem1.TextAlignment = System.Drawing.StringAlignment.Near; // // cmdScaleUp // this.cmdScaleUp.Caption = "Scale up"; this.cmdScaleUp.Glyph = ((System.Drawing.Image)(resources.GetObject("cmdScaleUp.Glyph"))); this.cmdScaleUp.Hint = "Scale up current counter"; this.cmdScaleUp.Id = 3; this.cmdScaleUp.ItemShortcut = new DevExpress.XtraBars.BarShortcut(System.Windows.Forms.Keys.Add); this.cmdScaleUp.Name = "cmdScaleUp"; this.cmdScaleUp.ItemClick += new DevExpress.XtraBars.ItemClickEventHandler(this.cmdScaleUp_ItemClick); // // cmdScaleDown // this.cmdScaleDown.Caption = "Scale down "; this.cmdScaleDown.Glyph = ((System.Drawing.Image)(resources.GetObject("cmdScaleDown.Glyph"))); this.cmdScaleDown.Hint = "Scale down current counter"; this.cmdScaleDown.Id = 4; this.cmdScaleDown.ItemShortcut = new DevExpress.XtraBars.BarShortcut(System.Windows.Forms.Keys.Subtract); this.cmdScaleDown.Name = "cmdScaleDown"; this.cmdScaleDown.ItemClick += new DevExpress.XtraBars.ItemClickEventHandler(this.barButtonItem3_ItemClick); // // cmdAddCounters // this.cmdAddCounters.Caption = "Add counter(s)"; this.cmdAddCounters.Glyph = ((System.Drawing.Image)(resources.GetObject("cmdAddCounters.Glyph"))); this.cmdAddCounters.Hint = "Add Counters..."; this.cmdAddCounters.Id = 5; this.cmdAddCounters.ItemShortcut = new DevExpress.XtraBars.BarShortcut((System.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.A)); this.cmdAddCounters.Name = "cmdAddCounters"; this.cmdAddCounters.ItemClick += new DevExpress.XtraBars.ItemClickEventHandler(this.cmdAddCounters_ItemClick); // // cmdCreateRootNode // this.cmdCreateRootNode.Caption = "Create Root"; this.cmdCreateRootNode.Glyph = ((System.Drawing.Image)(resources.GetObject("cmdCreateRootNode.Glyph"))); this.cmdCreateRootNode.Hint = "Create root folder in library"; this.cmdCreateRootNode.Id = 6; this.cmdCreateRootNode.Name = "cmdCreateRootNode"; this.cmdCreateRootNode.ItemClick += new DevExpress.XtraBars.ItemClickEventHandler(this.cmdCreateRootNode_ItemClick); // // cmdCreateChildNode // this.cmdCreateChildNode.Caption = "Create Child"; this.cmdCreateChildNode.Glyph = ((System.Drawing.Image)(resources.GetObject("cmdCreateChildNode.Glyph"))); this.cmdCreateChildNode.Hint = "Create sub folder in library"; this.cmdCreateChildNode.Id = 7; this.cmdCreateChildNode.Name = "cmdCreateChildNode"; this.cmdCreateChildNode.ItemClick += new DevExpress.XtraBars.ItemClickEventHandler(this.cmdCreateChildNode_ItemClick); // // cmdRemoveNode // this.cmdRemoveNode.Caption = "&Remove"; this.cmdRemoveNode.Hint = "Remove folder or counter from library"; this.cmdRemoveNode.Id = 8; this.cmdRemoveNode.ImageIndex = 1; this.cmdRemoveNode.Name = "cmdRemoveNode"; this.cmdRemoveNode.ItemClick += new DevExpress.XtraBars.ItemClickEventHandler(this.cmdRemoveNode_ItemClick); // // cmdCreateFolderFromActiveMonitor // this.cmdCreateFolderFromActiveMonitor.Caption = "Import Tab Counters to new folder"; this.cmdCreateFolderFromActiveMonitor.Glyph = ((System.Drawing.Image)(resources.GetObject("cmdCreateFolderFromActiveMonitor.Glyph"))); this.cmdCreateFolderFromActiveMonitor.Hint = "Import tab counters to a new library folder"; this.cmdCreateFolderFromActiveMonitor.Id = 10; this.cmdCreateFolderFromActiveMonitor.ItemShortcut = new DevExpress.XtraBars.BarShortcut(((System.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.Shift) | System.Windows.Forms.Keys.N)); this.cmdCreateFolderFromActiveMonitor.Name = "cmdCreateFolderFromActiveMonitor"; this.cmdCreateFolderFromActiveMonitor.ItemClick += new DevExpress.XtraBars.ItemClickEventHandler(this.cmdCreateFolderFromActiveMonitor_ItemClick); // // cmdSaveCountersToCurrentFolder // this.cmdSaveCountersToCurrentFolder.Caption = "Import tab counters to selected folder"; this.cmdSaveCountersToCurrentFolder.Glyph = ((System.Drawing.Image)(resources.GetObject("cmdSaveCountersToCurrentFolder.Glyph"))); this.cmdSaveCountersToCurrentFolder.Hint = "Import tab counters to the selected library folder"; this.cmdSaveCountersToCurrentFolder.Id = 11; this.cmdSaveCountersToCurrentFolder.ItemShortcut = new DevExpress.XtraBars.BarShortcut(((System.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.Shift) | System.Windows.Forms.Keys.F)); this.cmdSaveCountersToCurrentFolder.Name = "cmdSaveCountersToCurrentFolder"; this.cmdSaveCountersToCurrentFolder.ItemClick += new DevExpress.XtraBars.ItemClickEventHandler(this.cmdSaveCountersToCurrentFolder_ItemClick); // // cmdSetCounterMachineNames // this.cmdSetCounterMachineNames.Caption = "Set machine name"; this.cmdSetCounterMachineNames.Glyph = ((System.Drawing.Image)(resources.GetObject("cmdSetCounterMachineNames.Glyph"))); this.cmdSetCounterMachineNames.Hint = "set the machine name for the library counter(s)"; this.cmdSetCounterMachineNames.Id = 12; this.cmdSetCounterMachineNames.ItemShortcut = new DevExpress.XtraBars.BarShortcut((System.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.M)); this.cmdSetCounterMachineNames.Name = "cmdSetCounterMachineNames"; this.cmdSetCounterMachineNames.ItemClick += new DevExpress.XtraBars.ItemClickEventHandler(this.cmdChangeMachinNameForCOunters_ItemClick); // // cmdAddNodeToNewTab // this.cmdAddNodeToNewTab.Caption = "Add folder to new tab"; this.cmdAddNodeToNewTab.Glyph = ((System.Drawing.Image)(resources.GetObject("cmdAddNodeToNewTab.Glyph"))); this.cmdAddNodeToNewTab.Hint = "add this library folder\'s counters to a new tab"; this.cmdAddNodeToNewTab.Id = 13; this.cmdAddNodeToNewTab.ItemShortcut = new DevExpress.XtraBars.BarShortcut(((System.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.Shift) | System.Windows.Forms.Keys.Right)); this.cmdAddNodeToNewTab.Name = "cmdAddNodeToNewTab"; this.cmdAddNodeToNewTab.ItemClick += new DevExpress.XtraBars.ItemClickEventHandler(this.cmdAddNodeToNewTab_ItemClick); // // barButtonItem13 // this.barButtonItem13.Caption = "Add to selected tab"; this.barButtonItem13.Glyph = ((System.Drawing.Image)(resources.GetObject("barButtonItem13.Glyph"))); this.barButtonItem13.Hint = "add this library folder/counter to the current tab"; this.barButtonItem13.Id = 16; this.barButtonItem13.ItemShortcut = new DevExpress.XtraBars.BarShortcut((System.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.Right)); this.barButtonItem13.Name = "barButtonItem13"; this.barButtonItem13.ItemClick += new DevExpress.XtraBars.ItemClickEventHandler(this.barButtonItem13_ItemClick); // // chkTextReport // this.chkTextReport.Caption = "Text Report"; this.chkTextReport.Glyph = ((System.Drawing.Image)(resources.GetObject("chkTextReport.Glyph"))); this.chkTextReport.Hint = "Set the perfmon display to \"Text Report\""; this.chkTextReport.Id = 17; this.chkTextReport.ItemShortcut = new DevExpress.XtraBars.BarShortcut((System.Windows.Forms.Keys.Alt | System.Windows.Forms.Keys.R)); this.chkTextReport.LargeGlyph = ((System.Drawing.Image)(resources.GetObject("chkTextReport.LargeGlyph"))); this.chkTextReport.Name = "chkTextReport"; this.chkTextReport.CheckedChanged += new DevExpress.XtraBars.ItemClickEventHandler(this.chkTextReport_CheckedChanged); // // chkShowToolbar // this.chkShowToolbar.Caption = "Toolbar"; this.chkShowToolbar.Checked = true; this.chkShowToolbar.Glyph = ((System.Drawing.Image)(resources.GetObject("chkShowToolbar.Glyph"))); this.chkShowToolbar.Hint = "Show/Hide the perfmon toolbar"; this.chkShowToolbar.Id = 18; this.chkShowToolbar.ItemShortcut = new DevExpress.XtraBars.BarShortcut((System.Windows.Forms.Keys.Alt | System.Windows.Forms.Keys.T)); this.chkShowToolbar.Name = "chkShowToolbar"; this.chkShowToolbar.CheckedChanged += new DevExpress.XtraBars.ItemClickEventHandler(this.chkShowToolbar_CheckedChanged); // // chkLegend // this.chkLegend.Caption = "Legend"; this.chkLegend.Checked = true; this.chkLegend.Glyph = ((System.Drawing.Image)(resources.GetObject("chkLegend.Glyph"))); this.chkLegend.Hint = "Show/Hide the perfmon legend"; this.chkLegend.Id = 19; this.chkLegend.ItemShortcut = new DevExpress.XtraBars.BarShortcut((System.Windows.Forms.Keys.Alt | System.Windows.Forms.Keys.L)); this.chkLegend.Name = "chkLegend"; this.chkLegend.CheckedChanged += new DevExpress.XtraBars.ItemClickEventHandler(this.chkLegend_CheckedChanged); // // chkShowVGrid // this.chkShowVGrid.Caption = "Vertical Grid Lines"; this.chkShowVGrid.Glyph = ((System.Drawing.Image)(resources.GetObject("chkShowVGrid.Glyph"))); this.chkShowVGrid.Hint = "Show/Hide perfmon vertical grid lines"; this.chkShowVGrid.Id = 20; this.chkShowVGrid.ItemShortcut = new DevExpress.XtraBars.BarShortcut((System.Windows.Forms.Keys.Alt | System.Windows.Forms.Keys.V)); this.chkShowVGrid.Name = "chkShowVGrid"; this.chkShowVGrid.CheckedChanged += new DevExpress.XtraBars.ItemClickEventHandler(this.chkShowVGrid_CheckedChanged); // // chkShowHGrid // this.chkShowHGrid.Caption = "Horizontal Grid Lines"; this.chkShowHGrid.Glyph = ((System.Drawing.Image)(resources.GetObject("chkShowHGrid.Glyph"))); this.chkShowHGrid.Hint = "Show/Hide perfmon Horizontal grid lines"; this.chkShowHGrid.Id = 21; this.chkShowHGrid.ItemShortcut = new DevExpress.XtraBars.BarShortcut((System.Windows.Forms.Keys.Alt | System.Windows.Forms.Keys.H)); this.chkShowHGrid.Name = "chkShowHGrid"; this.chkShowHGrid.CheckedChanged += new DevExpress.XtraBars.ItemClickEventHandler(this.chkShowHGrid_CheckedChanged); // // barStaticItem2 // this.barStaticItem2.Caption = "Perf+ " + ""; this.barStaticItem2.Id = 22; this.barStaticItem2.Name = "barStaticItem2"; this.barStaticItem2.TextAlignment = System.Drawing.StringAlignment.Near; // // cmdRenameFolder // this.cmdRenameFolder.Caption = "&Rename"; this.cmdRenameFolder.Id = 23; this.cmdRenameFolder.Name = "cmdRenameFolder"; this.cmdRenameFolder.ItemClick += new DevExpress.XtraBars.ItemClickEventHandler(this.cmdRenameFolder_ItemClick); // // cmdRenameTab // this.cmdRenameTab.Caption = "&Rename Tab"; this.cmdRenameTab.Glyph = ((System.Drawing.Image)(resources.GetObject("cmdRenameTab.Glyph"))); this.cmdRenameTab.Hint = "Rename Tab"; this.cmdRenameTab.Id = 25; this.cmdRenameTab.ItemShortcut = new DevExpress.XtraBars.BarShortcut((System.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.R)); this.cmdRenameTab.Name = "cmdRenameTab"; this.cmdRenameTab.ItemClick += new DevExpress.XtraBars.ItemClickEventHandler(this.cmdRenameTab_ItemClick); // // barButtonGroup2 // this.barButtonGroup2.Caption = "Share"; this.barButtonGroup2.Id = 26; this.barButtonGroup2.Name = "barButtonGroup2"; // // cmdImport // this.cmdImport.Caption = "&Import Library..."; this.cmdImport.Glyph = ((System.Drawing.Image)(resources.GetObject("cmdImport.Glyph"))); this.cmdImport.Hint = "Import existing library counters from file"; this.cmdImport.Id = 27; this.cmdImport.ItemShortcut = new DevExpress.XtraBars.BarShortcut((System.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.I)); this.cmdImport.Name = "cmdImport"; this.cmdImport.ItemClick += new DevExpress.XtraBars.ItemClickEventHandler(this.cmdImport_ItemClick); // // cmdExport // this.cmdExport.Caption = "Export Library..."; this.cmdExport.Glyph = ((System.Drawing.Image)(resources.GetObject("cmdExport.Glyph"))); this.cmdExport.Hint = "Export coutner library to file"; this.cmdExport.Id = 28; this.cmdExport.ItemShortcut = new DevExpress.XtraBars.BarShortcut((System.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.E)); this.cmdExport.Name = "cmdExport"; this.cmdExport.ItemClick += new DevExpress.XtraBars.ItemClickEventHandler(this.cmdExport_ItemClick); // // barButtonGroup3 // this.barButtonGroup3.Caption = "barButtonGroup3"; this.barButtonGroup3.Id = 29; this.barButtonGroup3.Name = "barButtonGroup3"; // // barButtonGroup4 // this.barButtonGroup4.Caption = "View ptions"; this.barButtonGroup4.Id = 30; this.barButtonGroup4.ItemLinks.Add(this.chkLegend); this.barButtonGroup4.ItemLinks.Add(this.chkShowToolbar); this.barButtonGroup4.Name = "barButtonGroup4"; // // barButtonGroup5 // this.barButtonGroup5.Caption = "barButtonGroup5"; this.barButtonGroup5.Id = 31; this.barButtonGroup5.ItemLinks.Add(this.chkShowHGrid); this.barButtonGroup5.ItemLinks.Add(this.chkShowVGrid); this.barButtonGroup5.Name = "barButtonGroup5"; // // barButtonItem2 // this.barButtonItem2.Caption = "Team Agile"; this.barButtonItem2.Glyph = ((System.Drawing.Image)(resources.GetObject("barButtonItem2.Glyph"))); this.barButtonItem2.Id = 32; this.barButtonItem2.Name = "barButtonItem2"; this.barButtonItem2.ItemClick += new DevExpress.XtraBars.ItemClickEventHandler(this.barButtonItem2_ItemClick); // // barButtonItem3 // this.barButtonItem3.Caption = "Other Tools from Roy"; this.barButtonItem3.Glyph = ((System.Drawing.Image)(resources.GetObject("barButtonItem3.Glyph"))); this.barButtonItem3.Id = 33; this.barButtonItem3.Name = "barButtonItem3"; this.barButtonItem3.ItemClick += new DevExpress.XtraBars.ItemClickEventHandler(this.barButtonItem3_ItemClick_1); // // barButtonItem4 // this.barButtonItem4.Caption = "Roy\'s Blog"; this.barButtonItem4.Id = 34; this.barButtonItem4.LargeGlyph = ((System.Drawing.Image)(resources.GetObject("barButtonItem4.LargeGlyph"))); this.barButtonItem4.Name = "barButtonItem4"; this.barButtonItem4.ItemClick += new DevExpress.XtraBars.ItemClickEventHandler(this.barButtonItem4_ItemClick); // // barButtonItem5 // this.barButtonItem5.Caption = "Bug/ Feature request"; this.barButtonItem5.Glyph = ((System.Drawing.Image)(resources.GetObject("barButtonItem5.Glyph"))); this.barButtonItem5.Id = 35; this.barButtonItem5.Name = "barButtonItem5"; this.barButtonItem5.ItemClick += new DevExpress.XtraBars.ItemClickEventHandler(this.barButtonItem5_ItemClick); // // barButtonItem6 // this.barButtonItem6.Caption = "Email the author"; this.barButtonItem6.Glyph = ((System.Drawing.Image)(resources.GetObject("barButtonItem6.Glyph"))); this.barButtonItem6.Id = 36; this.barButtonItem6.Name = "barButtonItem6"; this.barButtonItem6.ItemClick += new DevExpress.XtraBars.ItemClickEventHandler(this.barButtonItem6_ItemClick); // // barButtonItem7 // this.barButtonItem7.Caption = "barButtonItem7"; this.barButtonItem7.Id = 37; this.barButtonItem7.Name = "barButtonItem7"; // // lblVersionCaption // this.lblVersionCaption.Caption = "Version:"; this.lblVersionCaption.Id = 38; this.lblVersionCaption.Name = "lblVersionCaption"; this.lblVersionCaption.TextAlignment = System.Drawing.StringAlignment.Near; // // lblVersion // this.lblVersion.Caption = " 1.0 "; this.lblVersion.Id = 39; this.lblVersion.Name = "lblVersion"; this.lblVersion.TextAlignment = System.Drawing.StringAlignment.Near; // // cmdCloseTab // this.cmdCloseTab.Caption = "&Close"; this.cmdCloseTab.Id = 40; this.cmdCloseTab.Name = "cmdCloseTab"; // // cmdSetInstanceName // this.cmdSetInstanceName.Caption = "Set Target Application Instance"; this.cmdSetInstanceName.Glyph = ((System.Drawing.Image)(resources.GetObject("cmdSetInstanceName.Glyph"))); this.cmdSetInstanceName.Hint = "Set the counter(s) target application instance"; this.cmdSetInstanceName.Id = 41; this.cmdSetInstanceName.ItemShortcut = new DevExpress.XtraBars.BarShortcut((System.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.T)); this.cmdSetInstanceName.Name = "cmdSetInstanceName"; this.cmdSetInstanceName.ItemClick += new DevExpress.XtraBars.ItemClickEventHandler(this.cmdSetInstanceName_ItemClick); // // ribPageGeneral // this.ribPageGeneral.Groups.AddRange(new DevExpress.XtraBars.Ribbon.RibbonPageGroup[] { this.ribbonPageGroup1, this.ribbonPageGroup2, this.ribbonPageGroup4, this.ribbonPageGroup16}); this.ribPageGeneral.Name = "ribPageGeneral"; this.ribPageGeneral.Text = "General"; // // ribbonPageGroup1 // this.ribbonPageGroup1.ItemLinks.Add(this.barButtonItem1); this.ribbonPageGroup1.Name = "ribbonPageGroup1"; this.ribbonPageGroup1.ShowCaptionButton = false; this.ribbonPageGroup1.Text = "Program"; // // ribbonPageGroup2 // this.ribbonPageGroup2.ItemLinks.Add(this.cmdNewTab); this.ribbonPageGroup2.ItemLinks.Add(this.cmdRenameTab); this.ribbonPageGroup2.Name = "ribbonPageGroup2"; this.ribbonPageGroup2.ShowCaptionButton = false; this.ribbonPageGroup2.Text = "Tabs"; // // ribbonPageGroup4 // this.ribbonPageGroup4.ItemLinks.Add(this.chkPanelCounters); this.ribbonPageGroup4.Name = "ribbonPageGroup4"; this.ribbonPageGroup4.Text = "Panels"; // // ribbonPageGroup16 // this.ribbonPageGroup16.ItemLinks.Add(this.cmdImport); this.ribbonPageGroup16.ItemLinks.Add(this.cmdExport); this.ribbonPageGroup16.Name = "ribbonPageGroup16"; this.ribbonPageGroup16.Text = "Share"; // // ribPageActiveMonitor // this.ribPageActiveMonitor.Groups.AddRange(new DevExpress.XtraBars.Ribbon.RibbonPageGroup[] { this.ribbonPageGroup5, this.ribbonPageGroup6, this.ribbonPageGroup3, this.ribbonPageGroup15}); this.ribPageActiveMonitor.Name = "ribPageActiveMonitor"; this.ribPageActiveMonitor.Text = "Active Monitor"; // // ribbonPageGroup5 // this.ribbonPageGroup5.ItemLinks.Add(this.cmdScaleUp); this.ribbonPageGroup5.ItemLinks.Add(this.cmdScaleDown); this.ribbonPageGroup5.Name = "ribbonPageGroup5"; this.ribbonPageGroup5.Text = "Active Counter"; // // ribbonPageGroup6 // this.ribbonPageGroup6.ItemLinks.Add(this.cmdAddCounters, true); this.ribbonPageGroup6.ItemLinks.Add(this.cmdRenameTab); this.ribbonPageGroup6.ItemLinks.Add(this.cmdNewTab); this.ribbonPageGroup6.Name = "ribbonPageGroup6"; this.ribbonPageGroup6.Text = "Monitor"; // // ribbonPageGroup3 // this.ribbonPageGroup3.ItemLinks.Add(this.barButtonGroup4); this.ribbonPageGroup3.ItemLinks.Add(this.barButtonGroup5); this.ribbonPageGroup3.ItemLinks.Add(this.chkTextReport); this.ribbonPageGroup3.Name = "ribbonPageGroup3"; this.ribbonPageGroup3.Text = "Toggle Visible"; // // ribbonPageGroup15 // this.ribbonPageGroup15.ItemLinks.Add(this.cmdCreateFolderFromActiveMonitor); this.ribbonPageGroup15.ItemLinks.Add(this.cmdSaveCountersToCurrentFolder); this.ribbonPageGroup15.Name = "ribbonPageGroup15"; this.ribbonPageGroup15.Text = "Library"; // // ribPageLibFolder // this.ribPageLibFolder.Groups.AddRange(new DevExpress.XtraBars.Ribbon.RibbonPageGroup[] { this.ribbonPageGroup7, this.ribbonPageGroup12, this.ribbonPageGroup10, this.ribbonPageGroup11}); this.ribPageLibFolder.Name = "ribPageLibFolder"; this.ribPageLibFolder.Text = "Library Folder"; // // ribbonPageGroup7 // this.ribbonPageGroup7.ItemLinks.Add(this.cmdCreateRootNode, true); this.ribbonPageGroup7.ItemLinks.Add(this.cmdCreateChildNode); this.ribbonPageGroup7.ItemLinks.Add(this.cmdRemoveNode, true); this.ribbonPageGroup7.ItemLinks.Add(this.cmdRenameFolder); this.ribbonPageGroup7.Name = "ribbonPageGroup7"; this.ribbonPageGroup7.Text = "Folders"; // // ribbonPageGroup12 // this.ribbonPageGroup12.ItemLinks.Add(this.cmdAddNodeToNewTab); this.ribbonPageGroup12.ItemLinks.Add(this.barButtonItem13); this.ribbonPageGroup12.Name = "ribbonPageGroup12"; this.ribbonPageGroup12.Text = "Monitor"; // // ribbonPageGroup10 // this.ribbonPageGroup10.ItemLinks.Add(this.cmdCreateFolderFromActiveMonitor); this.ribbonPageGroup10.ItemLinks.Add(this.cmdSaveCountersToCurrentFolder); this.ribbonPageGroup10.Name = "ribbonPageGroup10"; this.ribbonPageGroup10.Text = "Import"; // // ribbonPageGroup11 // this.ribbonPageGroup11.ItemLinks.Add(this.cmdSetCounterMachineNames); this.ribbonPageGroup11.ItemLinks.Add(this.cmdSetInstanceName); this.ribbonPageGroup11.Name = "ribbonPageGroup11"; this.ribbonPageGroup11.Text = "Current Folder\\Counter"; // // ribPageLibCounter // this.ribPageLibCounter.Groups.AddRange(new DevExpress.XtraBars.Ribbon.RibbonPageGroup[] { this.ribbonPageGroup13, this.ribbonPageGroup14}); this.ribPageLibCounter.Name = "ribPageLibCounter"; this.ribPageLibCounter.Text = "Library Counter"; // // ribbonPageGroup13 // this.ribbonPageGroup13.ItemLinks.Add(this.cmdSetCounterMachineNames); this.ribbonPageGroup13.Name = "ribbonPageGroup13"; this.ribbonPageGroup13.Text = "Modify Counter"; // // ribbonPageGroup14 // this.ribbonPageGroup14.ItemLinks.Add(this.cmdAddNodeToNewTab); this.ribbonPageGroup14.ItemLinks.Add(this.barButtonItem13); this.ribbonPageGroup14.Name = "ribbonPageGroup14"; this.ribbonPageGroup14.Text = "Monitor"; // // ribbonPage1 // this.ribbonPage1.Groups.AddRange(new DevExpress.XtraBars.Ribbon.RibbonPageGroup[] { this.ribbonPageGroup17, this.ribbonPageGroup18, this.ribbonPageGroup19, this.ribbonPageGroup20}); this.ribbonPage1.Name = "ribbonPage1"; this.ribbonPage1.Text = "Help"; // // ribbonPageGroup17 // this.ribbonPageGroup17.ItemLinks.Add(this.lblVersionCaption); this.ribbonPageGroup17.ItemLinks.Add(this.lblVersion); this.ribbonPageGroup17.Name = "ribbonPageGroup17"; this.ribbonPageGroup17.Text = "About"; // // ribbonPageGroup18 // this.ribbonPageGroup18.ItemLinks.Add(this.barButtonItem2); this.ribbonPageGroup18.ItemLinks.Add(this.barButtonItem3); this.ribbonPageGroup18.ItemLinks.Add(this.barButtonItem4, true); this.ribbonPageGroup18.Name = "ribbonPageGroup18"; this.ribbonPageGroup18.Text = "Other Sites"; // // ribbonPageGroup19 // this.ribbonPageGroup19.ItemLinks.Add(this.barButtonItem5); this.ribbonPageGroup19.ItemLinks.Add(this.barButtonItem6); this.ribbonPageGroup19.Name = "ribbonPageGroup19"; this.ribbonPageGroup19.Text = "Support"; // // ribbonPageGroup20 // this.ribbonPageGroup20.Name = "ribbonPageGroup20"; this.ribbonPageGroup20.Text = "Videos"; // // ribbonStatusBar1 // this.ribbonStatusBar1.ItemLinks.Add(this.barStaticItem2); this.ribbonStatusBar1.ItemLinks.Add(this.cmdScaleUp); this.ribbonStatusBar1.ItemLinks.Add(this.cmdScaleDown); this.ribbonStatusBar1.Location = new System.Drawing.Point(0, 470); this.ribbonStatusBar1.Name = "ribbonStatusBar1"; this.ribbonStatusBar1.Ribbon = this.ribbonMain; this.ribbonStatusBar1.Size = new System.Drawing.Size(712, 24); // // ribbonPageGroup8 // this.ribbonPageGroup8.ItemLinks.Add(this.barStaticItem1); this.ribbonPageGroup8.Name = "ribbonPageGroup8"; this.ribbonPageGroup8.Text = "Description"; // // ribbonPageGroup9 // this.ribbonPageGroup9.ItemLinks.Add(this.barStaticItem1); this.ribbonPageGroup9.Name = "ribbonPageGroup9"; this.ribbonPageGroup9.Text = "Description"; // // popupMenu1 // this.popupMenu1.Name = "popupMenu1"; this.popupMenu1.Ribbon = this.ribbonMain; // // popupMenu2 // this.popupMenu2.Name = "popupMenu2"; this.popupMenu2.Ribbon = this.ribbonMain; // // popupMenu3 // this.popupMenu3.ItemLinks.Add(this.cmdRenameTab); this.popupMenu3.ItemLinks.Add(this.cmdCloseTab); this.popupMenu3.Name = "popupMenu3"; this.popupMenu3.Ribbon = this.ribbonMain; // // toolTipController1 // this.toolTipController1.Rounded = true; this.toolTipController1.ShowBeak = true; // // MainForm // this.AutoScaleBaseSize = new System.Drawing.Size(5, 13); this.ClientSize = new System.Drawing.Size(712, 494); this.Controls.Add(this.pnlCountersTree); this.Controls.Add(this.ribbonMain); this.Controls.Add(this.ribbonStatusBar1); this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon"))); this.IsMdiContainer = true; this.Name = "MainForm"; this.Text = "Perf+ (Alpha - Expires February 2007)"; this.Load += new System.EventHandler(this.MainForm_Load); ((System.ComponentModel.ISupportInitialize)(this.barDockMgr)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.dockMgr)).EndInit(); this.pnlCountersTree.ResumeLayout(false); ((System.ComponentModel.ISupportInitialize)(this.lsttopToolbarImages)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.tabsMgr)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.imgRibbon)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.popupMenu1)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.popupMenu2)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.popupMenu3)).EndInit(); this.ResumeLayout(false); }
public void FireFocusBarArrived(Bar bar) { if (FocusBarArrived != null) FocusBarArrived(bar); }
private void OnComponentRemoving(object sender,ComponentEventArgs e) { if(e.Component!=this.Component) { return; } // Unhook events IComponentChangeService cc=(IComponentChangeService)GetService(typeof(IComponentChangeService)); if(cc!=null) cc.ComponentRemoving-=new ComponentEventHandler(this.OnComponentRemoving); DotNetBarManager m=this.Component as DotNetBarManager; IDesignerHost dh=(IDesignerHost)GetService(typeof(IDesignerHost)); if(dh==null || m==null) return; // Destroy bars Bar[] bars = new Bar[m.Bars.Count]; m.Bars.CopyTo(bars); foreach (Bar bar in bars) dh.DestroyComponent(bar); if (m.TopDockSite != null) { DockSiteDesigner designer = dh.GetDesigner(m.TopDockSite) as DockSiteDesigner; if (designer != null) designer.DotNetBarManagerRemoving = true; dh.DestroyComponent(m.TopDockSite); } if (m.BottomDockSite != null) { DockSiteDesigner designer = dh.GetDesigner(m.BottomDockSite) as DockSiteDesigner; if (designer != null) designer.DotNetBarManagerRemoving = true; dh.DestroyComponent(m.BottomDockSite); } if (m.LeftDockSite != null) { DockSiteDesigner designer = dh.GetDesigner(m.LeftDockSite) as DockSiteDesigner; if (designer != null) designer.DotNetBarManagerRemoving = true; dh.DestroyComponent(m.LeftDockSite); } if (m.RightDockSite != null) { DockSiteDesigner designer = dh.GetDesigner(m.RightDockSite) as DockSiteDesigner; if (designer != null) designer.DotNetBarManagerRemoving = true; dh.DestroyComponent(m.RightDockSite); } if (m.FillDockSite != null) { DockSiteDesigner designer = dh.GetDesigner(m.FillDockSite) as DockSiteDesigner; if (designer != null) designer.DotNetBarManagerRemoving = true; dh.DestroyComponent(m.FillDockSite); } if (m.ToolbarTopDockSite != null) { DockSiteDesigner designer = dh.GetDesigner(m.ToolbarTopDockSite) as DockSiteDesigner; if (designer != null) designer.DotNetBarManagerRemoving = true; dh.DestroyComponent(m.ToolbarTopDockSite); } if (m.ToolbarBottomDockSite != null) { DockSiteDesigner designer = dh.GetDesigner(m.ToolbarBottomDockSite) as DockSiteDesigner; if (designer != null) designer.DotNetBarManagerRemoving = true; dh.DestroyComponent(m.ToolbarBottomDockSite); } if (m.ToolbarLeftDockSite != null) { DockSiteDesigner designer = dh.GetDesigner(m.ToolbarLeftDockSite) as DockSiteDesigner; if (designer != null) designer.DotNetBarManagerRemoving = true; dh.DestroyComponent(m.ToolbarLeftDockSite); } if (m.ToolbarRightDockSite != null) { DockSiteDesigner designer = dh.GetDesigner(m.ToolbarRightDockSite) as DockSiteDesigner; if (designer != null) designer.DotNetBarManagerRemoving = true; dh.DestroyComponent(m.ToolbarRightDockSite); } if(m.DefinitionName!=null) { //DesignTimeDte.DeleteFromProject(m.DefinitionName, this.Component.Site); m.DefinitionName=""; } //// Remove Command links if any //if (m.CommandLinks.Count > 0) //{ // CommandLink[] links = new CommandLink[m.CommandLinks.Count]; // m.CommandLinks.CopyTo(links); // foreach (CommandLink link in links) // { // dh.DestroyComponent(link); // } //} }