/// <summary> /// Agrega un nuevo menu file a la lista de archivos /// </summary> /// <param name="isNew"></param> void Add_MenuFile(bool isNew) { Fwk.UI.Controls.Menu.ToolBar toolBar = null; string wFileName; if (isNew) { toolBar = new Fwk.UI.Controls.Menu.ToolBar(); wFileName = Fwk.HelperFunctions.FileFunctions.OpenFileDialog_New(toolBar.GetXml(), Fwk.HelperFunctions.FileFunctions.OpenFilterEnums.OpenXmlFilter, true); } else { wFileName = Fwk.HelperFunctions.FileFunctions.OpenFileDialog_Open(Fwk.HelperFunctions.FileFunctions.OpenFilterEnums.OpenXmlFilter); } if (string.IsNullOrEmpty(wFileName)) { return; } FileInfo f = new FileInfo(wFileName); if (_MenuFileList.Any <MenuFile>(p => p.Name.CompareTo(f.Name) == 0)) { base.MessageViewer.Show("Este menu ya esta cargado"); return; } _SelectedMenuFile = new MenuFile(f); _SelectedMenuFile.Toolbar = toolBar; _MenuFileList.Add(_SelectedMenuFile); lblSelectedFileName.Text = _SelectedMenuFile.FullName; ClearControlEditor(); this.LoadFromFile(); lstFiles.SelectedItem = _SelectedMenuFile; }
void RefreshView() { Fwk.UI.Controls.Menu.ToolBar toolBar = GenerateToolBarFromTree(); toolBarControl1.LoadToolBarFromXml(toolBar.GetXml()); }