Exemplo n.º 1
0
        /// <summary>
        /// Invoked when the Functional agent is activated.  This is
        /// the entry point for this agent.  Show the scanner that
        /// will display the list of files from the preferred folders(s)
        /// </summary>
        /// <returns>true on success</returns>
        public override bool Activate()
        {
            _autoLaunchFile = false;
            ExitCode        = CompletionCode.ContextSwitch;

            _fileBrowserScanner = Context.AppPanelManager.CreatePanel("FileBrowserScanner") as FileBrowserScanner;
            if (_fileBrowserScanner != null)
            {
                IsClosing = false;

                subscribeToEvents();

                _fileBrowserScanner.Action = parseAction(Action);
                _fileBrowserScanner.IncludeFileExtensions = IncludeFileExtensions;
                _fileBrowserScanner.ExcludeFileExtensions = ExcludeFileExtensions;
                _fileBrowserScanner.Folders    = Folders;
                _fileBrowserScanner.ActionVerb = ActionVerb;
                SelectedFile = String.Empty;

                IsActive = true;

                Context.AppPanelManager.ShowDialog(_fileBrowserScanner);

                return(true);
            }

            return(false);
        }
Exemplo n.º 2
0
 /// <summary>
 /// Closes the file browser scanner
 /// </summary>
 private void closeScanner()
 {
     if (_fileBrowserScanner != null)
     {
         Windows.CloseForm(_fileBrowserScanner);
         _fileBrowserScanner = null;
     }
 }
Exemplo n.º 3
0
        /// <summary>
        /// Form is closing. Cleanup
        /// </summary>
        /// <param name="sender">event sender</param>
        /// <param name="e">event args</param>
        private void _form_FormClosing(object sender, FormClosingEventArgs e)
        {
            unsubscribeFromEvents();
            _fileBrowserScanner = null;

            // re-initialize for next time
            initProperties();
        }
        /// <summary>
        /// Invoked when the Functional agent is activated.  This is
        /// the entry point for this agent.  Show the scanner that
        /// will display the list of files from the preferred folders(s)
        /// </summary>
        /// <returns>true on success</returns>
        public override bool Activate()
        {
            _autoLaunchFile = false;
            ExitCode        = CompletionCode.ContextSwitch;

            _fileBrowserScanner = Context.AppPanelManager.CreatePanel("FileBrowserScanner") as FileBrowserScanner;
            if (_fileBrowserScanner != null)
            {
                subscribeToEvents();

                _fileBrowserScanner.SelectActionOpen      = SelectActionOpen;
                _fileBrowserScanner.IncludeFileExtensions = IncludeFileExtensions;
                _fileBrowserScanner.ExcludeFileExtensions = ExcludeFileExtensions;
                _fileBrowserScanner.Folders    = Folders;
                _fileBrowserScanner.ActionVerb = ActionVerb;
                _fileBrowserScanner.DateFormat = Settings.FileBrowserDateFormat;
                SelectedFile = String.Empty;
                Context.AppPanelManager.ShowDialog(_fileBrowserScanner);

                return(true);
            }

            return(false);
        }
 /// <summary>
 /// Closes the file browser scanner
 /// </summary>
 private void closeScanner()
 {
     if (_fileBrowserScanner != null)
     {
         Windows.CloseForm(_fileBrowserScanner);
         _fileBrowserScanner = null;
     }
 }
        /// <summary>
        /// Form is closing. Cleanup
        /// </summary>
        /// <param name="sender">event sender</param>
        /// <param name="e">event args</param>
        private void _form_FormClosing(object sender, FormClosingEventArgs e)
        {
            unsubscribeFromEvents();
            _fileBrowserScanner = null;

            // re-initialize for next time
            initProperties();
        }
        /// <summary>
        /// Invoked when the Functional agent is activated.  This is
        /// the entry point for this agent.  Show the scanner that
        /// will display the list of files from the preferred folders(s)
        /// </summary>
        /// <returns>true on success</returns>
        public override bool Activate()
        {
            _autoLaunchFile = false;
            ExitCode = CompletionCode.ContextSwitch;

            _fileBrowserScanner = Context.AppPanelManager.CreatePanel("FileBrowserScanner") as FileBrowserScanner;
            if (_fileBrowserScanner != null)
            {
                subscribeToEvents();

                _fileBrowserScanner.SelectActionOpen = SelectActionOpen;
                _fileBrowserScanner.IncludeFileExtensions = IncludeFileExtensions;
                _fileBrowserScanner.ExcludeFileExtensions = ExcludeFileExtensions;
                _fileBrowserScanner.Folders = Folders;
                _fileBrowserScanner.ActionVerb = ActionVerb;
                _fileBrowserScanner.DateFormat = Settings.FileBrowserDateFormat;
                SelectedFile = String.Empty;
                Context.AppPanelManager.ShowDialog(_fileBrowserScanner);

                return true;
            }

            return false;
        }