예제 #1
0
파일: Options.cs 프로젝트: DavidIQ/OnlyT
        public Options()
        {
            OperatingMode           = OperatingMode.Automatic;
            CountdownScreenLocation = ScreenLocation.Centre;
            AlwaysOnTop             = true;
            IsBellEnabled           = true;
            AutoBell                   = true;
            BellVolumePercent          = 70;
            MidWeekAdaptiveMode        = AdaptiveMode.None;
            WeekendAdaptiveMode        = AdaptiveMode.None;
            AnalogueClockWidthPercent  = 50;
            CountdownZoomPercent       = 100;
            CountdownDurationMins      = DefaultCountdownDurationMins;
            FullScreenClockMode        = FullScreenClockMode.AnalogueAndDigital;
            ShowDurationSector         = true;
            HttpServerPort             = DefaultPort;
            PersistDurationSecs        = 90;
            IsApiThrottled             = true;
            PersistStudentTime         = true;
            MeetingStartTimes          = new MeetingStartTimes.MeetingStartTimes();
            ShowDigitalSeconds         = true;
            JwLibraryCompatibilityMode = true;
            CountdownFrame             = true;
            TimerFrame                 = true;
            LogEventLevel              = LogEventLevel.Information;
            ShowBackgroundOnClock      = true;

            AdjustClockFormat();
        }
예제 #2
0
        public Options()
        {
            OperatingMode             = OperatingMode.Automatic;
            AlwaysOnTop               = true;
            IsBellEnabled             = true;
            IsCountdownEnabled        = false;
            BellVolumePercent         = 70;
            MidWeekAdaptiveMode       = AdaptiveMode.None;
            WeekendAdaptiveMode       = AdaptiveMode.None;
            AnalogueClockWidthPercent = 50;
            FullScreenClockMode       = FullScreenClockMode.AnalogueAndDigital;
            ShowDurationSector        = true;
            HttpServerPort            = DefaultPort;
            PersistDurationSecs       = 90;
            IsApiThrottled            = true;
            PersistStudentTime        = true;
            MeetingStartTimes         = new MeetingStartTimes.MeetingStartTimes();

            var dateFormat = CultureInfo.CurrentCulture.DateTimeFormat.LongTimePattern;

            bool clock24     = dateFormat.Contains("H");
            bool leadingZero = dateFormat.Contains("HH") || dateFormat.Contains("hh");
            bool ampm        = dateFormat.Contains("tt");

            if (clock24)
            {
                ClockHourFormat = leadingZero ? ClockHourFormat.Format24LeadingZero : ClockHourFormat.Format24;
            }
            else
            {
                if (leadingZero)
                {
                    ClockHourFormat = ampm
                        ? ClockHourFormat.Format12LeadingZeroAMPM : ClockHourFormat.Format12LeadingZero;
                }
                else
                {
                    ClockHourFormat = ampm
                        ? ClockHourFormat.Format12AMPM : ClockHourFormat.Format12;
                }
            }
        }
예제 #3
0
        public Options()
        {
            OperatingMode             = OperatingMode.Automatic;
            AlwaysOnTop               = true;
            IsBellEnabled             = true;
            IsCountdownEnabled        = false;
            BellVolumePercent         = 70;
            MidWeekAdaptiveMode       = AdaptiveMode.None;
            WeekendAdaptiveMode       = AdaptiveMode.None;
            AnalogueClockWidthPercent = 50;
            FullScreenClockMode       = FullScreenClockMode.AnalogueAndDigital;
            ShowDurationSector        = true;
            HttpServerPort            = DefaultPort;
            PersistDurationSecs       = 90;
            IsApiThrottled            = true;
            PersistStudentTime        = true;
            MeetingStartTimes         = new MeetingStartTimes.MeetingStartTimes();
            ShowDigitalSeconds        = true;

            AdjustClockFormat();
        }