예제 #1
0
        private void ImageListForm_Load(object sender, EventArgs e)
        {
            _db = new MainDBClass();
            _db.OpenDB();

            RefreshImage();
        }
예제 #2
0
        private void UpdateGrid()
        {
            _dt.Rows.Clear();

            _db = new MainDBClass();

            _db.OpenDB();
            DeviceInfo[] tmpDevice = _db.RecoverDevice(false);
            _db.CloseDB();
            if (tmpDevice == null)
            {
                dataGridViewRemote.DataSource = null;
                dataGridViewRemote.Refresh();
                return;
            }

            _networkDevice = new DeviceInfo[tmpDevice.Length];
            tmpDevice.CopyTo(_networkDevice, 0);
            foreach (DeviceInfo di in _networkDevice)
            {
                _dt.Rows.Add(di.SerialRFID, di.DeviceName, di.deviceType, di.IP_Server, di.Port_Server);
            }
            dataGridViewRemote.DataSource = null;
            dataGridViewRemote.DataSource = _dt.DefaultView;
            dataGridViewRemote.Refresh();
        }
 public DtAndTagClass(Form theForm, DataTable dt, string tagUid, MainDBClass db)
 {
     TheForm = theForm;
     Dt      = dt;
     TagUid  = tagUid;
     Db      = db;
 }
 private void ItemHistoryForm_Load(object sender, EventArgs e)
 {
     _db = new MainDBClass();
     _db.OpenDB();
     _columnInfo = _db.GetColumnInfo();
     InitTable();
 }
        private static void treatBadBloodPatient(object o)
        {
            bool      sendMail = true;
            InputData input    = o as InputData;

            if (input.BShowWindowBox)
            {
                DialogResult ret = MessageBoxEx.Show(Properties.ResStrings.strAlertBlood, Properties.ResStrings.strAlertDetected, MessageBoxButtons.YesNo, MessageBoxIcon.Stop, 10000);
                if (ret == DialogResult.No)
                {
                    sendMail = false;
                }
            }

            if (sendMail)
            {
                MainDBClass db = new MainDBClass();
                if (db.OpenDB())
                {
                    smtpInfo  smtp  = db.getSmtpInfo(true);
                    alertInfo alert = db.getAlertInfo(AlertType.AT_Bad_Blood_Patient, true);
                    db.CloseDB();
                    if ((alert != null) && (smtp != null))
                    {
                        createAndSendMail(alert, smtp, input.Device, input.UTC, input.SpareData);
                    }
                }
            }
        }
//        private void MouseWheel(object sender, MouseEventArgs e)
//        {
//            if (e.Delta < 0)
//            {
//                _chartTemp.ChartAreas["Main"].AxisX.ScaleView.ZoomReset();
//            }
//            if (e.Delta > 0)
//            {
//                double xMin =  _chartTemp.ChartAreas["Main"].AxisX.ScaleView.ViewMinimum;
//                double xMax =  _chartTemp.ChartAreas["Main"].AxisX.ScaleView.ViewMaximum;
//              /*  double yMin = chartTemp.ChartAreas["Main"].AxisY.ScaleView.ViewMinimum;
//                double yMax = chartTemp.ChartAreas["Main"].AxisY.ScaleView.ViewMaximum;*/
//
//                double posXStart = _chartTemp.ChartAreas["Main"].AxisX.PixelPositionToValue(e.Location.X) - (xMax - xMin) / 4;
//                double posXFinish = _chartTemp.ChartAreas["Main"].AxisX.PixelPositionToValue(e.Location.X) + (xMax - xMin) / 4;
//                //double posYStart = chartTemp.ChartAreas["Main"].AxisY.PixelPositionToValue(e.Location.Y) - (yMax - yMin) / 4;
//                //double posYFinish = chartTemp.ChartAreas["Main"].AxisY.PixelPositionToValue(e.Location.Y) + (yMax - yMin) / 4;
//
//                _chartTemp.ChartAreas["Main"].AxisX.ScaleView.Zoom(posXStart, posXFinish);
//               // chartTemp.ChartAreas["Main"].AxisY.ScaleView.Zoom(posYStart, posYFinish);
//
//                _chartTemp.ChartAreas["Main"].CursorX.IsUserEnabled = true;
//                _chartTemp.ChartAreas["Main"].CursorX.IsUserSelectionEnabled = true;
//                _chartTemp.ChartAreas["Main"].AxisX.ScaleView.Zoomable = true;
//                _chartTemp.ChartAreas["Main"].CursorX.IntervalType = DateTimeIntervalType.Auto;
//                _chartTemp.ChartAreas["Main"].CursorX.Interval = 1;
//                _chartTemp.ChartAreas["Main"].CursorX.AutoScroll = true;
//                _chartTemp.ChartAreas["Main"].AxisX.ScrollBar.IsPositionedInside = false;
//            }
//        }

        private void tempHistory_Load(object sender, EventArgs e)
        {
            _db = new MainDBClass();
            _db.OpenDB();
            _maxTempFridgeValue = _db.GetMaxTempFridgeValue();
            toolStripComboBoxTime.SelectedIndex = 0;
            PopulateComboReader();
            CreateChart();
        }
