Example #1
0
        public void RemoveModel(TimelineEventModel model)
        {
            _modelDictionary.Remove(model.Id);
            ModelCollection.Remove(model);

            EventAggregator.OnModelDataChanged(this, new ModelValueChangedEventArgs());
        }
 /// <summary>
 /// 更新データとしてコンバートを行う
 /// </summary>
 /// <param name="src">コンバート対象</param>
 /// <param name="target">コンバート先</param>
 /// <returns>TimelineEventModel</returns>
 public static void ConvertAsModify(EventModel src, TimelineEventModel target)
 {
     target.Title = src.Title;
     target.StartDateTime = src.StartDateTime;
     target.EndDateTime = src.EndDateTime;
     target.Detail = src.Detail;
     target.Participants = src.Participants;
 }
        public TimelineEventModel GetNewModel()
        {
            var model = new TimelineEventModel();
            model.Title = "新しいイベント";
            model.Id = GetUniqueId();
            model.Participants = new List<int>();
            model.StartDateTime = DateTime.Today;
            model.EndDateTime = DateTime.Today.AddHours(1);
            model.Detail = "";

            return model;
        }
 /// <summary>
 /// TimelineEventModelからEventModelを作る
 /// </summary>
 private static EventModel GenerateEventModel(TimelineEventModel timeline)
 {
     return new EventModel()
     {
         Title = timeline.Title,
         StartDateTime = timeline.StartDateTime,
         EndDateTime = timeline.EndDateTime,
         Detail = timeline.Detail,
         SourceObject = timeline,
         Participants = new List<int>(timeline.Participants)
     };
 }
Example #5
0
        public TimelineEventModel GetNewModel()
        {
            var model = new TimelineEventModel();

            model.Title         = "新しいイベント";
            model.Id            = GetUniqueId();
            model.Participants  = new List <int>();
            model.StartDateTime = DateTime.Today;
            model.EndDateTime   = DateTime.Today.AddHours(1);
            model.Detail        = "";

            return(model);
        }
        public void RemoveModel(TimelineEventModel model)
        {
            _modelDictionary.Remove(model.Id);
            ModelCollection.Remove(model);

            EventAggregator.OnModelDataChanged(this, new ModelValueChangedEventArgs());
        }
 public void AddModel(TimelineEventModel model)
 {
     ModelCollection.Add(model);
     EventAggregator.OnModelDataChanged(this, new ModelValueChangedEventArgs());
 }
Example #8
0
 public void AddModel(TimelineEventModel model)
 {
     ModelCollection.Add(model);
     EventAggregator.OnModelDataChanged(this, new ModelValueChangedEventArgs());
 }
 /// <summary>
 /// コンストラクター
 /// </summary>
 /// <param name="org"></param>
 public EventTransferItemViewModel(TimelineEventModel org)
 {
     _source = org;
 }