コード例 #1
0
        public ConfiguratorForm(string config,FunctionData funcObj,ObjectData objObj,bool exceptionTracing,bool bConfigRequired,bool bInteractive)
        {
            //
            // Required for Windows Form Designer support
            //
            InitializeComponent();
            this.Icon=SharpClientForm.scInstance.Icon;
            try
            {
                cnfg=new Configurator(config,funcObj,objObj,exceptionTracing,bConfigRequired,bInteractive);
            }
            catch(Exception ex)
            {
                this.Text="ProfileSharp Exception!" ;
                this.Size=new Size(this.Width/2,this.Height/2);
                this.errorLabel.Text="\nAn exception has occured while trying to initialize profiling environment on your system.\n"
                    +"\n Exception details are :- \n\""+ex.Message+"\"\n\n Please contact SoftProdigy for support on this issue.";
                Application.DoEvents();
                this.Resize+=new EventHandler(ConfiguratorForm_Resize);
                Application.DoEvents();
                return;
            }

            this.Controls.Clear();
            Application.DoEvents();
            cnfg.Parent =this;
            this.Controls.Add(cnfg);
            cnfg.Dock =DockStyle.Fill ;
            this.ControlRemoved+=new ControlEventHandler(ConfiguratorForm_ControlRemoved);
            this.Resize+=new EventHandler(ConfiguratorForm_Resize);

            //
            // TODO: Add any constructor code after InitializeComponent call
            //
        }
コード例 #2
0
		public ProfilerControl(int PID,string PName,bool suspended,int functionFlag,int objectFlag,string cnfgString,Configurator cnfg)
		{
			//
			// Required for Windows Form Designer support
			//			

			this.pid =PID;
			processName=PName;
			bSuspended=suspended ;			
			m_functionFlag =functionFlag ;
			m_objectFlag =objectFlag ;
			configString =cnfgString;
			bIsCapturingStartedForOnce=false;
			bQuit=false;
			InitializeComponent();
			this.m_cnfg=cnfg;			
			this.HandleCreated +=new EventHandler(ProfilerControl_HandleCreated);		 

			//
			// TODO: Add any constructor code after InitializeComponent call
			//
		}
コード例 #3
0
		private void ProfilerControl_Activated(object sender, System.EventArgs e)
		{			
			if(this.Controls.Contains(Init))
			{				
				this.Show(); 				
				if(m_cnfg!=null)//V. Imp.
				{
					try
					{						
						m_cnfg.CloseConfigurator(); 
						m_cnfg.Dispose(); 
					}
					catch{}
				}
				m_cnfg=null;			
				System.GC.Collect();  
				InitProfiler();	
				try
				{
					this.Controls.Remove(Init);   
				}
				catch{}
			}		
		}