예제 #7
0
 private void TagUIDWritingForm_Load(object sender, EventArgs e)
 {
     _db = new MainDBClass();
     _db.OpenDB();
     if (!string.IsNullOrEmpty(_previousUid))
     {
         UpdateHistoryTable(_previousUid);
     }
 }
예제 #8
0
        private void Formule_Load(object sender, EventArgs e)
        {
            _db = new MainDBClass();

            _db.OpenDB();
            _fd = _db.getFormuleInfo();
            UpdateList();
            if (_fd != null)
            {
                textBoxFormule.Text      = _fd.Formule;
                textBoxFormuleTitle.Text = _fd.Title;
                checkBoxEnable.Checked   = _fd.Enable == 1;
            }
        }
예제 #9
0
        private void toolStripButtonDelete_Click(object sender, EventArgs e)
        {
            if (dataGridViewRemote.SelectedRows.Count > 0)
            {
                // string ip = _networkDevice[dataGridViewRemote.SelectedRows[0].Index].IP_Server;
                // int _port = _networkDevice[dataGridViewRemote.SelectedRows[0].Index].Port_Server;

                MainDBClass db = new MainDBClass();
                if (db.OpenDB())
                {
                    db.DeleteDevice(_networkDevice[dataGridViewRemote.SelectedRows[0].Index]);
                    db.CloseDB();
                }
            }

            UpdateGrid();
        }
예제 #10
0
        public static Image getImage(string LotID)
        {
            System.Drawing.Image imgFromDB = Properties.Resources.No_Image_Available;
            MainDBClass          dbTemp    = new MainDBClass();

            dbTemp.OpenDB();
            if (dbTemp.IsImageLinkExist(LotID))
            {
                string imgName = dbTemp.getImageNameLink(LotID);
                if (imgName != null)
                {
                    imgFromDB = DataClass.ImageUtils.byteArrayToImage(dbTemp.getImage(imgName));
                }
            }
            dbTemp.CloseDB();
            return(imgFromDB);
        }
예제 #11
0
 private void UpdateCTRL()
 {
     db = new MainDBClass();
     if (db.OpenDB())
     {
         smtp = db.getSmtpInfo(false);
         if (smtp != null)
         {
             textBoxSmtpServer.Text     = smtp.smtp;
             textBoxPort.Text           = smtp.port.ToString();
             textBoxSender.Text         = smtp.sender;
             textBoxLogin.Text          = smtp.login;
             textBoxPwd.Text            = smtp.pwd;
             checkBoxSSL.Checked        = smtp.bUseSSL;
             checkBoxSMTPActive.Checked = smtp.bActive;
         }
     }
 }
