Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7703035
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T23:22:03+00:00 2026-05-31T23:22:03+00:00

In this link, there is a code for open recent files and it seems

  • 0

In this link, there is a code for “open recent files” and it seems that everybody understands whats going there except me. There are only a few lines to add the code and I dont understand below. Here what is FileOpenCore?? What should I replace for it?

RecentFileList.MenuClick += ( s, e ) => FileOpenCore( e.Filepath );

partial class RecentFileList
{
   public void InsertFile( string filepath )
   public void RemoveFile( string filepath )
}
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-31T23:22:04+00:00Added an answer on May 31, 2026 at 11:22 pm

    I believe FileOpenCore is the name the author gave to the method that actually opens your files. Replace it with whatever method you have that takes a file name and opens it.

    The InsertFile method is to be called (probably in your FileOpenCore) whenever a file is successfully opened. The RemoveFile should be called if you attempted to open a file and it failed. You don’t want to keep files that no longer exist in your recent files list, for example.

    So, if you defined your RecentFileList as the author did:

    <common:RecentFileList x:Name="RecentFileList" />
    

    And you hook up the click handler as he did in the constructor of your window:

    RecentFileList.MenuClick += ( s, e ) => FileOpenCore( e.Filepath );
    

    Your FileOpenCore (or whatever you want to call it) might look something like this (pseudo-code):

    private void FileOpenCore(string filename)
    {
        try
        {
            // read your file
            // and do whatever processing you need
            // ...
            // if open was successful
            RecentFileList.InsertFile(filename);
        }
        catch (Exception e)
        {
            // opening the file failed - maybe it doesn't exist anymore 
            // or maybe it's corrupted
            RecentFileList.RemoveFile(filename);
            // Do whatever other error processing you want to do.
        }
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

.bind('click',function(){ window.open($(this).find('.pc_more').html()); }); }); is there something in this part of the code that
In this asp.net page, there is a link that leads to another page in
I downloaded these zip files from the link http://netbeans.org/downloads/zip.html with the hope that this
This is my code to open a Fancybox that loads a page via ajax:
I found this link http://artis.imag.fr/~Xavier.Decoret/resources/glsl-mode/ , but there isn't a lot of description around
This is a problem because when I do email campaign, There is a link
This link shows you that jQuery uses (new Function(return + data))(); for older browsers,
This link states that all columns that are nullable should be added to the
I'm implementing Simplemodal in an application of mine using this code: $(.dialog-link).live('click', function(e) {
I have an application that contains this code: <script src=Scripts/jquery-1.4.1.min.js type=text/javascript></script> <script src=Scripts/facebox.js type=text/javascript></script>

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.