/// <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);
     }
 }
Beispiel #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);
     }
 }
Beispiel #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);
                    }
                }
            }
        }
Beispiel #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);
     }
 }
 /// <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);
     }
 }
 /// <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);
     }
 }
Beispiel #7
0
 void lvExplorer_SelectFile(object sender, SelectFileEventArgs args)
 {
     FileNames = new string[] { args.m_strPath };
     ShowFileNames();
 }