コード例 #1
0
        private void Refresh_DataGridView()
        {
            List <T_DISK_INFO> tds = MyVideoBussiness.GetList_Disk_Info();

            SetMyDataViewSourceValue(dataGridView1, tds);
            int i_Line = 0, i_offLine = 0;

            for (int i = 0; i < tds.Count; i++)
            {
                if (tds[i].IS_ONLINE == 1)
                {
                    i_Line++;
                }
                else
                {
                    i_offLine++;
                }
            }
            SetMyTextBoxValue(lb_disk_Info, string.Format(str_disk_format, i_Line, i_offLine));
        }
コード例 #2
0
        private void btn_refresh_disk_Click(object sender, EventArgs e)
        {
            List <T_DISK_INFO> ds = MyVideoBussiness.GetList_Disk_Info();

            cb_disk.Items.Clear();
            string str_format  = "{0}(可用:{1}GB,总:{2}GB)";
            string str_display = "";

            for (int i = 0; i < ds.Count; i++)
            {
                if (ds[i].IS_ONLINE == 1)
                {
                    str_display = string.Format(str_format, ds[i].FIELD1 + "|" + ds[i].LOGICAL_NAME, Math.Round(ds[i].LOGICAL_FREESPACE.Value, 2), Math.Round(ds[i].LOGICAL_TOTALSIZE.Value, 2));
                    cb_disk.Items.Add(str_display);
                }
            }
            cb_disk.Tag = ds;
            if (cb_disk.Items.Count > 0)
            {
                cb_disk.SelectedIndex = cb_disk.Items.Count - 1;
            }
        }
コード例 #3
0
        private void button1_Click(object sender, EventArgs e)
        {
            List <T_DISK_INFO> tds = MyVideoBussiness.GetList_Disk_Info();

            SetMyDataViewSourceValue(dataGridView1, tds);
        }