public GridViewMenuEnumItemEntity()
     : base("GridViewMenuEnumItemEntity")
 {
     this.Items.Add(new ToolStripMenuItemCodon("Add", Language.Current.Explorer_GridViewMenuEnumItemEntity_Add,
                                               delegate(object sender, ToolStripItemCodonEventArgs args)
     {
         if (this.AddCommand != null)
         {
             AddCommand.Excute();
         }
     })
     {
         IsEnabled = (e) => { if (AddCommand == null)
                              {
                                  return(false);
                              }
                              else
                              {
                                  return(AddCommand.CanExcute());
                              } }
     });
     this.Items.Add(new ToolStripMenuItemCodon("Edit", Language.Current.Explorer_GridViewMenuEnumItemEntity_Edit,
                                               delegate(object sender, ToolStripItemCodonEventArgs args)
     {
         if (this.EditCommand != null)
         {
             EditCommand.Excute();
         }
     })
     {
         IsEnabled = (e) => { if (EditCommand == null)
                              {
                                  return(false);
                              }
                              else
                              {
                                  return(EditCommand.CanExcute());
                              } }
     });
     this.Items.Add(new ToolStripMenuItemCodon("Delete", Language.Current.Explorer_GridViewMenuEnumItemEntity_Delete,
                                               delegate(object sender, ToolStripItemCodonEventArgs args)
     {
         if (this.DeleteCommand != null)
         {
             DeleteCommand.Excute();
         }
     })
     {
         IsEnabled = (e) => { if (DeleteCommand == null)
                              {
                                  return(false);
                              }
                              else
                              {
                                  return(DeleteCommand.CanExcute());
                              } }
     });
 }
Пример #2
0
 public ImageListViewToolStrip()
     : base("ImageListViewToolStrip")
 {
     this.Items.Add(new ToolStripButtonCodon("Add", Language.Current.Explorer_ImageListViewContextMenuStrip_Add, IconsLibrary.New2,
                                             delegate(object sender, ToolStripItemCodonEventArgs args)
     {
         if (this.AddCommand != null)
         {
             AddCommand.Excute();
         }
     })
     {
         IsEnabled = (e) => { if (AddCommand == null)
                              {
                                  return(false);
                              }
                              else
                              {
                                  return(AddCommand.CanExcute());
                              } }
     });
     this.Items.Add(new ToolStripMenuItemCodon("Delete", Language.Current.Explorer_ImageListViewContextMenuStrip_Delete, IconsLibrary.Delete,
                                               delegate(object sender, ToolStripItemCodonEventArgs args)
     {
         if (this.RemoveCommand != null)
         {
             RemoveCommand.Excute();
         }
     })
     {
         IsEnabled = (e) => { if (RemoveCommand == null)
                              {
                                  return(false);
                              }
                              else
                              {
                                  return(RemoveCommand.CanExcute());
                              } }
     });
 }
