コード例 #1
0
ファイル: MM_Island.cs プロジェクト: sylvainr/MacomberMap
 /// <summary>
 /// Initialize a new island
 /// </summary>
 /// <param name="ID"></param>
 public MM_Island(int ID)
 {
     this.ID       = ID;
     this.Name     = "Island " + this.ID.ToString();
     this.ElemType = MM_Repository.FindElementType("Island");
     this.TEID     = Data_Integration.GetTEID();
     MM_Repository.TEIDs.Add(this.TEID, this);
 }
コード例 #2
0
 /// <summary>
 /// Initialize a new user event tracking window
 /// </summary>
 /// <param name="UserName"></param>
 /// <param name="EventTime"></param>
 public MM_UserInteraction_Viewer(String UserName, DateTime EventTime)
 {
     InitializeComponent();
     this.Text = "Event log: " + UserName;
     lvHistory.ListViewItemSorter = new MM_UserInteraction_Sorter(0, true);
     ShowInTaskbar                            = true;
     lvHistory.FullRowSelect                  = true;
     AssociatedEvent                          = new MM_AlarmViolation();
     AssociatedEvent.EventTime                = EventTime;
     AssociatedEvent.New                      = true;
     AssociatedEvent.Type                     = MM_Repository.ViolationTypes["UserAction"];
     AssociatedEvent.ViolatedElement          = new MM_Element();
     AssociatedEvent.ViolatedElement.ElemType = MM_Repository.FindElementType("User");
     AssociatedEvent.ViolatedElement.Name     = UserName;
     AssociatedEvent.ViolatedElement.TEID     = Data_Integration.GetTEID();
 }