public EvaluateQuestionsForm()
 {
     InitializeComponent();
     myRibbon = Globals.Ribbons.Ribbon;
     notEvaluatedQuestionsList = new List <Question>();
     evaluatedQuestionsList    = new List <Question>();
 }
        /*
         * Click on login button.
         */
        private void loginButton_Click(object sender, EventArgs e)
        {
            var      username = textBoxUser.Text;
            var      password = textBoxPassword.Text;
            MyRibbon myRibbon = Globals.Ribbons.Ribbon;

            myRibbon.myRestHelper.authenticate(username, password);

            // execute the request
            IRestResponse response = myRibbon.myRestHelper.getAllLectures();

            // if login is successfull
            if (response.StatusCode == System.Net.HttpStatusCode.OK)
            {
                var content     = response.Content;
                var lectureList = JsonConvert.DeserializeObject <List <Lecture> >(content);
                // configure myRibbon after successful login
                myRibbon.afterSuccessfulLogin(lectureList);
                this.Close();
            }
            else
            {
                this.loginError.Visible = true;
            }
            // System.Drawing.Bitmap bitmap = PowerPointAddIn1.Properties.Resources.connected;
            //connectBtn.Image = bitmap;*/
        }
Example #3
0
 public SelectLectureForm(MyRibbon myRibbon)
 {
     InitializeComponent();
     this.myRibbon = myRibbon;
     fillCombobox();
     select_lectures_combo.DisplayMember = "Text";
     select_lectures_combo.ValueMember   = "Value";
 }
Example #4
0
 /*
  * Constructor.
  */
 public StartSessionForm(MyRibbon myRibbon, bool fromBeginning, bool isUserLoggedIn, IRestResponse response)
 {
     InitializeComponent();
     this.myRibbon       = myRibbon;
     this.fromBeginning  = fromBeginning;
     this.isUserLoggedIn = isUserLoggedIn;
     fillComboBox(response);
     start_session_lectures_combo.DisplayMember = "Text";
     start_session_lectures_combo.ValueMember   = "Value";
 }
Example #5
0
 public SelectQuestionsForm()
 {
     InitializeComponent();
     myRibbon = Globals.Ribbons.Ribbon;
     initLecturesCombo();
 }