Пример #3
0
 public GridViewMenuDataEntity()
     : base("GridViewMenuDataEntity")
 {
     this.Items.Add(new ToolStripMenuItemCodon("Add", Language.Current.GridViewMenuDataEntity_Add,
                                               delegate(object sender, ToolStripItemCodonEventArgs args)
     {
         if (this.AddCommand != null)
         {
             AddCommand.Excute();
         }
     })
     {
         IsEnabled = (e) => { if (AddCommand == null)
                              {
                                  return(false);
                              }
                              else
                              {
                                  return(AddCommand.CanExcute());
                              } }
     });
     this.Items.Add(new ToolStripMenuItemCodon("Edit", Language.Current.GridViewMenuDataEntity_Edit,
                                               delegate(object sender, ToolStripItemCodonEventArgs args)
     {
         if (this.EditCommand != null)
         {
             EditCommand.Excute();
         }
     })
     {
         IsEnabled = (e) => { if (EditCommand == null)
                              {
                                  return(false);
                              }
                              else
                              {
                                  return(EditCommand.CanExcute());
                              } }
     });
     this.Items.Add(new ToolStripMenuItemCodon("Delete", Language.Current.GridViewMenuDataEntity_Delete,
                                               delegate(object sender, ToolStripItemCodonEventArgs args)
     {
         if (this.DeleteCommand != null)
         {
             DeleteCommand.Excute();
         }
     })
     {
         IsEnabled = (e) => { if (DeleteCommand == null)
                              {
                                  return(false);
                              }
                              else
                              {
                                  return(DeleteCommand.CanExcute());
                              } }
     });
     this.Items.Add(new ToolStripSeparatorCodon());
     this.Items.Add(new ToolStripMenuItemCodon("CreateSql", Language.Current.GridViewMenuDataEntity_CreateSql,
                                               IconsLibrary.Script,
                                               delegate(object sender, ToolStripItemCodonEventArgs args)
     {
         if (this.CreateSqlCommand != null)
         {
             CreateSqlCommand.Excute();
         }
     })
     {
         IsEnabled = (e) => { if (CreateSqlCommand == null)
                              {
                                  return(false);
                              }
                              else
                              {
                                  return(CreateSqlCommand.CanExcute());
                              } }
     });
 }
 public TreeMenuMenuEntity()
     : base("TreeMenuMenuEntity")
 {
     this.Items.Add(new ToolStripMenuItemCodon("Add", Language.Current.Explorer_TreeMenuMenuEntity_Add,
                                               delegate(object sender, ToolStripItemCodonEventArgs args)
     {
         if (this.AddCommand != null)
         {
             AddCommand.Excute();
         }
     })
     {
         IsEnabled = (e) => { if (AddCommand == null)
                              {
                                  return(false);
                              }
                              else
                              {
                                  return(AddCommand.CanExcute());
                              } }
     });
     this.Items.Add(new ToolStripMenuItemCodon("Edit", Language.Current.Explorer_TreeMenuMenuEntity_Edit,
                                               delegate(object sender, ToolStripItemCodonEventArgs args)
     {
         if (this.EditCommand != null)
         {
             EditCommand.Excute();
         }
     })
     {
         IsEnabled = (e) => { if (EditCommand == null)
                              {
                                  return(false);
                              }
                              else
                              {
                                  return(EditCommand.CanExcute());
                              } }
     });
     this.Items.Add(new ToolStripMenuItemCodon("Delete", Language.Current.Explorer_TreeMenuMenuEntity_Delete,
                                               delegate(object sender, ToolStripItemCodonEventArgs args)
     {
         if (this.DeleteCommand != null)
         {
             DeleteCommand.Excute();
         }
     })
     {
         IsEnabled = (e) => { if (DeleteCommand == null)
                              {
                                  return(false);
                              }
                              else
                              {
                                  return(DeleteCommand.CanExcute());
                              } }
     });
     this.Items.Add(new ToolStripSeparatorCodon());
     this.Items.Add(new ToolStripMenuItemCodon("MoveBeforeCommand", Language.Current.Explorer_TreeMenuMenuEntity_MoveBefore,
                                               delegate(object sender, ToolStripItemCodonEventArgs args)
     {
         if (this.MoveBeforeCommand != null)
         {
             MoveBeforeCommand.Excute();
         }
     })
     {
         IsEnabled = (e) => { if (MoveBeforeCommand == null)
                              {
                                  return(false);
                              }
                              else
                              {
                                  return(MoveBeforeCommand.CanExcute());
                              } }
     });
     this.Items.Add(new ToolStripMenuItemCodon("MoveAfterCommand", Language.Current.Explorer_TreeMenuMenuEntity_MoveAfter,
                                               delegate(object sender, ToolStripItemCodonEventArgs args)
     {
         if (this.MoveAfterCommand != null)
         {
             MoveAfterCommand.Excute();
         }
     })
     {
         IsEnabled = (e) => { if (MoveAfterCommand == null)
                              {
                                  return(false);
                              }
                              else
                              {
                                  return(MoveAfterCommand.CanExcute());
                              } }
     });
 }
 public GridMenuToolStripPage()
     : base("GridMenuToolStripPage")
 {
     //添加
     this.Items.Add(new ToolStripMenuItemCodon("Add", Language.Current.Explorer_GridMenuToolStripPage_Add,
                                               delegate(object sender, ToolStripItemCodonEventArgs args)
     {
         if (this.AddCommand != null)
         {
             AddCommand.Excute();
         }
     })
     {
         IsEnabled = (e) => { if (AddCommand == null)
                              {
                                  return(false);
                              }
                              else
                              {
                                  return(AddCommand.CanExcute());
                              } }
     });
     //编辑
     this.Items.Add(new ToolStripMenuItemCodon("Edit", Language.Current.Explorer_GridMenuToolStripPage_Edit,
                                               delegate(object sender, ToolStripItemCodonEventArgs args)
     {
         if (this.EditCommand != null)
         {
             EditCommand.Excute();
         }
     })
     {
         IsEnabled = (e) => { if (EditCommand == null)
                              {
                                  return(false);
                              }
                              else
                              {
                                  return(EditCommand.CanExcute());
                              } }
     });
     //删除
     this.Items.Add(new ToolStripMenuItemCodon("Delete", Language.Current.Explorer_GridMenuToolStripPage_Delete,
                                               delegate(object sender, ToolStripItemCodonEventArgs args)
     {
         if (this.DeleteCommand != null)
         {
             DeleteCommand.Excute();
         }
     })
     {
         IsEnabled = (e) => { if (DeleteCommand == null)
                              {
                                  return(false);
                              }
                              else
                              {
                                  return(DeleteCommand.CanExcute());
                              } }
     });
     //------------
     this.Items.Add(new ToolStripSeparatorCodon());
     //上移
     this.Items.Add(new ToolStripMenuItemCodon("MoveBefore", Language.Current.Explorer_GridMenuToolStripPage_MoveBefore,
                                               delegate(object sender, ToolStripItemCodonEventArgs args)
     {
         if (this.MoveBeforeCommand != null)
         {
             MoveBeforeCommand.Excute();
         }
     })
     {
         IsEnabled = (e) => { if (MoveBeforeCommand == null)
                              {
                                  return(false);
                              }
                              else
                              {
                                  return(MoveBeforeCommand.CanExcute());
                              } }
     });
     //下移
     this.Items.Add(new ToolStripMenuItemCodon("MoveAfter", Language.Current.Explorer_GridMenuToolStripPage_MoveAfter,
                                               delegate(object sender, ToolStripItemCodonEventArgs args)
     {
         if (this.MoveAfterCommand != null)
         {
             MoveAfterCommand.Excute();
         }
     })
     {
         IsEnabled = (e) => { if (MoveAfterCommand == null)
                              {
                                  return(false);
                              }
                              else
                              {
                                  return(MoveAfterCommand.CanExcute());
                              } }
     });
 }
