Application Settings

0

Witam, powrót do programowania to nie łatwe zadanie. Zmagam się z poniższym błędem. Czy ktoś może mi pomóc go rozwiązać?
Ręcznie dodałem app.config oraz app.settings gdyż VC++ z automatu tego nie zrobił.
Z góry dziękuję za pomoc osobom które mają to w jednym paluszku ;)

Severity Code Description Project File Line
Error C3083 'app': the symbol to the left of a '::' must be a type Project2 c:\users\admin\documents\visual studio 2015\projects\project2\project2\MyForm.h 60
Error C2039 'Default': is not a member of 'global namespace'' Project2 c:\users\admin\documents\visual studio 2015\projects\project2\project2\MyForm.h 60 Error C2065 'Default': undeclared identifier Project2 c:\users\admin\documents\visual studio 2015\projects\project2\project2\MyForm.h 60 Error (active) name followed by '::' must be a class or namespace name Project2 c:\Users\Admin\Documents\Visual Studio 2015\Projects\Project2\Project2\MyForm.h 61 Error C3083 'app': the symbol to the left of a '::' must be a type Project2 c:\users\admin\documents\visual studio 2015\projects\project2\project2\MyForm.h 65 Error C2039 'Default': is not a member of 'global namespace'' Project2 c:\users\admin\documents\visual studio 2015\projects\project2\project2\MyForm.h 65
Error C2065 'Default': undeclared identifier Project2 c:\users\admin\documents\visual studio 2015\projects\project2\project2\MyForm.h 65
Error C2227 left of '->fd' must point to class/struct/union/generic type Project2 c:\users\admin\documents\visual studio 2015\projects\project2\project2\MyForm.h 65
Error (active) name followed by '::' must be a class or namespace name Project2 c:\Users\Admin\Documents\Visual Studio 2015\Projects\Project2\Project2\MyForm.h 66

//MyForm.h
#pragma once

namespace Project2 {

using namespace System;
using namespace System::ComponentModel;
using namespace System::Collections;
using namespace System::Windows::Forms;
using namespace System::Data;
using namespace System::Drawing;
using namespace System::Configuration;

/// <summary>
/// Summary for MyForm
/// </summary>
public ref class MyForm : public System::Windows::Forms::Form
{
public:
	MyForm(void)
	{
		InitializeComponent();
		//
		//TODO: Add the constructor code here
		//
	}

protected:
	/// <summary>
	/// Clean up any resources being used.
	/// </summary>
	~MyForm()
	{
		if (components)
		{
			delete components;
		}
	}
private: System::Windows::Forms::Button^  button1;
protected:
private: System::Windows::Forms::Button^  button2;

private:
	/// <summary>
	/// Required designer variable.
	/// </summary>
	System::ComponentModel::Container ^components;

#pragma region Windows Form Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
void InitializeComponent(void)
{
this->button1 = (gcnew System::Button());
this->button2 = (gcnew System::Button());
this->SuspendLayout();
//
// button1
//
this->button1->DataBindings->Add((gcnew System::Binding(L"Text", ::Default, L"fd", true, System::OnPropertyChanged)));
this->button1->Location = System::Point(0, 0);
this->button1->Name = L"button1";
this->button1->Size = System::Size(75, 23);
this->button1->TabIndex = 0;
this->button1->Text = ::Default->fd;
this->button1->UseVisualStyleBackColor = true;
this->button1->Click += gcnew System::EventHandler(this, &MyForm::button1_Click);
//
// button2
//
this->button2->Location = System::Point(232, 91);
this->button2->Name = L"button2";
this->button2->Size = System::Size(8, 8);
this->button2->TabIndex = 1;
this->button2->Text = L"button2";
this->button2->UseVisualStyleBackColor = true;
//
// MyForm
//
this->AutoScaleDimensions = System::SizeF(6, 13);
this->AutoScaleMode = System::Font;
this->ClientSize = System::Size(284, 262);
this->Controls->Add(this->button2);
this->Controls->Add(this->button1);
this->Name = L"MyForm";
this->StartPosition = System::CenterScreen;
this->Text = L"MyForm";
this->ResumeLayout(false);

	}

#pragma endregion
private: System::Void button1_Click(System::Object sender, System::EventArgs e) {
}
};
}

//plik app.config

<?xml version='1.0' encoding='utf-8'?> <settingsfile xmlns="http://schemas.microsoft.com/VisualStudio/2004/01/settings" currentprofile="(Default)" generatedclassnamespace="" generatedclassname="app"> <profiles /> <settings> <setting name="fd" type="System.String" scope="User"> <value profile="(Default)">button1</value> </setting> </settings> </settingsfile>

1 użytkowników online, w tym zalogowanych: 0, gości: 1