Błąd CS5001 Program nie zawiera statycznej metody „Main” odpowiedniej jako punkt wejścia
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Drawing;
using System.Data;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
using MailManager;
using Config;
using Config.Forms;
using Config.Controls.AccountControls;
namespace SenWin
{
public partial class UserControl1: UserControl
{
public UserControl1()
{
InitializeComponent();
}
Sending s = new Sending(Config.Config.instance.loggedInUser.accounts[0].email,
Config.Config.instance.loggedInUser.accounts[0].password, "smtp.gmail.com");
private void btnAddFile_Click(object sender, EventArgs e)
{
OpenFileDialog o = new OpenFileDialog()
{
InitialDirectory = @"C:\",
Title = "Załączniki ...",
Filter = "RTF|*.rtf|Text|*.txt|C# Files|*.cs|All Files|*.*",
CheckFileExists = true,
CheckPathExists = true,
DefaultExt = "txt",
RestoreDirectory = true,
Multiselect = true
};
if (o.ShowDialog() == DialogResult.OK)
{
foreach (String file in o.FileNames)
{
try
{
s.attachmentsPaths.Add(file);
}
catch (Exception ex)
{
MessageBox.Show("Error: " + ex.Message);
}
}
}
}
private void btnSend_Click(object sender, EventArgs e)
{
try
{
s.recipment = tbTo.Text;
s.title = tbSubject.Text;
s.body = rtbContent.Text;
s.Send();
((Form)this.TopLevelControl).Close();
}
catch (Exception ex)
{
MessageBox.Show("Error: " + ex.Message);
}
}
private void btnCancel_Click(object sender, EventArgs e)
{
((Form)this.TopLevelControl).Close();
}
}
}
jest to kontrolka uzytkownika, wie ktoś jak rozwiazac problem