Exemple #1
0
 // Create circuit button clicked
 private void circuitCreateButton_Click(object sender, EventArgs e)
 {
     CreateResourceView resourceView = new CreateResourceView();
     if (resourceView.ShowDialog() == DialogResult.OK)
     {
         EditorCircuit circuit = new EditorCircuit(resourceView.uid);
         _controller.circuits.Add(circuit);
         selectCircuit(circuit);
     }
 }
Exemple #2
0
        // Add blueprint
        private void addBlueprintButton_Click(object sender, EventArgs e)
        {
            CreateResourceView createResourceView = new CreateResourceView();
            if (createResourceView.ShowDialog() == DialogResult.OK)
            {
                EditorBlueprint blueprint = _controller.createBlueprint(createResourceView.uid);
                blueprintList.RefreshItems();

                if (blueprint != null)
                    selectBlueprint(blueprint);
            }
        }
Exemple #3
0
 // Add material clicked
 private void addButton_Click(object sender, EventArgs e)
 {
     CreateResourceView createResourceView = new CreateResourceView();
     if (createResourceView.ShowDialog() == DialogResult.OK)
     {
         _controller.createMaterial(createResourceView.uid);
         materialsListBox.RefreshItems();
     }
 }
Exemple #4
0
        // Add blueprint scrap
        private void addScrapButton_Click(object sender, EventArgs e)
        {
            System.Diagnostics.Debug.Assert(selectedBlueprint != null);

            CreateResourceView createResourceView = new CreateResourceView();
            if (createResourceView.ShowDialog() == DialogResult.OK)
            {
                BlueprintScrap scrap = _controller.createBlueprintScrap(selectedBlueprint, createResourceView.uid);
                scrapList.RefreshItems();

                if (scrap != null)
                    selectBlueprintScrap(scrap);
            }
        }
 // Add new background
 private void addBackgroundButton_Click(object sender, EventArgs e)
 {
     CreateResourceView createResourceView = new CreateResourceView();
     if (createResourceView.ShowDialog() == DialogResult.OK)
     {
         EditorBackground background = new EditorBackground(createResourceView.uid);
         _controller.backgrounds.Add(background);
     }
 }