Ejemplo n.º 1
0
        private void button1_Click(object sender, EventArgs e)
        {
            // 首先通过当前树的内容, 修改事件选择器的选定内容
            formEventSelector.SetListAllItemChecked(false);
            foreach (TreeNode Node in treeView1.Nodes)
            {
                formEventSelector.SetListItemChecked(Node.Name, true);
            }

            if (formEventSelector.ShowDialog() == DialogResult.OK)
            {
                string[] EventKeyList = formEventSelector.GetSelectedEventList();
                foreach (string szKey in EventKeyList)
                {
                    if (!treeView1.Nodes.ContainsKey(szKey))
                    {
                        string szNodeName = "[" + String.Format("{0:D2}", Convert.ToInt32(TabFile.EventData.GetTabCell(szKey, "EventID"))) + "] " +
                                            TabFile.EventData.GetTabCell(szKey, "ShowName");
                        treeView1.Nodes.Add(szKey, szNodeName);
                    }
                }
            }
        }
Ejemplo n.º 2
0
        private void dataGridView3_MouseClick(object sender, MouseEventArgs e)
        {
            EventSelector formEventSelector = new EventSelector();

            // 首先通过当前树的内容, 修改事件选择器的选定内容
            formEventSelector.SetListAllItemChecked(false);
            foreach (DataGridViewRow row in dataGridView3.Rows)
            {
                if (row != null && row.Cells[0].Value != null)
                {
                    formEventSelector.SetListItemChecked(row.Cells[0].Value.ToString(), true);
                }
            }

            if (formEventSelector.ShowDialog() == DialogResult.OK)
            {
                string[] EventKeyList = formEventSelector.GetSelectedEventList();
                dataGridView3.Rows.Clear();
                foreach (string szKey in EventKeyList)
                {
                    dataGridView3.Rows.Add(szKey, TabFile.EventData.GetTabCell(szKey, "ShowName"));
                }
            }
        }
Ejemplo n.º 3
0
        private void dataGridView3_MouseClick(object sender, MouseEventArgs e)
        {
            EventSelector formEventSelector = new EventSelector();

            // 首先通过当前树的内容, 修改事件选择器的选定内容
            formEventSelector.SetListAllItemChecked(false);
            foreach (DataGridViewRow row in dataGridView3.Rows)
            {
                if (row != null && row.Cells[0].Value != null)
                {
                    formEventSelector.SetListItemChecked(row.Cells[0].Value.ToString(), true);
                }
            }

            if (formEventSelector.ShowDialog() == DialogResult.OK)
            {
                string[] EventKeyList = formEventSelector.GetSelectedEventList();
                dataGridView3.Rows.Clear();
                foreach (string szKey in EventKeyList)
                {
                    dataGridView3.Rows.Add(szKey, TabFile.EventData.GetTabCell(szKey, "ShowName"));
                }
            }
        }