| 网站首页 | 业界新闻 | 小组 | 威客 | 人才 | 下载频道 | 博客 | 代码贴 | 在线编程 | 编程论坛
欢迎加入我们,一同切磋技术
用户名:   
 
密 码:  
共有 561 人关注过本帖
标题:为什么阀还是没有反应呢
取消只看楼主 加入收藏
追影11
Rank: 1
等 级:新手上路
帖 子:4
专家分:0
注 册:2013-5-31
结帖率:100%
收藏
已结贴  问题点数:20 回复次数:1 
为什么阀还是没有反应呢
#region 判断各开关valuechange
        private void v1_valueChanged(object sender, EventArgs e)
        {
            JudgeFlowNo1();
            //Judgev9_v12();//输液臂开关打开前提下 开度开关启用
            //speed();//流速计算

        }
       #region
搜索更多相关主题的帖子: speed private 还是 开关 
2013-05-31 17:10
追影11
Rank: 1
等 级:新手上路
帖 子:4
专家分:0
注 册:2013-5-31
收藏
得分:0 
回复 2楼 shangsharon
我想点击阀,然后弹出页面,但是没有反应。
using System;
using System.Collections.Generic;
using
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
//using _1;
using _1.Forms;
using System.Threading;

namespace _1
{
    public partial class ZH_SIMULATING : Form
    {
        public static ZH_SIMULATING ZHS = null;//主界面切换
        public static 设定值窗口 SDZ = new 设定值窗口();


        public static GQ_SIMULATING GQS = new GQ_SIMULATING();


        private System.Threading.Timer mytimer;//管道流动时间-线程
        System.Timers.Timer t1 = new System.Timers.Timer(1000);//流速时间
        public bool loadingstart = false;


        public ZH_SIMULATING()
        {
            InitializeComponent();
            ZHS = this;////主界面切换


            CheckForIllegalCrossThreadCalls = false;
            mytimer = new System.Threading.Timer(new TimerCallback(PipeFlow), null, 0, 200);//设置管道流动时间

            //流速时间设置
            t1.Elapsed += new System.Timers.ElapsedEventHandler(T1);
            t1.AutoReset = true;//设置是执行一次(false)还是一直执行(true)
            t1.Enabled = true;
        }


        private void button1_Click(object sender, EventArgs e)
        {
            this.Close();
        }

        //private void button2_Click(object sender, EventArgs e)
        //{
        //    //SDZ.Show();
        //}

        private void button5_Click(object sender, EventArgs e)
        {
            GQ_SIMULATING.GQS.Show();
            this.Hide();
        }

        private void button6_Click(object sender, EventArgs e)
        {
           

        }
        private bool loadstart = false;
        private void PipeFlow(object o)//启动每个管道流动
        {
            pipe1.Flow_Tick(); pipe2.Flow_Tick();  pipe3.Flow_Tick(); pipe4.Flow_Tick(); pipe5.Flow_Tick(); pipe6.Flow_Tick(); pipe7.Flow_Tick(); pipe8.Flow_Tick(); pipe9.Flow_Tick(); pipe10.Flow_Tick();
            pipe11.Flow_Tick(); pipe12.Flow_Tick(); pipe13.Flow_Tick();  pipe14.Flow_Tick(); pipe15.Flow_Tick(); pipe16.Flow_Tick(); pipe17.Flow_Tick(); pipe18.Flow_Tick(); pipe19.Flow_Tick(); pipe20.Flow_Tick();
         
            pipe21.Flow_Tick(); pipe22.Flow_Tick(); pipe23.Flow_Tick(); pipe24.Flow_Tick(); pipe25.Flow_Tick(); pipe26.Flow_Tick(); pipe27.Flow_Tick(); pipe28.Flow_Tick(); pipe29.Flow_Tick(); pipe30.Flow_Tick();
            //pipe31.Flow_Tick(); pipe32.Flow_Tick(); pipe33.Flow_Tick(); pipe34.Flow_Tick(); pipe35.Flow_Tick(); pipe36.Flow_Tick(); pipe37.Flow_Tick(); pipe38.Flow_Tick(); pipe39.Flow_Tick(); pipe40.Flow_Tick();

            pipe41.Flow_Tick(); pipe42.Flow_Tick(); pipe43.Flow_Tick(); pipe44.Flow_Tick(); pipe45.Flow_Tick(); pipe46.Flow_Tick(); pipe47.Flow_Tick(); pipe48.Flow_Tick(); pipe49.Flow_Tick(); pipe50.Flow_Tick();
            pipe51.Flow_Tick(); pipe52.Flow_Tick(); pipe53.Flow_Tick(); pipe54.Flow_Tick(); pipe55.Flow_Tick(); pipe56.Flow_Tick(); pipe57.Flow_Tick(); pipe58.Flow_Tick(); pipe59.Flow_Tick(); pipe60.Flow_Tick();

            //pipe61.Flow_Tick(); pipe62.Flow_Tick(); pipe63.Flow_Tick(); pipe64.Flow_Tick(); pipe65.Flow_Tick(); pipe66.Flow_Tick(); pipe67.Flow_Tick(); pipe68.Flow_Tick(); pipe69.Flow_Tick(); pipe70.Flow_Tick();
            pipe71.Flow_Tick(); pipe72.Flow_Tick();

        }
         public void JudgeFlowNo1()//判断进气各个管道流动
         {
             if (loadstart == true)
             {
                 //pipe2.BFlow = pipe4.BFlow = true;
                 if (valve14.Open)
                 {
                     pipe2.BFlow = pipe4.BFlow = true;
                 }
                 else
                 {
                     pipe2.BFlow = pipe4.BFlow = false;
                 }
                 //if (valve15.Open)
                 //{
                 //    pipe2.BFlow = pipe41.BFlow = pipe31.BFlow = pipe5.BFlow = true;

                 //}
                 //else
                 //{
                 //    pipe2.BFlow = pipe41.BFlow = pipe31.BFlow = pipe5.BFlow = false;
                 //}
                 //if (valve5.Open)
                 //{
                 //    pipe7.BFlow = pipe9.BFlow = pipe10.BFlow = pipe11.BFlow = true;
                 //}
                 //else
                 //{
                 //    pipe7.BFlow = pipe9.BFlow = pipe10.BFlow = pipe11.BFlow = false;
                 //}


             }
             else
             {
                 pipe2.BFlow = pipe4.BFlow = false ;
             }
             //else
             //{
             //    pipe2.BFlow = pipe4.BFlow = false ;
             //}

         }
         private void T1(object sender, System.Timers.ElapsedEventArgs e)
         {


         }
         private void button2_Click(object sender, EventArgs e)
         {
             SDZ.StartPosition = FormStartPosition.CenterScreen;
             SDZ.Show();

         }

         #region 判断各开关valuechange
         private void valve14_valueChanged(object sender, EventArgs e)
         {
             JudgeFlowNo1();
             //Judgev9_v12();//输液臂开关打开前提下 开度开关启用
             //speed();//流速计算

         }
         #endregion

         private void button3_Click(object sender, EventArgs e)
         {

             if (loadstart  == false)
             {
                 loadstart  = true;
                 button3.Text = "暂停";
                 //t1.Enabled = true;
               
             }
             else
             {
                loadstart  = false;
                 button3.Text = "继续";
                 //t1.Enabled = f alse;
               
             }

             JudgeFlowNo1();
         }




        
           
        
        
    }
}
2013-06-01 10:05
快速回复:为什么阀还是没有反应呢
数据加载中...
 
   



关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.018272 second(s), 10 queries.
Copyright©2004-2024, BCCN.NET, All Rights Reserved