Exemplo n.º 1
0
        private void saveToolStripButton_Click(object sender, EventArgs e)
        {
            if (String.IsNullOrEmpty(_CurrentFullFileName))
            {
                return;
            }

            TreeViewEngine.SaveMenuToFile(_CurrentFullFileName, _RootMenu);
            m_Saved = true;
            fwkMessageView_Warning.Show("Menu sussefully saved");
        }
Exemplo n.º 2
0
 private void frmMain_FormClosing(object sender, FormClosingEventArgs e)
 {
     if (!m_Saved)
     {
         if (fwkMessageView_Warning.Show("Save current menu ?") == DialogResult.OK)
         {
             TreeViewEngine.SaveMenuToFile(_CurrentFullFileName, _RootMenu);
             m_Saved = true;
         }
     }
 }
Exemplo n.º 3
0
        /// <summary>
        /// Edita un  MenuItem de negocio.
        /// </summary>
        /// <date>2008-07-13T00:00:00</date>
        /// <author>moviedo</author>
        private void EditMenuItem()
        {
            if (_MenuItemSelected == null)
            {
                fwkMessageView_Warning.Show("Please.. select any menu to execute this option.-");
                return;
            }
            MenuItem wServiceClon = _MenuItemSelected;//_MenuItemSelected.Clone();

            if (frmEdit.ShowEdit(_MenuItemSelected, _RootMenu.MenuImageList) == DialogResult.OK)
            {
                TreeViewEngine.Update(this.treeViewDesingner.SelectedNode, _MenuItemSelected);
            }
            m_Saved = false;
        }
Exemplo n.º 4
0
        /// <summary>
        /// Agrega un  MenuItem de negocio.
        /// </summary>
        /// <date>2008-07-13T00:00:00</date>
        /// <author>moviedo</author>
        private void AddMenuItem()
        {
            if (_MenuItemSelected == null)
            {
                fwkMessageView_Warning.Show("Please.. select any menu to execute this option.-");
                return;
            }

            MenuItem wMenuItemNew = new MenuItem();

            if (frmEdit.ShowNew(ref wMenuItemNew, _RootMenu.MenuImageList) == DialogResult.OK)
            {
                TreeViewEngine.Create(this.treeViewDesingner.SelectedNode, _MenuItemSelected, wMenuItemNew);
            }
            m_Saved = false;
        }
Exemplo n.º 5
0
 /// <summary>
 ///
 /// </summary>
 void LoadMenuFile()
 {
     if (String.IsNullOrEmpty(_CurrentFullFileName))
     {
         return;
     }
     try
     {
         _RootMenu = TreeViewEngine.LoadMenuFromFile(_CurrentFullFileName);
         TreeViewEngine.Load(this.treeViewDesingner, _RootMenu);
         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);
     }
 }