/*
 *      private bool Import2()
 *      {
 *          string sheetName = null;
 *          DialogResult ret = openFileXLSDialog.ShowDialog();
 *          if (ret == System.Windows.Forms.DialogResult.OK)
 *          {
 *              try
 *              {
 *                  _pathXls = openFileXLSDialog.FileName;
 *                  if (!string.IsNullOrEmpty(_pathXls))
 *                  {
 *                      _ds = new DataSet();
 *                      if (Path.GetExtension(_pathXls).Contains("xlsx")) // 2010
 *                      {
 *                          FileInfo newFile = new FileInfo(_pathXls);
 *                          using (OfficeOpenXml.ExcelPackage pck = new OfficeOpenXml.ExcelPackage(newFile))
 *                          {
 *                              OfficeOpenXml.ExcelWorksheet ws = pck.Workbook.Worksheets[1];
 *                              sheetName = ws.Name;
 *                              _ds = _db.ImportExcelToDS(_pathXls, sheetName);
 *                          }
 *                      }
 *                      else if (Path.GetExtension(_pathXls).Contains("csv"))
 *                      {
 *                          _ds = _db.ImportCSVToDS(_pathXls);
 *
 *                      }
 *                      else
 *                      {
 *
 *                          _ds = _db.ImportExcelToDS(_pathXls);
 *                      }
 *
 *                      return true;
 *                  }
 *              }
 *              catch (IOException exp)
 *              {
 *                  MessageBox.Show(ResStrings.CompareInventoryForm_Import_, "Information", MessageBoxButtons.OK, MessageBoxIcon.Information);
 *              }
 *              catch (Exception exp)
 *              {
 *                  // On affiche l'erreur.
 *                  ErrorMessage.ExceptionMessageBox.Show(exp);
 *              }
 *          }
 *          return false;
 *      }
 */
        private void CompareInventoryForm_Load(object sender, EventArgs e)
        {
            try
            {
                _db = new MainDBClass();
                _db.OpenDB();
                _columnInfo = _db.GetColumnInfo();
                if (Import())
                {
                    ProcessData();
                }
            }
            catch (Exception exp)
            {
                // On affiche l'erreur.
                ErrorMessage.ExceptionMessageBox.Show(exp);
            }
        }
