无法调用表单和类,无法使用 Properties.Settings



最近两天Visual studio做得很奇怪,我已经重新安装了它,但它没有解决我的问题。

我不能调用其他类或窗体:

类:http://snag.gy/7W4dl.jpg

形式:http://snag.gy/lfm8Y.jpg

它不允许我使用属性。设置:http://snag.gy/W3VJn.jpg

代码打开mod表单:

private void button2_Click_1(object sender, EventArgs e)
{
    Mods modsForm = new Mods();
    modsForm.ShowDialog();
}

使用属性的代码设置和调用类的东西

if (SAVE_UN_CHECK.Checked)
{
    if (SAVE_UN_CHECK.Text != "")
    {
        string clearText = SAVE_UN_CHECK.Text.Trim();
        string cipherText = CryptorEngine.Encrypt(clearText, true);
        //Save textbox text to file
        Properties.Settings.Default.USER_USERNAME = cipherText;
        USERNAME_TEXT.Text = cipherText;
    }
}

该怎么办?我从来没有犯过这些奇怪的错误。我已经重新安装了Visual Studio 2012和所有其他的东西,比如SQL Server的东西。但这并没有解决问题。

using语句:

using System;
using System.Collections.Generic;
using System.Drawing;
using System.Windows.Forms;
using System.Threading;
using System.ComponentModel;
using System.Diagnostics;
using System.IO;
using System.Net;
using System.Data;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

您必须向具有CryptorEngineMods类型的dll添加引用。右键单击项目,选择Add Reference...

然后必须确保文件顶部的using语句指向定义CryptorEngineMods的名称空间。

最新更新