示例#1
0
        public BlackScreen(int stationIndex, string endpoint_confname, string endpoint_address)
        {
            try
            {
                InitializeComponent();
                this.Load -= this.BlackScreen_Load;
                this.pictureBox1.MouseDown += new System.Windows.Forms.MouseEventHandler(this.BlackScreen_MouseDown);
                this.pictureBox1.MouseMove += new System.Windows.Forms.MouseEventHandler(this.BlackScreen_MouseMove);

                this.myFormTimer              = new FormTimer();
                this.myFormTimer.CounterTick += new myEventHandler(timerHandler);
                this.stationIndex             = stationIndex; //Convert.ToInt32(Properties.Settings.Default.StationIndex);
                this.fLogMessage("Connect to Station #" + this.stationIndex.ToString() + " ...");
                this.laStation.Text = "Station ID: " + stationIndex.ToString();

                this.laFinishBtnValue.TextChanged += new EventHandler(finishButtonPressed_handler);
                this.laStopBtnValue.TextChanged   += new EventHandler(stopButtonPressed_handler);
                this.laHelpBtnValue.TextChanged   += new EventHandler(helpButtonPressed_handler);
                this.laBitState.TextChanged       += new EventHandler(laBitState_TextChanged);

                this.timerStop.Tick += new EventHandler(timerStop_Tick);
                this.myLineClient    = new ServiceReference2.AssembLineClient(endpoint_confname, endpoint_address);
                this.connected       = true;
                this.laBitState.Text = "0";

                mplayer = new MediaClient.MediaPlayer(this);
            }
            catch (Exception ex)
            {
                this.myLog.LogAlert(AppLog.AlertType.Error, "Client", ex.Message);
            }
        }
示例#2
0
        public BlackScreen()
        {
            try
            {
                InitializeComponent();
                this.myFormTimer              = new FormTimer();
                this.myFormTimer.CounterTick += new myEventHandler(timerHandler);
                this.stationIndex             = Convert.ToInt32(Properties.Settings.Default.StationIndex);
                this.fLogMessage("Connect to Station #" + this.stationIndex.ToString() + " ...");
                this.laStation.Text = "Station ID: " + stationIndex.ToString();

                this.laFinishBtnValue.TextChanged += new EventHandler(finishButtonPressed_handler);
                this.laStopBtnValue.TextChanged   += new EventHandler(stopButtonPressed_handler);
                this.laHelpBtnValue.TextChanged   += new EventHandler(helpButtonPressed_handler);
                this.laBitState.TextChanged       += new EventHandler(laBitState_TextChanged);

                this.formSize = this.Size;

                this.timerStop.Tick += new EventHandler(timerStop_Tick);
                this.myLineClient    = new ServiceReference2.AssembLineClient();
                this.connected       = true;
                this.laBitState.Text = "0";

                mplayer = new MediaClient.MediaPlayer(this);
            }
            catch (Exception ex)
            {
                this.myLog.LogAlert(AppLog.AlertType.Error, "Client", ex.Message);
            }
        }