예제 #1
0
 private void SetUIVisibleByUserRights()
 {
     pbAuditTrail.Visible               = Common.IsAuthorized(RightsText.ViewAuditTrail);
     dataManager.PnSignHis.Visible      = dataManager.BtnSign.Visible = Common.IsAuthorized(RightsText.SignRecords);
     viewManager.PnSignHis.Visible      = viewManager.BtnSign.Visible = Common.IsAuthorized(RightsText.SignRecords);
     viewManager.PbDeviceConfig.Visible = Common.IsAuthorized(RightsText.ConfigurateDevices);
     dataManager.TbCmt.Enabled          = Common.IsAuthorized(RightsText.CommentRecords);
 }
예제 #2
0
 protected void checkWhetherSectionShouldBeShown()
 {
     if (this.device != null)
     {
         if (SoftwareVersions.Pro == Common.Versions && Common.GlobalProfile != null && Common.GlobalProfile.IsShowHeader)
         {
             byte[] logoByte    = Common.GlobalProfile.Logo;
             string contactInfo = Common.GlobalProfile.ContactInfo;
             if (logoByte != null || !string.IsNullOrWhiteSpace(contactInfo))
             {
                 this.isHeaderShown = true;
             }
         }
         if (this.device.AlarmMode != 0)
         {
             this.isAlarmShown = true;
         }
         if (Common.IsAuthorized(RightsText.CommentRecords))
         {
             if (!string.IsNullOrWhiteSpace(this.CurrentComment) && this.CurrentComment != ReportConstString.CommentDefaultString)
             {
                 this.isCommentShown = true;
             }
         }
         if (this.device.DeviceID < 200)
         {
             this.isDescriptionShown = false;
         }
         if (this.device.AlarmMode > 0 && this.device.tempList.Count > 0)
         {
             if (IsDeviceAlarming(this.device))
             {
                 this.reportTitleIconStatus = ReportTitleIconStatus.Alarm;
             }
             else
             {
                 this.reportTitleIconStatus = ReportTitleIconStatus.OK;
             }
         }
         if (this.signatureList != null && this.signatureList.Count > 0)
         {
             this.isSignatureShown = true;
         }
     }
 }
예제 #3
0
 public ReportEditorExporter(DeviceDataFrom deviceDataFrom, SuperDevice device, IList <DigitalSignature> signatureList, Panel documentPanel, TextBox tbReportTitle, TextBox tbReportComment, Label lblReportEditorTip)
     : base(deviceDataFrom, device, signatureList)
 {
     if (Common.IsAuthorized(RightsText.CommentRecords))
     {
         this.isCommentShown = true;
     }
     this.tbReportTitle      = tbReportTitle;
     this.tbReportComment    = tbReportComment;
     this.lblReportEditorTip = lblReportEditorTip;
     this.documentPanel      = documentPanel;
     this.calculateSectionMargin();
     documentPanel.SizeChanged += new EventHandler(documentPanel_SizeChanged);
     documentPanel.Controls.Clear();
     this.AddNewPage();
     if (this.tbReportTitle != null)
     {
         this.tbReportTitle.TextChanged += new EventHandler(tbReportTitle_TextChanged);
     }
 }
예제 #4
0
        protected override void GenerateComments()
        {
            if (Common.IsAuthorized(RightsText.CommentRecords) && this.tbReportComment != null)
            {
                int   heightBetweenTitleAndContent = 5;
                int   tbCommentContentheight       = 51;
                Label lblCommentTitle = new Label();
                lblCommentTitle.Font = SectionTitleFont;
                lblCommentTitle.Text = "Comments";
                this.AddSection(lblCommentTitle);

                this.tbReportComment.Multiline  = true;
                this.tbReportComment.ScrollBars = ScrollBars.None;
                this.tbReportComment.Font       = new Font("Arial", 9);
                this.tbReportComment.Width      = DefaultSectionWidth;
                this.tbReportComment.Height     = tbCommentContentheight;
                this.tbReportComment.Top        = lblCommentTitle.Bottom + heightBetweenTitleAndContent;
                //this.tbReportComment.MaxLength = 200;
                this.AddSection(this.tbReportComment);
            }
        }