Exemplo n.º 1
0
        public Switcher(ref MMI.VT612.VT612State s, bool topMost)
        {
            //
            // Erforderlich für die Windows Form-Designerunterstützung
            //
            InitializeComponent();
            m_state = s;

            if (s.VT612type1 == VT612TYPE.VT611)
            {
                rb_611_1.Checked = true;
                rb_611_1_CheckedChanged(this, new EventArgs());
            }
            else if (s.VT612type1 == VT612TYPE.VT612)
            {
                rb_612_1.Checked = true;
                rb_612_1_CheckedChanged(this, new EventArgs());
            }

            if (s.VT612type2 == VT612TYPE.VT611)
                rb_611_2.Checked = true;
            else if (s.VT612type2 == VT612TYPE.VT612)
                rb_612_2.Checked = true;
            else
                rb_kein_2.Checked = true;

            if (s.VT612type3 == VT612TYPE.VT611)
                rb_611_3.Checked = true;
            else if (s.VT612type3 == VT612TYPE.VT612)
                rb_612_3.Checked = true;
            else
                rb_kein_3.Checked = true;

            if (s.VT612type4 == VT612TYPE.VT611)
                rb_611_4.Checked = true;
            else if (s.VT612type4 == VT612TYPE.VT612)
                rb_612_4.Checked = true;
            else
                rb_kein_4.Checked = true;

            if (m_state.addtionalhours)
                cb_12std.Checked = true;

            this.TopMost = topMost;
        }
Exemplo n.º 2
0
        public VT612Control(MMI.EBuLa.Tools.XMLLoader conf)
        {
            if (!conf.DoubleBuffer)
            {
                //This turns off internal double buffering of all custom GDI+ drawing
                this.SetStyle(ControlStyles.DoubleBuffer, true);
                this.SetStyle(ControlStyles.AllPaintingInWmPaint, true);
                this.SetStyle(ControlStyles.UserPaint, true);
                USE_DOUBLE_BUFFER = false;
            }
            else
                USE_DOUBLE_BUFFER = true;

            InitializeComponent();

            uhrAußen = new ISphere(468+80, 41+80, 74);
            uhrInnengr = new ISphere(468+80, 41+80, 62);
            uhrInnenkl = new ISphere(468+80, 41+80, 69);
            uhrsec = new ISphere(468+80, 41+80, 60);
            uhrmin = new ISphere(468+80, 41+80, 60);
            uhrstd = new ISphere(468+80, 41+80, 47);
            uhrrest = new ISphere(468+80, 41+80, 10);
            center = new Point(468+80, 41+80);

            m_conf = conf;

            localstate = new MMI.VT612.VT612State();

            // NOTBREMSE und E-BREMSE fehlen

            SetButtons();

            vtime = DateTime.Now;

            zugkraft_thread = new Thread(new ThreadStart(MoveZugkraft));

            int interval = Convert.ToInt32(Math.Round((1d/(double)conf.FramesPerSecondLow)*1000d));
            timer1.Interval = interval;
            timer1.Enabled = true;
        }