Ejemplo n.º 1
0
        private void HostingForm_Load(object sender, EventArgs e)
        {
            try
            {
                _host = new ServiceHost(typeof(VentsService));
                _host.Open();

                Connection.ConnectionString();

                labelRun.Text = @"Работает...";

                toolStripMenuRunService.Enabled = false;
                BtnStart.Enabled = false;

                _classOdTasks = new ClassOfTasks();
                _classOdTasks.OnNewMessageChataData += OnNewMessage;

                LoadMessages();

                //myTimer.Tick += new EventHandler(TimerEventProcessor);

                ////myTimer.Interval = 5000;
                //myTimer.Start();

                //// Runs the timer
                //while (exitFlag == false)
                //{
                //    Application.DoEvents();
                //}
                //myTimer.Stop();
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message + @": " + ex.TargetSite +@": " + ex.Source);
            }
        }
Ejemplo n.º 2
0
        private void HostingForm_Load(object sender, EventArgs e)
        {
            try
            {
                _host = new ServiceHost(typeof(VentsService));
                _host.Open();

                Connection.ConnectionString();

                labelRun.Text = @"Работает...";

                toolStripMenuRunService.Enabled = false;
                BtnStart.Enabled = false;

                _classOdTasks = new ClassOfTasks();
                _classOdTasks.OnNewMessageChataData += OnNewMessage;

                LoadMessages();

                //myTimer.Tick += new EventHandler(TimerEventProcessor);

                ////myTimer.Interval = 5000;
                //myTimer.Start();

                //// Runs the timer
                //while (exitFlag == false)
                //{
                //    Application.DoEvents();
                //}
                //myTimer.Stop();
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message + @": " + ex.TargetSite + @": " + ex.Source);
            }
        }
Ejemplo n.º 3
0
        private void BtnStart_Click(object sender, EventArgs e)
        {
            try
            {
                _host.Close();

                _host = new ServiceHost(typeof(VentsService));

                _host.Open();

                _classOdTasks = new ClassOfTasks();
                _classOdTasks.OnNewMessageChataData += new ClassOfTasks.NewMessage(OnNewMessage);

                LoadMessages();

                labelRun.Text = @"Работает...";

                toolStripMenuRunService.Enabled = false;

                BtnStart.Enabled = false;
            }
            catch (Exception ex)
            { MessageBox.Show(ex.Message); }
        }
Ejemplo n.º 4
0
        private void BtnStart_Click(object sender, EventArgs e)
        {
            try
            {
                _host.Close();

                _host = new ServiceHost(typeof(VentsService));

                _host.Open();

                _classOdTasks = new ClassOfTasks();
                _classOdTasks.OnNewMessageChataData += new ClassOfTasks.NewMessage(OnNewMessage);

                LoadMessages();

                labelRun.Text = @"Работает...";

                toolStripMenuRunService.Enabled = false;

                BtnStart.Enabled = false;
            }
            catch (Exception ex)
            { MessageBox.Show(ex.Message); }
        }
Ejemplo n.º 5
0
        public void StartProcess()
        {
            var c = new ClassOfTasks();

            c.Taskes();
        }
Ejemplo n.º 6
0
        public void StartProcess()
        {
            var c = new ClassOfTasks();

            c.Taskes();
        }