Exemplo n.º 1
0
        /// <summary>
        ///
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void frmCsinfo_Load(object sender, System.EventArgs e)
        {
            Text = _info.Address;
            LogItem li = new LogItem();

            li.HasDateTime = false;
            li.Add("名称    ", _info.Address);
            li.Add("通讯地址", _info.DeviceAddress);
            li.Add("IP地址  ", _info.IP.ToString());
            li.Add("设备类型", _info.DeviceKind);
            li.Add("电话号码", _info.Sim);

            if (_info.DeviceKind == DeviceInfoManager.TEXT_PUMP)
            {
                li.Add("泵站协议", _info.PumpCommunicationProtocolVersion);
            }

            li.Add(string.Empty);

            for (int i = 0; i < _info.Tally.Count; i++)
            {
                TallyItem ti = _info.Tally[i];
                li.Add(ti.Name, ti.List.Count);
                cmbListName.Items.Add(ti.Name);
            }
            if (cmbListName.Items.Count > 0)
            {
                cmbListName.SelectedIndex = 0;
            }
            this.txtDetail.Text = li.ToString();
        }
Exemplo n.º 2
0
Arquivo: tally.cs Projeto: hkiaipc/lx
        /// <summary>
        /// 
        /// </summary>
        /// <param name="name"></param>
        /// <param name="data"></param>
        public void Add( string name, object data )
        {
            bool isFind = false;

            foreach ( object obj in _itemList )
            {
                TallyItem ti = obj as TallyItem;
                if ( string.Compare( ti.Name, name, true ) == 0 )
                {
                    isFind = true;
                    if ( ti.List.Count >= MAXCOUNT )
                        ti.List.Clear();

                    ti.List.Add( data );
                    break;
                }
            }

            if ( !isFind )
            {
                TallyItem ti = new TallyItem( name );
                ti.List.Add( data );
                _itemList.Add( ti );
            }
        }
Exemplo n.º 3
0
        /// <summary>
        ///
        /// </summary>
        /// <param name="name"></param>
        /// <param name="data"></param>
        public void Add(string name, object data)
        {
            bool isFind = false;

            foreach (object obj in _itemList)
            {
                TallyItem ti = obj as TallyItem;
                if (string.Compare(ti.Name, name, true) == 0)
                {
                    isFind = true;
                    if (ti.List.Count >= MAXCOUNT)
                    {
                        ti.List.Clear();
                    }

                    ti.List.Add(data);
                    break;
                }
            }

            if (!isFind)
            {
                TallyItem ti = new TallyItem(name);
                ti.List.Add(data);
                _itemList.Add(ti);
            }
        }
Exemplo n.º 4
0
 /// <summary>
 ///
 /// </summary>
 public void Clear()
 {
     foreach (object obj in _itemList)
     {
         TallyItem ti = obj as TallyItem;
         ti.List.Clear();
     }
 }
Exemplo n.º 5
0
        /// <summary>
        ///
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void btnDetail_Click(object sender, System.EventArgs e)
        {
            string text = cmbListName.Text;

            if (text != string.Empty)
            {
                TallyItem ti = GetTallyItem(text);
                if (ti != null)
                {
                    new frmTallyDetail(ti).ShowDialog(this);
                }
            }
        }
Exemplo n.º 6
0
        public frmTallyDetail( TallyItem ti )
        {
            //
            // Windows ���������֧���������
            //
            InitializeComponent();

            //
            // TODO: �� InitializeComponent ���ú�����κι��캯������
            //
            if ( ti == null )
                throw new ArgumentNullException( "ti" );

            _tallyItem = ti;
        }
Exemplo n.º 7
0
        public frmTallyDetail(TallyItem ti)
        {
            //
            // Windows 窗体设计器支持所必需的
            //
            InitializeComponent();

            //
            // TODO: 在 InitializeComponent 调用后添加任何构造函数代码
            //
            if (ti == null)
            {
                throw new ArgumentNullException("ti");
            }

            _tallyItem = ti;
        }
Exemplo n.º 8
0
Arquivo: tally.cs Projeto: hkiaipc/lx
 /// <summary>
 /// 
 /// </summary>
 /// <param name="name"></param>
 public void AddTallyItem( string name )
 {
     TallyItem item = new TallyItem( name );
     _itemList.Add( item );
 }
Exemplo n.º 9
0
        /// <summary>
        ///
        /// </summary>
        /// <param name="name"></param>
        public void AddTallyItem(string name)
        {
            TallyItem item = new TallyItem(name);

            _itemList.Add(item);
        }