コード例 #1
0
 private void AddProtocolEventsToView()
 {
     this.protocolEvents = QProtocolEvents.SelectItemsByType(this.selectedEventType);
     foreach (ProtocolEvent protocolEvent in protocolEvents)
     {
         this.view.AddProtocolEventToView(protocolEvent);
     }
 }
コード例 #2
0
 public ProtocolEventAddController(IProtocolEventAddView view)
 {
     this.view = view;
     this.view.SetController(this);
     this.protocolEvents        = new ArrayList();
     this.protocolEventTypes    = new ArrayList(QProtocolEvents.SelectTypes());
     this.SelectedProtocolEvent = null;
 }
コード例 #3
0
        public override void LoadView()
        {
            this.items.Clear();
            this.view.ClearView();
            IList columns = new ArrayList()
            {
                "ID", "Event Type", "Description", "Active"
            };

            this.view.AddListViewColumns(columns);
            this.view.ListTitle = "Protocol Events";
            items = QProtocolEvents.SelectItems();
            AddItemsToView();
            SetColumnsHeaderSize();
        }
コード例 #4
0
 private void DoInsert(ProtocolEvent item)
 {
     QProtocolEvents.InsertItem(item, loginInfo.UserName);
     MessageBox.Show("New event is added.");
     LoadView();
 }
コード例 #5
0
 private void DoUpdate(ProtocolEvent item)
 {
     QProtocolEvents.UpdateItem(item, loginInfo.UserName);
     MessageBox.Show("Updated!");
     LoadView();
 }