Ejemplo n.º 1
0
        private void FormDefineEditor_Load(object sender, EventArgs e)
        {
            try
            {
                this.BlockIdList = BlockDefinitionStore.LoadBlockDefinitions();
                this.Tree        = CategoryTree.Load(CategoryTree.CATEGORY_TREE_FILE);
                this.AddSubCategories(this.Tree.SubCategories, 0);

                var table = new DataTable();
                table.Columns.Add("UID");
                table.Columns.Add("Name");
                table.Columns.Add("Wdith");
                table.Columns.Add("Height");
                table.Columns.Add("Length");
                table.Columns.Add("Definitions");
                table.Columns.Add("Category");
                table.Columns.Add("Grouped");
                table.Columns.Add("IsSubconstruction");

                foreach (var item in this.BlockIdList.Values)
                {
                    table.Rows.Add(new object[] { item.Uid, item.Name, item.Width, item.Height, item.Length, item.Defined, item.Category, item.Grouped, item.IsSubconstruction });
                }

                this.dataGridView1.DataSource = table;
            }
            catch (Exception ex)
            {
                Console.WriteLine(ex.ToString());
                MessageBox.Show(ex.Message, "error", MessageBoxButtons.OK, MessageBoxIcon.Error);
            }
        }
Ejemplo n.º 2
0
 private void Form2_Load(object sender, EventArgs e)
 {
     this.Blueprint.LoadBlocks();
     this.BlockIdList = BlockDefinitionStore.LoadBlockDefinitions();
 }