コード例 #4
0
        private void Init()
        {
            this.components = new System.ComponentModel.Container();
            System.Resources.ResourceManager resources = new System.Resources.ResourceManager(typeof(SharpClientTabPage));
            this.AnalysisPanelGroup = new PSUI.PSPanelGroup();
            this.analysisPanel = new PSUI.PSPanel(540);
            this.settingsPanel = new PSUI.PSPanel(425);
            this.ReportsNavigation = new System.Windows.Forms.TreeView();
            this.saveSessionDlg = new System.Windows.Forms.SaveFileDialog();
            this.saveSessionDlg.RestoreDirectory = true;
            this.saveSessionDlg.Title = "Export Session Data";

            MorphReportControl=new PGUserControl();
            MorphReportControl.TotallingEnabled = true;
            MorphReportControl.BackColor = System.Drawing.SystemColors.ActiveCaptionText;
            MorphReportControl.DBCon =null;
            MorphReportControl.ConfigFile ="";
            MorphReportControl.Dock=DockStyle.Fill;
            MorphReportControl.Location = new System.Drawing.Point(2, 35);
            MorphReportControl.Visible =false;

            Application.DoEvents();

            ///////////
            ((System.ComponentModel.ISupportInitialize)(this.AnalysisPanelGroup)).BeginInit();
            this.AnalysisPanelGroup.SuspendLayout();

            if(m_fileName.ToLower().EndsWith(".fxml"))
            {
                cnfgSettings=new Configurator ("READONLY",new FunctionData(0,"","",false,false,1),null,false,true,false);
            }
            else if(m_fileName.ToLower().EndsWith(".oxml"))
            {
                cnfgSettings=new Configurator ("READONLY",null,new ObjectData( 0,"",false,true),false,true,false);
            }
            else
            {
                cnfgSettings=new Configurator ("READONLY",null,null,false,true,false);
            }
            settingsPanel.Controls.Add(cnfgSettings);
            cnfgSettings.Dock =DockStyle.Fill ;
            cnfgSettings.Visible =false;
            //
            // AnalysisPanelGroup
            //
            this.AnalysisPanelGroup.AutoScroll = false;
            this.AnalysisPanelGroup.BackColor = System.Drawing.Color.Transparent;
            this.AnalysisPanelGroup.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D;
            this.AnalysisPanelGroup.Controls.Add(this.analysisPanel);
            this.AnalysisPanelGroup.Controls.Add(this.settingsPanel);
            //this.AnalysisPanelGroup.Dock = System.Windows.Forms.DockStyle.Top;
            this.AnalysisPanelGroup.Dock = System.Windows.Forms.DockStyle.Fill;
            this.AnalysisPanelGroup.Location = new System.Drawing.Point(17, 17);
            this.AnalysisPanelGroup.Name = "AnalysisPanelGroup";
            this.AnalysisPanelGroup.PanelGradient = ((PSUI.GradientColor)(resources.GetObject("AnalysisPanelGroup.PanelGradient")));
            //this.AnalysisPanelGroup.Size = new System.Drawing.Size(728, 581);
            //
            // analysisPanel
            //
            this.analysisPanel.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
                | System.Windows.Forms.AnchorStyles.Right)));
            this.analysisPanel.AnimationRate = 0;
            this.analysisPanel.BackColor = System.Drawing.Color.Transparent;
            this.analysisPanel.Caption = "Analyze";
            this.analysisPanel.CaptionCornerType = PSUI.CornerType.Top;
            this.analysisPanel.CaptionGradient.End = System.Drawing.SystemColors.AppWorkspace;
            this.analysisPanel.CaptionGradient.Start = System.Drawing.SystemColors.AppWorkspace;
            this.analysisPanel.CaptionGradientMode = System.Drawing.Drawing2D.LinearGradientMode.Horizontal;
            this.analysisPanel.CaptionUnderline = System.Drawing.Color.Gray;
            this.analysisPanel.CurveRadius = 12;
            this.analysisPanel.Font = new System.Drawing.Font("Arial", 9.75F, ((System.Drawing.FontStyle)((System.Drawing.FontStyle.Bold | System.Drawing.FontStyle.Underline))), System.Drawing.GraphicsUnit.Point, ((System.Byte)(0)));
            this.analysisPanel.ForeColor = System.Drawing.SystemColors.WindowText;
            this.analysisPanel.HorzAlignment = System.Drawing.StringAlignment.Near;
            this.analysisPanel.ImageItems.PSImgSet = null;
            this.analysisPanel.Location = new System.Drawing.Point(517, 17);
            this.analysisPanel.Name = "analysisPanel";
            this.analysisPanel.PanelGradient.End = System.Drawing.Color.White;
            this.analysisPanel.PanelGradient.Start = System.Drawing.Color.White;
            this.analysisPanel.PanelGradientMode = System.Drawing.Drawing2D.LinearGradientMode.Horizontal;
            this.analysisPanel.Size = new System.Drawing.Size(720, 540);
            this.analysisPanel.TabIndex = 1;
            this.analysisPanel.TextColors.Background = System.Drawing.SystemColors.ActiveCaptionText;
            this.analysisPanel.TextColors.Foreground = System.Drawing.SystemColors.ControlText;
            this.analysisPanel.TextHighlightColors.Background = System.Drawing.SystemColors.ControlText;
            this.analysisPanel.TextHighlightColors.Foreground = System.Drawing.SystemColors.ActiveCaptionText;
            this.analysisPanel.VertAlignment = System.Drawing.StringAlignment.Center;
            this.analysisPanel.Expanded += new System.EventHandler(this.settingsPanel_Expanded);
            //
            // settingsPanel
            //
            this.settingsPanel.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
                | System.Windows.Forms.AnchorStyles.Right)));
            this.settingsPanel.AnimationRate = 0;
            this.settingsPanel.BackColor = System.Drawing.Color.Transparent;
            this.settingsPanel.Caption = "Session Settings";
            this.settingsPanel.CaptionCornerType = PSUI.CornerType.Top;
            this.settingsPanel.CaptionGradient.End = System.Drawing.SystemColors.AppWorkspace;
            this.settingsPanel.CaptionGradient.Start = System.Drawing.SystemColors.AppWorkspace;
            this.settingsPanel.CaptionGradientMode = System.Drawing.Drawing2D.LinearGradientMode.Horizontal;
            this.settingsPanel.CaptionUnderline = System.Drawing.Color.Gray;
            this.settingsPanel.CurveRadius = 12;
            this.settingsPanel.Font = new System.Drawing.Font("Arial", 9.75F, ((System.Drawing.FontStyle)((System.Drawing.FontStyle.Bold | System.Drawing.FontStyle.Underline))), System.Drawing.GraphicsUnit.Point, ((System.Byte)(0)));
            this.settingsPanel.ForeColor = System.Drawing.SystemColors.WindowText;
            this.settingsPanel.HorzAlignment = System.Drawing.StringAlignment.Near;
            this.settingsPanel.ImageItems.PSImgSet = null;
            this.settingsPanel.Location = new System.Drawing.Point(166, 17);
            this.settingsPanel.Name = "settingsPanel";
            this.settingsPanel.PanelGradient.End = System.Drawing.Color.White;
            this.settingsPanel.PanelGradient.Start = System.Drawing.Color.White;
            this.settingsPanel.PanelGradientMode = System.Drawing.Drawing2D.LinearGradientMode.Horizontal;
            this.settingsPanel.PanelState = PSUI.PSPanelState.Collapsed;
            this.settingsPanel.Size = new System.Drawing.Size(720, 425);
            this.settingsPanel.TabIndex = 0;
            this.settingsPanel.TextColors.Background = System.Drawing.SystemColors.ActiveCaptionText;
            this.settingsPanel.TextColors.Foreground = System.Drawing.SystemColors.ControlText;
            this.settingsPanel.TextHighlightColors.Background = System.Drawing.SystemColors.ControlText;
            this.settingsPanel.TextHighlightColors.Foreground = System.Drawing.SystemColors.ActiveCaptionText;
            this.settingsPanel.VertAlignment = System.Drawing.StringAlignment.Center;
            this.settingsPanel.Expanded += new System.EventHandler(this.settingsPanel_Expanded);
            //
            // ReportsNavigation
            //
            this.ReportsNavigation.Dock = System.Windows.Forms.DockStyle.Fill;
            this.ReportsNavigation.Font = new System.Drawing.Font("Arial", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((System.Byte)(0)));
            this.ReportsNavigation.FullRowSelect = true;
            this.ReportsNavigation.Location = new System.Drawing.Point(776, 17);
            this.ReportsNavigation.Name = "ReportsNavigation";
            this.ReportsNavigation.SelectedImageIndex = -1;
            this.ReportsNavigation.Size = new System.Drawing.Size(708, 474);
            this.ReportsNavigation.TabIndex = 1;
            this.ReportsNavigation.ImageList=SharpClientForm.scInstance.imageList2;
            this.ReportsNavigation.ImageIndex=1;

            //
            // reportsImgList
            //
            ((System.ComponentModel.ISupportInitialize)(this.AnalysisPanelGroup)).EndInit();
            this.AnalysisPanelGroup.ResumeLayout(false);

            this.analysisPanel.Controls.Add(ReportsNavigation);
            this.Controls.Add(AnalysisPanelGroup);

            if(m_fileName.ToLower().EndsWith(".fxml"))
            {
                LoadReportList(Application.StartupPath+ @"\PerformanceReportDefs\PerformanceReportCollection.xml");
            }
            else if(m_fileName.ToLower().EndsWith(".oxml"))
            {
                LoadReportList(Application.StartupPath+@".\MemoryReportDefs\MemoryReportCollection.xml");
            }

            ReportsNavigation.DoubleClick +=new EventHandler(ReportsNavigation_DoubleClick);
        }