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

C# Form2类代码示例

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

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



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

示例1: button1_Click

 private void button1_Click(object sender, EventArgs e)
 {
     this.Hide();
     var form = new Form2();
     form.Closed += (s, args) => this.Close();
     form.Show();
 }
开发者ID:shreyans4nahata,项目名称:dairy_mgmt,代码行数:7,代码来源:retailerplantorder.cs


示例2: listView1_SelectedIndexChanged

 private void listView1_SelectedIndexChanged(object sender, EventArgs e)
 {
     Handler h = new Handler();
     Data.Value = h.getTipByID((System.Int32.Parse(listView1.Items[listView1.SelectedIndices[0]].Name)));
     Form2 detailForm = new Form2();
     detailForm.Show();
 }
开发者ID:Nimoto,项目名称:MyTipsWF,代码行数:7,代码来源:Form1.cs


示例3: button1_Click

 void button1_Click(object sender, EventArgs e)
 {
     var form2 = new Form2();
     var timeout = TimeSpan.FromSeconds(3);
     var result = form2.ShowWithTimeout(timeout);
     MessageBox.Show(result.ToString());
 }
开发者ID:daxfohl,项目名称:FormTimeoutExtension,代码行数:7,代码来源:Form1.cs


示例4: buttonDone_Click

 private void buttonDone_Click(object sender, EventArgs e)
 {
     if (levelSelect.Text == "Level 1")
     {
         Form1 Form1 = new Form1();
         this.Hide();
         Form1.Show();
     }
     else if (levelSelect.Text == "Level 2")
     {
         Form2 Form2 = new Form2();
         this.Hide();
         Form2.Show();
     }
     else if (levelSelect.Text == "Level 3")
     {
         Form3 Form3 = new Form3();
         this.Hide();
         Form3.Show();
     }
     else
     {
         MessageBox.Show("Please Select a Level!");
     }
 }
开发者ID:JamieFletcher92,项目名称:Year1BallBreakerGame,代码行数:25,代码来源:Settings.cs


示例5: start_Click

 private void start_Click(object sender, EventArgs e)
 {
     this.Hide();
     Form2 form2 = new Form2();
     form2.ShowDialog();
     this.Close();
 }
开发者ID:neilinglese,项目名称:Caves_of_Bowden_winForms,代码行数:7,代码来源:Form1.cs


示例6: btnNovaForma_Click

        private void btnNovaForma_Click(object sender, EventArgs e)
        {
            Form2 temp = new Form2();

            temp.ControlBox = false;
            temp.Show();
        }
开发者ID:humra,项目名称:Practice,代码行数:7,代码来源:Form1.cs


示例7: initializeBrain

        private void initializeBrain()
        {
            SettingsWindow = new Form2(); // contains the settings
            int result = SettingsWindow.loadSettings();
            if (result == 0)
            {
                writeLineToConsole("Location of ffmpeg and folder for temporary converted files loaded from previous session");
            }
            else
            {
                writeLineToConsole("Initial values set for location of ffmpeg and folder for temporary converted files");
                writeLineToConsole("You can change these in the 'settings' menu");
            }
            // load all settings and add them to brain
            int valueOfObjectSize = SettingsWindow.getValueOfObjectSize();
            int valueofMovementWindow = SettingsWindow.getValueofMovementWindow();
            String convertedOutputFolder = SettingsWindow.getConvertedOutputFolder();
            String ffmpegLocation = SettingsWindow.getFfmpegLocation();

            ffmpegLocation = Path.GetDirectoryName(ffmpegLocation) + "\\" + Path.GetFileNameWithoutExtension(ffmpegLocation);

            brain = new Brain();
            // Settings:
            updateThresholdLabel();
            brain.updateThreshold(trackBar1.Value);
            brain.addSeriousSettings(ffmpegLocation, convertedOutputFolder);
            brain.addLessSeriousSettings(valueOfObjectSize, valueofMovementWindow);

            // not busy
            Busy = 0;
        }
开发者ID:michaelfivez,项目名称:IntelligentPolicePlayer,代码行数:31,代码来源:Form1.cs


示例8: button1_Click

 private void button1_Click(object sender, EventArgs e)
 {
     m = panel1.CreateGraphics();
     m.DrawRectangle(pen, 20, 20, 20, 20);
     Form2 n = new Form2();
     n.Show();
 }
开发者ID:sem256,项目名称:first_year,代码行数:7,代码来源:Form1.cs


示例9: button1_Click

        private void button1_Click(object sender, EventArgs e)
        {
            // object Form2;

            //            string ipath1 = "c:\\tmp1\\このみタペ.jpg";
            string ipath1 = "c:\\tmp1\\ぱんちら.jpg";
            /* ぱんちらに変更 */

            // ファイル存在チェックして対応
            if (System.IO.File.Exists(ipath1))
            {
                pictureBox1.SizeMode = PictureBoxSizeMode.Zoom; // 窓に大きさあわせる

                pictureBox1.Load(ipath1);

                /* ここから Form2生成して表示のコード試験 */
                Form2 myform2 = new Form2();

                myform2.Show();

                myform2.pictureBoxF2.SizeMode = PictureBoxSizeMode.Zoom; // 窓に大きさあわせる
                myform2.pictureBoxF2.Load(ipath1);

                button1.Text = "おーーけー!";
            }
            else {
                button1.Text = "いや ファイルがだめだ!";
            }
        }
开发者ID:nopopopopon,项目名称:winHello1,代码行数:29,代码来源:Form1.cs


示例10: throwError

 public void throwError(string output)
 {
     Form2 errorWindow = new Form2(output);
     errorWindow.ShowInTaskbar = false;
     errorWindow.StartPosition = FormStartPosition.CenterScreen;
     errorWindow.ShowDialog(this);
 }
