コード例 #1
0
 private void HideAllErrors()
 {
     RegMsgLabel.Hide();
     NameMsgLabel.Hide();
     SurnameMsgLabel.Hide();
     EmailMsgLabel.Hide();
     PassMsgLabel.Hide();
     CapacityMsgLabel.Hide();
     RegNumErrorLabel.Hide();
     NameErrorLabel.Hide();
     SurnameErrorLabel.Hide();
     EmailErrorLabel.Hide();
     PassErrorLabel.Hide();
     CapacityErrorLabel.Hide();
 }
コード例 #2
0
        void ReleaseDesignerOutlets()
        {
            if (AddressLine12StackView != null)
            {
                AddressLine12StackView.Dispose();
                AddressLine12StackView = null;
            }

            if (AddressLine1TextField != null)
            {
                AddressLine1TextField.Dispose();
                AddressLine1TextField = null;
            }

            if (AddressLine2TextField != null)
            {
                AddressLine2TextField.Dispose();
                AddressLine2TextField = null;
            }

            if (AddressSameAsBuyerLabel != null)
            {
                AddressSameAsBuyerLabel.Dispose();
                AddressSameAsBuyerLabel = null;
            }

            if (AddressSameAsBuyerStackView != null)
            {
                AddressSameAsBuyerStackView.Dispose();
                AddressSameAsBuyerStackView = null;
            }

            if (AddressSameAsBuyerSwitch != null)
            {
                AddressSameAsBuyerSwitch.Dispose();
                AddressSameAsBuyerSwitch = null;
            }

            if (AliasTextField != null)
            {
                AliasTextField.Dispose();
                AliasTextField = null;
            }

            if (CityStateCountryStackView != null)
            {
                CityStateCountryStackView.Dispose();
                CityStateCountryStackView = null;
            }

            if (CityTextField != null)
            {
                CityTextField.Dispose();
                CityTextField = null;
            }

            if (CountryTextField != null)
            {
                CountryTextField.Dispose();
                CountryTextField = null;
            }

            if (CountyLabel != null)
            {
                CountyLabel.Dispose();
                CountyLabel = null;
            }

            if (CountyTextField != null)
            {
                CountyTextField.Dispose();
                CountyTextField = null;
            }

            if (CountyZipStackView != null)
            {
                CountyZipStackView.Dispose();
                CountyZipStackView = null;
            }

            if (EmailErrorLabel != null)
            {
                EmailErrorLabel.Dispose();
                EmailErrorLabel = null;
            }

            if (EmailLabel != null)
            {
                EmailLabel.Dispose();
                EmailLabel = null;
            }

            if (EmailTextField != null)
            {
                EmailTextField.Dispose();
                EmailTextField = null;
            }

            if (FirstNameErrorLabel != null)
            {
                FirstNameErrorLabel.Dispose();
                FirstNameErrorLabel = null;
            }

            if (FirstNameLabel != null)
            {
                FirstNameLabel.Dispose();
                FirstNameLabel = null;
            }

            if (FirstNameTextField != null)
            {
                FirstNameTextField.Dispose();
                FirstNameTextField = null;
            }

            if (HomePhoneEmailStackView != null)
            {
                HomePhoneEmailStackView.Dispose();
                HomePhoneEmailStackView = null;
            }

            if (HomePhoneErrorLabel != null)
            {
                HomePhoneErrorLabel.Dispose();
                HomePhoneErrorLabel = null;
            }

            if (HomePhoneLabel != null)
            {
                HomePhoneLabel.Dispose();
                HomePhoneLabel = null;
            }

            if (HomePhoneTextField != null)
            {
                HomePhoneTextField.Dispose();
                HomePhoneTextField = null;
            }

            if (LastNameErrorLabel != null)
            {
                LastNameErrorLabel.Dispose();
                LastNameErrorLabel = null;
            }

            if (LastNameLabel != null)
            {
                LastNameLabel.Dispose();
                LastNameLabel = null;
            }

            if (LastNameTextField != null)
            {
                LastNameTextField.Dispose();
                LastNameTextField = null;
            }

            if (MiddleLastStackView != null)
            {
                MiddleLastStackView.Dispose();
                MiddleLastStackView = null;
            }

            if (MiddleNameTextField != null)
            {
                MiddleNameTextField.Dispose();
                MiddleNameTextField = null;
            }

            if (MobilePhoneErrorLabel != null)
            {
                MobilePhoneErrorLabel.Dispose();
                MobilePhoneErrorLabel = null;
            }

            if (MobilePhoneLabel != null)
            {
                MobilePhoneLabel.Dispose();
                MobilePhoneLabel = null;
            }

            if (MobilePhoneTextField != null)
            {
                MobilePhoneTextField.Dispose();
                MobilePhoneTextField = null;
            }

            if (MobileWorkPhoneStackView != null)
            {
                MobileWorkPhoneStackView.Dispose();
                MobileWorkPhoneStackView = null;
            }

            if (PrefixFirstStackView != null)
            {
                PrefixFirstStackView.Dispose();
                PrefixFirstStackView = null;
            }

            if (PrefixTextField != null)
            {
                PrefixTextField.Dispose();
                PrefixTextField = null;
            }

            if (StateCountryLabel != null)
            {
                StateCountryLabel.Dispose();
                StateCountryLabel = null;
            }

            if (StateTextField != null)
            {
                StateTextField.Dispose();
                StateTextField = null;
            }

            if (SuffixAliasStackView != null)
            {
                SuffixAliasStackView.Dispose();
                SuffixAliasStackView = null;
            }

            if (SuffixTextField != null)
            {
                SuffixTextField.Dispose();
                SuffixTextField = null;
            }

            if (ValidationErrorLabel != null)
            {
                ValidationErrorLabel.Dispose();
                ValidationErrorLabel = null;
            }

            if (WorkExtensionTextField != null)
            {
                WorkExtensionTextField.Dispose();
                WorkExtensionTextField = null;
            }

            if (WorkPhoneErrorLabel != null)
            {
                WorkPhoneErrorLabel.Dispose();
                WorkPhoneErrorLabel = null;
            }

            if (WorkPhoneLabel != null)
            {
                WorkPhoneLabel.Dispose();
                WorkPhoneLabel = null;
            }

            if (WorkPhoneTextField != null)
            {
                WorkPhoneTextField.Dispose();
                WorkPhoneTextField = null;
            }

            if (ZipCodeTextField != null)
            {
                ZipCodeTextField.Dispose();
                ZipCodeTextField = null;
            }
        }
