示例#1
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);
     }
 }
示例#2
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);
     }
 }
示例#3
0
        void OnRenamed(string newPath)
        {
            AddonHostForm masterForm = FindForm() as AddonHostForm;

            if (masterForm != null)
            {
                SelectFileEventArgs args = new SelectFileEventArgs();
                args.m_strPath = newPath;
                OnSelectFile(this, args);
            }
        }
示例#4
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);
                    }
                }
            }
        }
示例#5
0
 void lvExplorer_SelectFile(object sender, SelectFileEventArgs args)
 {
     FileNames = new string[] { args.m_strPath };
     ShowFileNames();
 }