FileOpenFromMenu() 공개 정적인 메소드

Edit selected file using either the default editor (native OS file association, if the tag is null, or the editor program specified in the tag field. This is a handler for the context menu, edit tool bar button and also revision history view menus.
public static FileOpenFromMenu ( object sender, string file ) : void
sender object
file string
리턴 void
예제 #1
0
        /// <summary>
        /// Handler for the view file menus.
        /// The tag of the sender specifies the operation on a selected file: null will open a file
        /// using the default association, while any other tag specifies a program to run.
        /// </summary>
        private void MenuViewEditClick(object sender, EventArgs e)
        {
            // Create a temp file on the selected git file version
            string temp = GetTempFile(file, listRev.SelectedItems[0].Name);

            if (!string.IsNullOrEmpty(temp))
            {
                ClassUtils.FileOpenFromMenu(sender, temp);
            }
        }