Пример #1
0
        public MainForm(IndustryManager manager)
        {
            InitializeComponent();
            // Setup the trees.  One recipe on each main node
            Manager = manager;

            Market = new MarketManager();


            treeView.AfterSelect += TreeView_AfterSelect;

            // TODO: Freeze updates first
            foreach (var group in manager._recipes.Values.OrderBy(r => r.Name).GroupBy(r => r.ParentGroupName))
            {
                var groupNode = new TreeNode(group.Key);

                foreach (var recipe in group)
                {
                    var recipeNode = new TreeNode(recipe.Name);
                    recipeNode.Tag = recipe;
                    recipe.Node    = recipeNode;

                    groupNode.Nodes.Add(recipeNode);
                }

                treeView.Nodes.Add(groupNode);
            }
        }
Пример #2
0
 public LoadingForm(MarketManager market)
 {
     InitializeComponent();
     Market        = market;
     textBox1.Text = market._logFolderPath;
 }