예제 #1
0
        protected CalendarOutputData(CalendarMonth parent)
        {
            Parent = parent;
            Notes  = new List <CalendarNote>();

            ShowCustomComment        = false;
            ApplyForAllCustomComment = true;

            #region Basic
            ShowHeader        = true;
            ShowBusinessName  = true;
            ShowDecisionMaker = true;
            Header            = String.Empty;
            ApplyForAllBasic  = true;
            #endregion

            #region Style

            SlideColor            = "gray";
            ApplyForAllThemeColor = true;

            ShowLogo        = true;
            ApplyForAllLogo = true;

            ShowBigDate = false;

            #endregion
        }
		public MediaCalendarOutputData(CalendarMonth parent)
			: base(parent)
		{
			ApplyForAllCustomComment = false;
			ShowLogo = false;
			Logo = MediaMetaData.Instance.ListManager.Images.SelectMany(g => g.Images)
					.OrderByDescending(i => i.IsDefault)
					.ThenBy(i => i.Name)
					.FirstOrDefault()
					?.Clone<ImageSource, ImageSource>();
		}
 public CommonCalendarOutputData(CalendarMonth parent) : base(parent)
 {
 }
예제 #4
0
		protected override void ApplyDefaultMonthSettings(CalendarMonth targetMonth)
		{
			targetMonth.OutputData.ShowLogo = MediaMetaData.Instance.ListManager.DefaultBroadcastCalendarSettings.ShowLogo;
			targetMonth.OutputData.ShowBigDate = MediaMetaData.Instance.ListManager.DefaultBroadcastCalendarSettings.ShowBigDate;
		}
		public void LoadMonth(CalendarMonth month)
		{
			Month = month;
			LoadCurrentMonthData();
		}
		public CommonCalendarOutputData(CalendarMonth parent) : base(parent) { }
예제 #7
0
		private CalendarNoteControl[][] GetNotesByWeeeks(CalendarMonth month)
		{
			var monthNotes = new List<CalendarNoteControl[]>();
			var datesByWeeks = Calendar.CalendarContent.GetDaysByWeek(month.DaysRangeBegin, month.DaysRangeEnd);
			foreach (var weekDays in datesByWeeks)
			{
				var weekNotes = new List<CalendarNoteControl>();
				foreach (var weekDay in weekDays)
				{
					var note = Calendar.CalendarContent.Notes.FirstOrDefault(x => weekDay.Equals(x.StartDay));
					if (note == null) continue;
					var noteControl = (CalendarNoteControl)ReflectionHelper.GetControlInstance(typeof(CalendarNoteControl), note.GetType(), note);
					noteControl.NoteChanged += (sender, e) =>
					{
						var targetNoteControl = sender as CalendarNoteControl;
						if (targetNoteControl == null) return;
						Calendar.SettingsNotSaved = true;
					};
					noteControl.NoteDeleted += (sender, e) =>
					{
						DeleteNote(note);
						RefreshData();
					};
					noteControl.NoteCopied += (sender, e) =>
					{
						CopyPasteManager.CopyNote(note);
						Calendar.SettingsNotSaved = true;
					};
					noteControl.NoteCloned += (sender, e) =>
					{
						using (var form = new FormCloneNote(note, Calendar.CalendarContent.Settings.FlightDateStart.Value, Calendar.CalendarContent.Settings.FlightDateEnd.Value))
						{
							form.OnHelpClick = () => Calendar.OpenHelp("ninjanotesclone");
							if (form.ShowDialog() != DialogResult.OK) return;
							foreach (var range in form.SelectedRanges)
								AddNote(range, note.Note.Clone());
						}
						Calendar.SettingsNotSaved = true;
					};
					noteControl.ColorChanging += (sender, e) =>
					{
						using (var form = new FormNoteColor())
						{
							form.NoteColor = note.BackgroundColor;
							if (form.ShowDialog() != DialogResult.OK) return;
							note.BackgroundColor = form.NoteColor;
							if (form.ApplyForAll)
								foreach (var calendarNote in Calendar.CalendarContent.Notes)
									calendarNote.BackgroundColor = note.BackgroundColor;
							foreach (var monthControl in Months.Values)
								monthControl.RefreshNotes();
							Calendar.SettingsNotSaved = true;
						}
					};
					weekNotes.Add(noteControl);
				}
				monthNotes.Add(weekNotes.ToArray());
			}
			return monthNotes.ToArray();
		}
		protected CalendarOutputData(CalendarMonth parent)
		{
			Parent = parent;
			Notes = new List<CalendarNote>();

			ShowCustomComment = false;
			ApplyForAllCustomComment = true;

			#region Basic
			ShowHeader = true;
			ShowBusinessName = true;
			ShowDecisionMaker = true;
			Header = String.Empty;
			ApplyForAllBasic = true;
			#endregion

			#region Style

			SlideColor = "gray";
			ApplyForAllThemeColor = true;

			ShowLogo = true;
			ApplyForAllLogo = true;

			ShowBigDate = false;

			#endregion
		}