コード例 #3
0
        void ReleaseDesignerOutlets()
        {
            if (AddressLine12StackView != null)
            {
                AddressLine12StackView.Dispose();
                AddressLine12StackView = null;
            }

            if (AddressLine1TextField != null)
            {
                AddressLine1TextField.Dispose();
                AddressLine1TextField = null;
            }

            if (AddressLine2TextField != null)
            {
                AddressLine2TextField.Dispose();
                AddressLine2TextField = null;
            }

            if (AliasTextField != null)
            {
                AliasTextField.Dispose();
                AliasTextField = null;
            }

            if (CityStateCountryStackView != null)
            {
                CityStateCountryStackView.Dispose();
                CityStateCountryStackView = null;
            }

            if (CityTextField != null)
            {
                CityTextField.Dispose();
                CityTextField = null;
            }

            if (ConsentEmailMailStackView != null)
            {
                ConsentEmailMailStackView.Dispose();
                ConsentEmailMailStackView = null;
            }

            if (ConsentEmailSwitch != null)
            {
                ConsentEmailSwitch.Dispose();
                ConsentEmailSwitch = null;
            }

            if (ConsentMailSwitch != null)
            {
                ConsentMailSwitch.Dispose();
                ConsentMailSwitch = null;
            }

            if (ConsentPhoneContactPrefStackView != null)
            {
                ConsentPhoneContactPrefStackView.Dispose();
                ConsentPhoneContactPrefStackView = null;
            }

            if (ConsentPhoneSwitch != null)
            {
                ConsentPhoneSwitch.Dispose();
                ConsentPhoneSwitch = null;
            }

            if (ConsentTextSwitch != null)
            {
                ConsentTextSwitch.Dispose();
                ConsentTextSwitch = null;
            }

            if (ContactPreferenceTextField != null)
            {
                ContactPreferenceTextField.Dispose();
                ContactPreferenceTextField = null;
            }

            if (CountryTextField != null)
            {
                CountryTextField.Dispose();
                CountryTextField = null;
            }

            if (CountyLabel != null)
            {
                CountyLabel.Dispose();
                CountyLabel = null;
            }

            if (CountyTextField != null)
            {
                CountyTextField.Dispose();
                CountyTextField = null;
            }

            if (CountyZipStackView != null)
            {
                CountyZipStackView.Dispose();
                CountyZipStackView = null;
            }

            if (EmailErrorLabel != null)
            {
                EmailErrorLabel.Dispose();
                EmailErrorLabel = null;
            }

            if (EmailTextField != null)
            {
                EmailTextField.Dispose();
                EmailTextField = null;
            }

            if (ExcludeFollowUpSwitch != null)
            {
                ExcludeFollowUpSwitch.Dispose();
                ExcludeFollowUpSwitch = null;
            }

            if (ExcludeReasonTextField != null)
            {
                ExcludeReasonTextField.Dispose();
                ExcludeReasonTextField = null;
            }

            if (ExcludeStackView != null)
            {
                ExcludeStackView.Dispose();
                ExcludeStackView = null;
            }

            if (FirstNameErrorLabel != null)
            {
                FirstNameErrorLabel.Dispose();
                FirstNameErrorLabel = null;
            }

            if (FirstNameLabel != null)
            {
                FirstNameLabel.Dispose();
                FirstNameLabel = null;
            }

            if (FirstNameTextField != null)
            {
                FirstNameTextField.Dispose();
                FirstNameTextField = null;
            }

            if (HomePhoneEmailStackView != null)
            {
                HomePhoneEmailStackView.Dispose();
                HomePhoneEmailStackView = null;
            }

            if (HomePhoneErrorLabel != null)
            {
                HomePhoneErrorLabel.Dispose();
                HomePhoneErrorLabel = null;
            }

            if (HomePhoneTextField != null)
            {
                HomePhoneTextField.Dispose();
                HomePhoneTextField = null;
            }

            if (LastNameErrorLabel != null)
            {
                LastNameErrorLabel.Dispose();
                LastNameErrorLabel = null;
            }

            if (LastNameLabel != null)
            {
                LastNameLabel.Dispose();
                LastNameLabel = null;
            }

            if (LastNameTextField != null)
            {
                LastNameTextField.Dispose();
                LastNameTextField = null;
            }

            if (MiddleLastStackView != null)
            {
                MiddleLastStackView.Dispose();
                MiddleLastStackView = null;
            }

            if (MiddleNameTextField != null)
            {
                MiddleNameTextField.Dispose();
                MiddleNameTextField = null;
            }

            if (MobilePhoneErrorLabel != null)
            {
                MobilePhoneErrorLabel.Dispose();
                MobilePhoneErrorLabel = null;
            }

            if (MobilePhoneTextField != null)
            {
                MobilePhoneTextField.Dispose();
                MobilePhoneTextField = null;
            }

            if (MobileWorkPhoneStackView != null)
            {
                MobileWorkPhoneStackView.Dispose();
                MobileWorkPhoneStackView = null;
            }

            if (PrefixFirstStackView != null)
            {
                PrefixFirstStackView.Dispose();
                PrefixFirstStackView = null;
            }

            if (PrefixTextField != null)
            {
                PrefixTextField.Dispose();
                PrefixTextField = null;
            }

            if (StateCountryLabel != null)
            {
                StateCountryLabel.Dispose();
                StateCountryLabel = null;
            }

            if (StateTextField != null)
            {
                StateTextField.Dispose();
                StateTextField = null;
            }

            if (SuffixAliasStackView != null)
            {
                SuffixAliasStackView.Dispose();
                SuffixAliasStackView = null;
            }

            if (SuffixTextField != null)
            {
                SuffixTextField.Dispose();
                SuffixTextField = null;
            }

            if (TrafficDetailTextField != null)
            {
                TrafficDetailTextField.Dispose();
                TrafficDetailTextField = null;
            }

            if (TrafficSourceDetailError != null)
            {
                TrafficSourceDetailError.Dispose();
                TrafficSourceDetailError = null;
            }

            if (TrafficSourceDetailLabel != null)
            {
                TrafficSourceDetailLabel.Dispose();
                TrafficSourceDetailLabel = null;
            }

            if (TrafficSourceLabel != null)
            {
                TrafficSourceLabel.Dispose();
                TrafficSourceLabel = null;
            }

            if (TrafficSourceTextField != null)
            {
                TrafficSourceTextField.Dispose();
                TrafficSourceTextField = null;
            }

            if (TrafficStackView != null)
            {
                TrafficStackView.Dispose();
                TrafficStackView = null;
            }

            if (ValidationErrorsLabel != null)
            {
                ValidationErrorsLabel.Dispose();
                ValidationErrorsLabel = null;
            }

            if (WorkExtentionTextField != null)
            {
                WorkExtentionTextField.Dispose();
                WorkExtentionTextField = null;
            }

            if (WorkPhoneErrorLabel != null)
            {
                WorkPhoneErrorLabel.Dispose();
                WorkPhoneErrorLabel = null;
            }

            if (WorkPhoneTextField != null)
            {
                WorkPhoneTextField.Dispose();
                WorkPhoneTextField = null;
            }

            if (ZipTextField != null)
            {
                ZipTextField.Dispose();
                ZipTextField = null;
            }
        }
