Преглед изворни кода

Вывод списка посещений

Вячеслав Терешенко пре 2 година
родитељ
комит
0757bb2c1e

+ 142 - 11
ImpulseVision/FormMain.Designer.cs

@@ -48,7 +48,7 @@
             this.BtnInfoTraffic = new System.Windows.Forms.ToolStripButton();
             this.statusStrip1 = new System.Windows.Forms.StatusStrip();
             this.TslStatus = new System.Windows.Forms.ToolStripStatusLabel();
-            this.ProgressTrain = new System.Windows.Forms.ToolStripProgressBar();
+            this.ProgressOperation = new System.Windows.Forms.ToolStripProgressBar();
             this.TimerNewCam = new System.Windows.Forms.Timer(this.components);
             this.TimerCheckTrain = new System.Windows.Forms.Timer(this.components);
             this.TabPages = new System.Windows.Forms.TabControl();
@@ -77,8 +77,18 @@
             this.LblTextSettings = new System.Windows.Forms.Label();
             this.SwAutoLoad = new ImpulseVision.EgoldsToggleSwitch();
             this.TbVisits = new System.Windows.Forms.TabPage();
+            this.TabJournal = new System.Windows.Forms.TableLayoutPanel();
+            this.BtnJournal = new System.Windows.Forms.Button();
+            this.DtpFiniteDate = new System.Windows.Forms.DateTimePicker();
+            this.CmbSortDate = new System.Windows.Forms.ComboBox();
+            this.PanelPeriod = new System.Windows.Forms.Panel();
+            this.DtpDateEnd = new System.Windows.Forms.DateTimePicker();
+            this.DtpDateStart = new System.Windows.Forms.DateTimePicker();
+            this.label6 = new System.Windows.Forms.Label();
+            this.label5 = new System.Windows.Forms.Label();
             this.ImList = new System.Windows.Forms.ImageList(this.components);
             this.TimerSaving = new System.Windows.Forms.Timer(this.components);
+            this.TmAnim = new System.Windows.Forms.Timer(this.components);
             this.menuStrip1.SuspendLayout();
             this.ToolsMenu.SuspendLayout();
             this.statusStrip1.SuspendLayout();
@@ -92,6 +102,8 @@
             this.RPanelForAddUser.SuspendLayout();
             this.TbSettings.SuspendLayout();
             this.RPanelSettings.SuspendLayout();
+            this.TbVisits.SuspendLayout();
+            this.PanelPeriod.SuspendLayout();
             this.SuspendLayout();
             // 
             // menuStrip1
@@ -234,7 +246,7 @@
             // 
             this.statusStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
             this.TslStatus,
-            this.ProgressTrain});
+            this.ProgressOperation});
             this.statusStrip1.Location = new System.Drawing.Point(0, 440);
             this.statusStrip1.Name = "statusStrip1";
             this.statusStrip1.Padding = new System.Windows.Forms.Padding(1, 0, 11, 0);
@@ -248,10 +260,10 @@
             this.TslStatus.Size = new System.Drawing.Size(38, 19);
             this.TslStatus.Text = "Готов";
             // 
-            // ProgressTrain
+            // ProgressOperation
             // 
-            this.ProgressTrain.Name = "ProgressTrain";
-            this.ProgressTrain.Size = new System.Drawing.Size(100, 18);
+            this.ProgressOperation.Name = "ProgressOperation";
+            this.ProgressOperation.Size = new System.Drawing.Size(100, 18);
             // 
             // TimerNewCam
             // 
@@ -278,7 +290,7 @@
             // 
             // TbUsers
             // 
-            this.TbUsers.BackColor = System.Drawing.Color.White;
+            this.TbUsers.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(253)))), ((int)(((byte)(255)))), ((int)(((byte)(252)))));
             this.TbUsers.Controls.Add(this.TableUsers);
             this.TbUsers.Controls.Add(this.RPanelUser);
             this.TbUsers.Location = new System.Drawing.Point(4, 30);
@@ -295,11 +307,11 @@
             this.TableUsers.AutoScroll = true;
             this.TableUsers.ColumnCount = 1;
             this.TableUsers.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle());
-            this.TableUsers.Location = new System.Drawing.Point(8, 31);
+            this.TableUsers.Location = new System.Drawing.Point(0, 31);
             this.TableUsers.Name = "TableUsers";
             this.TableUsers.RowCount = 1;
             this.TableUsers.RowStyles.Add(new System.Windows.Forms.RowStyle());
-            this.TableUsers.Size = new System.Drawing.Size(707, 291);
+            this.TableUsers.Size = new System.Drawing.Size(723, 323);
             this.TableUsers.TabIndex = 7;
             // 
             // RPanelUser
@@ -355,7 +367,7 @@
             // 
             // TableLayoutWorks
             // 
-            this.TableLayoutWorks.BackColor = System.Drawing.Color.White;
+            this.TableLayoutWorks.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(253)))), ((int)(((byte)(255)))), ((int)(((byte)(252)))));
             this.TableLayoutWorks.ColumnCount = 2;
             this.TableLayoutWorks.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Absolute, 256F));
             this.TableLayoutWorks.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Absolute, 473F));
@@ -664,12 +676,113 @@
             // 
             // TbVisits
             // 
+            this.TbVisits.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(253)))), ((int)(((byte)(255)))), ((int)(((byte)(252)))));
+            this.TbVisits.Controls.Add(this.TabJournal);
+            this.TbVisits.Controls.Add(this.BtnJournal);
+            this.TbVisits.Controls.Add(this.DtpFiniteDate);
+            this.TbVisits.Controls.Add(this.CmbSortDate);
+            this.TbVisits.Controls.Add(this.PanelPeriod);
+            this.TbVisits.Font = new System.Drawing.Font("Segoe UI Variable Small Semibol", 12F, System.Drawing.FontStyle.Bold);
             this.TbVisits.Location = new System.Drawing.Point(4, 30);
             this.TbVisits.Name = "TbVisits";
             this.TbVisits.Size = new System.Drawing.Size(723, 357);
             this.TbVisits.TabIndex = 3;
             this.TbVisits.Text = "tabPage1";
-            this.TbVisits.UseVisualStyleBackColor = true;
+            // 
+            // TabJournal
+            // 
+            this.TabJournal.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) 
+            | System.Windows.Forms.AnchorStyles.Left) 
+            | System.Windows.Forms.AnchorStyles.Right)));
+            this.TabJournal.AutoScroll = true;
+            this.TabJournal.ColumnCount = 1;
+            this.TabJournal.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle());
+            this.TabJournal.Location = new System.Drawing.Point(0, 49);
+            this.TabJournal.Name = "TabJournal";
+            this.TabJournal.RowCount = 1;
+            this.TabJournal.RowStyles.Add(new System.Windows.Forms.RowStyle());
+            this.TabJournal.Size = new System.Drawing.Size(723, 264);
+            this.TabJournal.TabIndex = 5;
+            // 
+            // BtnJournal
+            // 
+            this.BtnJournal.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
+            this.BtnJournal.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(124)))), ((int)(((byte)(136)))), ((int)(((byte)(144)))));
+            this.BtnJournal.Font = new System.Drawing.Font("Segoe UI Variable Small Semibol", 12F, System.Drawing.FontStyle.Bold);
+            this.BtnJournal.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(246)))), ((int)(((byte)(255)))), ((int)(((byte)(248)))));
+            this.BtnJournal.Location = new System.Drawing.Point(3, 319);
+            this.BtnJournal.Name = "BtnJournal";
+            this.BtnJournal.Size = new System.Drawing.Size(281, 35);
+            this.BtnJournal.TabIndex = 4;
+            this.BtnJournal.Text = "Журнал нераспознанных";
+            this.BtnJournal.UseVisualStyleBackColor = false;
+            this.BtnJournal.Click += new System.EventHandler(this.BtnJournal_Click);
+            // 
+            // DtpFiniteDate
+            // 
+            this.DtpFiniteDate.Location = new System.Drawing.Point(182, 3);
+            this.DtpFiniteDate.Name = "DtpFiniteDate";
+            this.DtpFiniteDate.Size = new System.Drawing.Size(199, 29);
+            this.DtpFiniteDate.TabIndex = 1;
+            this.DtpFiniteDate.ValueChanged += new System.EventHandler(this.DtpFiniteDate_ValueChanged);
+            // 
+            // CmbSortDate
+            // 
+            this.CmbSortDate.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
+            this.CmbSortDate.FormattingEnabled = true;
+            this.CmbSortDate.Items.AddRange(new object[] {
+            "Дата",
+            "Период"});
+            this.CmbSortDate.Location = new System.Drawing.Point(8, 3);
+            this.CmbSortDate.Name = "CmbSortDate";
+            this.CmbSortDate.Size = new System.Drawing.Size(168, 29);
+            this.CmbSortDate.TabIndex = 0;
+            this.CmbSortDate.SelectedIndexChanged += new System.EventHandler(this.CmbSortDate_SelectedIndexChanged);
+            // 
+            // PanelPeriod
+            // 
+            this.PanelPeriod.Controls.Add(this.DtpDateEnd);
+            this.PanelPeriod.Controls.Add(this.DtpDateStart);
+            this.PanelPeriod.Controls.Add(this.label6);
+            this.PanelPeriod.Controls.Add(this.label5);
+            this.PanelPeriod.Location = new System.Drawing.Point(168, -8);
+            this.PanelPeriod.Name = "PanelPeriod";
+            this.PanelPeriod.Size = new System.Drawing.Size(488, 51);
+            this.PanelPeriod.TabIndex = 3;
+            // 
+            // DtpDateEnd
+            // 
+            this.DtpDateEnd.Location = new System.Drawing.Point(279, 11);
+            this.DtpDateEnd.Name = "DtpDateEnd";
+            this.DtpDateEnd.Size = new System.Drawing.Size(199, 29);
+            this.DtpDateEnd.TabIndex = 7;
+            this.DtpDateEnd.ValueChanged += new System.EventHandler(this.DtpDateEnd_ValueChanged);
+            // 
+            // DtpDateStart
+            // 
+            this.DtpDateStart.Location = new System.Drawing.Point(36, 11);
+            this.DtpDateStart.Name = "DtpDateStart";
+            this.DtpDateStart.Size = new System.Drawing.Size(199, 29);
+            this.DtpDateStart.TabIndex = 6;
+            this.DtpDateStart.ValueChanged += new System.EventHandler(this.DtpDateStart_ValueChanged);
+            // 
+            // label6
+            // 
+            this.label6.AutoSize = true;
+            this.label6.Location = new System.Drawing.Point(10, 17);
+            this.label6.Name = "label6";
+            this.label6.Size = new System.Drawing.Size(20, 21);
+            this.label6.TabIndex = 4;
+            this.label6.Text = "С";
+            // 
+            // label5
+            // 
+            this.label5.AutoSize = true;
+            this.label5.Location = new System.Drawing.Point(241, 17);
+            this.label5.Name = "label5";
+            this.label5.Size = new System.Drawing.Size(32, 21);
+            this.label5.TabIndex = 5;
+            this.label5.Text = "По";
             // 
             // ImList
             // 
@@ -682,6 +795,11 @@
             this.TimerSaving.Interval = 500;
             this.TimerSaving.Tick += new System.EventHandler(this.TimerSaving_Tick);
             // 
+            // TmAnim
+            // 
+            this.TmAnim.Interval = 25;
+            this.TmAnim.Tick += new System.EventHandler(this.TmAnim_Tick);
+            // 
             // FormMain
             // 
             this.AutoScaleDimensions = new System.Drawing.SizeF(9F, 21F);
@@ -720,6 +838,9 @@
             this.TbSettings.ResumeLayout(false);
             this.TbSettings.PerformLayout();
             this.RPanelSettings.ResumeLayout(false);
+            this.TbVisits.ResumeLayout(false);
+            this.PanelPeriod.ResumeLayout(false);
+            this.PanelPeriod.PerformLayout();
             this.ResumeLayout(false);
             this.PerformLayout();
 
@@ -737,7 +858,7 @@
         private System.Windows.Forms.ToolStripButton BtnEditUser;
         private System.Windows.Forms.StatusStrip statusStrip1;
         private System.Windows.Forms.ToolStripStatusLabel TslStatus;
-        private System.Windows.Forms.ToolStripProgressBar ProgressTrain;
+        private System.Windows.Forms.ToolStripProgressBar ProgressOperation;
         private System.Windows.Forms.ToolStripSeparator toolStripSeparator2;
         private System.Windows.Forms.ToolStripButton BtnDelUser;
         private System.Windows.Forms.ToolStripMenuItem MSettings;
@@ -776,6 +897,16 @@
         public System.Windows.Forms.Timer TimerSaving;
         private EgoldsGoogleTextBox TbxPhone;
         private System.Windows.Forms.TabPage TbVisits;
+        private System.Windows.Forms.DateTimePicker DtpFiniteDate;
+        private System.Windows.Forms.ComboBox CmbSortDate;
+        private System.Windows.Forms.Panel PanelPeriod;
+        private System.Windows.Forms.DateTimePicker DtpDateEnd;
+        private System.Windows.Forms.DateTimePicker DtpDateStart;
+        private System.Windows.Forms.Label label6;
+        private System.Windows.Forms.Label label5;
+        private System.Windows.Forms.Timer TmAnim;
+        private System.Windows.Forms.Button BtnJournal;
+        private System.Windows.Forms.TableLayoutPanel TabJournal;
     }
 }
 

+ 169 - 158
ImpulseVision/FormMain.cs

@@ -106,6 +106,8 @@ namespace ImpulseVision
         //хранение информации о выбранном пользователе
         UserItem CurrentUser = null;
 
+        TileOvals CurrentOvals = null;
+
         SqlConnection SCon = new SqlConnection(Properties.Settings.Default.ImpulseVisionAppConnectionString);
         //список с пользователями системы
         List<Users> LstUsers = new List<Users>();
@@ -190,8 +192,6 @@ namespace ImpulseVision
 
             HaarCascade = new CascadeClassifier(Config.HaarCascadePath);
             FaceList.Clear();
-            string line;
-            FaceData faceInstance = null;
 
             // Create empty directory / file for face data if it doesn't exist
             if (!Directory.Exists(Config.FacePhotosPath))
@@ -199,42 +199,7 @@ namespace ImpulseVision
                 Directory.CreateDirectory(Config.FacePhotosPath);
             }
 
-            //if (!File.Exists(Config.FaceListTextFile))
-            //{
-            //    string text = "Cannot find face data file:\n\n";
-            //    text += Config.FaceListTextFile + "\n\n";
-            //    text += "If this is your first time running the app, an empty file will be created for you.";
-            //    DialogResult result = MessageBox.Show(text, "Warning",
-            //        MessageBoxButtons.OK, MessageBoxIcon.Warning);
-            //    switch (result)
-            //    {
-            //        case DialogResult.OK:
-            //            String dirName = Path.GetDirectoryName(Config.FaceListTextFile);
-            //            Directory.CreateDirectory(dirName);
-            //            File.Create(Config.FaceListTextFile).Close();
-            //            break;
-            //    }
-            //}
-
-            //StreamReader reader = new StreamReader(Config.FaceListTextFile);
-            //int i = 0;
-            //while ((line = reader.ReadLine()) != null)
-            //{
-            //    string[] lineParts = line.Split(':');
-            //    faceInstance = new FaceData();
-            //    faceInstance.FaceImage = new Image<Gray, byte>(Config.FacePhotosPath + lineParts[0] + Config.ImageFileExtension);
-            //    faceInstance.PersonName = lineParts[1];
-            //    FaceList.Add(faceInstance);
-            //}
-            //foreach (var face in FaceList)
-            //{
-            //    ImageList.Push(face.FaceImage.Mat);
-            //    NameList.Add(face.PersonName);
-            //    LabelList.Push(new[] { i++ });
-            //}
-            //reader.Close();
-
-            // Train recogniser
+            // Тренировать изображения
             if (ImageList.Size > 0)
             {
                 recognizer = new EigenFaceRecognizer(ImageList.Size);
@@ -284,6 +249,9 @@ namespace ImpulseVision
             CmbCams.Visible = false;
             TslSelCamText.Visible = false;
 
+            CmbSortDate.SelectedIndex = 0;
+            DtpFiniteDate.Value = DateTime.Now.Date;
+
             GetUsersFromDB();
         }
         /// <summary>
