Example #1
0
File: Utility.cs Project: joyoon/mb
        public void ColorFormat(DataDynamics.ActiveReports.TextBox ctrl, string text)
        {
            if (text == null) return;

            if (text.Length > 4 && text.Substring(0, 5) == "Green")
            {
                ctrl.BackColor = System.Drawing.Color.FromArgb(138, 207, 88); //#8ACF58
                ctrl.ForeColor = System.Drawing.Color.Black;
            }
            else if (text.Length > 5 && text.Substring(0, 6) == "Yellow")
            {
                ctrl.BackColor = System.Drawing.Color.FromArgb(255, 255, 204); //#FDFFA4
                ctrl.ForeColor = System.Drawing.Color.FromArgb(156, 124, 0);
            }
            else if (text.Length > 2 && text.Substring(0, 3) == "Red")
            {
                ctrl.BackColor = System.Drawing.Color.FromArgb(255, 215, 215);
                ctrl.ForeColor = System.Drawing.Color.FromArgb(204, 51, 0);
            }
            else if (text.Length > 7 && text.Substring(0, 8) == "Critical")
            {
                ctrl.BackColor = System.Drawing.Color.FromName("Black");
                ctrl.ForeColor = System.Drawing.Color.White;
            }
            else
            {
                ctrl.BackColor = System.Drawing.Color.White;
                ctrl.ForeColor = System.Drawing.Color.Black;
            }
        }
Example #2
0
    public ReportForm(Form parent, DataDynamics.ActiveReports.ActiveReport3 rpt)
    {
      InitializeComponent();
      _parent = parent;
      _reporte = rpt;

      if (rpt is IntelliTrack.Client.Application.Reportes.Reporte1)
      {
        IntelliTrack.Service.Common.Singleton<IntelliTrack.Client.Application.Imaging.ComplexMap>.Instance.SetHistoricDataHandlerReportForm(this);
      }
      else if (rpt is IntelliTrack.Client.Application.Reportes.Regadores)
      {
        IntelliTrack.Service.Common.Singleton<IntelliTrack.Client.Application.Imaging.ComplexMap>.Instance.SetHistoricDataHandlerReporteRegadoresForm(this);
        (rpt as IntelliTrack.Client.Application.Reportes.Regadores).OnCalcularTiemposTotales += new IntelliTrack.Client.Application.Reportes.Regadores.DoCalcularTiemposTotales(ReportForm_OnCalcularTiemposTotales);

      }
      HideOnClose = true;
    }
 private void LoadTools(DataDynamics.ActiveReports.Design.Toolbox.Toolbox toolbox)
 {
     //Add Data Providers
     toolbox.AddToolboxItem(new System.Drawing.Design.ToolboxItem(typeof(System.Data.DataSet)), "Data");
     toolbox.AddToolboxItem(new System.Drawing.Design.ToolboxItem(typeof(System.Data.DataView)), "Data");
     toolbox.AddToolboxItem(new System.Drawing.Design.ToolboxItem(typeof(System.Data.OleDb.OleDbConnection)), "Data");
     toolbox.AddToolboxItem(new System.Drawing.Design.ToolboxItem(typeof(System.Data.OleDb.OleDbDataAdapter)), "Data");
     toolbox.AddToolboxItem(new System.Drawing.Design.ToolboxItem(typeof(System.Data.Odbc.OdbcConnection)), "Data");
     toolbox.AddToolboxItem(new System.Drawing.Design.ToolboxItem(typeof(System.Data.Odbc.OdbcDataAdapter)), "Data");
     toolbox.AddToolboxItem(new System.Drawing.Design.ToolboxItem(typeof(System.Data.SqlClient.SqlConnection)), "Data");
     toolbox.AddToolboxItem(new System.Drawing.Design.ToolboxItem(typeof(System.Data.SqlClient.SqlDataAdapter)), "Data");
 }
Example #4
0
 private void HacerCampoVisible(DataDynamics.ActiveReports.TextBox ControlAHacerVisible)
 {
   txtTiempoCarga1.Visible = txtTiempoCarga1 == ControlAHacerVisible ? true : false;
   txtTiempoTransito1.Visible = txtTiempoTransito1 == ControlAHacerVisible ? true : false;
   txtTiempoDetenido1.Visible = txtTiempoDetenido1 == ControlAHacerVisible ? true : false;
 }
Example #5
0
File: Utility.cs Project: joyoon/mb
 public void ColorFormat(DataDynamics.ActiveReports.TextBox ctrl)
 {
     ColorFormat(ctrl, ctrl.Text);
 }