public string ToPrettyString()
 {
     return("AppointmentGroup {" +
            ($"\n{nameof(Id)}: {Id}," +
             $"\n{nameof(Title)}: {Title}," +
             $"\n{nameof(StartAt)}: {StartAt}," +
             $"\n{nameof(EndAt)}: {EndAt}," +
             $"\n{nameof(Description)}: {Description}," +
             $"\n{nameof(LocationName)}: {LocationName}," +
             $"\n{nameof(LocationAddress)}: {LocationAddress}," +
             $"\n{nameof(ParticipantCount)}: {ParticipantCount}," +
             $"\n{nameof(ReservedTimes)}: {ReservedTimes.ToPrettyString()}," +
             $"\n{nameof(ContextCodes)}: {ContextCodes.ToPrettyString()}," +
             $"\n{nameof(SubContextCodes)}: {SubContextCodes.ToPrettyString()}," +
             $"\n{nameof(WorkflowState)}: {WorkflowState}," +
             $"\n{nameof(RequiringAction)}: {RequiringAction}," +
             $"\n{nameof(AppointmentsCount)}: {AppointmentsCount}," +
             $"\n{nameof(Appointments)}: {Appointments?.ToPrettyString()}," +
             $"\n{nameof(NewAppointments)}: {NewAppointments?.ToPrettyString()}," +
             $"\n{nameof(MaxAppointmentsPerParticipant)}: {MaxAppointmentsPerParticipant}," +
             $"\n{nameof(MinAppointmentsPerParticipant)}: {MinAppointmentsPerParticipant}," +
             $"\n{nameof(ParticipantsPerAppointment)}: {ParticipantsPerAppointment}," +
             $"\n{nameof(ParticipantVisibility)}: {ParticipantVisibility}," +
             $"\n{nameof(ParticipantType)}: {ParticipantType}," +
             $"\n{nameof(Url)}: {Url}," +
             $"\n{nameof(HtmlUrl)}: {HtmlUrl}," +
             $"\n{nameof(CreatedAt)}: {CreatedAt}," +
             $"\n{nameof(UpdatedAt)}: {UpdatedAt}").Indent(4) +
            "\n}");
 }
Beispiel #2
0
        private void RemoveTime()
        {
            if (SelectedIndex != -1)
            {
                DateTime selectedTime = ReservedTimes[SelectedIndex];
                ReservedTimes.RemoveAt(SelectedIndex);
                CollectionViewSource.GetDefaultView(ReservedTimes).Refresh(); // 번호 초기화를 위해 컬렉션을 새로고침함.
                Settings.Instance.ReservedTimes = ReservedTimes.ToList();

                Reports.Instance.AddReport(ReportType.Removed, $"'{selectedTime.Hour,2:D2}:{selectedTime.Minute,2:D2}'의 갱신 예약이 제거되었습니다.");
            }
        }
Beispiel #3
0
        public SettingsViewModel()
        {
            _settings = Settings.Instance;

            VersionList = new ObservableCollection <Version>(_driver.GetVersions());

            // 예약 시간 리스트 불러오기.
            foreach (DateTime time in _settings.ReservedTimes)
            {
                ReservedTimes.Add(time);
            }
        }
Beispiel #4
0
        private void AddTime()
        {
            if (!ReservedTimes.Contains(SelectedTime))
            {
                ReservedTimes.Add(SelectedTime);
                ReservedTimes = new ObservableCollection <DateTime>(ReservedTimes.OrderBy(time => time));
                Settings.Instance.ReservedTimes = ReservedTimes.ToList();

                Reports.Instance.AddReport(ReportType.Added, $"'{SelectedTime.Hour}:{SelectedTime.Minute}'에 갱신 예약이 추가되었습니다.");
            }
            else
            {
                MessageBox.Show("이미 같은 시간에 갱신 예약이 되어 있습니다.", "Bandit", MessageBoxButton.OK, MessageBoxImage.Exclamation);
            }
        }