@@ -356,33 +324,6 @@ where ID = '{IdUser}'";
 
             MessageBox.Show("Пользователь безвозвратно удалён из системы!", "ImpulseVision", MessageBoxButtons.OK, MessageBoxIcon.Information);
         }
-        /// <summary>
-        /// получение информации об идентификаторах пользователей и путях доступа к их фотографиям
-        /// </summary>
-        private void GetPicturesPath()
-        {
-            SCon.Open();
-            string Query1 = $@"select UserID,Picture
-                    from FaceImages";
-            SqlCommand Cmd = new SqlCommand(Query1, SCon);
-            SqlDataReader Res = Cmd.ExecuteReader();
-            if (Res.HasRows)
-            {
-                LstUserPictures.Clear();
-                while (Res.Read())
-                {
-                    Pictures Pic = new Pictures();
-                    Pic.UserID = Res["UserID"].ToString();
-                    Pic.PicturePath = Res["Picture"].ToString();
-                    LstUserPictures.Add(Pic);
-                }
-            }
-            else
-            {
-                MessageBox.Show("Не удалось получить информацию об изображениях!", "ImpulseVision", MessageBoxButtons.OK, MessageBoxIcon.Error);
-            }
-            SCon.Close();
-        }
 
         /// <summary>
         /// показ окна добавления
@@ -640,23 +581,7 @@ where ID = '{IdUser}'";
             TableLayoutWorks.BackColor = Color.Gray;
             IsWorking = false;
         }
-        /// <summary>
-        /// переключение цветов кнопок включения/выключения
-        /// </summary>
-        /// <param name="IsWorking">статус работы камеры</param>
-        private void ColorRegular(bool IsWorking)
-        {
-            if(IsWorking)
-            {
-                BtnAddUser.BackColor = Color.LightGreen;
-                BtnEditUser.BackColor = Color.White;
-            }
-            else
-            {
-                BtnAddUser.BackColor = Color.White;
-                BtnEditUser.BackColor = Color.LightPink;
-            }
-        }
+
         /// <summary>
         /// сохранение информации для нового пользователя
         /// </summary>
@@ -668,7 +593,7 @@ where ID = '{IdUser}'";
                 return;
             }
             string PhotoPath = string.Empty;
-            ProgressTrain.Value = 10;
+            ProgressOperation.Value = 10;
             TslStatus.Text = "Добавление нового пользователя...";
 
             bool Flag = TbxLastname.Text.Trim() == "" || TbxFirstname.Text.Trim() == "" || TbxPasportSeria.Text.Trim() == "" || TbxPasportNum.Text.Trim() == "" || TbxPhone.Text.Trim() == "";
@@ -689,7 +614,7 @@ where PassportSeria = '{TbxPasportSeria.Text.Trim()}' and PassportNum = '{TbxPas
             {
                 MessageBox.Show("Данные паспорта указаны неверно!", "ImpulseVision", MessageBoxButtons.OK, MessageBoxIcon.Error);
                 SCon.Close();
-                ProgressTrain.Value = 0;
+                ProgressOperation.Value = 0;
                 return;
             }
             SCon.Close();
@@ -728,7 +653,7 @@ where PassportSeria = '{TbxPasportSeria.Text.Trim()}' and PassportNum = '{TbxPas
 
             TslStatus.Text = "Сохранение данных о пользователе...";
 
-            ProgressTrain.Value = 50;
+            ProgressOperation.Value = 50;
             TslStatus.Text = "Добавление нового пользователя...";
             //сохранение пути до фотографии
             SCon.Open();
@@ -744,73 +669,8 @@ values ({AddingUserID},'{PhotoPath}')";
             TimerSaving.Start();
 
             TslStatus.Text = "Готов";
-            ProgressTrain.Value = 100;
-        }
-
-        /// <summary>
-        /// тренировка изображения
-        /// </summary>
-        /// <returns>результат тренировки (true или false)</returns>
-        /*
-        private void TrainImageFromDir()
-        {
-            int CountImage = 0;
-            //порог
-            double Threshold = 10000;
-
-            LstTrainedFaces.Clear();
-            PersonLabes.Clear();
-            LstPersonNames.Clear();
-
-            try
-            {
-                //ProgressTrain.Value += 15;
-                string MyPath = Directory.GetCurrentDirectory() + @"\TrainedImages\";
-                string[] Files = Directory.GetFiles(MyPath, "*.jpg", SearchOption.AllDirectories);
-
-                int n = Files.Length;
-
-                foreach (string file in Files)
-                {
-                    //ProgressTrain.Value += (int)PlusDigit;
-
-                    Image<Gray, Byte> TrainedImage = new Image<Gray, Byte>(file);
-                    //добавить обученное изображение
-                    LstTrainedFaces.Add(TrainedImage);
-                    PersonLabes.Add(CountImage);
-
-                    string CurrentFileName = Path.GetFileName(file);
-                    string Name = CurrentFileName.Remove(CurrentFileName.IndexOf("_"), CurrentFileName.Length - CurrentFileName.IndexOf("_"));
-                    //(0, CurrentFileName.Length - CurrentFileName.IndexOf("_") + 1);
-                    //добавить имя
-                    LstPersonNames.Add(Name);
-
-                    CountImage++;
-                }
-                if (CountImage == 0)
-                {
-                    IsTrained = false;
-                    return;
-                }
-                //тренировка изображения
-                Recognizer = new EigenFaceRecognizer(CountImage, Threshold);
-                Recognizer.Train(LstTrainedFaces.ToArray(), PersonLabes.ToArray());
-
-                //ProgressTrain.Value += 100 - ProgressTrain.Value;
-
-                //записать, что обучен
-                IsTrained = true;
-
-                MessageBox.Show("Тренировка изображений выполнена!");
-            }
-            catch (Exception ex)
-            {
-                IsTrained = false;
-            }
-
+            ProgressOperation.Value = 100;
         }
-        */
-
 
         private void CmbCams_SelectedIndexChanged(object sender, EventArgs e)
         {
@@ -882,10 +742,10 @@ values ({AddingUserID},'{PhotoPath}')";
             }
             HtBefore.Except(HtAfter);
 
-            ProgressTrain.Value = 0;
+            ProgressOperation.Value = 0;
             TslStatus.Text = $"Устройство: {string.Join(" ",HtBefore)} - отключено";
             await Task.Delay(1000);
-            ProgressTrain.Value = 100;
+            ProgressOperation.Value = 100;
             TslStatus.Text = "Готов";
         }
         /// <summary>
@@ -895,24 +755,24 @@ values ({AddingUserID},'{PhotoPath}')";
         async void StatusAddNewDevice(DsDevice[] Cams)
         {
             TslStatus.Text = "Добавление нового устройства..";
-            ProgressTrain.Value = 0;
-            while(ProgressTrain.Value < 100)
+            ProgressOperation.Value = 0;
+            while(ProgressOperation.Value < 100)
             {
-                ProgressTrain.Value += 5;
+                ProgressOperation.Value += 5;
                 await Task.Delay(50);
             }
             TslStatus.Text = "Добавлено новое устройство";
             await Task.Delay(1000);
             TslStatus.Text = $"{Cams[Cams.Length-1].Name}";
             await Task.Delay(1000);
-            ProgressTrain.Value = 100;
+            ProgressOperation.Value = 100;
             TslStatus.Text = "Готов";
         }
 
         private void BtnCheck_Click(object sender, EventArgs e)
         {
             TslStatus.Text = "Подождите.. выполняется анализ лица..";
-            ProgressTrain.Value = 45;
+            ProgressOperation.Value = 45;
             //TrainImageFromDir();
 
             //FaceDifferent();
@@ -1022,6 +882,8 @@ values ({AddingUserID},'{PhotoPath}')";
             BtnAddUser.Enabled = true;
             BtnInfoTraffic.Enabled = true;
 
+            TslStatus.Text = "Готов";
+            ProgressOperation.Value = 100;
         }
 
         private void BtnEditUser_Click(object sender, EventArgs e)
