Пример #1
0
        private void newToolStripButton_Click(object sender, EventArgs e)
        {
            _MenuItemEncuestaList = new MenuItemEncuestaList();
            _CurrentFullFileName  = Helper.NewFile(_MenuItemEncuestaList);

            LoadMenuFile();
        }
        public static MenuItemEncuestaList LoadMenuFromFile(String pFullFileName)
        {
            //Application.StartupPath
            if (String.IsNullOrEmpty(pFullFileName))
            {
                return(null);
            }

            String xml = Fwk.HelperFunctions.FileFunctions.OpenTextFile(pFullFileName);

            return(MenuItemEncuestaList.GetMenuItemEncuestaListFromXml(xml));
        }
Пример #3
0
 /// <summary>
 ///
 /// </summary>
 void LoadMenuFile()
 {
     if (String.IsNullOrEmpty(_CurrentFullFileName))
     {
         return;
     }
     try
     {
         this.menuItemEncuestaBindingSource.DataSource = _MenuItemEncuestaList = TreeListEngineDevExpress.LoadMenuFromFile(_CurrentFullFileName);
         treeList1.ExpandAll();
         treeList1.RefreshDataSource();
         lblFileLoad.Text = String.Concat("File ", _CurrentFullFileName);
     }
     catch (InvalidOperationException)
     {
         fwkMessageView_Error.Show("The file not contain correct format to represent any menu .-");
     }
     catch (Exception ex2)
     {
         fwkMessageView_Error.Show(ex2);
     }
 }
Пример #4
0
 /// <summary>
 ///
 /// </summary>
 public void Populate(string pFullFileName)
 {
     this.menuItemEncuestaBindingSource.DataSource = _MenuItemEncuestaList = TreeListEngineDevExpress.LoadMenuFromFile(pFullFileName);
     treeList1.ExpandAll();
     treeList1.RefreshDataSource();
 }