コード例 #1
0
ファイル: FormManager.cs プロジェクト: ToughBill/NanCrm
 public static bool DisplayForm(BOIDEnum boid, string key, FormMode formMode, bool isReport = false, DeleReturnProc retProc = null)
 {
     bool result = true;
     Form mainForm = FormManager.GetMainForm();
     switch (boid)
     {
         case BOIDEnum.Country:
             frmCountry cty = new frmCountry(BOIDEnum.Country);
             cty.MdiParent = mainForm;
             cty.ReturnProc = retProc;
             cty.Show();
             break;
         case BOIDEnum.Market:
             frmMarketList mkt = new frmMarketList();
             mkt.MdiParent = mainForm;
             mkt.ReturnProc = retProc;
             mkt.Show();
             break;
         case BOIDEnum.BP:
             frmBP bpmd = new frmBP(BOIDEnum.BP);
             bpmd.MdiParent = mainForm;
             bpmd.ReturnProc = retProc;
             bpmd.Show();
             break;
         case BOIDEnum.ProductGroup:
             frmProductGroup frmProGrp = new frmProductGroup();
             frmProGrp.MdiParent = mainForm;
             frmProGrp.Show();
             break;
         case BOIDEnum.Product:
             frmProduct frmPro = new frmProduct(BOIDEnum.Product);
             frmPro.MdiParent = mainForm;
             frmPro.ReturnProc = retProc;
             frmPro.Show();
             break;
         case BOIDEnum.Texture:
             frmTexture frmTxt = new frmTexture(BOIDEnum.Texture);
             frmTxt.MdiParent = mainForm;
             frmTxt.ReturnProc = retProc;
             frmTxt.Show();
             break;
         case BOIDEnum.KeyWord:
             frmKeyWrod frmKw = new frmKeyWrod();
             frmKw.MdiParent = mainForm;
             frmKw.ReturnProc = retProc;
             frmKw.Show();
             break;
         default: break;
     }
     return result;
 }
コード例 #2
0
ファイル: frmMainMenu.cs プロジェクト: ToughBill/NanCrm
 private void mainMenu_NodeMouseClick(object sender, TreeNodeMouseClickEventArgs e)
 {
     TreeMenuNode node = (TreeMenuNode)e.Node;
     MainMenuTag tag = (MainMenuTag)node.Tag;
     switch (tag.ID)
     {
         case MenuID.Setup_Country:
             frmCountry cty = new frmCountry(BOIDEnum.Country);
             cty.MdiParent = this.MdiParent;
             cty.Show();
             break;
         case MenuID.Setup_Market:
             frmMarketList mkt = new frmMarketList();
             mkt.MdiParent = this.MdiParent;
             mkt.Show();
             break;
         case MenuID.Setup_Texture:
             frmTexture txt = new frmTexture(BOIDEnum.Texture);
             txt.MdiParent = this.MdiParent;
             txt.Show();
             break;
         case MenuID.Setup_ProductGroup:
             frmProductGroup frmProGrp = new frmProductGroup();
             frmProGrp.MdiParent = this.MdiParent;
             frmProGrp.Show();
             break;
         case MenuID.Setup_KeyWord:
             frmKeyWrod frmkw = new frmKeyWrod();
             frmkw.MdiParent = this.MdiParent;
             frmkw.Show();
             break;
         case MenuID.Setup_KeyWordList:
             frmKeyWordList frmKwl = new frmKeyWordList();
             frmKwl.MdiParent = this.MdiParent;
             frmKwl.Show();
             break;
         case MenuID.Setup_SearchPlatform:
             break;
         case MenuID.BP_MD:
             frmBP bpmd = new frmBP(BOIDEnum.BP);
             bpmd.MdiParent = this.MdiParent;
             bpmd.Show();
             break;
         case MenuID.BP_List:
             frmBpList bpList = new frmBpList();
             bpList.MdiParent = this.MdiParent;
             bpList.Show();
             break;
         case MenuID.PR_MD:
              frmProduct frmPro = new frmProduct(BOIDEnum.Product);
              frmPro.MdiParent = this.MdiParent;
              frmPro.Show();
             break;
         case MenuID.PR_MDList:
             frmProductList frmProList = new frmProductList();
             frmProList.MdiParent = this.MdiParent;
             frmProList.Show();
             break;
         default: break;
     }
 }