当前位置: 首页>>代码示例>>C#>>正文


C# Form1类代码示例

本文整理汇总了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>();
        }
开发者ID:rvnijnatten,项目名称:De-Fles,代码行数:7,代码来源:GameLogic.cs

示例2: Main

 static void Main()
 {
     Application.EnableVisualStyles();
     Application.SetCompatibleTextRenderingDefault(false);
     Form1 f = new Form1();
     Application.Run(f);
 }
开发者ID:nkarastamatis,项目名称:FieldsGrid,代码行数:7,代码来源:Program.cs

示例3: button1_Click_1

 private void button1_Click_1(object sender, EventArgs e)
 {
     Form1 newform = new Form1();
     this.Hide();
     newform.ShowDialog();
     this.Close();
 }
开发者ID:anandtripathi5,项目名称:R-and-I,代码行数:7,代码来源:Form2.cs

示例4: button2_Click

 private void button2_Click(object sender, EventArgs e)
 {
     Form1 obj1 = new Form1();
     obj1.RefToForm7 = this;
     this.Close();
     this.RefToForm1.Show();
 }
开发者ID:alexeykuzmin7,项目名称:Diplom_project,代码行数:7,代码来源:Form7.cs

示例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);
            }
        }
开发者ID:aaasekar,项目名称:store,代码行数:25,代码来源:frmLogin.cs

示例6: WordFileControl

		public WordFileControl(Form1 mainform)
		{
			//
			// TODO: 여기에 생성자 논리를 추가합니다.
			//
			form1 = mainform;
		}
开发者ID:whysay,项目名称:EnglishWord,代码行数:7,代码来源:WordFileControl.cs

示例7: Server

 public Server(Form1 form)
 {
     this.form = form;
     server_active = true;
     Thread thread = new Thread(new ThreadStart(initializeServer));
     thread.Start();
 }
开发者ID:NRJanssen,项目名称:NFCinHome_Server,代码行数:7,代码来源:server.cs

示例8: Main

        static void Main()
        {
            User32Application app = new User32Application();
            Form1 win = new Form1();

            app.Run(win);
        }
开发者ID:Wiladams,项目名称:NewTOAPIA,代码行数:7,代码来源:Program.cs

示例9: SocketClient

 public SocketClient(Form1 form,string inRemoteIpAddr, int inRemotePortNum)
 {
     this._RemoteIpAddress = inRemoteIpAddr;
     this._RemotePortNumber = inRemotePortNum;
     f = form;
     setListBox = f.addListBoxString;
 }
开发者ID:hymen81,项目名称:SocketSender,代码行数:7,代码来源:SocketClinet.cs

示例10: Rename_Character

        public Rename_Character(Form1 father, string name)
        {
            InitializeComponent();

            this.father = father;
            textBox1.Text = name;
        }
开发者ID:inb4iba,项目名称:Dating-Sim-Game,代码行数:7,代码来源:Rename+Character.cs

示例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;
        }
开发者ID:TerenceWallace,项目名称:bloodbox,代码行数:26,代码来源:Program.cs

示例12: pictureBox2_Click

 private void pictureBox2_Click(object sender, EventArgs e)
 {
     Form1 f1 = new Form1();
     this.Close();
     this.Hide();
     f1.ShowDialog();
 }
开发者ID:ScorpionSpanner,项目名称:DezvoltarePersonala_NeXTHackathon,代码行数:7,代码来源:Zodie.cs

示例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;
 }
开发者ID:winterheart,项目名称:game-utilities,代码行数:30,代码来源:Form1.cs

示例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;
        }
开发者ID:Semkado,项目名称:SortAlgo,代码行数:29,代码来源:Sort.cs

示例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);
                }
            }
        }
开发者ID:vishal-h,项目名称:Farleyfile,代码行数:25,代码来源:Program.cs


注:本文中的Form1类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。