/// <summary> /// Opens the file. /// </summary> /// <remarks> /// It is called for the current file when [Enter] is pressed. /// The base method just calls <see cref="FarNet.Explorer.OpenFile"/> if the explorer supports it. /// </remarks> /// <param name="file">The file to be opened.</param> public virtual void UIOpenFile(FarFile file) { if (file == null) { return; } if (!Explorer.CanOpenFile) { return; } var args = new OpenFileEventArgs(file); var explorer = UIOpenFile(args); if (explorer != null) { explorer.OpenPanelChild(this); } }
/// <summary> /// Calls <see cref="FarNet.Explorer.OpenFile"/>. /// </summary> /// <param name="args">.</param> public virtual Explorer UIOpenFile(OpenFileEventArgs args) { return(Explorer.OpenFile(args)); }
/// <summary> /// Opens the file. /// </summary> /// <param name="args">.</param> /// <returns>The explorer to be opened in a child panel, or null.</returns> /// <remarks> /// It is normally called for the current file in a panel on [Enter]. /// The core does nothing after the call if it returns null. /// Otherwise it opens the returned explorer. /// </remarks> public virtual Explorer OpenFile(OpenFileEventArgs args) { return(null); }