private async Task CalendarPickerForm_Init(object sender, InitEventArgs e) { this.Picker = new CalendarPicker(); this.Picker.Title = "Datum auswählen / Pick date"; this.AddControl(Picker); }
private async Task CheckedButtonListForm_Init(object sender, InitEventArgs e) { m_Buttons = new CheckedButtonList(); m_Buttons.KeyboardType = TelegramBotBase.Enums.eKeyboardType.InlineKeyBoard; m_Buttons.EnablePaging = true; m_Buttons.HeadLayoutButtonRow = new List <ButtonBase>() { new ButtonBase("Back", "back"), new ButtonBase("Switch Keyboard", "switch") }; m_Buttons.SubHeadLayoutButtonRow = new List <ButtonBase>() { new ButtonBase("No checked items", "$") }; ButtonForm bf = new ButtonForm(); for (int i = 0; i < 30; i++) { bf.AddButtonRow($"{i}. Item", i.ToString()); } m_Buttons.ButtonsForm = bf; m_Buttons.ButtonClicked += Bg_ButtonClicked; m_Buttons.CheckedChanged += M_Buttons_CheckedChanged; this.AddControl(m_Buttons); }
private async Task ButtonGridTagForm_Init(object sender, InitEventArgs e) { m_Buttons = new TaggedButtonGrid(); m_Buttons.KeyboardType = TelegramBotBase.Enums.eKeyboardType.ReplyKeyboard; m_Buttons.EnablePaging = true; m_Buttons.HeadLayoutButtonRow = new List <ButtonBase>() { new ButtonBase("Back", "back") }; var countries = CultureInfo.GetCultures(CultureTypes.SpecificCultures); ButtonForm bf = new ButtonForm(); foreach (var c in countries) { bf.AddButtonRow(new TagButtonBase(c.EnglishName, c.EnglishName, c.Parent.EnglishName)); } m_Buttons.Tags = countries.Select(a => a.Parent.EnglishName).Distinct().OrderBy(a => a).ToList(); m_Buttons.SelectedTags = countries.Select(a => a.Parent.EnglishName).Distinct().OrderBy(a => a).ToList(); m_Buttons.ButtonsForm = bf; m_Buttons.ButtonClicked += Bg_ButtonClicked; this.AddControl(m_Buttons); }
private void HandleInit(object sender, InitEventArgs e) { // _state.ApplyCallback(gameObject => gameObject.InitializeAssets(new AssetsLoader())); // _state.GameObjects.ForEach(o => { // o.InitializeAssets(); // }); }
public void OnInit(InitEventArgs e) { InitEventHandler handler = InitEvent; if (InitEvent != null) { handler(this, e); } }
private async Task AutoCleanForm_Init(object sender, InitEventArgs e) { if (this.Device == null) { return; } this.Device.MessageSent += Device_MessageSent; this.Device.MessageReceived += Device_MessageReceived; }
public async Task OnInit(InitEventArgs e) { if (this.Events[__evInit] == null) { return; } var handler = this.Events[__evInit].GetInvocationList().Cast <AsyncEventHandler <InitEventArgs> >(); foreach (var h in handler) { await Async.InvokeAllAsync <InitEventArgs>(h, this, e); } }
private async Task ButtonGridForm_Init(object sender, InitEventArgs e) { m_Buttons = new ButtonGrid(); m_Buttons.KeyboardType = TelegramBotBase.Enums.eKeyboardType.InlineKeyBoard; ButtonForm bf = new ButtonForm(); bf.AddButtonRow(new ButtonBase("Back", "back"), new ButtonBase("Switch Keyboard", "switch")); bf.AddButtonRow(new ButtonBase("Button1", "b1"), new ButtonBase("Button2", "b2")); bf.AddButtonRow(new ButtonBase("Button3", "b3"), new ButtonBase("Button4", "b4")); m_Buttons.ButtonsForm = bf; m_Buttons.ButtonClicked += Bg_ButtonClicked; this.AddControl(m_Buttons); }
private async Task ToggleButtons_Init(object sender, InitEventArgs e) { var tb = new ToggleButton(); tb.Checked = true; tb.Toggled += Tb_Toggled; this.AddControl(tb); tb = new ToggleButton(); tb.Checked = false; tb.Toggled += Tb_Toggled; this.AddControl(tb); tb = new ToggleButton(); tb.Checked = true; tb.Toggled += Tb_Toggled; this.AddControl(tb); }
private async Task ToggleButtons_Init(object sender, InitEventArgs e) { var mtb = new MultiToggleButton(); mtb.Options = new List <ButtonBase>() { new ButtonBase("Option 1", "1"), new ButtonBase("Option 2", "2"), new ButtonBase("Option 3", "3") }; mtb.SelectedOption = mtb.Options.FirstOrDefault(); mtb.Toggled += Tb_Toggled; this.AddControl(mtb); mtb = new MultiToggleButton(); mtb.Options = new List <ButtonBase>() { new ButtonBase("Option 4", "4"), new ButtonBase("Option 5", "5"), new ButtonBase("Option 6", "6") }; mtb.SelectedOption = mtb.Options.FirstOrDefault(); mtb.AllowEmptySelection = false; mtb.Toggled += Tb_Toggled; this.AddControl(mtb); }
private async Task TreeViewForms_Init(object sender, InitEventArgs e) { view = new TreeView(); var tvn = new TreeViewNode("Cars", "cars"); tvn.AddNode(new TreeViewNode("Porsche", "porsche", new TreeViewNode("Website", "web", "https://www.porsche.com/germany/"), new TreeViewNode("911", "911"), new TreeViewNode("918 Spyder", "918"))); tvn.AddNode(new TreeViewNode("BMW", "bmw")); tvn.AddNode(new TreeViewNode("Audi", "audi")); tvn.AddNode(new TreeViewNode("VW", "vw")); tvn.AddNode(new TreeViewNode("Lamborghini", "lamborghini")); view.Nodes.Add(tvn); tvn = new TreeViewNode("Fruits", "fruits"); tvn.AddNode(new TreeViewNode("Apple", "apple")); tvn.AddNode(new TreeViewNode("Orange", "orange")); tvn.AddNode(new TreeViewNode("Lemon", "lemon")); view.Nodes.Add(tvn); this.AddControl(view); }
private async Task MonthPickerForm_Init(object sender, InitEventArgs e) { this.Picker = new MonthPicker(); this.Picker.Title = "Monat auswählen / Pick month"; this.AddControl(Picker); }
protected virtual void OnInit(InitEventArgs ies) { Console.WriteLine($"{ies.SpiderInfo}初始化完毕"); InitEvent?.Invoke(this, ies); }
/// <summary> /// Raises the oninit event. /// </summary> /// <param name="args">The <see cref="Rendition.InitEventArgs"/> instance containing the event data.</param> internal void raiseOnInit(InitEventArgs args) { if(Initializing != null) { Initializing(this, args); }; }
protected void DayPilotScheduler1_OnClientInit(object sender, InitEventArgs e) { setDataSourceAndBind(); DayPilotScheduler1.UpdateWithMessage("Initialized"); }
private async Task Step1_Init(object sender, InitEventArgs e) { this.UserData = new Data(); }