Esempio n. 1
0
        /// <summary>
        /// Load the Quick buttons with the open File Dialog from Windows
        /// </summary>
        /// <returns>Returns the Linked List of Quick Buttons</returns>
        public static quickButtonXmlParserReturnVal loadQuickButtons()
        {
            quickButtonXmlParserReturnVal _retStruct = new quickButtonXmlParserReturnVal();

            _retStruct.quickButtonsList = new LinkedList <Button>();
            _retStruct.retVal           = 0;

            OpenFileDialog _openFileDialog = new OpenFileDialog();

            _openFileDialog.Title        = "Quick Buttons öffnen";
            _openFileDialog.DefaultExt   = ".xml";
            _openFileDialog.AddExtension = true;

            // If the File Open Dialog was Abborted then Return with an Empty List of QuickButtons
            if (!_openFileDialog.ShowDialog() == true)
            {
                return(_retStruct);
            }

            // The File Open Dialog was Closed with an Selection.
            _retStruct.quickButtonsList = _loadQuickButtons(_openFileDialog.FileName);
            _retStruct.pathAndName      = _openFileDialog.FileName;
            _retStruct.retVal           = 1;
            return(_retStruct);
        }
Esempio n. 2
0
        /// <summary>
        /// Load QuickButtons from existing XML File
        /// </summary>
        public void LoadQuickButtons()
        {
            quickButtonXmlParserReturnVal _parserReturnValue = QuickButtonXmlParser.loadQuickButtons();

            if (_parserReturnValue.retVal == 1)
            {
                // At first remove all the Quick Buttons already Created
                RemoveAllQuickButtons();

                // Load the List of Buttons to the local List
                buttonList           = _parserReturnValue.quickButtonsList;
                lastQuickButtonsPath = _parserReturnValue.pathAndName;

                AddAllQuickButtonsToTheUI();
            }
        }
Esempio n. 3
0
        /// <summary>
        /// Load the Quick buttons with the open File Dialog from Windows
        /// </summary>
        /// <returns>Returns the Linked List of Quick Buttons</returns>
        public static quickButtonXmlParserReturnVal loadQuickButtons(string pathAndFileName)
        {
            quickButtonXmlParserReturnVal _retStruct = new quickButtonXmlParserReturnVal();

            _retStruct.quickButtonsList = new LinkedList <Button>();
            _retStruct.retVal           = 0;

            if (pathAndFileName != null)
            {
                _retStruct.pathAndName      = pathAndFileName;
                _retStruct.quickButtonsList = _loadQuickButtons(pathAndFileName);
                _retStruct.retVal           = 1;
            }



            return(_retStruct);
        }