有没有办法更改 Xamarin Studio 中的启动代码?
它开始困扰我的启动代码,我不需要大部分代码
Xamarin Studio 6.0.2
从此改变:
namespace App2
{
[Activity(MainLauncher = true, Icon = "@mipmap/icon")]
public class MainActivity : Activity
{
int count = 1;
protected override void OnCreate(Bundle savedInstanceState)
{
base.OnCreate(savedInstanceState);
// Set our view from the "main" layout resource
SetContentView(Resource.Layout.Main);
// Get our button from the layout resource,
// and attach an event to it
Button button = FindViewById<Button>(Resource.Id.myButton);
button.Click += delegate { button.Text = string.Format("{0} clicks!", count++); };
}
}
}
对此:
namespace App1
{
[Activity(MainLauncher = true, Icon = "@mipmap/icon")]
public class MainActivity : Activity
{
protected override void OnCreate(Bundle savedInstanceState)
{
base.OnCreate(savedInstanceState);
SetContentView(Resource.Layout.Main);
}
}
}
我检查了选项中的代码模板,但这些是片段
如果是这样,怎么做?