コード例 #1
0
 private void ViewOriginalToolStripMenuItem_Click(object sender, EventArgs e)
 {
     if (!filename.Contains(New_JsonEditor.readOnlyName))
     {
         JsonEditorHandler.OpenOriginalFile(path);
     }
     else
     {
         ConsoleHandler.append_Notice("You are already looking at the original " + filename.Replace(New_JsonEditor.readOnlyName, ""));
     }
 }
コード例 #2
0
        //
        //Open stuff
        //
        private void ContextClicked(object sender, ToolStripItemClickedEventArgs e)
        {
            int i = GetTabUnderMouse(mouseClickPos.X, mouseClickPos.Y);

            if (i != 9999)
            {
                if (e.ClickedItem.Text == "Close")
                {
                    CloseTab(tabFilePaths[i]);
                }
                else if (e.ClickedItem.Text == "View original")
                {
                    JsonEditorHandler.OpenOriginalFile(tabFilePaths[i]);
                }
                else if (e.ClickedItem.Text == "Restore to original")
                {
                    userControls[i].RestoreToOriginal();
                }
                else if (e.ClickedItem.Text == "Open in File Explorer")
                {
                    userControls[i].OpenInFileExplorer();
                }
            }
        }