123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139 |
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- using System.Threading.Tasks;
- using System.Windows.Controls;
- namespace HistoryDLL
- {
-
-
-
-
-
-
- public partial class CyclicScroller : UserControl
- {
- private int MainEventHeight = 610;
- private int MainEventWidth = 460;
- private int YearEventHeight = 77;
-
- private int ResolutionValueHeight = 0;
- private int ResolutionValueWidth = 0;
-
- private int ChildrenCount = 0;
-
- private int TotalShowChildren = 0;
-
- private int NoneUseRange = 0;
- private int FadeRate;
- private void SetSpecValue()
- {
-
- uxMyScroll.Height = MainEventHeight;
- ChildrenCount = GetChildrenCount();
- TotalShowChildren = ChildrenCount + 4;
- NoneUseRange = GetNoneUseRange();
- FadeRate = MainEventWidth / 2;
- }
-
- private int GetNoneUseRange()
- {
- int result = 0;
- int buffer = 0;
-
- if (CurrentMonitorCount.ncm == MonitorFlag.Monitor1_1)
- {
-
- ResolutionValueWidth = 1920;
- ResolutionValueHeight = 1080;
- }
- else if (CurrentMonitorCount.ncm == MonitorFlag.Monitor2_1)
- {
-
- ResolutionValueWidth = 3840;
- ResolutionValueHeight = 1080;
- }
- else if (CurrentMonitorCount.ncm == MonitorFlag.Monitor3_1)
- {
-
- ResolutionValueWidth = 5760;
- ResolutionValueHeight = 1080;
- }
- else if (CurrentMonitorCount.ncm == MonitorFlag.Monitor4_1)
- {
-
- ResolutionValueWidth = 7680;
- ResolutionValueHeight = 1080;
- }
- else if (CurrentMonitorCount.ncm == MonitorFlag.Monitor5_1)
- {
-
- ResolutionValueWidth = 9600;
- ResolutionValueHeight = 1080;
- }
- else if (CurrentMonitorCount.ncm == MonitorFlag.Monitor6_1)
- {
-
- ResolutionValueWidth = 11520;
- ResolutionValueHeight = 1080;
- }
- if (GlobalFunction.isSolutionUsing4K)
- {
- ResolutionValueHeight *= 2;
- }
- buffer = (ResolutionValueWidth - MainEventWidth) / MainEventWidth;
- result = MainEventWidth - (ResolutionValueWidth - (MainEventWidth * buffer)) / 2;
- return result;
- }
-
-
-
-
- private int GetChildrenCount()
- {
- int result = 0;
-
- if (CurrentMonitorCount.ncm == MonitorFlag.Monitor1_1)
- {
-
- result = 1920 / MainEventWidth + 1;
- }
- else if (CurrentMonitorCount.ncm == MonitorFlag.Monitor2_1)
- {
-
- result = 3840 / MainEventWidth + 1;
- }
- else if (CurrentMonitorCount.ncm == MonitorFlag.Monitor3_1)
- {
-
- result = 5760 / MainEventWidth + 1;
- }
- else if (CurrentMonitorCount.ncm == MonitorFlag.Monitor4_1)
- {
-
- result = 7680 / MainEventWidth + 1;
- }
- else if (CurrentMonitorCount.ncm == MonitorFlag.Monitor5_1)
- {
-
- result = 9600 / MainEventWidth + 1;
- }
- else if (CurrentMonitorCount.ncm == MonitorFlag.Monitor6_1)
- {
-
- result = 11520 / MainEventWidth + 1;
- }
- return result;
- }
- }
- }
|