Пример #6
0
 public TreeMenuFolder()
     : base("TreeMenuFolder")
 {
     this.Items.Add(new ToolStripMenuItemCodon("Add", Language.Current.TreeMenuFolder_Add,
                                               delegate(object sender, ToolStripItemCodonEventArgs args)
     {
         if (this.AddCommand != null)
         {
             AddCommand.Excute();
         }
     })
     {
         IsEnabled = (e) => { if (AddCommand == null)
                              {
                                  return(false);
                              }
                              else
                              {
                                  return(AddCommand.CanExcute());
                              } }
     });
     this.Items.Add(new ToolStripMenuItemCodon("Edit", Language.Current.TreeMenuFolder_Edit,
                                               delegate(object sender, ToolStripItemCodonEventArgs args)
     {
         if (this.EditCommand != null)
         {
             EditCommand.Excute();
         }
     })
     {
         IsEnabled = (e) => { if (EditCommand == null)
                              {
                                  return(false);
                              }
                              else
                              {
                                  return(EditCommand.CanExcute());
                              } }
     });
     this.Items.Add(new ToolStripMenuItemCodon("Delete", Language.Current.TreeMenuFolder_Delete,
                                               delegate(object sender, ToolStripItemCodonEventArgs args)
     {
         if (this.DeleteCommand != null)
         {
             DeleteCommand.Excute();
         }
     })
     {
         IsEnabled = (e) => { if (DeleteCommand == null)
                              {
                                  return(false);
                              }
                              else
                              {
                                  return(DeleteCommand.CanExcute());
                              } }
     });
     this.Items.Add(new ToolStripSeparatorCodon());
     this.Items.Add(new ToolStripMenuItemCodon("AddWindow", Language.Current.TreeMenuFolder_AddWindow,
                                               delegate(object sender, ToolStripItemCodonEventArgs args)
     {
         if (this.AddWindowCommand != null)
         {
             AddWindowCommand.Excute();
         }
     })
     {
         IsEnabled = (e) => { if (AddWindowCommand == null)
                              {
                                  return(false);
                              }
                              else
                              {
                                  return(AddWindowCommand.CanExcute());
                              } }
     });
 }