Exemplo n.º 1
0
        public void ButtonSingInClick(object sender, EventArgs ea)
        {
            ConnectionModule CM = new DefaultConnectionModule();

            var sp = CM.StartSession(InputField.Text);

            if (sp != null)
            {
                MessageBox.Show(sp.show());
                ApplicationSetting.GetInstance().Session.SessionKey = InputField.Text;
                TimerController TC = new TimerController(sp);
                TC.SessionClose += CallAdditionalSession;
                this.Hide();
            }
            else
            {
                MessageBox.Show("error");
            }
        }
        private void ButtonOk_Click(object sender, RoutedEventArgs e)
        {
            ConnectionModule CM = new DefaultConnectionModule();

            var sp = CM.StartSession(ApplicationSetting.GetInstance().Session.SessionKey);

            if (sp != null)
            {
                ApplicationSetting.GetInstance().Session.SessionKey = ApplicationSetting.GetInstance().Session.SessionKey;
                TimerController TC = new TimerController(sp);
                TC.SessionClose += CloseConnection;
                this.Hide();
            }
            else
            {
                //Графический вывод ошибки
                MessageBox.Show("error");
            }
        }