コード例 #4
0
        public AdminForm()
        {
            InitializeComponent();

            UserGroupBox.Controls.Add(NameBox);
            UserGroupBox.Controls.Add(RegNumBox);
            UserGroupBox.Controls.Add(SurnameBox);
            UserGroupBox.Controls.Add(PassBox);
            UserGroupBox.Controls.Add(EmailBox);
            UserGroupBox.Controls.Add(CapacityBox);
            UserGroupBox.Controls.Add(CreateEditUserBtn);
            UserGroupBox.Controls.Add(NameLabel);
            UserGroupBox.Controls.Add(RegNumLabel);
            UserGroupBox.Controls.Add(SurnameLabel);
            UserGroupBox.Controls.Add(PassLabel);
            UserGroupBox.Controls.Add(EmailLabel);
            UserGroupBox.Controls.Add(CapacityLabel);



            //Creating the UsersList
            UsersList.Bounds        = new Rectangle(new Point(196, 12), new Size(375, 500));
            UsersList.View          = View.Details;
            UsersList.FullRowSelect = true;
            UsersList.GridLines     = true;
            UsersList.Sorting       = SortOrder.Ascending;
            UsersList.Columns.Add("Registration Number", -2, HorizontalAlignment.Left);
            UsersList.Columns.Add("Name", -2, HorizontalAlignment.Left);
            UsersList.Columns.Add("Surname", -2, HorizontalAlignment.Left);
            UsersList.Columns.Add("Email", -2, HorizontalAlignment.Left);
            UsersList.Columns.Add("Capacity", -2, HorizontalAlignment.Left);

            //============================================================================



            LocalUsersDatabase.Add("kp0000");
            LocalUsersDatabase.Add("Mike");
            LocalUsersDatabase.Add("Kalliafas");
            LocalUsersDatabase.Add("*****@*****.**");
            LocalUsersDatabase.Add("Professor");

            LocalUsersDatabase.Add("p50000");
            LocalUsersDatabase.Add("Alberto");
            LocalUsersDatabase.Add("Makavegias");
            LocalUsersDatabase.Add("*****@*****.**");
            LocalUsersDatabase.Add("Student");

            LocalCoursesDatabase.Add("Algebra");
            LocalCoursesDatabase.Add("Professor 1");
            LocalCoursesDatabase.Add("Physics");
            LocalCoursesDatabase.Add("Professor 2");



            //Users Right Click menu creation
            ToolStripMenuItem UsersRightClickMenuEdit   = new ToolStripMenuItem("Edit");
            ToolStripMenuItem UsersRightClickMenuDelete = new ToolStripMenuItem("Delete");

            UsersRightClickMenuDelete.Click += new EventHandler(UserDelete_RightClick);
            UsersRightClickMenuEdit.Click   += new EventHandler(UserEdit_RightClick);
            UsersRightClickMenu.Items.AddRange(new ToolStripItem[] { UsersRightClickMenuEdit, UsersRightClickMenuDelete });

            //===================================================================================


            //Courses Right Click menu creation
            ToolStripMenuItem CoursesRightClickMenuEdit   = new ToolStripMenuItem("Edit");
            ToolStripMenuItem CoursesRightClickMenuDelete = new ToolStripMenuItem("Delete");

            CoursesRightClickMenuDelete.Click += new EventHandler(CoursesDelete_RightClick);
            CoursesRightClickMenuEdit.Click   += new EventHandler(CoursesEdit_RightClick);
            CoursesRightClickMenu.Items.AddRange(new ToolStripItem[] { CoursesRightClickMenuEdit, CoursesRightClickMenuDelete });
            //===================================================================================



            //Creating the CoursesList
            CoursesList.Bounds        = new Rectangle(new Point(150, 12), new Size(250, 500));
            CoursesList.View          = View.Details;
            CoursesList.FullRowSelect = true;
            CoursesList.GridLines     = true;
            CoursesList.Sorting       = SortOrder.Ascending;
            CoursesList.Columns.Add("Courses", -2, HorizontalAlignment.Left);
            CoursesList.Columns.Add("Professor", -2, HorizontalAlignment.Left);
            //=============================================================================



            ChangeMsgLabel("Create", "Users");

            CourseGroupBox.Text = "";
            UserGroupBox.Text   = "";

            CoursesList.Hide();
            UsersList.Hide();
            CourseGroupBox.Hide();
            CourseTitleErrorLabel.Hide();
            AssignMsgLabel.Hide();
            AssignCourseBtn.Hide();
            RegMsgLabel.Hide();
            NameMsgLabel.Hide();
            SurnameMsgLabel.Hide();
            EmailMsgLabel.Hide();
            PassMsgLabel.Hide();
            CapacityMsgLabel.Hide();
            CancelCoursesBtn.Hide();
            RegNumErrorLabel.Hide();
            NameErrorLabel.Hide();
            SurnameErrorLabel.Hide();
            EmailErrorLabel.Hide();
            PassErrorLabel.Hide();
            CapacityErrorLabel.Hide();
            CancelUsersBtn.Hide();

            RegNumErrorLabel.SendToBack();
            NameErrorLabel.SendToBack();
            SurnameErrorLabel.SendToBack();
            EmailErrorLabel.SendToBack();
            PassErrorLabel.SendToBack();
            CapacityErrorLabel.SendToBack();



            UserGroupBox.Left = (this.ClientSize.Width - UserGroupBox.Width + 100) / 2;
            UserGroupBox.Top  = (this.ClientSize.Height - UserGroupBox.Height - 100) / 2;

            UpdateList("Users");
            UpdateList("Courses");
        }