@@ -1047,7 +909,156 @@ values ({AddingUserID},'{PhotoPath}')";
 
         private void BtnInfoTraffic_Click(object sender, EventArgs e)
         {
+            GetJournalVisits();
             TabPages.SelectTab(3);
+            TmAnim.Enabled = true;
+        }
+        /// <summary>
+        /// получение из БД списка посещений
+        /// </summary>
+        private void GetJournalVisits()
+        {
+            TslStatus.Text = "Загрузка данных...";
+            ProgressOperation.Value = 10;
+
+            SCon.Open();
+            string QueryGetVisits = $@"set dateformat dmy
+select Users.ID,Users.Lastname +' '+ Users.Firstname + ' '+Users.Patronymic as FIO,TimeEntrance,TimeExit,
+[Date],Identification
+from UserTraffic ut join Users on ut.UserID = Users.ID
+";
+            if(DtpFiniteDate.Visible)
+            {
+                QueryGetVisits += $"  where [Date] = '{DtpFiniteDate.Value.Date}'";
+            }
+            else
+            {
+                QueryGetVisits += $"  where [Date] between '{DtpDateStart.Value.Date}' and '{DtpDateEnd.Value.Date}'";
+            }
+            SqlCommand Cmd = new SqlCommand(QueryGetVisits, SCon);
+            SqlDataReader Res = Cmd.ExecuteReader();
+
+            ProgressOperation.Value = 30;
+
+            TabJournal.Controls.Clear();
+            if (Res.HasRows)
+            {
+                while (Res.Read())
+                {
+                    TileOvals Ovals = new TileOvals();
+                    Ovals.UserID = Res["ID"].ToString();
+                    Ovals.LblNameUser.Text = Res["FIO"].ToString();
+                    Ovals.LblTimeEntrance.Text = Res["TimeEntrance"].ToString();
+                    Ovals.LblTimeExit.Text = Res["TimeExit"].ToString();
+                    Ovals.IsIdentification = Res["Identification"].ToString();
+                    Ovals.LblDate.Text = DateTime.Parse(Res["Date"].ToString()).ToString("dd.MM.yyyy");
+
+                    Ovals.Click += Ovals_Click;
+                    Ovals.LblDate.Click += OvalsObject_Click;
+                    Ovals.LblNameUser.Click += OvalsObject_Click;
+                    Ovals.LblTimeEntrance.Click += OvalsObject_Click;
+                    Ovals.LblTimeExit.Click += OvalsObject_Click;
+                    Ovals.RPanelName.Click += OvalsObject_Click;
+                    Ovals.RPanelTimeEntrance.Click += OvalsObject_Click;
+                    Ovals.RPanelTimeExit.Click += OvalsObject_Click;
+                    Ovals.RPanelDate.Click += OvalsObject_Click;
+
+                    TabJournal.Controls.Add(Ovals);
+                    if (TabJournal.Controls.Count == 1)
+                    {
+                        CurrentOvals = Ovals;
+                        CurrentOvals.RPanelDate.BackColor = ColorTranslator.FromHtml("#C3EB78");
+                        CurrentOvals.RPanelName.BackColor = ColorTranslator.FromHtml("#C3EB78");
+                        CurrentOvals.RPanelTimeEntrance.BackColor = ColorTranslator.FromHtml("#C3EB78");
+                        CurrentOvals.RPanelTimeExit.BackColor = ColorTranslator.FromHtml("#C3EB78");
+                    }
+                }
+            }
+            else
+            {
+                //MessageBox.Show("При выбранных параметрах сортировки, результаты отсутствуют! Выберите новые параметры и повторите попытку.", "ImpulseVision", MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
+                //SCon.Close();
+                //return;
+            }
+            SCon.Close();
+
+            TslStatus.Text = "Готов";
+            ProgressOperation.Value = 100;
+        }
+
+        private void OvalsObject_Click(object sender, EventArgs e)
+        {
+            //CurrentOvals = (sender as Control).Parent as TileOvals;
+
+            CurrentOvals.RPanelDate.BackColor = Color.FromArgb(184, 184, 255);
+            CurrentOvals.RPanelName.BackColor = Color.FromArgb(184, 184, 255);
+            CurrentOvals.RPanelTimeEntrance.BackColor = Color.FromArgb(184, 184, 255);
+            CurrentOvals.RPanelTimeExit.BackColor = Color.FromArgb(184, 184, 255);
+
+            CurrentOvals = ((sender as Control).Parent as RPanel).Parent as TileOvals;
+
+            CurrentOvals.RPanelDate.BackColor = ColorTranslator.FromHtml("#C3EB78");
+            CurrentOvals.RPanelName.BackColor = ColorTranslator.FromHtml("#C3EB78");
+            CurrentOvals.RPanelTimeEntrance.BackColor = ColorTranslator.FromHtml("#C3EB78");
+            CurrentOvals.RPanelTimeExit.BackColor = ColorTranslator.FromHtml("#C3EB78");
+        }
+
+        private void Ovals_Click(object sender, EventArgs e)
+        {
+            CurrentOvals.RPanelDate.BackColor = Color.FromArgb(184, 184, 255);
+            CurrentOvals.RPanelName.BackColor = Color.FromArgb(184, 184, 255);
+            CurrentOvals.RPanelTimeEntrance.BackColor = Color.FromArgb(184, 184, 255);
+            CurrentOvals.RPanelTimeExit.BackColor = Color.FromArgb(184, 184, 255);
+
+            CurrentOvals = sender as TileOvals;
+
+            CurrentOvals.RPanelDate.BackColor = ColorTranslator.FromHtml("#C3EB78");
+            CurrentOvals.RPanelName.BackColor = ColorTranslator.FromHtml("#C3EB78");
+            CurrentOvals.RPanelTimeEntrance.BackColor = ColorTranslator.FromHtml("#C3EB78");
+            CurrentOvals.RPanelTimeExit.BackColor = ColorTranslator.FromHtml("#C3EB78");
+        }
+
+        private void CmbSortDate_SelectedIndexChanged(object sender, EventArgs e)
+        {
+            PanelPeriod.Visible = CmbSortDate.SelectedIndex == 1;
+            DtpFiniteDate.Visible = CmbSortDate.SelectedIndex == 0;
+        }
+        int LocX = 0;
+        private void TmAnim_Tick(object sender, EventArgs e)
+        {
+            //LocX = LblTest.Location.X;
+            //LocX++;
+            //LblTest.Location = new Point(LocX, LblTest.Location.Y);
+        }
+
+
+        private void BtnJournal_Click(object sender, EventArgs e)
+        {
+            TabJournal.Controls.Clear();
+            for (int i = 0; i < 10; i++)
+            {
+                TileOvals Ovals = new TileOvals();
+                Ovals.LblNameUser.Text = "Иванов Иван Иванович";
+                Ovals.LblTimeEntrance.Text = "13:15:00";
+                Ovals.LblTimeExit.Text = "13:48:59";
+                Ovals.LblDate.Text = "26.04.2023";
+                TabJournal.Controls.Add(Ovals);
+            }
+        }
+
+        private void DtpFiniteDate_ValueChanged(object sender, EventArgs e)
+        {
+            GetJournalVisits();
+        }
+
+        private void DtpDateStart_ValueChanged(object sender, EventArgs e)
+        {
+            GetJournalVisits();
+        }
+
+        private void DtpDateEnd_ValueChanged(object sender, EventArgs e)
+        {
+            GetJournalVisits();
         }
     }
 }

+ 4 - 1
ImpulseVision/FormMain.resx

@@ -138,8 +138,11 @@
   <metadata name="TimerSaving.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
     <value>711, 17</value>
   </metadata>
+  <metadata name="TmAnim.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
+    <value>17, 19</value>
+  </metadata>
   <metadata name="$this.TrayHeight" type="System.Int32, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
-    <value>58</value>
+    <value>64</value>
   </metadata>
   <assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
   <data name="$this.Icon" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">

+ 252 - 0
ImpulseVision/FormOvals.Designer.cs

