Example #1
0
		private SharpClient.UI.Controls.TabControl AddPanelContents(string ContentTitle,int imageListIndex,SharpClient.UI.Docking.State _dockstate,bool bShow)
		{
			SharpClient.UI.Controls.TabControl stackTabControl=null;
			Content cStack=null;
			if(_stackManager==null)
			{
				_stackManager=new DockingManager(this,SharpClient.UI.Common.VisualStyle.IDE);
				_stackManager.InnerControl=sharpClientMDITab;
				_stackManager.OuterControl= psStatusBar;	
			}

			if(_stackManager.Contents[ContentTitle]==null)
			{
				stackTabControl=new SharpClient.UI.Controls.TabControl();				
				stackTabControl.Appearance = SharpClient.UI.Controls.TabControl.VisualAppearance.MultiDocument;
				stackTabControl.BackColor = System.Drawing.SystemColors.ActiveCaptionText;
				stackTabControl.ButtonActiveColor = System.Drawing.SystemColors.ActiveCaptionText;
				stackTabControl.ButtonInactiveColor = System.Drawing.SystemColors.InactiveCaptionText;
				stackTabControl.Dock = System.Windows.Forms.DockStyle.Fill;
				stackTabControl.Font = new System.Drawing.Font("Arial", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((System.Byte)(0)));
				stackTabControl.HideTabsMode = SharpClient.UI.Controls.TabControl.HideTabsModes.ShowAlways;
				stackTabControl.HotTextColor = System.Drawing.SystemColors.Desktop;
				stackTabControl.IDEPixelBorder = false;
				stackTabControl.Location = new System.Drawing.Point(0, 31);				
				stackTabControl.Size = new System.Drawing.Size(790, 484);			
				stackTabControl.ClosePressed+=new EventHandler(stackTabControl_ClosePressed); 
				cStack=_stackManager.Contents.Add(stackTabControl,ContentTitle,imageList1,imageListIndex );								
				_stackManager.AddContentWithState(cStack,_dockstate);
								
			}
			else
			{
				cStack=_stackManager.Contents[ContentTitle];
				stackTabControl=cStack.Control as SharpClient.UI.Controls.TabControl;
			}

			ShowStackControl(bShow,cStack);	
			return stackTabControl;
		}
