Ejemplo n.º 1
0
        public MenuImageButton NewImageButton(int Index)
        {
            MenuImageButton icon = new MenuImageButton();

            Icons.Insert(Index, icon);
            return(icon);
        }
Ejemplo n.º 2
0
        public MenuImageButton NewImageButton()
        {
            MenuImageButton icon = new MenuImageButton();

            Icons.Add(icon);
            return(icon);
        }
Ejemplo n.º 3
0
 public MenuImageButton NewImageButton() {
     MenuImageButton icon = new MenuImageButton();
     Icons.Add(icon);
     return icon;
 }
Ejemplo n.º 4
0
 public MenuImageButton NewImageButton(int Index) {
     MenuImageButton icon = new MenuImageButton();
     Icons.Insert(Index, icon);
     return icon;
 }
        private void initializeToolbar()
        {
            // Get a reference to the Wiki toolbar.
            var tab = (TabPage)Parent.Parent.Parent;
            var toolbar = tab.Menu;

            // Add the multi-purpose "Edit" and "Back" button.
            btnEditAndBack = toolbar.NewImageButton();
            btnEditAndBack.ID = "btnEditAndBack";
            btnEditAndBack.Command += new CommandEventHandler(btn_Command);
            btnEditAndBack.ToolTip = IconEditTitle;
            btnEditAndBack.CommandName = "edit";

            // Add and hide the "Save" button.
            btnSave = toolbar.NewImageButton();
            btnSave.ID = "btnSave";
            btnSave.ImageUrl = GlobalSettings.Path + IconSavePath;
            btnSave.Command += new CommandEventHandler(btn_Command);
            btnSave.ToolTip = IconSaveTitle;
            btnSave.CommandName = "save";
            btnSave.Visible = false;

            // Add and hide the "Delete" button.
            btnDelete = toolbar.NewImageButton();
            btnDelete.ID = "btnDelete";
            btnDelete.ImageUrl = GlobalSettings.Path + IconDeletePath;
            btnDelete.Command += new CommandEventHandler(btn_Command);
            btnDelete.ToolTip = IconDeleteTitle;
            btnDelete.CommandName = "deletepage";
            btnDelete.OnClientClick = "return deletePage()";
            btnDelete.Visible = false;

            toolbar.InsertSplitter();

            // Add and hide the "New Page" button.
            btnNewPage = toolbar.NewImageButton();
            btnNewPage.ID = "btnNewPage";
            btnNewPage.ImageUrl = GlobalSettings.Path + IconNewPagePath;
            btnNewPage.Command += new CommandEventHandler(btn_Command);
            btnNewPage.ToolTip = IconNewPageTitle;
            btnNewPage.CommandName = "newpage";
            btnNewPage.Visible = false;

            // Add and hide the "Category Editor" button.
            btnCategoryEditor = toolbar.NewImageButton();
            btnCategoryEditor.ID = "btnCategoryEditor";
            btnCategoryEditor.ImageUrl = GlobalSettings.Path + IconCategoriesPath;
            btnCategoryEditor.Command += new CommandEventHandler(btn_Command);
            btnCategoryEditor.ToolTip = IconCategoriesTitle;
            btnCategoryEditor.CommandName = "cats";
            btnCategoryEditor.Visible = false;
        }