コード例 #1
0
        /// <summary>
        /// Sets project info on the topbar.
        /// </summary>
        private void setTopBarRiskInfo()
        {
            //Set top bar info.
            ARA_TopBar aForm = new ARA_TopBar(
                string.Format("RiskID: {0} -- {1} -> {2}\nVersion: {3}", this.riskID, this.riskGroupName, this.riskTypeName, this.riskVersionID),
                string.Format("{0}", this.hazardSituation));

            ARA_Events.triggerBaseFormSetTopBarEvent(aForm);
        }
コード例 #2
0
        /// <summary>
        /// Sets risk info in the topbar of the application.
        /// </summary>
        private void setTopBarRiskInfo()
        {
            //Set top bar info.
            ARA_TopBar aForm = new ARA_TopBar(
                string.Format("RiskID: {0} -- {1} -> {2}\nVersion: {3}, Created by: {4}",
                              this.riskID,
                              this.riskGroupName,
                              this.riskTypeName,
                              this.riskVersionID,
                              this.tbl_UserTableAdapter.GetData().FindByUserID(this.riskCreatedByUserID)["UserName"].ToString()),
                string.Format("{0} {1}",
                              this.hazardSituation,
                              this.isRiskDataProjectSpecific && this.projectID != -1 ? "\n(Project specific)":""));

            ARA_Events.triggerBaseFormSetTopBarEvent(aForm);
        }
コード例 #3
0
        /// <summary>
        /// Sets the topbar with project specific data.
        /// </summary>
        private void setProjectInfoTopForm()
        {
            //Construct text to display on topbar.
            DataRow riskAnalysisData = this.get_All_RiskProject_InfoTableAdapter.GetData(this.projectID).Rows[0];
            string  leftText         = string.Format("Customer: {0}\nProject state: {1}",
                                                     riskAnalysisData["Customer"],
                                                     riskAnalysisData["StateName"]);
            string rightText = string.Format("Draft version: {0}\nProject revision: {1}",
                                             riskAnalysisData["DraftVersion"],
                                             riskAnalysisData["Revision"]);

            //Create topbar form.
            Form topBar = new ARA_TopBar(leftText, rightText);

            //Trigger event for displaying the form.
            ARA_Events.triggerBaseFormSetTopBarEvent(topBar);
        }