예제 #1
0
        public FormAttribute(string modus)
        {
            InitializeComponent();
            LoadTheme();

            this.currentModus = modus;

            if (currentModus == "Fach")
            {
                this.StyleManager.Style = MetroColorStyle.Teal;
                subjectHelper           = new SubjectHelper();
                subjectHelper.FillGrid(ref gv_manage);
                Text = "Fächer" + AuthInfo.FormInfo();
            }
            else if (currentModus == "Sprache")
            {
                this.StyleManager.Style = MetroColorStyle.Blue;

                Text           = "Sprachen" + AuthInfo.FormInfo();
                languageHelper = new LanguageHelper();
                languageHelper.FillGrid(ref gv_manage);
            }
            else if (currentModus == "Autor")
            {
                this.StyleManager.Style = MetroColorStyle.Blue;

                Text         = "Autoren" + AuthInfo.FormInfo();
                authorHelper = new AuthorHelper();
                authorHelper.FillGrid(ref gv_manage);
            }
            else if (currentModus == "Genre")
            {
                this.StyleManager.Style = MetroColorStyle.Blue;

                Text        = "Genres" + AuthInfo.FormInfo();
                genreHelper = new GenreHelper();
                genreHelper.FillGrid(ref gv_manage);
            }
            else if (currentModus == "Zustand")
            {
                this.StyleManager.Style = MetroColorStyle.Blue;

                Text            = "Buchzustände" + AuthInfo.FormInfo();
                conditionHelper = new ConditionHelper();
                conditionHelper.FillGrid(ref gv_manage);
            }
            else if (currentModus == "Verlag")
            {
                this.StyleManager.Style = MetroColorStyle.Blue;
                Text            = "Verlage" + AuthInfo.FormInfo();
                publisherHelper = new PublisherHelper();
                publisherHelper.FillGrid(ref gv_manage);
            }
            else if (currentModus == "Klasse")
            {
                this.StyleManager.Style = MetroColorStyle.Teal;
                Text = "Klasse" + AuthInfo.FormInfo();
                schoolClassHelper = new SchoolClassHelper();
                schoolClassHelper.FillGrid(ref gv_manage);
            }
            originalHeightLabel             = tLP_Faecher.RowStyles[0].Height;
            originalHeightText              = tLP_Faecher.RowStyles[1].Height;
            tLP_Faecher.RowStyles[0].Height = 0;
            tLP_Faecher.RowStyles[1].Height = 0;
        }