Exemplo n.º 1
0
        public DropDownListForm()
        {
            Draw = () =>
            {
                DrawFormSolid(new OpenTK.Vector4(1, 1, 1, 1));
                DrawText(CurrentItem, 5, -3);
            };

            MouseDown = (b) =>
            {
                if (Open)
                {
                    Open = false;
                    Forms.Clear();
                }
                else
                {
                    int y = 0;
                    Open = true;
                    foreach (var item in Items)
                    {
                        var ib = new ButtonForm().Set(0, H + y, W, 25, item) as ButtonForm;
                        y = y + 25;
                        Add(ib);
                        ib.Click = (bt) =>
                        {
                            CurrentItem = item;
                            Open        = false;
                            Forms.Clear();
                            SelectedItem?.Invoke(item);
                        };
                    }
                }
            };
        }
Exemplo n.º 2
0
        async Task ExecuteLoadItemsCommand()
        {
            if (IsBusy)
            {
                return;
            }

            IsBusy = true;

            try
            {
                Forms.Clear();
                var forms = await DataStore.GetFormsAsync(true);

                foreach (var form in forms)
                {
                    Forms.Add(form);
                }
            }
            catch (Exception ex)
            {
                Debug.WriteLine(ex);
            }
            finally
            {
                IsBusy = false;
            }
        }
Exemplo n.º 3
0
        public void Submit()
        {
            Forms.ForEach(form => form.Submit());
            Forms.Clear();
            subtractor.Clear();


            Refresh();
        }
Exemplo n.º 4
0
 public void AddPage(TabPageForm page)
 {
     Pages.Add(page);
     Active = page;
     Forms.Clear();
     Add(Active);
     page.Y = page.Y + 20;
     Shown  = Active;
     //Forms.Add(Active);
 }
Exemplo n.º 5
0
 public void Clear()
 {
     Tables.Clear();
     Forms.Clear();
     Pages.Clear();
     Reports.Clear();
     XmlPorts.Clear();
     Codeunits.Clear();
     Queries.Clear();
     MenuSuites.Clear();
 }
Exemplo n.º 6
0
 public void ClearData()
 {
     Teachers.Clear();
     Lessons.Clear();
     Forms.Clear();
     Groups.Clear();
     Subjects.Clear();
     YearGroups.Clear();
     YearGroups.Add(NoneYear);
     Subjects.Add(NoneSubject);
 }
Exemplo n.º 7
0
        private void UpdateFood()
        {
            Application.Current.Dispatcher.Invoke(delegate
            {
                Forms.Clear();

                api.GetForms().ForEach(form => Forms.Add(form));

                if (Forms.Count > 0)
                {
                    SelectedForm = Forms[0];
                }
            });
        }
        public void Clear()
        {
            Tables.Clear();
#if NAV2009
            Forms.Clear();
            Dataports.Clear();
#endif
            Pages.Clear();
            Reports.Clear();
            XmlPorts.Clear();
            Codeunits.Clear();
            Queries.Clear();
            MenuSuites.Clear();
        }