private ModelBaseCore ShowNodeInitialForm(string nodeName, EndType nodeType) { switch (nodeType) { case EndType.PPC: Component_PPCInitForm ppcForm = new Component_PPCInitForm(nodeName); ppcForm.ShowDialog(); if (ppcForm.DialogResult == DialogResult.Yes) { return(ppcForm._ppc); } break; case EndType.FPGA: Component_FPGAInitForm fpgaForm = new Component_FPGAInitForm(nodeName); fpgaForm.ShowDialog(); if (fpgaForm.DialogResult == DialogResult.Yes) { return(fpgaForm._fpga); } break; default: //ComputeNodeType.ZYNQ Component_ZYNQInitForm zynqForm = new Component_ZYNQInitForm(nodeName); zynqForm.ShowDialog(); if (zynqForm.DialogResult == DialogResult.Yes) { return(zynqForm._zynq); } break; } return(null); }
private void ShowNodeInitialForm(CmpNode node) { switch (node.NodeType) { case EndType.PPC: PPC ppc = node.Obj as PPC; Component_PPCInitForm ppcForm = new Component_PPCInitForm(ppc); ppcForm.ShowDialog(); if (ppcForm.DialogResult == DialogResult.Yes) { node.Obj = ppcForm._ppc; } break; case EndType.FPGA: FPGA fpga = node.Obj as FPGA; Component_FPGAInitForm fpgaForm = new Component_FPGAInitForm(fpga); fpgaForm.ShowDialog(); if (fpgaForm.DialogResult == DialogResult.Yes) { node.Obj = fpgaForm._fpga; } break; default: //ComputeNodeType.ZYNQ ZYNQ zynq = node.Obj as ZYNQ; Component_ZYNQInitForm zynqForm = new Component_ZYNQInitForm(zynq); zynqForm.ShowDialog(); if (zynqForm.DialogResult == DialogResult.Yes) { node.Obj = zynqForm._zynq; } break; } return; }