错误 CS0103: 当前上下文中不存在名称“OptionForm”(C#)
用.net reflector反编译别人的.exe,自己编译出错src:
[code]
namespace Assistant
{
using Assistant.Filters;
using Assistant.Macros;
using Assistant.MapUO;
using Microsoft.Win32;
using System;
using System.Collections;
using System.ComponentModel;
using System.Diagnostics;
using System.Drawing;
using System.IO;
using System.Resources;
using System.Runtime.InteropServices;
using System.Text;
using System.Windows.Forms;
using System.Reflection;
using Ultima;
public class MainForm : Form
{
public MainForm()
{
this.InitializeComponent();
this.m_NotifyIcon.ContextMenu = new ContextMenu(new MenuItem[] { new MenuItem("Show Razor", new EventHandler(this.DoShowMe)), new MenuItem("Hide Razor", new EventHandler(this.HideMe)), new MenuItem("-"), new MenuItem("Toggle Razor Visibility", new EventHandler(this.ToggleVisible)), new MenuItem("-"), new MenuItem("Close Razor && UO", new EventHandler(this.OnClose)) });
this.m_NotifyIcon.ContextMenu.MenuItems[0].DefaultItem = true;
this.ContextMenu = new ContextMenu(new MenuItem[] { new MenuItem("Options", new EventHandler(OptionForm.ShowMe)), new MenuItem("-"), new MenuItem("Ignore List", new EventHandler(IgnoreListForm.ShowMe)), new MenuItem("Loot List", new EventHandler(LootListForm.ShowMe)) });
this.ContextMenu.MenuItems[0].DefaultItem = true;
}
}
}
编译错误如下:
D:\C# Src\Razor_Source\Assistant.Plus\MyCaseInsensitiveEqualityComparer.cs(15,21): 警告 CS0108: “Assistant.Plus.MyCaseInsensitiveEqualityComparer.Equals(object, object)”隐藏了继承的成员“object.Equals(object, object)”。如果是有意隐藏,请使用关键字 new。
c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\mscorlib.dll: (相关文件)
D:\C# Src\Razor_Source\Assistant\MainForm.cs(258,106): 错误 CS0103: 当前上下文中不存在名称“OptionForm”
D:\C# Src\Razor_Source\Assistant\MainForm.cs(258,191): 错误 CS0103: 当前上下文中不存在名称“IgnoreListForm”
D:\C# Src\Razor_Source\Assistant\MainForm.cs(258,259): 错误 CS0103: 当前上下文中不存在名称“LootListForm”
求各位高手指教,全部代码过长,只截取出了主要部分 --------------------编程问答-------------------- 你去搜OptionForm 的定义啊
一般是
public class OptionForm : Form --------------------编程问答-------------------- 感谢楼上的回复,我去试一下,多谢 --------------------编程问答-------------------- 问题解决了,多谢楼上的回复,嘿嘿
补充:.NET技术 , C#