String[] resNames = typeof(Program).Assembly.GetManifestResourceNames(); // names of resources
foreach (var name in resNames)
{
// Alasah.ru-ru doesn't include
Console.WriteLine("\t" + name); // ends with .resource
}
var resource = new ResourceManager("Target.Alasah", typeof(Program).Assembly);
// ru-ru
Console.WriteLine(resource.GetString("hello"));
Console.WriteLine(resource.GetString("hello", null));
Console.WriteLine(resource.GetString("hello", CultureInfo.CurrentCulture));
// without culture
Console.WriteLine(resource.GetString("hello", CultureInfo.InvariantCulture));
private Boolean canMove = false;
private void lbl_MouseLeftButtonUp(Object sender, MouseButtonEventArgs e)
{
canMove = false;
}
private void lbl_MouseLeftButtonDown(Object sender, MouseButtonEventArgs e)
{
canMove = true;
}
private void Window_MouseMove(Object sender, MouseEventArgs e)
{
// отменяем перетаскивание, если пользователь не нажал кнопку.
if (!canMove) return;
Control control = this.lbl;
//Берем позиции мыши.
Double x = e.GetPosition(this).X,
y = e.GetPosition(this).Y;
//Устанавливаем значение через margin
control.Margin = new Thickness(x, y, 0, 0);
}
classObj.PropertyA.ToString();
public class ClassObj
{
public ClassA PropertyA {get; set}
}
public class ClassA
{
public override String ToString()
{
return "To String method";
}
}
Может я чайник, и программирование это не моё?
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
pictureBox1.DoubleClick += pictureBox1_Click; //!!!!
}
private void pictureBox1_Click(object sender, EventArgs e)
{
MessageBox.Show("Contact List 1.0\nWritten by: 18ko&Ururur", "About");
}
}
public class Lol : IChild, IParent // !!!
{
string IParent.Family { get { return "suck"; } }
string IChild.Family { get { return "duck"; } }
public string Name { get { return "ross"; } }
}