• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

C# Form1类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C#中Form1的典型用法代码示例。如果您正苦于以下问题:C# Form1类的具体用法?C# Form1怎么用?C# Form1使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



Form1类属于命名空间,在下文中一共展示了Form1类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的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


示例16: button_Click

        private void button_Click(object sender, EventArgs e)
        {
            DialogResult dialogResult =  MessageBox.Show("是否关闭","", MessageBoxButtons.YesNo);
            if(dialogResult== DialogResult.Yes)
            {
                this.Close();
            }

            List<Form> formList = new List<Form>();

            Form1 f1 = new Form1();
            formList.Add(f1);

            Form1 f2 = new Form1();
            formList.Add(f2);

            Form1 f3 = new Form1();
            formList.Add(f3);

            f1.Close();
            formList.Remove(f1);

            foreach(Form f in formList)
            {
                f.Close();
            }
        }
开发者ID:dearz,项目名称:Practice,代码行数:27,代码来源:Form1.cs


示例17: FormSlices

        public FormSlices(Form1 form, Nodes nodes, DataToRender dataToRender, DeviceContext context)
        {
            this.form = form;
            this.nodes = nodes;
            this.dataToRender = dataToRender;
            InitializeComponent();

            if (!dataToRender.pathToVtk)
            {
                trackBar1.Enabled = false;
                trackBar2.Enabled = false;
                trackBar3.Enabled = false;
                checkBoxXY.Enabled = false;
                checkBoxXZ.Enabled = false;
                checkBoxYZ.Enabled = false;
                DisableOkolie();
                form.StatusInfo = "Set the path to vtk files to enable full functionality!";
            }
            else
            {
                this.SetForSlices();
            }
            checkBox1.Checked = dataToRender.okolie;
            DisableButton2();
            DisableButton3();
            SetComboBox();
        }
开发者ID:nataliaheliova,项目名称:Diplomovka,代码行数:27,代码来源:FormSlices.cs


示例18: Main

        static void Main()
        {
            #if DEBUG
            // Enable object tracking
            SharpDX.Configuration.EnableObjectTracking = true;
            #endif
            // Create the form to render to
            var form = new Form1();
            form.Text = "D3DRendering - Physics Simulation";
            form.ClientSize = new System.Drawing.Size(640, 480);
            form.Show();
            // Create and initialize the new D3D application
            // Then run the application.
            using (D3DApp app = new D3DApp(form))
            {
                // Only render frames at the maximum rate the
                // display device can handle.
                app.VSync = true;

                // Initialize the framework (creates Direct3D device etc)
                app.Initialize();

                // Run the application
                app.Run();
            }
        }
开发者ID:QamarWaqar,项目名称:Direct3D-Rendering-Cookbook,代码行数:26,代码来源:Program.cs


示例19: Perestanovka

        /// <summary>
        /// Метод перестановки уроков.
        /// </summary>
        /// <param name="f">Главная форма программы</param>
        public void Perestanovka(Form1 f)
        {
            this.TablicaAdd(f);
            this.a = 0;

            for (int i = 2; i < f.Tabl.ColumnCount; i++)
            {
                for (int j = 1; j < f.Tabl.RowCount; j++)
                {
                    f.Tabl[i, j].Value = string.Empty;
                }
            }

            while (this.a <= 28)
            {
                for (int fo = 0; fo < 3; fo++)
                {
                    for (int fok = 0; fok < 7; fok++)
                    {
                        this.AlgBeta();
                        this.AlgBetaT();
                        this.DopAlg();
                    }

                    this.AlgOkna();
                }

                this.a = this.a + 7;
            }

            this.Exp(f);
        }
开发者ID:wlad-popow,项目名称:Raspisanie,代码行数:36,代码来源:algoritm.cs


示例20: write_log_file

        public void write_log_file(Form1 f,String type_of_network)
        {
            this.f = f;
            int time = f.time;
            Console.Write("Time in excel : " + time);
            Console.Write("Selected network : " + type_of_network);
            String network_type = make_network_string(type_of_network);
            nodes = Convert.ToString(f.no_of_nodes);
            String connections = make_connections_string();
            if (System.IO.File.Exists("log.xls"))
                file_exists = true;
             //       MyConnection = new System.Data.OleDb.OleDbConnection("provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\\Users\\ABHISHEK\\ExcelData1.xls;;Extended Properties=Excel 8.0;");
            MyConnection = new System.Data.OleDb.OleDbConnection("provider=Microsoft.Jet.OLEDB.4.0;Data Source = log.xls;;Extended Properties=Excel 8.0;");
            MyConnection.Open();
            myCommand.Connection = MyConnection;
            if (!file_exists)
            {
                Console.Write("does not exist");
                sql = "CREATE TABLE Simulation (TypeofNetwork String, Nodes int, Packets int,Seeder_Nodes int,Seeder_Packets int,Download_edges int,Upload_edges int,Ratio float,Thresh_Probability float,Nodes_row int,Connections String,Alturists int,Traders int,Parasites int,Time_taken int)";

                myCommand.CommandText = sql;
                myCommand.ExecuteNonQuery();

            }
            sql = "INSERT INTO [Simulation$] (TypeofNetwork, Nodes, Packets,Seeder_Nodes,Seeder_Packets,Download_edges,Upload_edges,Ratio,Thresh_Probability,Nodes_row,Connections,Alturists,Traders,Parasites,Time_taken) values (" + " ' " + network_type + " ' " + "," + nodes + "," + f.no_of_packets.ToString() + "," + f.seeder_nodes.ToString() + "," + f.seeder_packets.ToString() + "," + f.no_of_download_edges.ToString() + "," + f.no_of_upload_edges.ToString() + "," + f.ratio.ToString() + "," + (f.threshold_probability / 100.0).ToString() + "," + f.widthstep.ToString() + "," + "'" + connections +"'" + "," +f.alturists.ToString() + "," + f.traders.ToString() + "," + f.parasites.ToString()+"," +time.ToString()+ ")";

            myCommand.CommandText = sql;
            myCommand.ExecuteNonQuery();
            MyConnection.Close();
        }
开发者ID:innoavator,项目名称:PeerSim,代码行数:30,代码来源:GenerateLog.cs



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C# Form2类代码示例发布时间:2022-05-24
下一篇:
C# Form类代码示例发布时间:2022-05-24
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap