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);
                        };
                    }
                }
            };
        }
示例#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;
            }
        }
示例#3
0
        public void Submit()
        {
            Forms.ForEach(form => form.Submit());
            Forms.Clear();
            subtractor.Clear();


            Refresh();
        }
示例#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);
 }
示例#5
0
 public void Clear()
 {
     Tables.Clear();
     Forms.Clear();
     Pages.Clear();
     Reports.Clear();
     XmlPorts.Clear();
     Codeunits.Clear();
     Queries.Clear();
     MenuSuites.Clear();
 }
 public void ClearData()
 {
     Teachers.Clear();
     Lessons.Clear();
     Forms.Clear();
     Groups.Clear();
     Subjects.Clear();
     YearGroups.Clear();
     YearGroups.Add(NoneYear);
     Subjects.Add(NoneSubject);
 }
示例#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();
        }