Example #2
0
		/// <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(SharpClientForm));
			this.psStatusBar = new System.Windows.Forms.StatusBar();
			this.panelSharpClientStatus = new System.Windows.Forms.StatusBarPanel();
			this.psToolBar = new System.Windows.Forms.ToolBar();
			this.newSession = new System.Windows.Forms.ToolBarButton();
			this.newContextMenu = new System.Windows.Forms.ContextMenu();
			this.menuItem7 = new System.Windows.Forms.MenuItem();
			this.menuItem8 = new System.Windows.Forms.MenuItem();
			this.menuItem17 = new System.Windows.Forms.MenuItem();
			this.menuItem18 = new System.Windows.Forms.MenuItem();
			this.menuItem19 = new System.Windows.Forms.MenuItem();
			this.openSession = new System.Windows.Forms.ToolBarButton();
			this.openContextMenu = new System.Windows.Forms.ContextMenu();
			this.menuItem5 = new System.Windows.Forms.MenuItem();
			this.menuItem6 = new System.Windows.Forms.MenuItem();
			this.menuItem11 = new System.Windows.Forms.MenuItem();
			this.openProfilerOptions = new System.Windows.Forms.ToolBarButton();
			this.toggleSettings = new System.Windows.Forms.ToolBarButton();
			this.createGraph = new System.Windows.Forms.ToolBarButton();
			this.webPrintPreview = new System.Windows.Forms.ToolBarButton();
			this.codePreview = new System.Windows.Forms.ToolBarButton();
			this.imageList1 = new System.Windows.Forms.ImageList(this.components);
			this.psMainMenu = new System.Windows.Forms.MainMenu();
			this.menuFile = new System.Windows.Forms.MenuItem();
			this.menuNew = new System.Windows.Forms.MenuItem();
			this.menuItem12 = new System.Windows.Forms.MenuItem();
			this.menuItem13 = new System.Windows.Forms.MenuItem();
			this.menuItem14 = new System.Windows.Forms.MenuItem();
			this.menuItem15 = new System.Windows.Forms.MenuItem();
			this.menuItem16 = new System.Windows.Forms.MenuItem();
			this.menuOpen = new System.Windows.Forms.MenuItem();
			this.menuOpen_MemAnalysis = new System.Windows.Forms.MenuItem();
			this.menuOpen_PerfAnalysis = new System.Windows.Forms.MenuItem();
			this.menuOpen_CompareAnalysis = new System.Windows.Forms.MenuItem();
			this.menuExport = new System.Windows.Forms.MenuItem();
			this.menuExport_XML = new System.Windows.Forms.MenuItem();
			this.menuExport_CSV = new System.Windows.Forms.MenuItem();
			this.menuClose = new System.Windows.Forms.MenuItem();
			this.menuItem4 = new System.Windows.Forms.MenuItem();
			this.menuExit = new System.Windows.Forms.MenuItem();
			this.menuView = new System.Windows.Forms.MenuItem();
			this.menuProfilerOptions = new System.Windows.Forms.MenuItem();
			this.menuGraph = new System.Windows.Forms.MenuItem();
			this.menuPrintPreview = new System.Windows.Forms.MenuItem();
			this.menuWebPreview = new System.Windows.Forms.MenuItem();
			this.menuItem1 = new System.Windows.Forms.MenuItem();
			this.menuItem9 = new System.Windows.Forms.MenuItem();
			this.menuItem2 = new System.Windows.Forms.MenuItem();
			this.menuItem10 = new System.Windows.Forms.MenuItem();
			this.menuCustomization = new System.Windows.Forms.MenuItem();
			this.menuItem3 = new System.Windows.Forms.MenuItem();
			this.menuAbout = new System.Windows.Forms.MenuItem();
			this.openProfilerSession = new System.Windows.Forms.OpenFileDialog();
			this.imageList2 = new System.Windows.Forms.ImageList(this.components);
			this.sharpClientMDITab = new SharpClient.UI.Controls.TabControl();
			((System.ComponentModel.ISupportInitialize)(this.panelSharpClientStatus)).BeginInit();
			this.SuspendLayout();
			// 
			// psStatusBar
			// 
			this.psStatusBar.Font = new System.Drawing.Font("Microsoft Sans Serif", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((System.Byte)(0)));
			this.psStatusBar.Location = new System.Drawing.Point(0, 511);
			this.psStatusBar.Name = "psStatusBar";
			this.psStatusBar.Panels.AddRange(new System.Windows.Forms.StatusBarPanel[] {
																						   this.panelSharpClientStatus});
			this.psStatusBar.ShowPanels = true;
			this.psStatusBar.Size = new System.Drawing.Size(790, 20);
			this.psStatusBar.TabIndex = 1;
			// 
			// panelSharpClientStatus
			// 
			this.panelSharpClientStatus.AutoSize = System.Windows.Forms.StatusBarPanelAutoSize.Contents;
			this.panelSharpClientStatus.Width = 10;
			// 
			// psToolBar
			// 
			this.psToolBar.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
			this.psToolBar.Buttons.AddRange(new System.Windows.Forms.ToolBarButton[] {
																						 this.newSession,
																						 this.openSession,
																						 this.openProfilerOptions,
																						 this.toggleSettings,
																						 this.createGraph,
																						 this.webPrintPreview,
																						 this.codePreview});
			this.psToolBar.ButtonSize = new System.Drawing.Size(24, 24);
			this.psToolBar.DropDownArrows = true;
			this.psToolBar.ImageList = this.imageList1;
			this.psToolBar.Location = new System.Drawing.Point(0, 0);
			this.psToolBar.Name = "psToolBar";
			this.psToolBar.ShowToolTips = true;
			this.psToolBar.Size = new System.Drawing.Size(790, 37);
			this.psToolBar.TabIndex = 2;
			this.psToolBar.ButtonClick += new System.Windows.Forms.ToolBarButtonClickEventHandler(this.psToolBar_ButtonClick);
			// 
			// newSession
			// 
			this.newSession.DropDownMenu = this.newContextMenu;
			this.newSession.ImageIndex = 0;
			this.newSession.Style = System.Windows.Forms.ToolBarButtonStyle.DropDownButton;
			this.newSession.Text = "NS";
			this.newSession.ToolTipText = "Start New Profiling Session.";
			// 
			// newContextMenu
			// 
			this.newContextMenu.MenuItems.AddRange(new System.Windows.Forms.MenuItem[] {
																						   this.menuItem7,
																						   this.menuItem8,
																						   this.menuItem17,
																						   this.menuItem18,
																						   this.menuItem19});
			// 
			// menuItem7
			// 
			this.menuItem7.Index = 0;
			this.menuItem7.Text = "Desktop Application..";
			this.menuItem7.Click += new System.EventHandler(this.menuItem12_Click);
			// 
			// menuItem8
			// 
			this.menuItem8.Index = 1;
			this.menuItem8.Text = "Windows Service..";
			this.menuItem8.Click += new System.EventHandler(this.menuItem13_Click);
			// 
			// menuItem17
			// 
			this.menuItem17.Index = 2;
			this.menuItem17.Text = "COM+ Application..";
			this.menuItem17.Click += new System.EventHandler(this.menuItem13_Click);
			// 
			// menuItem18
			// 
			this.menuItem18.Index = 3;
			this.menuItem18.Text = "ASP.NET..";
			this.menuItem18.Click += new System.EventHandler(this.menuItem13_Click);
			// 
			// menuItem19
			// 
			this.menuItem19.Index = 4;
			this.menuItem19.Text = "Any .NET Process";
			this.menuItem19.Click += new System.EventHandler(this.menuItem13_Click);
			// 
			// openSession
			// 
			this.openSession.DropDownMenu = this.openContextMenu;
			this.openSession.ImageIndex = 1;
			this.openSession.Style = System.Windows.Forms.ToolBarButtonStyle.DropDownButton;
			this.openSession.Text = "OS";
			this.openSession.ToolTipText = "Open Profiling Results.";
			// 
			// openContextMenu
			// 
			this.openContextMenu.MenuItems.AddRange(new System.Windows.Forms.MenuItem[] {
																							this.menuItem5,
																							this.menuItem6,
																							this.menuItem11});
			// 
			// menuItem5
			// 
			this.menuItem5.Index = 0;
			this.menuItem5.Text = "Memory Profiling Results..";
			this.menuItem5.Click += new System.EventHandler(this.menuOpen_MemAnalysis_Click);
			// 
			// menuItem6
			// 
			this.menuItem6.Index = 1;
			this.menuItem6.Text = "Performance Profiling Results..";
			this.menuItem6.Click += new System.EventHandler(this.menuOpen_PerfAnalysis_Click);
			// 
			// menuItem11
			// 
			this.menuItem11.Index = 2;
			this.menuItem11.Text = "Memory Comparison Results..";
			this.menuItem11.Click += new System.EventHandler(this.menuOpen_CompareAnalysis_Click);
			// 
			// openProfilerOptions
			// 
			this.openProfilerOptions.ImageIndex = 12;
			this.openProfilerOptions.Text = "OPO";
			this.openProfilerOptions.ToolTipText = "Show Profiler Options";
			// 
			// toggleSettings
			// 
			this.toggleSettings.Enabled = false;
			this.toggleSettings.ImageIndex = 2;
			this.toggleSettings.Text = "TS";
			this.toggleSettings.ToolTipText = "Hide/Show Settings";
			// 
			// createGraph
			// 
			this.createGraph.Enabled = false;
			this.createGraph.ImageIndex = 3;
			this.createGraph.Text = "CG";
			this.createGraph.ToolTipText = "Create Graph";
			// 
			// webPrintPreview
			// 
			this.webPrintPreview.Enabled = false;
			this.webPrintPreview.ImageIndex = 5;
			this.webPrintPreview.Text = "WP";
			this.webPrintPreview.ToolTipText = "Web/Print Preview";
			// 
			// codePreview
			// 
			this.codePreview.Enabled = false;
			this.codePreview.ImageIndex = 4;
			this.codePreview.Text = "CP";
			this.codePreview.ToolTipText = "Hide/Show Source Code";
			// 
			// imageList1
			// 
			this.imageList1.ColorDepth = System.Windows.Forms.ColorDepth.Depth16Bit;
			this.imageList1.ImageSize = new System.Drawing.Size(24, 24);
			this.imageList1.ImageStream = ((System.Windows.Forms.ImageListStreamer)(resources.GetObject("imageList1.ImageStream")));
			this.imageList1.TransparentColor = System.Drawing.Color.Transparent;
			// 
			// psMainMenu
			// 
			this.psMainMenu.MenuItems.AddRange(new System.Windows.Forms.MenuItem[] {
																					   this.menuFile,
																					   this.menuView,
																					   this.menuItem1});
			// 
			// menuFile
			// 
			this.menuFile.Index = 0;
			this.menuFile.MenuItems.AddRange(new System.Windows.Forms.MenuItem[] {
																					 this.menuNew,
																					 this.menuOpen,
																					 this.menuExport,
																					 this.menuClose,
																					 this.menuItem4,
																					 this.menuExit});
			this.menuFile.Text = "File";
			// 
			// menuNew
			// 
			this.menuNew.Index = 0;
			this.menuNew.MenuItems.AddRange(new System.Windows.Forms.MenuItem[] {
																					this.menuItem12,
																					this.menuItem13,
																					this.menuItem14,
																					this.menuItem15,
																					this.menuItem16});
			this.menuNew.Shortcut = System.Windows.Forms.Shortcut.CtrlP;
			this.menuNew.Text = "Profile                    ";
			// 
			// menuItem12
			// 
			this.menuItem12.Index = 0;
			this.menuItem12.Text = "Desktop Application..";
			this.menuItem12.Click += new System.EventHandler(this.menuItem12_Click);
			// 
			// menuItem13
			// 
			this.menuItem13.Index = 1;
			this.menuItem13.Text = "Windows Service..";
			this.menuItem13.Click += new System.EventHandler(this.menuItem13_Click);
			// 
			// menuItem14
			// 
			this.menuItem14.Index = 2;
			this.menuItem14.Text = "COM+ Application..";
			this.menuItem14.Click += new System.EventHandler(this.menuItem13_Click);
			// 
			// menuItem15
			// 
			this.menuItem15.Index = 3;
			this.menuItem15.Text = "ASP.NET..";
			this.menuItem15.Click += new System.EventHandler(this.menuItem13_Click);
			// 
			// menuItem16
			// 
			this.menuItem16.Index = 4;
			this.menuItem16.Text = "Any .NET Process..";
			this.menuItem16.Click += new System.EventHandler(this.menuItem13_Click);
			// 
			// menuOpen
			// 
			this.menuOpen.Index = 1;
			this.menuOpen.MenuItems.AddRange(new System.Windows.Forms.MenuItem[] {
																					 this.menuOpen_MemAnalysis,
																					 this.menuOpen_PerfAnalysis,
																					 this.menuOpen_CompareAnalysis});
			this.menuOpen.Text = "Open";
			// 
			// menuOpen_MemAnalysis
			// 
			this.menuOpen_MemAnalysis.Index = 0;
			this.menuOpen_MemAnalysis.Shortcut = System.Windows.Forms.Shortcut.CtrlShiftM;
			this.menuOpen_MemAnalysis.Text = "Memory Profiling Results..";
			this.menuOpen_MemAnalysis.Click += new System.EventHandler(this.menuOpen_MemAnalysis_Click);
			// 
			// menuOpen_PerfAnalysis
			// 
			this.menuOpen_PerfAnalysis.Index = 1;
			this.menuOpen_PerfAnalysis.Shortcut = System.Windows.Forms.Shortcut.CtrlShiftP;
			this.menuOpen_PerfAnalysis.Text = "Performance Profiling Results..";
			this.menuOpen_PerfAnalysis.Click += new System.EventHandler(this.menuOpen_PerfAnalysis_Click);
			// 
			// menuOpen_CompareAnalysis
			// 
			this.menuOpen_CompareAnalysis.Index = 2;
			this.menuOpen_CompareAnalysis.Shortcut = System.Windows.Forms.Shortcut.CtrlShiftC;
			this.menuOpen_CompareAnalysis.Text = "Memory Comparison Results..";
			this.menuOpen_CompareAnalysis.Click += new System.EventHandler(this.menuOpen_CompareAnalysis_Click);
			// 
			// menuExport
			// 
			this.menuExport.Index = 2;
			this.menuExport.MenuItems.AddRange(new System.Windows.Forms.MenuItem[] {
																					   this.menuExport_XML,
																					   this.menuExport_CSV});
			this.menuExport.Text = "Export";
			// 
			// menuExport_XML
			// 
			this.menuExport_XML.Enabled = false;
			this.menuExport_XML.Index = 0;
			this.menuExport_XML.Shortcut = System.Windows.Forms.Shortcut.CtrlShiftX;
			this.menuExport_XML.Text = "Export as XML..";
			this.menuExport_XML.Click += new System.EventHandler(this.menuItem_Click);
			// 
			// menuExport_CSV
			// 
			this.menuExport_CSV.Enabled = false;
			this.menuExport_CSV.Index = 1;
			this.menuExport_CSV.Shortcut = System.Windows.Forms.Shortcut.CtrlShiftV;
			this.menuExport_CSV.Text = "Export as CSV..";
			this.menuExport_CSV.Click += new System.EventHandler(this.menuItem_Click);
			// 
			// menuClose
			// 
			this.menuClose.Index = 3;
			this.menuClose.Shortcut = System.Windows.Forms.Shortcut.CtrlF4;
			this.menuClose.Text = "Close";
			this.menuClose.Click += new System.EventHandler(this.menuClose_Click);
			// 
			// menuItem4
			// 
			this.menuItem4.Index = 4;
			this.menuItem4.Text = "-";
			// 
			// menuExit
			// 
			this.menuExit.Index = 5;
			this.menuExit.Text = "Exit";
			this.menuExit.Click += new System.EventHandler(this.menuExit_Click);
			// 
			// menuView
			// 
			this.menuView.Index = 1;
			this.menuView.MenuItems.AddRange(new System.Windows.Forms.MenuItem[] {
																					 this.menuProfilerOptions,
																					 this.menuGraph,
																					 this.menuPrintPreview,
																					 this.menuWebPreview});
			this.menuView.Text = "View";
			// 
			// menuProfilerOptions
			// 
			this.menuProfilerOptions.Index = 0;
			this.menuProfilerOptions.Shortcut = System.Windows.Forms.Shortcut.CtrlO;
			this.menuProfilerOptions.Text = "Profiler Options";
			this.menuProfilerOptions.Click += new System.EventHandler(this.menuProfilerOptions_Click);
			// 
			// menuGraph
			// 
			this.menuGraph.Enabled = false;
			this.menuGraph.Index = 1;
			this.menuGraph.Shortcut = System.Windows.Forms.Shortcut.CtrlG;
			this.menuGraph.Text = "Graph..";
			this.menuGraph.Click += new System.EventHandler(this.menuItem_Click);
			// 
			// menuPrintPreview
			// 
			this.menuPrintPreview.Enabled = false;
			this.menuPrintPreview.Index = 2;
			this.menuPrintPreview.Shortcut = System.Windows.Forms.Shortcut.CtrlW;
			this.menuPrintPreview.Text = "Print Preview";
			this.menuPrintPreview.Click += new System.EventHandler(this.menuItem_Click);
			// 
			// menuWebPreview
			// 
			this.menuWebPreview.Enabled = false;
			this.menuWebPreview.Index = 3;
			this.menuWebPreview.Text = "Web Preview";
			this.menuWebPreview.Click += new System.EventHandler(this.menuItem_Click);
			// 
			// menuItem1
			// 
			this.menuItem1.Index = 2;
			this.menuItem1.MenuItems.AddRange(new System.Windows.Forms.MenuItem[] {
																					  this.menuItem9,
																					  this.menuItem2,
																					  this.menuItem10,
																					  this.menuCustomization,
																					  this.menuItem3,
																					  this.menuAbout});
			this.menuItem1.Text = "Help";
			// 
			// menuItem9
			// 
			this.menuItem9.Index = 0;
			this.menuItem9.Text = "Contact..";
			this.menuItem9.Click += new System.EventHandler(this.menuItem9_Click);
			// 
			// menuItem2
			// 
			this.menuItem2.Index = 1;
			this.menuItem2.Shortcut = System.Windows.Forms.Shortcut.F1;
			this.menuItem2.Text = "Product Documentation..";
			this.menuItem2.Click += new System.EventHandler(this.menuItem2_Click);
			// 
			// menuItem10
			// 
			this.menuItem10.Index = 2;
			this.menuItem10.Text = "License..";
			this.menuItem10.Click += new System.EventHandler(this.menuItem10_Click);
			// 
			// menuCustomization
			// 
			this.menuCustomization.Index = 3;
			this.menuCustomization.Text = "Order Product Customization..";
			this.menuCustomization.Click += new System.EventHandler(this.menuCustomization_Click);
			// 
			// menuItem3
			// 
			this.menuItem3.Index = 4;
			this.menuItem3.Text = "-";
			// 
			// menuAbout
			// 
			this.menuAbout.Index = 5;
			this.menuAbout.Text = "About Profile#";
			this.menuAbout.Click += new System.EventHandler(this.menuAbout_Click);
			// 
			// openProfilerSession
			// 
			this.openProfilerSession.AddExtension = false;
			this.openProfilerSession.RestoreDirectory = true;
			// 
			// imageList2
			// 
			this.imageList2.ImageSize = new System.Drawing.Size(16, 16);
			this.imageList2.ImageStream = ((System.Windows.Forms.ImageListStreamer)(resources.GetObject("imageList2.ImageStream")));
			this.imageList2.TransparentColor = System.Drawing.Color.Transparent;
			// 
			// sharpClientMDITab
			// 
			this.sharpClientMDITab.AllowDrop = true;
			this.sharpClientMDITab.Appearance = SharpClient.UI.Controls.TabControl.VisualAppearance.MultiDocument;
			this.sharpClientMDITab.BackColor = System.Drawing.SystemColors.ActiveCaptionText;
			this.sharpClientMDITab.ButtonActiveColor = System.Drawing.SystemColors.ActiveCaptionText;
			this.sharpClientMDITab.ButtonInactiveColor = System.Drawing.SystemColors.InactiveCaptionText;
			this.sharpClientMDITab.Dock = System.Windows.Forms.DockStyle.Fill;
			this.sharpClientMDITab.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((System.Byte)(0)));
			this.sharpClientMDITab.HideTabsMode = SharpClient.UI.Controls.TabControl.HideTabsModes.ShowAlways;
			this.sharpClientMDITab.HotTextColor = System.Drawing.SystemColors.Desktop;
			this.sharpClientMDITab.IDEPixelBorder = false;
			this.sharpClientMDITab.Location = new System.Drawing.Point(0, 37);
			this.sharpClientMDITab.Name = "sharpClientMDITab";
			this.sharpClientMDITab.Size = new System.Drawing.Size(790, 474);
			this.sharpClientMDITab.TabIndex = 6;
			this.sharpClientMDITab.TextInactiveColor = System.Drawing.Color.Gray;
			this.sharpClientMDITab.DragDrop += new System.Windows.Forms.DragEventHandler(this.SharpClientForm_DragDrop);
			this.sharpClientMDITab.DragEnter += new System.Windows.Forms.DragEventHandler(this.SharpClientForm_DragEnter);
			this.sharpClientMDITab.ClosePressed += new System.EventHandler(this.sharpClientMDITab_ClosePressed);
			// 
			// SharpClientForm
			// 
			this.AllowDrop = true;
			this.AutoScaleBaseSize = new System.Drawing.Size(5, 13);
			this.BackColor = System.Drawing.SystemColors.Control;
			this.ClientSize = new System.Drawing.Size(790, 531);
			this.Controls.Add(this.sharpClientMDITab);
			this.Controls.Add(this.psToolBar);
			this.Controls.Add(this.psStatusBar);
			this.HelpButton = true;
			this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
			this.IsMdiContainer = true;
			this.Menu = this.psMainMenu;
			this.MinimumSize = new System.Drawing.Size(640, 480);
			this.Name = "SharpClientForm";
			this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
			this.Text = " ProfileSharp Enterprise Edition";
			this.WindowState = System.Windows.Forms.FormWindowState.Maximized;
			this.Closing += new System.ComponentModel.CancelEventHandler(this.SharpClientForm_Closing);
			this.Load += new System.EventHandler(this.SharpClientForm_Load);
			this.DragDrop += new System.Windows.Forms.DragEventHandler(this.SharpClientForm_DragDrop);
			this.DragEnter += new System.Windows.Forms.DragEventHandler(this.SharpClientForm_DragEnter);
			((System.ComponentModel.ISupportInitialize)(this.panelSharpClientStatus)).EndInit();
			this.ResumeLayout(false);

		}
