public override void Init(params string[] Param) { sdCard.Mounted += (SDCard sender, GT.StorageDevice device) => { PopulateList(); }; MainWindow = GlideLoader.LoadWindow(Resources.GetString(Resources.StringResources.EditorForm)); //populate Code data PopulateList(); txtCode = (GHI.Glide.UI.TextBox)MainWindow.GetChildByName("txtCode"); btnExec = (GHI.Glide.UI.Button)MainWindow.GetChildByName("btnExec"); btnClear = (GHI.Glide.UI.Button)MainWindow.GetChildByName("btnClear"); txtCode.TapEvent += new OnTap(Glide.OpenKeyboard); listFile.CloseEvent += (object sender) => { Glide.CloseList(); }; cmbFile = (GHI.Glide.UI.Dropdown)MainWindow.GetChildByName("cmbFile"); cmbFile.TapEvent += (object sender) => { Glide.OpenList(sender, listFile); }; cmbFile.ValueChangedEvent += (object sender) => { var dropdown = (GHI.Glide.UI.Dropdown)sender; if (dropdown.Value == null) { return; } var data = sdCard.StorageDevice.ReadFile(dropdown.Value.ToString()); txtCode.Text = new string(Encoding.UTF8.GetChars(data)); txtCode.Invalidate(); //Debug.Print("Dropdown value: " + dropdown.Text + " : " + dropdown.Value.ToString()); }; btnExec.PressEvent += (sender) => { CallFormRequestEvent(ScreenTypes.Executor, txtCode.Text); }; btnClear.PressEvent += (sender) => { txtCode.Text = string.Empty; }; Glide.MainWindow = MainWindow; //MainWindow.Invalidate(); }
void dropDown_PumpSelection_TapEvent(object sender) { Glide.OpenList(sender, list_dropDown_PumpSelection); }