using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
namespace WindowsFormsApplication1
{
public partial class Form1 : Form
{
string str = "Form1からラベルを書き換えました";
public Form1()
{
InitializeComponent();
}
public string TextBoxText
{
get
{
return str;
}
set
{
str = value;
}
}
private void Form1_Load(object sender, EventArgs e)
{
Form2 f = new Form2();
Form2.Form2Instance = f;
f.Show();
Form2.Form2Instance.TextBoxText = this.str;
}
}
}
dXNpbmcgU3lzdGVtOwp1c2luZyBTeXN0ZW0uQ29sbGVjdGlvbnMuR2VuZXJpYzsKdXNpbmcgU3lzdGVtLkNvbXBvbmVudE1vZGVsOwp1c2luZyBTeXN0ZW0uRGF0YTsKdXNpbmcgU3lzdGVtLkRyYXdpbmc7CnVzaW5nIFN5c3RlbS5MaW5xOwp1c2luZyBTeXN0ZW0uVGV4dDsKdXNpbmcgU3lzdGVtLldpbmRvd3MuRm9ybXM7CgpuYW1lc3BhY2UgV2luZG93c0Zvcm1zQXBwbGljYXRpb24xCnsKICAgIHB1YmxpYyBwYXJ0aWFsIGNsYXNzIEZvcm0xIDogRm9ybQogICAgewogICAgICAgIHN0cmluZyBzdHIgPSAiRm9ybTHjgYvjgonjg6njg5njg6vjgpLmm7jjgY3mj5vjgYjjgb7jgZfjgZ8iOwoKICAgICAgICBwdWJsaWMgRm9ybTEoKQogICAgICAgIHsKICAgICAgICAgICAgSW5pdGlhbGl6ZUNvbXBvbmVudCgpOwogICAgICAgIH0KCiAgICAgICAgcHVibGljIHN0cmluZyBUZXh0Qm94VGV4dAogICAgICAgIHsKICAgICAgICAgICAgZ2V0CiAgICAgICAgICAgIHsKICAgICAgICAgICAgICAgIHJldHVybiBzdHI7CiAgICAgICAgICAgIH0KICAgICAgICAgICAgc2V0CiAgICAgICAgICAgIHsKICAgICAgICAgICAgICAgIHN0ciA9IHZhbHVlOwogICAgICAgICAgICB9CiAgICAgICAgfQoKICAgICAgICBwcml2YXRlIH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