Example #3
0
//		public ObjectMonitorClass ObjectMonitor
//		{
//			get
//			{
//				return objMonitor;
//			}
//		}

		public SharpClientForm()
		{
			//
			// Required for Windows Form Designer support
			//

			try
			{
				if(!Convert.ToBoolean(IsUserAnAdmin()))
				{
					if(DialogResult.No==MessageBox.Show("ProfileSharp has detected that you are running the profiler in a non-administrative account.\nThis can make the profiler unreponsive.Do you still want to continue?"  ,"Non-Administrator",MessageBoxButtons.YesNo,MessageBoxIcon.Warning))
					{
						System.Diagnostics.Process.GetCurrentProcess().Kill();    
					}
				}
			}
			catch
			{}

			try
			{
				if(IsProfilerAlreadyRunning())
				{

//					if(objMonitor!=null)
//					{
//						try
//						{
//							Marshal.ReleaseComObject(objMonitor);
//							objMonitor=null;
//						}
//						catch{}
//					}
					MessageBox.Show("ProfileSharp could not be initialized on your system.\nPlease contact SoftProdigy for support on this issue." ,"ProfileSharp Error!",MessageBoxButtons.OK,MessageBoxIcon.Stop);
					System.Diagnostics.Process.GetCurrentProcess().Kill();	
					return;
				}
			}
			catch(Exception except){
				MessageBox.Show("An Exception occured\n"+except.Message ,"ProfileSharp Error!.",MessageBoxButtons.OK,MessageBoxIcon.Stop);
				System.Diagnostics.Process.GetCurrentProcess().Kill();		
				return;
			}
			finally
			{
//				if(objMonitor!=null)
//				{
//					try
//					{
//						Marshal.ReleaseComObject(objMonitor);
//						objMonitor=null;
//					}
//					catch{}
//				}				
			}			

			
			Application.DoEvents(); 
			InitializeComponent();
			if(SharpClientForm.scInstance ==null)
			{
				SharpClientForm.scInstance=this;
			}
			sharpClientMDITab.Appearance=SharpClient.UI.Controls.TabControl.VisualAppearance.MultiDocument;

			subscribersTable=new Hashtable();   
			subscribersMenuTable =new Hashtable ();

			SetStyle(ControlStyles.DoubleBuffer, true);
			SetStyle(ControlStyles.AllPaintingInWmPaint, true);

			codeTabControl=new SharpClient.UI.Controls.TabControl(); 
			this.Controls.Add(codeTabControl);   

			_manager=new DockingManager(this,SharpClient.UI.Common.VisualStyle.IDE);			
			this.codeTabControl.Appearance = SharpClient.UI.Controls.TabControl.VisualAppearance.MultiDocument;
			this.codeTabControl.BackColor = System.Drawing.SystemColors.ActiveCaptionText;
			this.codeTabControl.ButtonActiveColor = System.Drawing.SystemColors.ActiveCaptionText;
			this.codeTabControl.ButtonInactiveColor = System.Drawing.SystemColors.InactiveCaptionText;
			this.codeTabControl.Dock = System.Windows.Forms.DockStyle.Fill;
			this.codeTabControl.Font = new System.Drawing.Font("Arial", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((System.Byte)(0)));
			this.codeTabControl.HideTabsMode = SharpClient.UI.Controls.TabControl.HideTabsModes.ShowAlways;
			this.codeTabControl.HotTextColor = System.Drawing.SystemColors.Desktop;
			this.codeTabControl.IDEPixelBorder = false;
			this.codeTabControl.Location = new System.Drawing.Point(0, 31);
			this.codeTabControl.Name = "codeTabControl";
			this.codeTabControl.Size = new System.Drawing.Size(790, 484);
			this.codeTabControl.TabIndex = 4;
			this.codeTabControl.ClosePressed+=new EventHandler(codeTabControl_ClosePressed); 			
			
			_manager.InnerControl=sharpClientMDITab; 
			_manager.OuterControl= psStatusBar;				
			
			Content c=_manager.Contents.Add(codeTabControl,"Source Code",imageList1,4);
			_manager.AddContentWithState(c,SharpClient.UI.Docking.State.DockBottom);     
			_manager.HideAllContents();	

			///////////////Stack Control///////
			///

			_stackManager=new DockingManager(this,SharpClient.UI.Common.VisualStyle.IDE);			
			_stackManager.InnerControl=sharpClientMDITab;
			_stackManager.OuterControl= psStatusBar;	
			//
			// TODO: Add any constructor code after InitializeComponent call
			//
		}