开发者ID:elimonova,项目名称:ExtremSearch,代码行数:7,代码来源:Form1.cs


示例11: Form1

        public Form1()
        {
            InitializeComponent();

            form2 = new Form2(this);
            form2.Visible = true;
        }
开发者ID:PrinceFroggy,项目名称:illuminati,代码行数:7,代码来源:Form1.cs


示例12: button1_Click

        private void button1_Click(object sender, EventArgs e)
        {
            SqlConnection con = new SqlConnection(@"Data Source=.\SQLEXPRESS;AttachDbFilename=C:\Users\Elcot\Documents\data.mdf;Integrated Security=True;Connect Timeout=30;User Instance=True");
            SqlDataAdapter sda = new SqlDataAdapter("Select Count(*) From login where username='" + textBox1.Text + "'and password='" + textBox2.Text + "'", con);
            DataTable dt = new DataTable();
            sda.Fill(dt);

            try
            {

                if (dt.Rows[0][0].ToString() == "1" || dt.Rows[0][1].ToString() == "1")
                {
                    this.Hide();
                    Form2 form2 = new Form2();
                    form2.Show();
                }
                else
                {
                    MessageBox.Show("please enter the valid username and password");
                }
            }
            catch
            {
                MessageBox.Show("please enter the id");
            }
        }
开发者ID:karthikeyan93,项目名称:mypro,代码行数:26,代码来源:Form1.cs


示例13: barSubItem15_ItemClick

 private void barSubItem15_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e)
 {
     XtraReport r = this.xrDesignPanel1.Report;
     Form2 frm = new Form2(r.FilterString);
     frm.ShowDialog();
     this.xrDesignPanel1.Report.FilterString = frm.Criteria;
 }
开发者ID:dioptre,项目名称:nkd,代码行数:7,代码来源:ReportDesigner.cs


示例14: b_Click

 void b_Click(object sender, EventArgs e)
 {
     WinPcapDevice device = (WinPcapDevice)((Button)sender).Tag;
     Form2 form = new Form2();
     form.Run(device);
     form.Show(this);
 }
开发者ID:kenjiuno,项目名称:EthernetLoopDetector,代码行数:7,代码来源:Form1.cs


示例15: changePlayersToolStripMenuItem_Click

        private void changePlayersToolStripMenuItem_Click(object sender, EventArgs e) // File>Change Players
        {
            Form2 f2 = new Form2();
            f2.ShowDialog();

            label1.Text = player1 + "(X)";
            label3.Text = player2 + "(O)";
            o_win_count.Text = "0";
            x_win_count.Text = "0";
            draw_count.Text = "0";
            turn = true;
            turn_count = 0;
            haveWinner = false;

            foreach (Control c in Controls)
            {
                try
                {
                    Button b = (Button)c;
                    b.Enabled = true;
                    b.Text = "";
                    b.BackColor = SystemColors.Control;
                }
                catch { }
            }

            newGameButton.Text = "New Game";
        }
开发者ID:Seniority,项目名称:TicTacToe,代码行数:28,代码来源:Form1.cs


示例16: lOGINToolStripMenuItem_Click

        private void lOGINToolStripMenuItem_Click(object sender, EventArgs e)
        {
            try { statusStrip1.Text = "connecting";
            Form2 login = new Form2();
            login.ShowDialog(this);
                if(!String.IsNullOrEmpty(login.Name))
                {
                    remotefactory = new ChannelFactory<Triva>("Chatconfig");
                    remoteproxy = remotefactory.CreateChannel();
                    clientuser = remoteproxy.ClientConnect(login.Name);
                    if (clientuser != null)
                    {
                        menuStrip1.Enabled = false;
                        button1.Enabled = true;
                        textBox2.Enabled = true;
                        isconnected = true;
                        statusStrip1.Text = "connect as" + clientuser.Name;
                    }
                    else
                        statusStrip1.Text = "disconnect";
                }

            }
            catch(Exception ex)
            {
                MessageBox.Show("an error occurred" + ex.Message,"fatal error", MessageBoxButtons.OK, MessageBoxIcon.Error);
            }
        }
开发者ID:TodorTsekov,项目名称:Middleware,代码行数:28,代码来源:Form1.cs


示例17: button1_Click

 private void button1_Click(object sender, EventArgs e)
 {
     Form3 Form1 = new Form3();
     Form1.Show();
     Form2 form2 = new Form2();
     form2.Visible = false;
 }
开发者ID:jakamarang,项目名称:PinoyHenyo,代码行数:7,代码来源:Form2.cs


示例18: button1_Click

 private void button1_Click(object sender, EventArgs e)
 {
     Form2 frmenglish = new Form2();
     this.Hide();
     frmenglish.ShowDialog();
     this.Close();
 }
开发者ID:Darcade,项目名称:MW3-Music-Tool,代码行数:7,代码来源:Form1.cs


示例19: button2_Click

 private void button2_Click(object sender, EventArgs e)
 {
     Form2 f2 = new Form2();
     this.Hide();
     f2.ShowDialog();
     this.ShowDialog();
 }
开发者ID:jacobromero,项目名称:RandomMovieChooser,代码行数:7,代码来源:Form1.cs


示例20: Form1_Load

 private void Form1_Load(object sender, EventArgs e)
 {
     Form2 Form2 = new Form2();
     Form2.Show();
     Thread.Sleep(1000);
     Form2.Close();
 }
开发者ID:paxillum,项目名称:Ololo,代码行数:7,代码来源:Form1.cs



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

专题导读
上一篇:
C# FormBorderStyle类代码示例发布时间:2022-05-24
下一篇:
C# Form1类代码示例发布时间: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