@@ -0,0 +1,252 @@
+namespace ImpulseVision
+{
+    partial class FormOvals
+    {
+        /// <summary>
+        /// Required designer variable.
+        /// </summary>
+        private System.ComponentModel.IContainer components = null;
+
+        /// <summary>
+        /// Clean up any resources being used.
+        /// </summary>
+        /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
+        protected override void Dispose(bool disposing)
+        {
+            if (disposing && (components != null))
+            {
+                components.Dispose();
+            }
+            base.Dispose(disposing);
+        }
+
+        #region Windows Form Designer generated code
+
+        /// <summary>
+        /// Required method for Designer support - do not modify
+        /// the contents of this method with the code editor.
+        /// </summary>
+        private void InitializeComponent()
+        {
+            this.PanelTile = new System.Windows.Forms.Panel();
+            this.RPanelDate = new ImpulseVision.RPanel();
+            this.LblDate = new System.Windows.Forms.Label();
+            this.RPanelTimeExit = new ImpulseVision.RPanel();
+            this.LblTimeExit = new System.Windows.Forms.Label();
+            this.RPanelTimeEntrance = new ImpulseVision.RPanel();
+            this.LblTimeEntrance = new System.Windows.Forms.Label();
+            this.RPanelName = new ImpulseVision.RPanel();
+            this.LblNameUser = new System.Windows.Forms.Label();
+            this.PanelTile.SuspendLayout();
+            this.RPanelDate.SuspendLayout();
+            this.RPanelTimeExit.SuspendLayout();
+            this.RPanelTimeEntrance.SuspendLayout();
+            this.RPanelName.SuspendLayout();
+            this.SuspendLayout();
+            // 
+            // PanelTile
+            // 
+            this.PanelTile.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) 
+            | System.Windows.Forms.AnchorStyles.Right)));
+            this.PanelTile.Controls.Add(this.RPanelDate);
+            this.PanelTile.Controls.Add(this.RPanelTimeExit);
+            this.PanelTile.Controls.Add(this.RPanelTimeEntrance);
+            this.PanelTile.Controls.Add(this.RPanelName);
+            this.PanelTile.Location = new System.Drawing.Point(3, 31);
+            this.PanelTile.Name = "PanelTile";
+            this.PanelTile.Size = new System.Drawing.Size(638, 50);
+            this.PanelTile.TabIndex = 0;
+            // 
+            // RPanelDate
+            // 
+            this.RPanelDate.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
+            this.RPanelDate.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(184)))), ((int)(((byte)(184)))), ((int)(((byte)(255)))));
+            this.RPanelDate.BackColorAdditional = System.Drawing.Color.Gray;
+            this.RPanelDate.BackColorGradientEnabled = false;
+            this.RPanelDate.BackColorGradientMode = System.Drawing.Drawing2D.LinearGradientMode.Horizontal;
+            this.RPanelDate.BorderColor = System.Drawing.Color.Tomato;
+            this.RPanelDate.BorderColorEnabled = false;
+            this.RPanelDate.BorderColorOnHover = System.Drawing.Color.Tomato;
+            this.RPanelDate.BorderColorOnHoverEnabled = false;
+            this.RPanelDate.Controls.Add(this.LblDate);
+            this.RPanelDate.Cursor = System.Windows.Forms.Cursors.Default;
+            this.RPanelDate.Font = new System.Drawing.Font("Verdana", 8.25F);
+            this.RPanelDate.ForeColor = System.Drawing.Color.White;
+            this.RPanelDate.Location = new System.Drawing.Point(512, 3);
+            this.RPanelDate.Name = "RPanelDate";
+            this.RPanelDate.RippleColor = System.Drawing.Color.Black;
+            this.RPanelDate.RoundingEnable = true;
+            this.RPanelDate.Size = new System.Drawing.Size(123, 43);
+            this.RPanelDate.TabIndex = 4;
+            this.RPanelDate.TextHover = null;
+            this.RPanelDate.UseDownPressEffectOnClick = false;
+            this.RPanelDate.UseRippleEffect = true;
+            this.RPanelDate.UseZoomEffectOnHover = false;
+            // 
+            // LblDate
+            // 
+            this.LblDate.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) 
+            | System.Windows.Forms.AnchorStyles.Right)));
+            this.LblDate.BackColor = System.Drawing.Color.Transparent;
+            this.LblDate.Font = new System.Drawing.Font("Segoe UI Variable Small Semibol", 12F, System.Drawing.FontStyle.Bold);
+            this.LblDate.ForeColor = System.Drawing.Color.Black;
+            this.LblDate.Location = new System.Drawing.Point(3, 0);
+            this.LblDate.Name = "LblDate";
+            this.LblDate.Size = new System.Drawing.Size(117, 43);
+            this.LblDate.TabIndex = 0;
+            this.LblDate.Text = "26.04.2023";
+            this.LblDate.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
+            // 
+            // RPanelTimeExit
+            // 
+            this.RPanelTimeExit.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
+            this.RPanelTimeExit.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(184)))), ((int)(((byte)(184)))), ((int)(((byte)(255)))));
+            this.RPanelTimeExit.BackColorAdditional = System.Drawing.Color.Gray;
+            this.RPanelTimeExit.BackColorGradientEnabled = false;
+            this.RPanelTimeExit.BackColorGradientMode = System.Drawing.Drawing2D.LinearGradientMode.Horizontal;
+            this.RPanelTimeExit.BorderColor = System.Drawing.Color.Tomato;
+            this.RPanelTimeExit.BorderColorEnabled = false;
+            this.RPanelTimeExit.BorderColorOnHover = System.Drawing.Color.Tomato;
+            this.RPanelTimeExit.BorderColorOnHoverEnabled = false;
+            this.RPanelTimeExit.Controls.Add(this.LblTimeExit);
+            this.RPanelTimeExit.Cursor = System.Windows.Forms.Cursors.Default;
+            this.RPanelTimeExit.Font = new System.Drawing.Font("Verdana", 8.25F);
+            this.RPanelTimeExit.ForeColor = System.Drawing.Color.White;
+            this.RPanelTimeExit.Location = new System.Drawing.Point(404, 3);
+            this.RPanelTimeExit.Name = "RPanelTimeExit";
+            this.RPanelTimeExit.RippleColor = System.Drawing.Color.Black;
+            this.RPanelTimeExit.RoundingEnable = true;
+            this.RPanelTimeExit.Size = new System.Drawing.Size(105, 43);
+            this.RPanelTimeExit.TabIndex = 3;
+            this.RPanelTimeExit.TextHover = null;
+            this.RPanelTimeExit.UseDownPressEffectOnClick = false;
+            this.RPanelTimeExit.UseRippleEffect = true;
+            this.RPanelTimeExit.UseZoomEffectOnHover = false;
+            // 
+            // LblTimeExit
+            // 
+            this.LblTimeExit.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) 
+            | System.Windows.Forms.AnchorStyles.Right)));
+            this.LblTimeExit.BackColor = System.Drawing.Color.Transparent;
+            this.LblTimeExit.Font = new System.Drawing.Font("Segoe UI Variable Small Semibol", 12F, System.Drawing.FontStyle.Bold);
+            this.LblTimeExit.ForeColor = System.Drawing.Color.Black;
+            this.LblTimeExit.Location = new System.Drawing.Point(3, 0);
+            this.LblTimeExit.Name = "LblTimeExit";
+            this.LblTimeExit.Size = new System.Drawing.Size(99, 43);
+            this.LblTimeExit.TabIndex = 0;
+            this.LblTimeExit.Text = "13:15:00";
+            this.LblTimeExit.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
+            // 
+            // RPanelTimeEntrance
+            // 
+            this.RPanelTimeEntrance.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
+            this.RPanelTimeEntrance.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(184)))), ((int)(((byte)(184)))), ((int)(((byte)(255)))));
+            this.RPanelTimeEntrance.BackColorAdditional = System.Drawing.Color.Gray;
+            this.RPanelTimeEntrance.BackColorGradientEnabled = false;
+            this.RPanelTimeEntrance.BackColorGradientMode = System.Drawing.Drawing2D.LinearGradientMode.Horizontal;
+            this.RPanelTimeEntrance.BorderColor = System.Drawing.Color.Tomato;
+            this.RPanelTimeEntrance.BorderColorEnabled = false;
+            this.RPanelTimeEntrance.BorderColorOnHover = System.Drawing.Color.Tomato;
+            this.RPanelTimeEntrance.BorderColorOnHoverEnabled = false;
+            this.RPanelTimeEntrance.Controls.Add(this.LblTimeEntrance);
+            this.RPanelTimeEntrance.Cursor = System.Windows.Forms.Cursors.Default;
+            this.RPanelTimeEntrance.Font = new System.Drawing.Font("Verdana", 8.25F);
+            this.RPanelTimeEntrance.ForeColor = System.Drawing.Color.White;
+            this.RPanelTimeEntrance.Location = new System.Drawing.Point(296, 3);
+            this.RPanelTimeEntrance.Name = "RPanelTimeEntrance";
+            this.RPanelTimeEntrance.RippleColor = System.Drawing.Color.Black;
+            this.RPanelTimeEntrance.RoundingEnable = true;
+            this.RPanelTimeEntrance.Size = new System.Drawing.Size(105, 43);
+            this.RPanelTimeEntrance.TabIndex = 2;
+            this.RPanelTimeEntrance.TextHover = null;
+            this.RPanelTimeEntrance.UseDownPressEffectOnClick = false;
+            this.RPanelTimeEntrance.UseRippleEffect = true;
+            this.RPanelTimeEntrance.UseZoomEffectOnHover = false;
+            // 
+            // LblTimeEntrance
+            // 
+            this.LblTimeEntrance.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) 
+            | System.Windows.Forms.AnchorStyles.Right)));
+            this.LblTimeEntrance.BackColor = System.Drawing.Color.Transparent;
+            this.LblTimeEntrance.Font = new System.Drawing.Font("Segoe UI Variable Small Semibol", 12F, System.Drawing.FontStyle.Bold);
+            this.LblTimeEntrance.ForeColor = System.Drawing.Color.Black;
+            this.LblTimeEntrance.Location = new System.Drawing.Point(3, 0);
+            this.LblTimeEntrance.Name = "LblTimeEntrance";
+            this.LblTimeEntrance.Size = new System.Drawing.Size(99, 43);
+            this.LblTimeEntrance.TabIndex = 0;
+            this.LblTimeEntrance.Text = "13:15:00";
+            this.LblTimeEntrance.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
+            // 
+            // RPanelName
+            // 
+            this.RPanelName.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) 
+            | System.Windows.Forms.AnchorStyles.Right)));
+            this.RPanelName.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(195)))), ((int)(((byte)(235)))), ((int)(((byte)(120)))));
+            this.RPanelName.BackColorAdditional = System.Drawing.Color.Gray;
+            this.RPanelName.BackColorGradientEnabled = false;
+            this.RPanelName.BackColorGradientMode = System.Drawing.Drawing2D.LinearGradientMode.Horizontal;
+            this.RPanelName.BorderColor = System.Drawing.Color.Tomato;
+            this.RPanelName.BorderColorEnabled = false;
+            this.RPanelName.BorderColorOnHover = System.Drawing.Color.Tomato;
+            this.RPanelName.BorderColorOnHoverEnabled = false;
+            this.RPanelName.Controls.Add(this.LblNameUser);
+            this.RPanelName.Cursor = System.Windows.Forms.Cursors.Default;
+            this.RPanelName.Font = new System.Drawing.Font("Verdana", 8.25F);
+            this.RPanelName.ForeColor = System.Drawing.Color.White;
+            this.RPanelName.Location = new System.Drawing.Point(3, 3);
+            this.RPanelName.Name = "RPanelName";
+            this.RPanelName.RippleColor = System.Drawing.Color.Black;
+            this.RPanelName.RoundingEnable = true;
+            this.RPanelName.Size = new System.Drawing.Size(290, 43);
+            this.RPanelName.TabIndex = 1;
+            this.RPanelName.TextHover = null;
+            this.RPanelName.UseDownPressEffectOnClick = false;
+            this.RPanelName.UseRippleEffect = true;
+            this.RPanelName.UseZoomEffectOnHover = false;
+            // 
+            // LblNameUser
+            // 
+            this.LblNameUser.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) 
+            | System.Windows.Forms.AnchorStyles.Right)));
+            this.LblNameUser.BackColor = System.Drawing.Color.Transparent;
+            this.LblNameUser.Font = new System.Drawing.Font("Segoe UI Variable Small Semibol", 12F, System.Drawing.FontStyle.Bold);
+            this.LblNameUser.ForeColor = System.Drawing.Color.Black;
+            this.LblNameUser.Location = new System.Drawing.Point(3, 0);
+            this.LblNameUser.Name = "LblNameUser";
+            this.LblNameUser.Size = new System.Drawing.Size(284, 43);
+            this.LblNameUser.TabIndex = 0;
+            this.LblNameUser.Text = "Сидоров Иван Игоревич";
+            this.LblNameUser.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
+            // 
+            // FormOvals
+            // 
+            this.AutoScaleDimensions = new System.Drawing.SizeF(9F, 21F);
+            this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
+            this.BackColor = System.Drawing.Color.White;
+            this.ClientSize = new System.Drawing.Size(644, 218);
+            this.Controls.Add(this.PanelTile);
+            this.Font = new System.Drawing.Font("Segoe UI Variable Small Semibol", 12F, System.Drawing.FontStyle.Bold);
+            this.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5);
+            this.Name = "FormOvals";
+            this.Text = "FormOvals";
+            this.PanelTile.ResumeLayout(false);
+            this.RPanelDate.ResumeLayout(false);
+            this.RPanelTimeExit.ResumeLayout(false);
+            this.RPanelTimeEntrance.ResumeLayout(false);
+            this.RPanelName.ResumeLayout(false);
+            this.ResumeLayout(false);
+
+        }
+
+        #endregion
+        public RPanel RPanelName;
+        public System.Windows.Forms.Label LblNameUser;
+        public RPanel RPanelDate;
+        public System.Windows.Forms.Label LblDate;
+        public RPanel RPanelTimeExit;
+        public System.Windows.Forms.Label LblTimeExit;
+        public RPanel RPanelTimeEntrance;
+        public System.Windows.Forms.Label LblTimeEntrance;
+        public System.Windows.Forms.Panel PanelTile;
+    }
+}

