/// <summary>
 /// Occurs when a file item was selected.
 /// </summary>
 private void OnSelectFile(string strPath)
 {
     if (SelectFile != null)
     {
         SelectFileEventArgs eventArgs = new SelectFileEventArgs();
         if (File.Exists(strPath) || Directory.Exists(strPath))
         {
             eventArgs.m_strPath = strPath;
         }
         SelectFile(this, eventArgs);
     }
 }
Ejemplo n.º 2
0
 private void OnSelectFile(object sender, SelectFileEventArgs args)
 {
     if (args != null)
     {
         List<string> paths = new List<string>();
         paths.Add(args.m_strPath);
         RaiseNavigationAction(NavActionType.ActionSelectFile, paths, _cat);
     }
 }
Ejemplo n.º 3
0
        private void OnSelectFile(object sender, SelectFileEventArgs args)
        {
            CancelAutoPreview();

            if (args != null)
            {
                List<string> paths = new List<string>();
                paths.Add(args.m_strPath);
                RaiseNavigationAction(NavActionType.ActionSelectFile, paths);

                if (paths != null && 
                    paths.Count == 1 &&
                    !string.IsNullOrEmpty(paths[0]))
                {
                    ActionRequest req = new ActionRequest();
                    req.ActionType = ActionType.ActionBeginPreview;
                    req.Items = paths;

                    bool autoPreviewAvailable = false;
                    if (AddonsCore.Instance.CanDispatchAction(req, ref autoPreviewAvailable))
                    {
                        if (autoPreviewAvailable && BuiltinAddonConfig.FEPreviewTimer > 0)
                        {
                            previewTimer.Interval = (int)(BuiltinAddonConfig.FEPreviewTimer * 1000);
                            previewTimer.Start();
                            RaiseNavigationAction(NavActionType.ActionPrepareAutoPreview, null, null);
                        }
                        else
                        {
                            RaiseNavigationAction(NavActionType.ActionNotifyPreviewableItem, null, null);
                        }
                    }
                    else
                    {
                        RaiseNavigationAction(NavActionType.ActionNotifyNonPreviewableItem, null, null);
                    }
                }
            }
        }
Ejemplo n.º 4
0
 void OnRenamed(string newPath)
 {
     AddonHostForm masterForm = FindForm() as AddonHostForm;
     if (masterForm != null)
     {
         SelectFileEventArgs args = new SelectFileEventArgs();
         args.m_strPath = newPath;
         OnSelectFile(this, args);
     }
 }
Ejemplo n.º 5
0
 /// <summary>
 /// Occurs when a file item was selected.
 /// </summary>
 private void OnSelectFile(string strPath)
 {
     if (SelectFile != null)
     {
         SelectFileEventArgs eventArgs = new SelectFileEventArgs();
         if (File.Exists(strPath) || Directory.Exists(strPath))
         {
             eventArgs.m_strPath = strPath;
         }
         SelectFile(this, eventArgs);
     }
 }
Ejemplo n.º 6
0
 /// <summary>
 /// Occurs when a file item was selected.
 /// </summary>
 private void OnSelectFile(string strPath)
 {
     if (SelectFile != null)
     {
         SelectFileEventArgs eventArgs = new SelectFileEventArgs();
         eventArgs.m_strPath = strPath;
         SelectFile(this, eventArgs);
     }
 }
Ejemplo n.º 7
0
 void lvExplorer_SelectFile(object sender, SelectFileEventArgs args)
 {
     FileNames = new string[] { args.m_strPath };
     ShowFileNames();
 }