예제 #1
0
        public PollPage()
        {
            InitializeComponent();

            BindingContext = new PollViewModel();
            PollListView.BeginRefresh();
        }
예제 #2
0
        private void addVar(string address, string datatype, string val, CommAddress comaddr)
        {
            //public Boolean showErrOnce { set; get; }

            if (PollListView.FindItemWithText(address) == null)
            {
                tsbStart.Enabled = true;
                ListViewItem lvi = new ListViewItem(new string[] { address, datatype, val });
                lvi.Tag = new CommAddress {
                    Domain = comaddr.Domain, Variable = comaddr.Variable, owner = comaddr.owner
                };
                PollListView.Items.Add(lvi);
            }
            else
            {
                if (!showOnce)
                {
                    MessageBox.Show("Data exists in list !", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
                    showOnce = true;
                }
            }
        }