+ 20 - 0
ImpulseVision/FormOvals.cs

@@ -0,0 +1,20 @@
+using System;
+using System.Collections.Generic;
+using System.ComponentModel;
+using System.Data;
+using System.Drawing;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using System.Windows.Forms;
+
+namespace ImpulseVision
+{
+    public partial class FormOvals : Form
+    {
+        public FormOvals()
+        {
+            InitializeComponent();
+        }
+    }
+}

+ 120 - 0
ImpulseVision/FormOvals.resx

@@ -0,0 +1,120 @@
+<?xml version="1.0" encoding="utf-8"?>
+<root>
+  <!-- 
+    Microsoft ResX Schema 
+    
+    Version 2.0
+    
+    The primary goals of this format is to allow a simple XML format 
+    that is mostly human readable. The generation and parsing of the 
+    various data types are done through the TypeConverter classes 
+    associated with the data types.
+    
+    Example:
+    
+    ... ado.net/XML headers & schema ...
+    <resheader name="resmimetype">text/microsoft-resx</resheader>
+    <resheader name="version">2.0</resheader>
+    <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
+    <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
+    <data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
+    <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
+    <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
+        <value>[base64 mime encoded serialized .NET Framework object]</value>
+    </data>
+    <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+        <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
+        <comment>This is a comment</comment>
+    </data>
+                
+    There are any number of "resheader" rows that contain simple 
+    name/value pairs.
+    
+    Each data row contains a name, and value. The row also contains a 
+    type or mimetype. Type corresponds to a .NET class that support 
+    text/value conversion through the TypeConverter architecture. 
+    Classes that don't support this are serialized and stored with the 
+    mimetype set.
+    
+    The mimetype is used for serialized objects, and tells the 
+    ResXResourceReader how to depersist the object. This is currently not 
+    extensible. For a given mimetype the value must be set accordingly:
+    
+    Note - application/x-microsoft.net.object.binary.base64 is the format 
+    that the ResXResourceWriter will generate, however the reader can 
+    read any of the formats listed below.
+    
+    mimetype: application/x-microsoft.net.object.binary.base64
+    value   : The object must be serialized with 
+            : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
+            : and then encoded with base64 encoding.
+    
+    mimetype: application/x-microsoft.net.object.soap.base64
+    value   : The object must be serialized with 
+            : System.Runtime.Serialization.Formatters.Soap.SoapFormatter
+            : and then encoded with base64 encoding.
+
+    mimetype: application/x-microsoft.net.object.bytearray.base64
+    value   : The object must be serialized into a byte array 
+            : using a System.ComponentModel.TypeConverter
+            : and then encoded with base64 encoding.
+    -->
+  <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
+    <xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
+    <xsd:element name="root" msdata:IsDataSet="true">
+      <xsd:complexType>
+        <xsd:choice maxOccurs="unbounded">
+          <xsd:element name="metadata">
+            <xsd:complexType>
+              <xsd:sequence>
+                <xsd:element name="value" type="xsd:string" minOccurs="0" />
+              </xsd:sequence>
+              <xsd:attribute name="name" use="required" type="xsd:string" />
+              <xsd:attribute name="type" type="xsd:string" />
+              <xsd:attribute name="mimetype" type="xsd:string" />
+              <xsd:attribute ref="xml:space" />
+            </xsd:complexType>
+          </xsd:element>
+          <xsd:element name="assembly">
+            <xsd:complexType>
+              <xsd:attribute name="alias" type="xsd:string" />
+              <xsd:attribute name="name" type="xsd:string" />
+            </xsd:complexType>
+          </xsd:element>
+          <xsd:element name="data">
+            <xsd:complexType>
+              <xsd:sequence>
+                <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
+                <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
+              </xsd:sequence>
+              <xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
+              <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
+              <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
+              <xsd:attribute ref="xml:space" />
+            </xsd:complexType>
+          </xsd:element>
+          <xsd:element name="resheader">
+            <xsd:complexType>
+              <xsd:sequence>
+                <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
+              </xsd:sequence>
+              <xsd:attribute name="name" type="xsd:string" use="required" />
+            </xsd:complexType>
+          </xsd:element>
+        </xsd:choice>
+      </xsd:complexType>
+    </xsd:element>
+  </xsd:schema>
+  <resheader name="resmimetype">
+    <value>text/microsoft-resx</value>
+  </resheader>
+  <resheader name="version">
+    <value>2.0</value>
+  </resheader>
+  <resheader name="reader">
+    <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+  </resheader>
+  <resheader name="writer">
+    <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+  </resheader>
+</root>

