Example #1
0
        public override Grid Load(dynamic f)
        {
            Grid g = base.Load((FantasticTales)f);

            Grid grg = FormCreator.CreateGrid(new Thickness(0, 0, 0, 0));

            grg.Children.Add(FormCreator.CreateCheckBox("CheckFictFantFairyIsIllustrated", "is illustrated", new Thickness(10, 9, 0, 0), f.IsIllustrated));

            GroupBox gr = FormCreator.CreateGroupBox("FictFantFairyTalesGroup", "FairyTales", new Thickness(332, 184, 0, 0), 165, 170);

            gr.Content = grg;

            g.Children.Add(gr);

            GroupBox ftGroupBox           = g.Children.OfType <GroupBox>().First(x => x.Name == "FictFantasticTalesGroup");
            IEnumerable <ComboBox> cbList = ((Grid)ftGroupBox.Content).Children.OfType <ComboBox>();
            ComboBox genreComboBox        = cbList.First(x => x.Name == "ChooseFictFantType");

            genreComboBox.SelectedIndex = 0;

            return(g);
        }
Example #2
0
        public override Grid Load(dynamic a)
        {
            Grid g = base.Load((Historical)a);

            Grid grg = FormCreator.CreateGrid(new Thickness(0, 0, 0, 0));

            grg.Children.Add(FormCreator.CreateLabel("Form of art", new Thickness(10, 10, 73, 0)));
            grg.Children.Add(FormCreator.CreateTextBox("InpHistArtForm", a.ArtForm, new Thickness(9, 38, 10, 0)));

            GroupBox gr = FormCreator.CreateGroupBox("HistArtGroup", "Art", new Thickness(329, 0, 10, 10), 174, 384);

            gr.Content = grg;

            g.Children.Add(gr);

            GroupBox ftGroupBox           = g.Children.OfType <GroupBox>().First(x => x.Name == "HistoricalGroup");
            IEnumerable <ComboBox> cbList = ((Grid)ftGroupBox.Content).Children.OfType <ComboBox>();
            ComboBox genreComboBox        = cbList.First(x => x.Name == "ChooseHistType");

            genreComboBox.SelectedIndex = 0;

            return(g);
        }
Example #3
0
        public GroupBox CreateButtonsGroup(string bookType)
        {
            Grid g = FormCreator.CreateGrid(new Thickness(0, 0, 0, 0));

            Button btnTemp = FormCreator.CreateButton("BtnAdd", "Add", new Thickness(10, 0, 0, 0), BtnAdd_Click);

            btnTemp.IsEnabled = LoaderManager.resultList.Contains(bookType);
            g.Children.Add(btnTemp);

            g.Children.Add(FormCreator.CreateButton("BtnRemove", "Remove", new Thickness(75, 0, 0, 0), BtnRemove_Click));

            btnTemp           = FormCreator.CreateButton("BtnSubmit", "Submit", new Thickness(140, 0, 0, 0), BtnSubmit_Click);
            btnTemp.IsEnabled = LoaderManager.resultList.Contains(bookType);
            g.Children.Add(btnTemp);
            g.Children.Add(FormCreator.CreateButton("BtnSerialize", "Serialize", new Thickness(205, 0, 0, 0), BtnSerialize_Click));
            g.Children.Add(FormCreator.CreateButton("BtnDeserialize", "Deserialize", new Thickness(270, 0, 0, 0), BtnDeserialize_Click));

            GroupBox gb = FormCreator.CreateGroupBox("ButtonGroup", "", new Thickness(520, 0, 0, 0), 352, 362);

            gb.Content = g;

            return(gb);
        }
Example #4
0
        public override Grid Load(dynamic t)
        {
            Grid g = base.Load((Fiction)t);

            Grid grg = FormCreator.CreateGrid(new Thickness(0, 0, 0, 0));

            grg.Children.Add(FormCreator.CreateLabel("Countries", new Thickness(10, 10, 45, 0)));
            grg.Children.Add(FormCreator.CreateTextBox("InpFictTravCountries", t.Countries, new Thickness(10, 38, 9, 10)));

            GroupBox gr = FormCreator.CreateGroupBox("FictTravellingGroup", "Travelling", new Thickness(329, 0, 10, 10), 174, 384);

            gr.Content = grg;

            g.Children.Add(gr);

            GroupBox fictionGroupBox      = g.Children.OfType <GroupBox>().First(x => x.Name == "FictionGroup");
            IEnumerable <ComboBox> cbList = ((Grid)fictionGroupBox.Content).Children.OfType <ComboBox>();
            ComboBox genreComboBox        = cbList.First(x => x.Name == "ChooseFictType");

            genreComboBox.SelectedIndex = 1;

            return(g);
        }
 private void Doldur()
 {
     FormCreator.FillForm(form, Getir());
 }
Example #6
0
 private void AbrirForm(string formName)
 {
     FormCreator.ShowDialog(formName);
     this.RefreshStatus();
 }