예제 #13
0
        private void ReaderHistoryForm_Load(object sender, EventArgs e)
        {
            bool.TryParse(ConfigurationManager.AppSettings["bShowImage"], out BShowImage);

            if (!BShowImage)
            {
                DataGridViewColumn dgvc1 = dataGridViewAll.Columns["ImageAll"];
                if (dgvc1 != null)
                {
                    dgvc1.Visible = false;
                }
                DataGridViewColumn dvgc2 = dataGridViewPresent.Columns["ImagePresent"];
                if (dvgc2 != null)
                {
                    dvgc2.Visible = false;
                }
                DataGridViewColumn dgvc3 = dataGridViewRemoved.Columns["ImageRemove"];
                if (dgvc3 != null)
                {
                    dgvc3.Visible = false;
                }
                DataGridViewColumn dvgc4 = dataGridViewAdded.Columns["Imageadd"];
                if (dvgc4 != null)
                {
                    dvgc4.Visible = false;
                }

                dataGridViewAdded.RowTemplate.Height   = 25;
                dataGridViewPresent.RowTemplate.Height = 25;
                dataGridViewRemoved.RowTemplate.Height = 25;
                dataGridViewAll.RowTemplate.Height     = 25;
            }

            _db = new MainDBClass();
            _db.OpenDB();
            _columnInfo  = _db.GetColumnInfo();
            DtProductRef = _db.RecoverAllProduct();

            PopulateComboReader();
            PopulateComboUser();
            InitReaderScanTable();
            ProcessData();
        }
        private void AutoFillBox_Load(object sender, EventArgs e)
        {
            _db = new MainDBClass();

            _db.OpenDB();
            _columnInfo = _db.GetColumnInfo();


            labelLotID.Text = ResStrings.strEnter + _columnInfo[1];
            labelTagID.Text = ResStrings.strEnter + _columnInfo[0];


            foreach (DataGridViewRow oRow in _dgv.Rows)
            {
                if (!string.IsNullOrEmpty(oRow.Cells[_columnInfo[0].ToString()].Value.ToString()))
                {
                    _listTagId.Add(oRow.Cells[_columnInfo[0].ToString()].Value.ToString());
                }
            }

            textBoxLotID.Focus();
        }
        private static void treatValueRemoved(object o)
        {
            InputData input = o as InputData;

            if (input.BShowWindowBox)
            {
                MessageBoxEx.Show(Properties.ResStrings.strAlertValue, Properties.ResStrings.strAlertDetected, MessageBoxButtons.OK, MessageBoxIcon.Stop, 10000);
            }
            MainDBClass db = new MainDBClass();

            if (db.OpenDB())
            {
                smtpInfo  smtp  = db.getSmtpInfo(true);
                alertInfo alert = db.getAlertInfo(AlertType.AT_Limit_Value_Exceed, true);
                db.CloseDB();

                if ((alert != null) && (smtp != null))
                {
                    createAndSendMail(alert, smtp, input.Device, input.UTC, input.SpareData);
                }
            }
        }
        private void ReaderHistoryForm_Load(object sender, EventArgs e)
        {
            bool.TryParse(ConfigurationManager.AppSettings["bShowImage"], out BShowImage);

            if (!BShowImage)
            {
                dataGridViewAll.Columns["ImageAll"].Visible         = false;
                dataGridViewPresent.Columns["ImagePresent"].Visible = false;
                dataGridViewRemoved.Columns["ImageRemove"].Visible  = false;
                dataGridViewAdded.Columns["Imageadd"].Visible       = false;

                dataGridViewAdded.RowTemplate.Height   = 25;
                dataGridViewPresent.RowTemplate.Height = 25;
                dataGridViewRemoved.RowTemplate.Height = 25;
                dataGridViewAll.RowTemplate.Height     = 25;
            }

            _db = new MainDBClass();
            _db.OpenDB();
            _columnInfo = _db.GetColumnInfo();
            GetProduct();
            PopulateComboReader();
        }
        private DataTable ConvertForExport(DataTable dt)
        {
            MainDBClass db = new MainDBClass();

            db.OpenDB();
            ArrayList columnToExport = db.GetColumnToExport();

            dtColumnInfo[] colList = db.GetdtColumnInfo();
            db.CloseDB();
            if (columnToExport != null)
            {
                DataTable            dtToexport = dt.Copy();
                DataColumnCollection dcc        = dt.Columns;
                for (int loop = 0; loop < dcc.Count; loop++)
                {
                    if (!columnToExport.Contains(dcc[loop].ColumnName))
                    {
                        dtToexport.Columns.Remove(dcc[loop].ColumnName);
                    }
                }
                return(ConvertColumnType(dtToexport, colList));
            }
            return(ConvertColumnType(dt, colList));
        }
예제 #18
0
 private void DbColumnForm_Load(object sender, EventArgs e)
 {
     _db = new MainDBClass();
     _db.OpenDB();
     LoadDbColumn();
 }
