From 356f3b9c03f2f13b9da101db906aed6b6c147c8f Mon Sep 17 00:00:00 2001 From: hj615 Date: Fri, 29 Aug 2025 17:00:07 +0900 Subject: [PATCH] =?UTF-8?q?feat:=20CCTV=20=EB=AA=A9=EB=A1=9D=20=EC=B6=9C?= =?UTF-8?q?=EB=A0=A5=20=EB=B0=8F=20=EC=8B=9C=EC=9E=91/=EC=A4=91=EC=A7=80?= =?UTF-8?q?=20=EA=B8=B0=EB=8A=A5=20=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- SmartAquaViewer/Controls/FFPlayerControl.xaml | 4 +- SmartAquaViewer/MainWindow.xaml | 7 +- SmartAquaViewer/Model/CCTVInfo.cs | 23 +- SmartAquaViewer/Model/Enums.cs | 7 + SmartAquaViewer/Resources/Generic.xaml | 26 + .../Resources/Images/arrow_left.png | Bin 0 -> 986 bytes .../Resources/Images/arrow_right.png | Bin 0 -> 983 bytes SmartAquaViewer/SmartAquaViewer.csproj | 8 + SmartAquaViewer/View/CCTVView.xaml | 137 +++- SmartAquaViewer/View/EnegyView.xaml | 674 +++++++++--------- SmartAquaViewer/View/FileListView.xaml | 2 +- SmartAquaViewer/View/GreenHouseView.xaml | 670 ++++++++--------- SmartAquaViewer/View/MonitoringView.xaml | 4 +- SmartAquaViewer/ViewModel/CCTVViewModel.cs | 130 +++- .../ViewModel/FFPlayerViewModel.cs | 28 +- .../ViewModel/GraphControlViewModel.cs | 2 +- SmartAquaViewer/ViewModel/MainViewModel.cs | 14 +- .../ViewModel/MonitoringViewModel.cs | 34 +- 18 files changed, 1016 insertions(+), 754 deletions(-) create mode 100644 SmartAquaViewer/Resources/Images/arrow_left.png create mode 100644 SmartAquaViewer/Resources/Images/arrow_right.png diff --git a/SmartAquaViewer/Controls/FFPlayerControl.xaml b/SmartAquaViewer/Controls/FFPlayerControl.xaml index ea2f968..c82e901 100644 --- a/SmartAquaViewer/Controls/FFPlayerControl.xaml +++ b/SmartAquaViewer/Controls/FFPlayerControl.xaml @@ -6,13 +6,13 @@ xmlns:local="clr-namespace:SmartAquaViewer.Controls" mc:Ignorable="d" d:DesignHeight="450" d:DesignWidth="800"> - + - + diff --git a/SmartAquaViewer/MainWindow.xaml b/SmartAquaViewer/MainWindow.xaml index 69256c3..a2ee1f9 100644 --- a/SmartAquaViewer/MainWindow.xaml +++ b/SmartAquaViewer/MainWindow.xaml @@ -93,9 +93,8 @@ CommandParameter="{Binding Tag, RelativeSource={RelativeSource Self}}"/> - - - + + diff --git a/SmartAquaViewer/Model/CCTVInfo.cs b/SmartAquaViewer/Model/CCTVInfo.cs index 11fd0ef..4eaf1c0 100644 --- a/SmartAquaViewer/Model/CCTVInfo.cs +++ b/SmartAquaViewer/Model/CCTVInfo.cs @@ -1,16 +1,35 @@ using System; using System.Collections.Generic; +using System.ComponentModel; using System.Linq; +using System.Runtime.CompilerServices; using System.Text; using System.Threading.Tasks; namespace SmartAquaViewer.Model { - public class CCTVInfo + public class CCTVInfo : INotifyPropertyChanged { public string? DeviceId { get; set; } public string? DeviceName { get; set; } public string? RtspUrl { get; set; } - public string? Status { get; set; } + + private CCTVStatus? _status; + public CCTVStatus? Status + { + get => _status; + set + { + if (_status != value) + { + _status = value; + OnPropertyChanged(); + } + } + } + + public event PropertyChangedEventHandler? PropertyChanged; + private void OnPropertyChanged([CallerMemberName] string? name = null) + => PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(name)); } } diff --git a/SmartAquaViewer/Model/Enums.cs b/SmartAquaViewer/Model/Enums.cs index 4f6b500..377c66f 100644 --- a/SmartAquaViewer/Model/Enums.cs +++ b/SmartAquaViewer/Model/Enums.cs @@ -25,6 +25,7 @@ namespace SmartAquaViewer.Model public enum StepFieldKind { + Time, Status, // 전원/상태 Sensor, // 센서 값 Energy, // 에너지 소비량 @@ -42,4 +43,10 @@ namespace SmartAquaViewer.Model Energy, GreenhouseGas } + + public enum CCTVStatus + { + Disconnected, + Connected + } } diff --git a/SmartAquaViewer/Resources/Generic.xaml b/SmartAquaViewer/Resources/Generic.xaml index 6ecf346..983ddba 100644 --- a/SmartAquaViewer/Resources/Generic.xaml +++ b/SmartAquaViewer/Resources/Generic.xaml @@ -177,4 +177,30 @@ + + + + \ No newline at end of file diff --git a/SmartAquaViewer/Resources/Images/arrow_left.png b/SmartAquaViewer/Resources/Images/arrow_left.png new file mode 100644 index 0000000000000000000000000000000000000000..8922cce4a05e3e010c06db00999a93f78161a2c9 GIT binary patch literal 986 zcmV<0110>4P)500001b5ch_0Itp) z=>Px#1ZP1_K>z@;j|==^1poj532;bRa{vGi!vFvd!vV){sAK>D18+%0K~!i%?U}!8 zn@1SOKXlpNdAHpLP}dg zh729Lgg}-ONWl%Eq+@X{Te9BYcOC2#dQW;~Te^GQA)oEO_aJ?E-j{o&_YsWY$Q^%SthekQIaycI~7{GeVNP6^-YOuNu76O6#aX~hycV%N_Q`y(+!B?q!ba1OryE} ziwV-~;L-#kX_n=ReRI$m`Kbw_I3Wn5(nSE|M_+vN#$b>nDPf#=y-|yhbzQFw23e*^ z)AGB*;0vR04ZF$=9VolY-b;egeZCGOt7!Jm(R z0K*mw+FS8Iru&^+nuNXnm3Ch4z zx#(xYI4bYHe`!uu)b}Rn1rcEw=c_E9J%7R3Gs~PlwPg+TQUZG?5IRgeI23gV0nmI2M{(28TjUWN;+pOon3$-GA__y*1ehJdVwmueg5m z&Y=h6D4ff11finbiwuVdmD(9Yk&wMMc$HyO zJNHd{XT*^G;SaYi0mDDTd?T#OWOI4#+n=NqpV_$&+Phu;1589QFd@S{tpET307*qo IM6N<$f|p3eX#fBK literal 0 HcmV?d00001 diff --git a/SmartAquaViewer/Resources/Images/arrow_right.png b/SmartAquaViewer/Resources/Images/arrow_right.png new file mode 100644 index 0000000000000000000000000000000000000000..e3a81c20bbfb16ef74083b588b76829b93e2150d GIT binary patch literal 983 zcmV;|11S87P)500001b5ch_0Itp) z=>Px#1ZP1_K>z@;j|==^1poj532;bRa{vGi!vFvd!vV){sAK>D18hk|K~!i%?b)$w z8)q2D@$dV}l5A5i1&1^gyO`7=OS6Q~4y9X36hfC2T+z;kx*ED<4IZ*&FC>3K3L&K} zp+kobT|%Kt2_)czP?E8@mMmGPd++XjJJ_$#y*kDA-FtF}{I>UbU!)Ju9d}5N;5GU5 z`nPY-)S@pzdP|U2hiT_k@=xlnyrTduDbOy)86eN-D0EJ`gPh6 zn^b46e9`({2tFRIB}syc65=>U8-p=sbh~hb5MZDm4APiJvo-uCV+>K85CkFpK}e_~ zk|aTEznIYsF_)VgTN3#`2asT(*y{)MgAf(P-aC?&;XPv^04j>NS$ z&5fUJAx;i1O)wx%lGNd{bI=)i%@#rx5e&kqLjdF_pMU+dfYibuL~w55UC>=h?im?gb=cEf?&<7|>d$Ph`YGM%O+- zxjOUbUr*hV7m%Ehx@#9gfRu;(+|Jk(1s(p)8OiF5O%YIK^@B_A7{t0Qv^zcYAur0u zPo8t`>@sIgFS=U*oH@P7xwFeWe)62{osPRbF}X0?JDpNMxiFLj%8j7}P$3MSL4`4R z1bM;W3FHmKF+mR={^oAwd+5C`TQ6R6^Y-0CAB7VF>YskK*)<3eJlHd0EqoDPP}ak|NPrwr#<{#H`V0oOj-GV zW26xKW0w<%3`M9?1u3ai#*9;mJjG%PQ=O?$uT@W^JM#Yh%@n3yt1>rRKauW80IkhW zwot9kFh5skezs2K2>;di%Fx#lG literal 0 HcmV?d00001 diff --git a/SmartAquaViewer/SmartAquaViewer.csproj b/SmartAquaViewer/SmartAquaViewer.csproj index 6fbd482..8756b8e 100644 --- a/SmartAquaViewer/SmartAquaViewer.csproj +++ b/SmartAquaViewer/SmartAquaViewer.csproj @@ -21,6 +21,8 @@ + + @@ -70,6 +72,12 @@ + + PreserveNewest + + + PreserveNewest + diff --git a/SmartAquaViewer/View/CCTVView.xaml b/SmartAquaViewer/View/CCTVView.xaml index d22bc3a..90e9035 100644 --- a/SmartAquaViewer/View/CCTVView.xaml +++ b/SmartAquaViewer/View/CCTVView.xaml @@ -6,20 +6,129 @@ xmlns:local="clr-namespace:SmartAquaViewer.View" xmlns:classes="clr-namespace:SmartAquaViewer.Classes" xmlns:controls="clr-namespace:SmartAquaViewer.Controls" + xmlns:helper="clr-namespace:SmartAquaViewer.Helper" + xmlns:model="clr-namespace:SmartAquaViewer.Model" + xmlns:md="http://materialdesigninxaml.net/winfx/xaml/themes" mc:Ignorable="d" d:DesignHeight="450" d:DesignWidth="800"> - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/SmartAquaViewer/View/EnegyView.xaml b/SmartAquaViewer/View/EnegyView.xaml index 41456dd..7970bbe 100644 --- a/SmartAquaViewer/View/EnegyView.xaml +++ b/SmartAquaViewer/View/EnegyView.xaml @@ -13,356 +13,358 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - + + + + + + + + + + + + + - - - - - - - - - - + + + + + + + + + + - - - - - - + + + + + + + + + + - - - - - + + + + + + + + + + + + - - - - - - - + + + + + + + - - - - + + + + - - - + + + + - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + - -