本文整理汇总了C#中Form1类的典型用法代码示例。如果您正苦于以下问题:C# Form1类的具体用法?C# Form1怎么用?C# Form1使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
Form1类属于命名空间,在下文中一共展示了Form1类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: GameLogic
public GameLogic(Form1 form)
{
networkClient = new NetworkClient(this, "localhost" , 31337);
mainForm = form;
highscores = new Dictionary<string, int>();
}
示例2: Main
static void Main()
{
Application.EnableVisualStyles();
Application.SetCompatibleTextRenderingDefault(false);
Form1 f = new Form1();
Application.Run(f);
}
示例3: button1_Click_1
private void button1_Click_1(object sender, EventArgs e)
{
Form1 newform = new Form1();
this.Hide();
newform.ShowDialog();
this.Close();
}
示例4: button2_Click
private void button2_Click(object sender, EventArgs e)
{
Form1 obj1 = new Form1();
obj1.RefToForm7 = this;
this.Close();
this.RefToForm1.Show();
}
示例5: btnLogin_Click
private void btnLogin_Click(object sender, EventArgs e)
{
m_sbQueryText.Length = 0;
m_sbQueryText.AppendFormat("select id from nexusGarments_Master_Employee where username='{0}' and password='{1}'", txtUserName.Text.ToString().Trim(), txtPassword.Text.ToString().Trim());
if (dbHandler.IsExists(m_sbQueryText.ToString()))
{
Form1 main = new Form1();
m_sbQueryText.Length = 0;
m_sbQueryText.AppendFormat("select id from nexusGarments_Master_Employee where username='{0}' ", txtUserName.Text.ToString().Trim());
dbHandler.loadUserid(m_sbQueryText.ToString(), Sess.id);
//XtraMessageBox.Show(main.lblID.Text.ToString());
//this.Close();
Sess.id = Convert.ToInt32(Sess.id);
this.Hide();
main.ShowDialog();
this.Close();
}
else
{
XtraMessageBox.Show("Login Failed", "Nexus Garments", MessageBoxButtons.OK, MessageBoxIcon.Information);
}
}
示例6: WordFileControl
public WordFileControl(Form1 mainform)
{
//
// TODO: 여기에 생성자 논리를 추가합니다.
//
form1 = mainform;
}
示例7: Server
public Server(Form1 form)
{
this.form = form;
server_active = true;
Thread thread = new Thread(new ThreadStart(initializeServer));
thread.Start();
}
示例8: Main
static void Main()
{
User32Application app = new User32Application();
Form1 win = new Form1();
app.Run(win);
}
示例9: SocketClient
public SocketClient(Form1 form,string inRemoteIpAddr, int inRemotePortNum)
{
this._RemoteIpAddress = inRemoteIpAddr;
this._RemotePortNumber = inRemotePortNum;
f = form;
setListBox = f.addListBoxString;
}
示例10: Rename_Character
public Rename_Character(Form1 father, string name)
{
InitializeComponent();
this.father = father;
textBox1.Text = name;
}
示例11: Main
static void Main()
{
Application.EnableVisualStyles();
Application.SetCompatibleTextRenderingDefault(false);
MainForm = new Form1();
// Create Server object
ServerBB = new BBServer();
// Catch log events
ServerBB.Log.LogEvent += new EventHandler<NetLogEventArgs>(Program.Log_LogEvent);
// Catch co/deco events
ServerBB.ClientConnected += new EventHandler<ClientConnectEventArgs>(ServerBB_ClientConnected);
ServerBB.ClientDisconnected += new EventHandler<ClientConnectEventArgs>(ServerBB_ClientDisconnected);
Application.Idle += new EventHandler(ApplicationLoop);
CreateNotificationIcon();
Application.Run(MainForm);
// shutdown; sends disconnect to all connected clients with this reason string
ServerBB.Stop("Application exiting");
if (notifyIconNA != null)
notifyIconNA.Visible = false;
}
示例12: pictureBox2_Click
private void pictureBox2_Click(object sender, EventArgs e)
{
Form1 f1 = new Form1();
this.Close();
this.Hide();
f1.ShowDialog();
}
示例13: Form1
public Form1(int w, int h, bool mx, bool sz, string nm)
{
InitializeComponent();
try
{
byte[] ic = ResourceLocator.getResources().getResource("favicon.ico");
MemoryStream ms=new MemoryStream(ic);
this.Icon = new System.Drawing.Icon(ms);
ms.Close();
}
catch (Exception)
{
this.Icon = System.Drawing.Icon.ExtractAssociatedIcon(Application.ExecutablePath);
}
Text = nm;
if (!sz)
{
FormBorderStyle = FormBorderStyle.FixedSingle;
MaximizeBox = false;
}
if (mx)
WindowState = FormWindowState.Maximized;
else
{
Width = w;
Height = h;
}
webBrowser1.Navigate("http://localhost:34567/");
obj = this;
}
示例14: ColorNumbers
public static int ColorNumbers(int[] neu, int[] alt, int z, Form1 f1)
{
f1.richTextBox1.AppendText("Schritt " + z + ": ");
z++;
f1.richTextBox1.Update();
Thread.Sleep(f1.delay);
for (int x = 0; x < neu.Length; x++)
{
if (alt[x] != neu[x])
{
f1.richTextBox1.SelectionColor = Color.Red;
f1.richTextBox1.AppendText(alt[x].ToString());
f1.richTextBox1.SelectionColor = Color.Black;
f1.richTextBox1.AppendText(" ");
}
else
{
f1.richTextBox1.AppendText(alt[x].ToString());
f1.richTextBox1.AppendText(" ");
}
}
f1.richTextBox1.AppendText("\n");
//Scrollen
f1.richTextBox1.Select(f1.richTextBox1.Text.Length, 1);
f1.richTextBox1.ScrollToCaret();
f1.richTextBox1.Update();
return z;
}
示例15: Main
static void Main()
{
Application.EnableVisualStyles();
Application.SetCompatibleTextRenderingDefault(false);
var cache = GetDataFolder();
using (var source = new CancellationTokenSource())
{
var builder = Sys.Configure(cache);
var fastSubject = new Subject<ISystemEvent>();
builder.Advanced.Observers.Clear();
builder.Advanced.RegisterObserver(fastSubject);
using (var host = builder.Build())
{
Console.WriteLine("Starting host");
var task = host.Start(source.Token);
var form = new Form1(host, fastSubject);
form.FormClosing += (sender, args) => source.Cancel();
Application.Run(form);
task.Wait(5000);
}
}
}