+ 12 - 0
ImpulseVision/ImpulseVision.csproj

@@ -150,6 +150,12 @@
     <Compile Include="FormMain.Designer.cs">
       <DependentUpon>FormMain.cs</DependentUpon>
     </Compile>
+    <Compile Include="FormOvals.cs">
+      <SubType>Form</SubType>
+    </Compile>
+    <Compile Include="FormOvals.Designer.cs">
+      <DependentUpon>FormOvals.cs</DependentUpon>
+    </Compile>
     <Compile Include="FormStart.cs">
       <SubType>Form</SubType>
     </Compile>
@@ -190,6 +196,9 @@
     <Compile Include="Switch.Designer.cs">
       <DependentUpon>Switch.cs</DependentUpon>
     </Compile>
+    <Compile Include="TileOvals.cs">
+      <SubType>Component</SubType>
+    </Compile>
     <Compile Include="UserItem.cs">
       <SubType>Component</SubType>
     </Compile>
@@ -208,6 +217,9 @@
     <EmbeddedResource Include="FormMain.resx">
       <DependentUpon>FormMain.cs</DependentUpon>
     </EmbeddedResource>
+    <EmbeddedResource Include="FormOvals.resx">
+      <DependentUpon>FormOvals.cs</DependentUpon>
+    </EmbeddedResource>
     <EmbeddedResource Include="FormStart.resx">
       <DependentUpon>FormStart.cs</DependentUpon>
     </EmbeddedResource>

+ 219 - 0
ImpulseVision/TileOvals.cs

