public override void LoadUI(Call call, TabModel model) { _myParams = new MyParams(); var tabMyParams = new TabControlMyParams(this, _myParams); model.AddObject(tabMyParams); _toolbar = new TabControlSearchToolbar(this); model.AddObject(_toolbar); _toolbar.ButtonSearch.Click += ButtonSearch_Click; // move logic into SearchToolbar Command _toolbar.ButtonLoadNext.Click += ButtonLoadNext_Click; _toolbar.ButtonCopyClipBoard.Click += ButtonCopyClipBoard_Click; _items = new ItemCollection <MyParams>(); for (int i = 0; i < 10; i++) { var item = new MyParams() { Name = "Item " + i.ToString(), Amount = i, }; _items.Add(item); } model.Items = _items; }
public override void Load(Call call, TabModel model) { _series = new List <ItemCollection <int> >(); //model.Items = items; model.Actions = new List <TaskCreator>() { new TaskDelegate("Add Entry", AddEntry), new TaskDelegate("Start: 1 Entry / second", StartTask, true), }; var chartSettings = new ChartSettings(); for (int i = 0; i < 2; i++) { var list = new ItemCollection <int>(); chartSettings.AddList("Series " + i, list); _series.Add(list); } for (int i = 0; i < 10; i++) { AddSample(); } model.AddObject(chartSettings); }
public override void Load(Call call, TabModel model) { LoadSavedItems(call, model); /*model.Actions = new List<TaskCreator>() * { * new TaskDelegate("Add", Add), * };*/ _paramTestItem = LoadData <ParamTestItem>(DataKey); model.AddObject(_paramTestItem); var toolbar = new Toolbar(); toolbar.ButtonNew.Action = New; toolbar.ButtonSave.Action = Save; model.AddObject(toolbar); }
public override void Load(Call call, TabModel model) { var toolbar = new TestToolbar(); toolbar.ButtonRefresh.Action = ButtonRefresh_Click; toolbar.ButtonOpenBrowser.Action = ButtonOpenBrowser_Click; model.AddObject(toolbar); }
public override void LoadUI(Call call, TabModel model) { var toolbar = new TabToolbar(); foreach (var memberInfo in Icons.Streams.GetItems()) { if (memberInfo.Key.Name == "Logo") { continue; } toolbar.Buttons.Add(new ToolButton(memberInfo.Key.Name, memberInfo.Value)); } model.AddObject(toolbar); }
public override void LoadUI(Call call, TabModel model) { var toolbar = new Toolbar(); toolbar.ButtonRefresh.Action = Refresh; //toolbar.ButtonReset.Action = Reset; toolbar.ButtonDeleteAll.Action = DeleteAll; model.AddObject(toolbar); if (Tab.Bookmarks.NewBookmark != null) { SelectItem(Tab.Bookmarks.NewBookmark); Tab.Bookmarks.NewBookmark = null; } }
public async Task LoadAsync(Call call, TabModel model) { call.Log.Add("Sleeping", new Tag("Milliseconds", DelayMs)); await Task.Delay(DelayMs); model.AddObject("Finished"); model.Items = new List <int>() { 1, 2, 3 }; model.Actions = new List <TaskCreator>() { new TaskDelegate("Reload", ReloadInstance), }; }
public override void Load(Call call, TabModel model) { model.Items = _items; model.Actions = new List <TaskCreator>() { new TaskDelegate("Add", Add), new TaskDelegateAsync("10s Task", LongTaskAsync, true), }; _paramTestItem = LoadData <ParamTestItem>(DataKey); if (_paramTestItem.DateTime.Ticks == 0) { _paramTestItem.DateTime = DateTime.Now; // in case the serializer loses it } model.AddObject(_paramTestItem); model.Notes = "Adding a class of type [Params] to a tabModel creates a TabControlParam\nParameter values can be saved between Tasks"; }
public override void LoadUI(Call call, TabModel model) { // No Json highlighting or search control /*var textBox = new TabControlTextBox() * { * TextWrapping = TextWrapping.Wrap, * AcceptsReturn = true, * }; * textBox.SetFormattedJson(Tab.Text); * model.AddObject(textBox, true);*/ // wordwrap doesn't work var tabAvaloniaEdit = new TabControlAvaloniaEdit(this); tabAvaloniaEdit.SetFormattedJson(Tab.Text); model.AddObject(tabAvaloniaEdit, true); }
private object GetDeveloperChart() { var listGroup = new ListGroup("Sales by Developer") { XBinSize = 1, }; listGroup.AddDimensions(Tab.Database.ReleaseViews, nameof(ReleaseView.Developer), nameof(ReleaseView.YearOfRelease), nameof(ReleaseView.Global_Sales)); var chartSettings = new ChartSettings(listGroup); var model = new TabModel() { MinDesiredWidth = 1000, }; model.AddObject(chartSettings); return(model); }
public async Task LoadAsync(Call call, TabModel model) { await Task.Delay(10); var list = new List <TimeRangeValue>(); var chartSettings = new ChartSettings(list, "Active Connection Count"); DateTime startTime = DateTime.Now; for (int i = 0; i < 24; i++) { var value = new TimeRangeValue() { StartTime = startTime, EndTime = startTime.AddHours(1), Value = (random.Next() % 5), }; list.Add(value); startTime = startTime.AddHours(1); } model.AddObject(chartSettings); }
private object GetSalesChart() { var listSeries = new ListSeries("Sales", Tab.Database.ReleaseViews, nameof(ReleaseView.YearOfRelease), nameof(ReleaseView.Global_Sales)) { XBinSize = 1, // Dimensions, allow selecting multiple //yPropertyName = nameof(ReleaseData.Platform), //yPropertyName = nameof(ReleaseData.Genre), //yPropertyName = nameof(ReleaseData.Publisher), //yPropertyName = nameof(ReleaseData.Developer), }; var chartSettings = new ChartSettings(); chartSettings.AddSeries(listSeries); //return chartSettings; var model = new TabModel() { MinDesiredWidth = 1000, }; model.AddObject(chartSettings); return(model); }
public override void Load(Call call, TabModel model) { Thread.Sleep(5000); model.AddObject("Finished"); }