예제 #19
0
        private void toolStripButtonACreateNew_Click(object sender, EventArgs e)
        {
            toolStripStatusInfo.Text = ResStrings.str_Status;

            if (textBoxIPAddress.Text.Contains("."))
            {
                _ip = textBoxIPAddress.Text;
            }
            else
            {
                _ip = System.Net.Dns.GetHostEntry(textBoxIPAddress.Text).AddressList[0].ToString();
            }

            if (TcpIP_class.tcpUtils.CheckIp(_ip))
            {
                _port = 0;
                int.TryParse(textBoxPort.Text, out _port);

                if (TcpIP_class.tcpUtils.PingAddress(_ip, 1000))
                {
                    TcpIP_class.TcpIpClient tcp = new TcpIP_class.TcpIpClient();
                    if (tcp.pingServer(_ip, _port) == TcpIP_class.TcpIpClient.RetCode.RC_Succeed)
                    {
                        _dev[listBoxReader.SelectedIndex].IP_Server   = _serverIp;
                        _dev[listBoxReader.SelectedIndex].Port_Server = _serverPort;

                        //if (tcp.enableRemoteAccess(IP, port, dev[listBoxReader.SelectedIndex]) == TcpIP_class.TcpIpClient.RetCode.RC_Succeed)
                        //{

                        MainDBClass db = new MainDBClass();

                        if (db.OpenDB())
                        {
                            _dev[listBoxReader.SelectedIndex].IP_Server   = _ip;
                            _dev[listBoxReader.SelectedIndex].Port_Server = _port;
                            if (db.StoreDevice(_dev[listBoxReader.SelectedIndex], true))
                            {
                                MessageBox.Show(ResStrings.str_DATA_SAVED, ResStrings.strInfo, MessageBoxButtons.OK, MessageBoxIcon.Information);
                            }
                            else
                            {
                                MessageBox.Show(ResStrings.str_Error_while_Saving_Data, ResStrings.strInfo, MessageBoxButtons.OK, MessageBoxIcon.Information);
                            }
                            db.CloseDB();
                        }
                        // }
                        //else
                        //{
                        //    toolStripStatusInfo.Text = "Status : Error while set Remote On server";
                        //}
                    }
                    else
                    {
                        toolStripStatusInfo.Text = string.Format(ResStrings.Rstr_Unable_to_connect_to_server__0__on_port__1, _ip, _port);
                    }
                }
                else
                {
                    toolStripStatusInfo.Text = string.Format(ResStrings.str_Unable_to_connect_to_machine__0, _ip);
                }
            }
            else
            {
                toolStripStatusInfo.Text = string.Format(ResStrings.str_Status___Enter_a_valid_IP_or_DNS_Not_Resolve_adress__0_, textBoxIPAddress.Text);
            }

            UpdateGrid();
        }
        static public void CreateGraphFile(string filePath, string graphTitle, List <PtTemp> points)
        {
            MainDBClass db = new MainDBClass();

            db.OpenDB();
            double tempTreshold = db.GetMaxTempFridgeValue();

            db.CloseDB();

            _minValueAnnotation     = new TextAnnotation();
            _maxValueAnnotation     = new TextAnnotation();
            _averageValueAnnotation = new TextAnnotation();

            Chart exportChart = new Chart();

            exportChart.Legends.Add(new Legend());
            exportChart.Width  = 1300;
            exportChart.Height = 750;

            if (points.Count == 0)
            {
                exportChart.SaveImage(filePath, ChartImageFormat.Png);
                return;
            }

            exportChart.BackColor           = Color.WhiteSmoke;
            exportChart.BackGradientStyle   = GradientStyle.None;
            exportChart.BorderlineColor     = Color.FromArgb(64, 0, 64);
            exportChart.BorderlineDashStyle = ChartDashStyle.Solid;
            exportChart.BorderlineWidth     = 2;
            exportChart.AntiAliasing        = AntiAliasingStyles.All;

            exportChart.ChartAreas.Add("Main");
            exportChart.ChartAreas["Main"].AxisX.IntervalAutoMode = IntervalAutoMode.VariableCount;
            exportChart.ChartAreas["Main"].AxisX.LabelStyle.Angle = -90;
            exportChart.ChartAreas["Main"].AxisX.LabelStyle.Font  = new Font("Verdana", 8.0f, FontStyle.Bold);

            exportChart.ChartAreas["Main"].AxisY.LabelStyle.Font = new Font("Verdana", 10.0f, FontStyle.Bold);

            exportChart.ChartAreas["Main"].BackColor          = Color.WhiteSmoke;
            exportChart.ChartAreas["Main"].BackGradientStyle  = GradientStyle.VerticalCenter;
            exportChart.ChartAreas["Main"].BackSecondaryColor = Color.WhiteSmoke;
            exportChart.ChartAreas["Main"].BorderColor        = Color.FromArgb(64, 0, 64);
            exportChart.ChartAreas["Main"].BorderDashStyle    = ChartDashStyle.Solid;
            exportChart.ChartAreas["Main"].BorderWidth        = 2;
            exportChart.ChartAreas["Main"].ShadowOffset       = 3;
            exportChart.ChartAreas["Main"].ShadowColor        = Color.FromArgb(128, 0, 0);

            exportChart.ChartAreas["Main"].AxisX.TitleForeColor  = Color.Blue;
            exportChart.ChartAreas["Main"].AxisY.TitleForeColor  = Color.Blue;
            exportChart.ChartAreas["Main"].AxisY.Title           = "T°";
            exportChart.ChartAreas["Main"].AxisY.TextOrientation = TextOrientation.Rotated270;
            exportChart.ChartAreas["Main"].AxisY.TitleFont       = new Font("Verdana", 12.0f, FontStyle.Italic);

            exportChart.Titles.Add(graphTitle);
            exportChart.ChartAreas["Main"].AxisX.Title           = "Time";
            exportChart.ChartAreas["Main"].AxisX.TextOrientation = TextOrientation.Horizontal;
            exportChart.ChartAreas["Main"].AxisX.TitleFont       = new Font("Verdana", 12.0f, FontStyle.Italic);

            exportChart.ChartAreas["Main"].CursorX.IsUserEnabled          = true;
            exportChart.ChartAreas["Main"].CursorX.IsUserSelectionEnabled = true;
            exportChart.ChartAreas["Main"].AxisX.ScaleView.Zoomable       = true;
            exportChart.ChartAreas["Main"].CursorX.IntervalType           = DateTimeIntervalType.Auto;
            exportChart.ChartAreas["Main"].CursorX.Interval   = 1;
            exportChart.ChartAreas["Main"].CursorX.AutoScroll = true;
            exportChart.ChartAreas["Main"].AxisX.ScrollBar.IsPositionedInside = false;
            exportChart.ChartAreas["Main"].AxisX.IsMarginVisible = false;


            exportChart.Titles[0].Font      = new Font("Verdana", 16.0f, FontStyle.Bold);
            exportChart.Titles[0].ForeColor = Color.Blue;

            exportChart.Series.Add("T° Alarm High");
            exportChart.Series["T° Alarm High"].ChartType = SeriesChartType.Line;

            exportChart.Series["T° Alarm High"].YValueType          = ChartValueType.Double;
            exportChart.Series["T° Alarm High"].IsValueShownAsLabel = false;
            exportChart.Series["T° Alarm High"].ToolTip             = "#VALX : #VALY";
            exportChart.Series["T° Alarm High"].BackGradientStyle   = GradientStyle.VerticalCenter;
            exportChart.Series["T° Alarm High"].ShadowOffset        = 0;
            exportChart.Series["T° Alarm High"].BackSecondaryColor  = Color.White;
            exportChart.Series["T° Alarm High"].ShadowColor         = Color.FromArgb(128, 0, 0);
            exportChart.Series["T° Alarm High"].Color       = Color.Red;
            exportChart.Series["T° Alarm High"].BorderWidth = 3;

            exportChart.Series.Add("T° Alarm Low");
            exportChart.Series["T° Alarm Low"].ChartType           = SeriesChartType.Line;
            exportChart.Series["T° Alarm Low"].YValueType          = ChartValueType.Double;
            exportChart.Series["T° Alarm Low"].IsValueShownAsLabel = false;
            exportChart.Series["T° Alarm Low"].ToolTip             = "#VALX : #VALY";
            exportChart.Series["T° Alarm Low"].BackGradientStyle   = GradientStyle.VerticalCenter;
            exportChart.Series["T° Alarm Low"].ShadowOffset        = 0;
            exportChart.Series["T° Alarm Low"].BackSecondaryColor  = Color.White;
            exportChart.Series["T° Alarm Low"].ShadowColor         = Color.FromArgb(128, 0, 0);
            exportChart.Series["T° Alarm Low"].Color       = Color.Red;
            exportChart.Series["T° Alarm Low"].BorderWidth = 3;

            exportChart.Series.Add("T° Bottle");
            exportChart.Series["T° Bottle"].ChartType           = SeriesChartType.Line;
            exportChart.Series["T° Bottle"].YValueType          = ChartValueType.Double;
            exportChart.Series["T° Bottle"].IsValueShownAsLabel = false;
            exportChart.Series["T° Bottle"].ToolTip             = "#VALX : #VALY";
            exportChart.Series["T° Bottle"].BackGradientStyle   = GradientStyle.VerticalCenter;
            exportChart.Series["T° Bottle"].ShadowOffset        = 0;
            exportChart.Series["T° Bottle"].BackSecondaryColor  = Color.White;
            exportChart.Series["T° Bottle"].ShadowColor         = Color.FromArgb(128, 0, 0);
            exportChart.Series["T° Bottle"].Color       = Color.DodgerBlue;
            exportChart.Series["T° Bottle"].BorderWidth = 3;

            Font ft = new Font("Verdana", 12.0f, FontStyle.Bold);

            exportChart.Series["T° Bottle"].Font = ft;

            exportChart.Series.Add("Measure presence");
            exportChart.Series["Measure presence"].ChartType           = SeriesChartType.Area;
            exportChart.Series["Measure presence"].YValueType          = ChartValueType.Double;
            exportChart.Series["Measure presence"].IsValueShownAsLabel = false;
            exportChart.Series["Measure presence"].ToolTip             = "Measure found at #VALX";
            exportChart.Series["Measure presence"].Color       = Color.ForestGreen;
            exportChart.Series["Measure presence"].BorderWidth = 1;

            List <double> tempBottlePointsValues = new List <double>();

            foreach (PtTemp point in points)
            {
                string pointDate = DateTime.Parse(point.TempAcqDate).ToString("dd/MM - HH:mm t");
                exportChart.Series["T° Alarm High"].Points.AddXY(pointDate, tempTreshold);
                exportChart.Series["T° Alarm Low"].Points.AddXY(pointDate, tempTreshold - 5);
                exportChart.Series["T° Bottle"].Points.AddXY(pointDate, point.TempBottle);

                exportChart.Series["Measure presence"].Points.AddXY(pointDate, (point.TempBottle != null) ? 1 : (double?)null);

                if (point.TempBottle == null)
                {
                    continue;
                }
                tempBottlePointsValues.Add(point.TempBottle.Value);
            }

            double coeffHeight       = 100 / (double)exportChart.Height;
            double coeffWidth        = 100 / (double)exportChart.Width;
            int    rightBorderOffset = -50;

            _minValueAnnotation.Text = String.Format(ResStrings.str_minValue, tempBottlePointsValues.Min());
            SizeF annotationSize = TextRenderer.MeasureText(_minValueAnnotation.Text, _minValueAnnotation.Font);

            _minValueAnnotation.X = (exportChart.Width - annotationSize.Width + rightBorderOffset) * coeffWidth;
            _minValueAnnotation.Y = (exportChart.Height / 3.0 - 3 * (annotationSize.Height) + 10) * coeffHeight;

            _maxValueAnnotation.Text = String.Format(ResStrings.str_maxvalue, tempBottlePointsValues.Max());
            annotationSize           = TextRenderer.MeasureText(_maxValueAnnotation.Text, _minValueAnnotation.Font);
            _maxValueAnnotation.X    = (exportChart.Width - annotationSize.Width + rightBorderOffset) * coeffWidth;
            _maxValueAnnotation.Y    = (exportChart.Height / 3.0 - 2 * (annotationSize.Height) + 10) * coeffHeight;

            _averageValueAnnotation.Text = String.Format(ResStrings.str_Average_value, tempBottlePointsValues.Average());
            annotationSize            = TextRenderer.MeasureText(_averageValueAnnotation.Text, _minValueAnnotation.Font);
            _averageValueAnnotation.X = (exportChart.Width - annotationSize.Width + rightBorderOffset) * coeffWidth;
            _averageValueAnnotation.Y = (exportChart.Height / 3.0 - (annotationSize.Height) + 10) * coeffHeight;

            exportChart.Annotations.Add(_minValueAnnotation);
            exportChart.Annotations.Add(_maxValueAnnotation);
            exportChart.Annotations.Add(_averageValueAnnotation);

            exportChart.SaveImage(filePath, ChartImageFormat.Png);
        }