@@ -0,0 +1,219 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using System.Windows.Forms;
+
+namespace ImpulseVision
+{
+    /// <summary>
+    /// Овальноподобные плитки для вывода журнала посещений
+    /// </summary>
+    public class TileOvals : Panel
+    {
+        public RPanel RPanelName;
+        public System.Windows.Forms.Label LblNameUser;
+        public RPanel RPanelDate;
+        public System.Windows.Forms.Label LblDate;
+        public RPanel RPanelTimeExit;
+        public System.Windows.Forms.Label LblTimeExit;
+        public RPanel RPanelTimeEntrance;
+        public System.Windows.Forms.Label LblTimeEntrance;
+        public string UserID;
+        public string IsIdentification;
+
+        public TileOvals()
+        {
+            //this = new System.Windows.Forms.Panel();
+            this.RPanelName = new ImpulseVision.RPanel();
+            this.LblNameUser = new System.Windows.Forms.Label();
+            this.RPanelTimeEntrance = new ImpulseVision.RPanel();
+            this.LblTimeEntrance = new System.Windows.Forms.Label();
+            this.RPanelTimeExit = new ImpulseVision.RPanel();
+            this.LblTimeExit = new System.Windows.Forms.Label();
+            this.RPanelDate = new ImpulseVision.RPanel();
+            this.LblDate = new System.Windows.Forms.Label();
+            //this.SuspendLayout();
+            //this.RPanelName.SuspendLayout();
+            this.RPanelTimeEntrance.SuspendLayout();
+            this.RPanelTimeExit.SuspendLayout();
+            this.RPanelDate.SuspendLayout();
+            //this.SuspendLayout();
+            // 
+            // PanelTile
+            // 
+            this.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
+            | System.Windows.Forms.AnchorStyles.Right)));
+            this.Controls.Add(this.RPanelDate);
+            this.Controls.Add(this.RPanelTimeExit);
+            this.Controls.Add(this.RPanelTimeEntrance);
+            this.Controls.Add(this.RPanelName);
+            this.Location = new System.Drawing.Point(3, 31);
+            this.Name = "PanelTile";
+            this.Size = new System.Drawing.Size(638, 50);
+            this.TabIndex = 0;
+            // 
+            // RPanelName
+            // 
+            this.RPanelName.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
+            | System.Windows.Forms.AnchorStyles.Right)));
+            this.RPanelName.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(184)))), ((int)(((byte)(184)))), ((int)(((byte)(255)))));
+            this.RPanelName.BackColorAdditional = System.Drawing.Color.Gray;
+            this.RPanelName.BackColorGradientEnabled = false;
+            this.RPanelName.BackColorGradientMode = System.Drawing.Drawing2D.LinearGradientMode.Horizontal;
+            this.RPanelName.BorderColor = System.Drawing.Color.Tomato;
+            this.RPanelName.BorderColorEnabled = false;
+            this.RPanelName.BorderColorOnHover = System.Drawing.Color.Tomato;
+            this.RPanelName.BorderColorOnHoverEnabled = false;
+            this.RPanelName.Controls.Add(this.LblNameUser);
+            this.RPanelName.Cursor = System.Windows.Forms.Cursors.Default;
+            this.RPanelName.Font = new System.Drawing.Font("Verdana", 8.25F);
+            this.RPanelName.ForeColor = System.Drawing.Color.White;
+            this.RPanelName.Location = new System.Drawing.Point(3, 3);
+            this.RPanelName.Name = "RPanelName";
+            this.RPanelName.RippleColor = System.Drawing.Color.Black;
+            this.RPanelName.RoundingEnable = true;
+            this.RPanelName.Size = new System.Drawing.Size(290, 43);
+            this.RPanelName.TabIndex = 1;
+            this.RPanelName.TextHover = null;
+            this.RPanelName.UseDownPressEffectOnClick = false;
+            this.RPanelName.UseRippleEffect = true;
+            this.RPanelName.UseZoomEffectOnHover = false;
+            // 
+            // LblNameUser
+            // 
+            this.LblNameUser.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
+            | System.Windows.Forms.AnchorStyles.Right)));
+            this.LblNameUser.BackColor = System.Drawing.Color.Transparent;
+            this.LblNameUser.Font = new System.Drawing.Font("Segoe UI Variable Small Semibol", 12F, System.Drawing.FontStyle.Bold);
+            this.LblNameUser.ForeColor = System.Drawing.Color.Black;
+            this.LblNameUser.Location = new System.Drawing.Point(3, 0);
+            this.LblNameUser.Name = "LblNameUser";
+            this.LblNameUser.Size = new System.Drawing.Size(284, 43);
+            this.LblNameUser.TabIndex = 0;
+            this.LblNameUser.Text = "Сидоров Иван Игоревич";
+            this.LblNameUser.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
+            // 
+            // RPanelTimeEntrance
+            // 
+            this.RPanelTimeEntrance.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
+            this.RPanelTimeEntrance.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(184)))), ((int)(((byte)(184)))), ((int)(((byte)(255)))));
+            this.RPanelTimeEntrance.BackColorAdditional = System.Drawing.Color.Gray;
+            this.RPanelTimeEntrance.BackColorGradientEnabled = false;
+            this.RPanelTimeEntrance.BackColorGradientMode = System.Drawing.Drawing2D.LinearGradientMode.Horizontal;
+            this.RPanelTimeEntrance.BorderColor = System.Drawing.Color.Tomato;
+            this.RPanelTimeEntrance.BorderColorEnabled = false;
+            this.RPanelTimeEntrance.BorderColorOnHover = System.Drawing.Color.Tomato;
+            this.RPanelTimeEntrance.BorderColorOnHoverEnabled = false;
+            this.RPanelTimeEntrance.Controls.Add(this.LblTimeEntrance);
+            this.RPanelTimeEntrance.Cursor = System.Windows.Forms.Cursors.Default;
+            this.RPanelTimeEntrance.Font = new System.Drawing.Font("Verdana", 8.25F);
+            this.RPanelTimeEntrance.ForeColor = System.Drawing.Color.White;
+            this.RPanelTimeEntrance.Location = new System.Drawing.Point(296, 3);
+            this.RPanelTimeEntrance.Name = "RPanelTimeEntrance";
+            this.RPanelTimeEntrance.RippleColor = System.Drawing.Color.Black;
+            this.RPanelTimeEntrance.RoundingEnable = true;
+            this.RPanelTimeEntrance.Size = new System.Drawing.Size(105, 43);
+            this.RPanelTimeEntrance.TabIndex = 2;
+            this.RPanelTimeEntrance.TextHover = null;
+            this.RPanelTimeEntrance.UseDownPressEffectOnClick = false;
+            this.RPanelTimeEntrance.UseRippleEffect = true;
+            this.RPanelTimeEntrance.UseZoomEffectOnHover = false;
+            // 
+            // LblTimeEntrance
+            // 
+            this.LblTimeEntrance.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
+            | System.Windows.Forms.AnchorStyles.Right)));
+            this.LblTimeEntrance.BackColor = System.Drawing.Color.Transparent;
+            this.LblTimeEntrance.Font = new System.Drawing.Font("Segoe UI Variable Small Semibol", 12F, System.Drawing.FontStyle.Bold);
+            this.LblTimeEntrance.ForeColor = System.Drawing.Color.Black;
+            this.LblTimeEntrance.Location = new System.Drawing.Point(3, 0);
+            this.LblTimeEntrance.Name = "LblTimeEntrance";
+            this.LblTimeEntrance.Size = new System.Drawing.Size(99, 43);
+            this.LblTimeEntrance.TabIndex = 0;
+            this.LblTimeEntrance.Text = "13:15:00";
+            this.LblTimeEntrance.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
+            // 
+            // RPanelTimeExit
+            // 
+            this.RPanelTimeExit.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
+            this.RPanelTimeExit.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(184)))), ((int)(((byte)(184)))), ((int)(((byte)(255)))));
+            this.RPanelTimeExit.BackColorAdditional = System.Drawing.Color.Gray;
+            this.RPanelTimeExit.BackColorGradientEnabled = false;
+            this.RPanelTimeExit.BackColorGradientMode = System.Drawing.Drawing2D.LinearGradientMode.Horizontal;
+            this.RPanelTimeExit.BorderColor = System.Drawing.Color.Tomato;
+            this.RPanelTimeExit.BorderColorEnabled = false;
+            this.RPanelTimeExit.BorderColorOnHover = System.Drawing.Color.Tomato;
+            this.RPanelTimeExit.BorderColorOnHoverEnabled = false;
+            this.RPanelTimeExit.Controls.Add(this.LblTimeExit);
+            this.RPanelTimeExit.Cursor = System.Windows.Forms.Cursors.Default;
+            this.RPanelTimeExit.Font = new System.Drawing.Font("Verdana", 8.25F);
+            this.RPanelTimeExit.ForeColor = System.Drawing.Color.White;
+            this.RPanelTimeExit.Location = new System.Drawing.Point(404, 3);
+            this.RPanelTimeExit.Name = "RPanelTimeExit";
+            this.RPanelTimeExit.RippleColor = System.Drawing.Color.Black;
+            this.RPanelTimeExit.RoundingEnable = true;
+            this.RPanelTimeExit.Size = new System.Drawing.Size(105, 43);
+            this.RPanelTimeExit.TabIndex = 3;
+            this.RPanelTimeExit.TextHover = null;
+            this.RPanelTimeExit.UseDownPressEffectOnClick = false;
+            this.RPanelTimeExit.UseRippleEffect = true;
+            this.RPanelTimeExit.UseZoomEffectOnHover = false;
+            // 
+            // LblTimeExit
+            // 
+            this.LblTimeExit.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
+            | System.Windows.Forms.AnchorStyles.Right)));
+            this.LblTimeExit.BackColor = System.Drawing.Color.Transparent;
+            this.LblTimeExit.Font = new System.Drawing.Font("Segoe UI Variable Small Semibol", 12F, System.Drawing.FontStyle.Bold);
+            this.LblTimeExit.ForeColor = System.Drawing.Color.Black;
+            this.LblTimeExit.Location = new System.Drawing.Point(3, 0);
+            this.LblTimeExit.Name = "LblTimeExit";
+            this.LblTimeExit.Size = new System.Drawing.Size(99, 43);
+            this.LblTimeExit.TabIndex = 0;
+            this.LblTimeExit.Text = "13:15:00";
+            this.LblTimeExit.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
+            // 
+            // RPanelDate
+            // 
+            this.RPanelDate.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
+            this.RPanelDate.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(184)))), ((int)(((byte)(184)))), ((int)(((byte)(255)))));
+            this.RPanelDate.BackColorAdditional = System.Drawing.Color.Gray;
+            this.RPanelDate.BackColorGradientEnabled = false;
+            this.RPanelDate.BackColorGradientMode = System.Drawing.Drawing2D.LinearGradientMode.Horizontal;
+            this.RPanelDate.BorderColor = System.Drawing.Color.Tomato;
+            this.RPanelDate.BorderColorEnabled = false;
+            this.RPanelDate.BorderColorOnHover = System.Drawing.Color.Tomato;
+            this.RPanelDate.BorderColorOnHoverEnabled = false;
+            this.RPanelDate.Controls.Add(this.LblDate);
+            this.RPanelDate.Cursor = System.Windows.Forms.Cursors.Default;
+            this.RPanelDate.Font = new System.Drawing.Font("Verdana", 8.25F);
+            this.RPanelDate.ForeColor = System.Drawing.Color.White;
+            this.RPanelDate.Location = new System.Drawing.Point(512, 3);
+            this.RPanelDate.Name = "RPanelDate";
+            this.RPanelDate.RippleColor = System.Drawing.Color.Black;
+            this.RPanelDate.RoundingEnable = true;
+            this.RPanelDate.Size = new System.Drawing.Size(123, 43);
+            this.RPanelDate.TabIndex = 4;
+            this.RPanelDate.TextHover = null;
+            this.RPanelDate.UseDownPressEffectOnClick = false;
+            this.RPanelDate.UseRippleEffect = true;
+            this.RPanelDate.UseZoomEffectOnHover = false;
+            // 
+            // LblDate
+            // 
+            this.LblDate.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
+            | System.Windows.Forms.AnchorStyles.Right)));
+            this.LblDate.BackColor = System.Drawing.Color.Transparent;
+            this.LblDate.Font = new System.Drawing.Font("Segoe UI Variable Small Semibol", 12F, System.Drawing.FontStyle.Bold);
+            this.LblDate.ForeColor = System.Drawing.Color.Black;
+            this.LblDate.Location = new System.Drawing.Point(3, 0);
+            this.LblDate.Name = "LblDate";
+            this.LblDate.Size = new System.Drawing.Size(117, 43);
+            this.LblDate.TabIndex = 0;
+            this.LblDate.Text = "26.04.2023";
+            this.LblDate.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
+        }
+    }
+}

BIN
ImpulseVision/bin/Debug/ImpulseVision.exe