public override void ButtonClick(ButtonClickEventArgs e) { base.ButtonClick(e); if (e.Key.EqualsIgnoreCase("F_HS_Confirm")) { try { string printerName = GetSelectedPrinterName(); if (numbers != null && numbers.Count > 0) { foreach (var num in numbers) { if (num != null) { PrintUtil.Print("C:\\Fedex\\" + num + ".pdf", printerName); } } } this.View.Close(); } catch (Exception ex) { this.View.ShowErrMessage(ex.Message + Environment.NewLine + ex.StackTrace, "", MessageBoxType.Error); } } else if (e.Key.EqualsIgnoreCase("F_HS_Cancel")) { this.View.Close(); } }
/// <summary> /// 按钮点击事件 /// </summary> /// <param name="e"></param> public override void ButtonClick(ButtonClickEventArgs e) { // 用户点击确定按钮 if (e.Key.EqualsIgnoreCase("FQueryPlan")) { // 构建返回数据对象 try { Context context = this.Context; ReturnInfo returnInfo = new ReturnInfo(); if (this.Model.GetValue("FMATERIALID") != null && this.Model.GetValue("FPickQty") != null) { returnInfo.Fnumber = ((DynamicObject)this.Model.GetValue("FMATERIALID"))["Id"].ToString(); //产品id returnInfo.Qty = Convert.ToInt32(this.Model.GetValue("FPickQty")); //起止日期 returnInfo.FGG = this.Model.GetValue("FGG").ToString(); // ReturnParam returnParam = GenerateSolutions(returnInfo.Fnumber, returnInfo.Qty,Context);//生成方案 // 把数据对象,返回给父界面 this.View.ReturnToParentWindow(new FormResult(returnInfo)); this.View.Close(); } else { this.View.ShowErrMessage("请填写产品编码和数量!"); } } catch (Exception ex) { this.View.ShowErrMessage("生成方案失败:" + ex.ToString()); throw; } } }
protected async Task ButtonOnClickAsync(ButtonClickEventArgs args) { try { if (args.ViewModel == null) { throw new ArgumentException($"ViewModel required"); } var command = await EditContextService.ProcessEntityActionAsync( GetUsageType(), CollectionAlias, GetParentPath(), Id, args.EditContext, args.ViewModel.ButtonId, args.Data); await HandleViewCommandAsync(command); } catch (Exception ex) { HandleException(ex); } }
protected async Task ListButtonOnClickAsync(ButtonClickEventArgs args) { try { if (CurrentState == null) { throw new InvalidOperationException(); } var request = new PersistEntitiesRequestModel { ActionId = args.ViewModel.ButtonId, CustomData = args.Data, ListContext = ListContext !, Related = CurrentState.Related }; var command = CurrentState.UsageType.HasFlag(UsageType.Edit) ? (ViewCommandResponseModel)await InteractionService.InteractAsync <PersistEntitiesRequestModel, ListEditorCommandResponseModel>(request, CurrentViewState) : (ViewCommandResponseModel)await InteractionService.InteractAsync <PersistEntitiesRequestModel, ListViewCommandResponseModel>(request, CurrentViewState); await HandleViewCommandAsync(command); } catch (Exception ex) { HandleException(ex); } }
private void OnClick(ButtonClickEventArgs obj) { var thread = new Thread(() => { var chartObjectModels = _chart.GetObjectModels(); if (chartObjectModels.Length == 0) { MessageBox.Show("There is no pattern object on your chart to save", "Error", MessageBoxButtons.OK, MessageBoxIcon.Warning); return; } var saveFileDialog = new SaveFileDialog { Title = "Save Chart Patters", Filter = "pt Files (*.pt)|*.pt", RestoreDirectory = true }; if (saveFileDialog.ShowDialog() != DialogResult.OK) { return; } ChartObjectsSerializer.Serialize(chartObjectModels, saveFileDialog.FileName); }); thread.SetApartmentState(ApartmentState.STA); thread.Start(); thread.Join(); }
protected async Task NodeButtonOnClickAsync(ButtonClickEventArgs args) { try { var command = (CurrentState.Related != null) ? await InteractionService.InteractAsync <PersistRelatedEntityRequestModel, NodeInListViewCommandResponseModel>(new PersistRelatedEntityRequestModel { ActionId = args.ViewModel.ButtonId, CustomData = args.Data, EditContext = args.EditContext, Related = CurrentState.Related }, CurrentViewState) : await InteractionService.InteractAsync <PersistEntityRequestModel, NodeInListViewCommandResponseModel>(new PersistEntityRequestModel { ActionId = args.ViewModel.ButtonId, CustomData = args.Data, EditContext = args.EditContext, }, CurrentViewState); await HandleViewCommandAsync(command); } catch (Exception ex) { HandleException(ex); } }
private void EnterTabBtn1_OnButtonClicked(object Sender, ButtonClickEventArgs E) { if (m_Avatars.Count == 0) { m_HouseButton1.Visible = false; m_CityButton1.Visible = false; } else { if (m_Avatars[0].HasHouse) { m_HouseButton1.Visible = true; } m_CityButton1.Visible = true; m_CityNameText1.Visible = true; } m_PersonDescriptionText1.Visible = false; m_PersonDescriptionScrollDownBtn1.Visible = false; m_PersonDescriptionScrollUpBtn1.Visible = false; DescriptionTabBackgroundImg1.Visible = false; DescriptionTabImage1.Visible = false; EnterTabImage1.Visible = true; EnterTabBackgroundImage1.Visible = true; //HitVM.PlayEvent("ui_nhood_click"); HitVM.PlayEvent("vox_teasee_giggle"); }
public override void ButtonClick(ButtonClickEventArgs e) { // 用户点击确定按钮 if (e.Key.EqualsIgnoreCase("F_JD_OK")) { } }
protected virtual void OnButtonClick(ButtonClickEventArgs e) { //Menuumschaltung nicht durchreichen ButtonNavigation SubMenu = m_ButtonNavigation.FilterByMenu(m_Menustack.Peek()); switch (SubMenu[e.Button].GetBtFunction()) { case ButtonFunction.Call: if (ButtonClick != null) { ButtonClickEventArgs Event = new ButtonClickEventArgs(e.Button, SubMenu[e.Button].GetValue()); ButtonClick(this, Event); } break; case ButtonFunction.OpenSubMenu: OpenMenu(SubMenu[e.Button].GetValue()); break; case ButtonFunction.OpenTopMenu: OpenMenu(""); break; case ButtonFunction.ReturnSubMenu: m_Menustack.Pop(); OpenMenu(m_Menustack.Peek()); break; default: break; } }
private void _shuttle_ButtonClick(object sender, ButtonClickEventArgs e) { //Convert ButtonClickEventArgs data into text... textBox1.Text = Convert.ToString(e.Device); textBox2.Text = Convert.ToString(e.DeviceNumber); textBox3.Text = Convert.ToString("BUTTON CLICKED - Button Number: " + e.ButtonNumber); }
private void on_button_clicked(object o, ButtonClickEventArgs bcea) { if (bcea.button_name == "word submit") { var unicode_word = unicode_ansi_handler.ansi_to_unicode(bcea.message); debug_mesh.text = unicode_word; if (!created_words.Contains(unicode_word) && player_db_manager.has_word(unicode_word)) { score_controller.update_score(CharacterBlock.selected_block_stack.Count); current_word_animator.SetTrigger("bounce"); created_words.Add(unicode_word); print("word " + unicode_word + " in db"); } else { current_word_animator.SetTrigger("vibrate"); } } else if (bcea.button_name == "vowel select") { print("vowel added"); //current_word[current_word.Count - 1].text_mesh.text = add_vowel_to_end(current_word[current_word.Count - 1].text_mesh.text, bcea.message); CharacterBlock.last_clicked_on_character.text_mesh.text = modify_vowel(CharacterBlock.last_clicked_on_character.text_mesh.text, bcea.message); update_word(); } else if (bcea.button_name == "clear button") { clear_current_word(); } }
public override void ButtonClick(ButtonClickEventArgs e) { base.ButtonClick(e); switch (e.Key.ToLower()) { case "f_pae_disablebaritem": //禁用主菜单 this.View.GetMainBarItem("tbButtonTest").Enabled = false; this.View.GetControl("F_PAE_OrderAmount").Enabled = false; break; case "f_pae_enablebaritem": //启用主菜单 this.View.GetMainBarItem("tbButtonTest").Enabled = true; this.View.GetControl("F_PAE_OrderAmount").Enabled = true; break; case "f_pae_hidebaritem": //隐藏主菜单 this.View.GetMainBarItem("tbButtonTest").Visible = false; break; case "f_pae_showbaritem": //显示主菜单 this.View.GetMainBarItem("tbButtonTest").Visible = true; break; } }
/// <summary> /// User tried to scroll the text in the description textbox up. /// </summary> private void M_DescriptionScrollUpBtn_OnButtonClicked(object Sender, ButtonClickEventArgs E) { if (!m_DescriptionTextEdit.ScrollUp()) { m_DescriptionScrollUpBtn.Enabled = false; } }
private void SendButtonClick(ButtonClickEventArgs e) { if (ButtonClick != null) { ButtonClick(this, e); } }
private void latestRegistrationUC1_ButtonClick(object sender, ButtonClickEventArgs e) { if (ButtonClick == null) { return; } ButtonClick(sender, e); }
/// <summary> /// User wanted to change the sex of the avatar to female. /// </summary> private void M_FemaleBtn_OnButtonClicked(object Sender, ButtonClickEventArgs E) { m_HeadSkinBrowser.Sex = AvatarSex.Female; m_BodySkinBrowser.Sex = AvatarSex.Female; m_Avatar.ChangeOutfit(FileManager.GetOutfit((ulong)FileIDs.OutfitsFileIDs.fab001_sl__pjs4), (Vitaboy.SkinType)m_CurrentSkinType); m_Avatar.Head(FileManager.GetOutfit((ulong)FileIDs.OutfitsFileIDs.fah002_mom), (Vitaboy.SkinType)m_CurrentSkinType); }
/// <summary> /// User wanted to change the sex of the avatar to male. /// </summary> private void M_MaleBtn_OnButtonClicked(object Sender, ButtonClickEventArgs E) { m_HeadSkinBrowser.Sex = AvatarSex.Male; m_BodySkinBrowser.Sex = AvatarSex.Male; m_Avatar.ChangeOutfit(FileManager.GetOutfit((ulong)FileIDs.OutfitsFileIDs.mab000_robin), (Vitaboy.SkinType)m_CurrentSkinType); m_Avatar.Head(FileManager.GetOutfit((ulong)FileIDs.OutfitsFileIDs.mah003_antony), (Vitaboy.SkinType)m_CurrentSkinType); }
public override void ButtonClick(ButtonClickEventArgs e) { base.ButtonClick(e); if (e.Key.EqualsIgnoreCase("F_PAEZ_Button")) { this.View.ShowMessage("测试弹窗"); } }
private void incompletApplicationUC1_ButtonClick(object sender, ButtonClickEventArgs e) { if (ButtonClick == null) { return; } ButtonClick(sender, e); }
private void _trendLineHorizontalButton_Click(ButtonClickEventArgs obj) { var name = string.Format("Horizontal Trend Line [Auto Drawing] {0}", DateTime.Now.ToString("dd.MM.yy HH:mm:ss.zzz")); var line = Chart.DrawTrendLine(name, SelectedStartBarIndex, Bars.ClosePrices[SelectedStartBarIndex], SelectedEndBarIndex, Bars.ClosePrices[SelectedStartBarIndex], DrawingsColor); line.IsInteractive = true; line.ExtendToInfinity = EntendToInfinity; _closeDrawingDialog(); }
public void TestButtonClick(ButtonClickEventArgs args) { ButtonAsset button = args.Sender as ButtonAsset; Demo1VirtualizedContext context = (Demo1VirtualizedContext)button.VirtualizedDataContext; Debug.WriteLine("OH HAI THERE!"); context.TestText = context.TestText + "!"; }
public override void ButtonClick(ButtonClickEventArgs e) { if (e.Key == "FBTNOK") { string json = presenter.GenerateToJson(); this.View.ReturnToParentWindow(new FormResult(json)); this.View.Close(); } }
private void _supportLevelButton_Click(ButtonClickEventArgs obj) { var minimum = _getMinimumInSelection(); var name = string.Format("Support Level [Auto Drawing] {0}", DateTime.Now.ToString("dd.MM.yy HH:mm:ss.zzz")); var line = Chart.DrawHorizontalLine(name, minimum.Price, DrawingsColor); line.IsInteractive = true; _closeDrawingDialog(); }
public override void ButtonClick(ButtonClickEventArgs e) { base.ButtonClick(e); if (e.Key.EqualsIgnoreCase("F_PAE_SaveView")) { SaveBillInfo(); } }
public override void ButtonClick(ButtonClickEventArgs e) { string str; if (((str = e.Key.ToUpperInvariant()) != null) && (str == "FBTNOK")) { e.Cancel = this.CheckParam(); ReportCommonFunction.CheckDefaultScheme(this.View, this.Model, e, this._curFilterSchemeId, this._defaultSchemeId); } base.ButtonClick(e); }
public override void ButtonClick(ButtonClickEventArgs e) { base.ButtonClick(e); switch (e.Key) { case "F_HS_QUERY": LoadData(this.Context); break; } }
private void OnButtonClick(object sender, ButtonClickEventArgs args) { Log.Verbose("OnButtonClick", "GUI"); var type = args.Type; if (type != ButtonType.NextPhaseButton) { return; } GetComponent <PhotonView>().RPC("NextPhase", PhotonTargets.AllViaServer); }
public override void ButtonClick(ButtonClickEventArgs e) { base.ButtonClick(e); string key = e.Key.ToUpperInvariant(); switch (key) { case "FDETAILED": //OpenDetailedPage(); break; } }
public override void ButtonClick(ButtonClickEventArgs e) { base.ButtonClick(e); if (e.Key.EqualsIgnoreCase("F_PAE_Button")) { DynamicFormShowParameter showFormPara = new DynamicFormShowParameter(); showFormPara.FormId = "k2a30f11491e2485b949c98792f73b0e0"; showFormPara.CustomParams.Add("aaa", "111"); //showFormPara.CustomParams.Add("resizable", "111"); this.View.ShowForm(showFormPara); } else if (e.Key.EqualsIgnoreCase("F_PAE_Button2")) { //this.View.ParentFormView.GetControl("F_PAE_Text").SetEnabled("", false); this.View.ParentFormView.GetControl("F_PAE_Text").SetValue("aaa"); this.View.GetControl("F_PAE_Lable").Text = "aaaa"; //this.View.ParentFormView.GetMainBarItem("tbNewList").Enabled = false; //this.View.ParentFormView.GetBarItem("ToolBar", "tbNewList").Enabled = false; //this.View.ParentFormView.StyleManager. this.View.SendDynamicFormAction(this.View.ParentFormView); this.View.UpdateView(); } else if (e.Key.EqualsIgnoreCase("F_PAE_btnSave")) { /* * IViewService viewService = this.Model.GetService<IViewService>(); * FormMetadata test3Meta = FormMetaDataCache.GetCachedFormMetaData(this.Context, "kd015e925f51e411b8408c1f8e7fcb066"); * DynamicObjectType dyType = test3Meta.BusinessInfo.GetDynamicObjectType(); * DynamicObject dyObj = new DynamicObject(dyType); * * dyObj["BillNo"] = DateTime.Now.ToString("yyyyMMddHHmmssss"); * dyObj["F_PAE_Text1"] = "11111"; * * BusinessDataServiceHelper.Save(this.Context,dyObj); * * var result = this.Model.LoadReferenceData(dyType,100005); * //var result=BusinessDataServiceHelper.LoadSingle(this.Context, 100005, dyType); * if (result != null) { * this.View.ShowMessage(result["Id"].ToString()); * } */ //this.View.InvokeFormOperation(FormOperationEnum.Save); this.View.GetMainBarItem("tbSNew").Enabled = true; //SaveBillInfo(); } }
private void _resistanceTrendLineButton_Click(ButtonClickEventArgs obj) { var extremums = _getTwoTopHighExtremumsInSelection(); //_getFirstLastHighExtremumsInSelection(); var point1 = extremums.Point1.BarIndex < extremums.Point2.BarIndex ? extremums.Point1 : extremums.Point2; var point2 = extremums.Point1.BarIndex < extremums.Point2.BarIndex ? extremums.Point2 : extremums.Point1; var name = string.Format("Resistance Trend Line [Auto Drawing] {0}", DateTime.Now.ToString("dd.MM.yy HH:mm:ss.zzz")); var line = Chart.DrawTrendLine(name, point1.BarIndex, point1.Price, point2.BarIndex, point2.Price, DrawingsColor); line.IsInteractive = true; line.ExtendToInfinity = EntendToInfinity; _closeDrawingDialog(); }
private void titleBarUC1_ButtonClick(object sender, ButtonClickEventArgs e) { SendButtonClick(e); }
private void SendButtonClick(ButtonClickEventArgs e) { if (ButtonClick != null) ButtonClick(this, e); }
//private void InitializeDynamicComponent() //{ // var pts = Models.ProductTypeModel.FindAll(); // foreach (var pt in pts) // { // ApplicationGroup uc = new ApplicationGroup(); // uc.Name = "ag" + pt.Code; // uc.Dock = DockStyle.Top; // uc.Tag = pt.Code; // uc.Title = pt.Name; // uc.ButtonClick += uc_ButtonClick; // panel1.Controls.Add(uc); // var ats = Models.ApplicationTypeModel.FindAllByProductCode(pt.Code); // foreach(var at in ats) // { // SelectionButtonUC bt = new SelectionButtonUC(); // bt.Name = "btn" + at.Code; // // bt.Size = new System.Drawing.Size(91, 88); // bt.Code = at.Code; // bt.Title = at.Name; // //bt.UseVisualStyleBackColor = true; // bt.ButtonClick += bt_Click; // uc.ApplicationControls.Add(bt); // //flpEndUserType.Controls.Add(bt); // } // } //} //private void bt_Click(object sender, EventArgs e) //{ // Button bt = sender as Button; // if (bt == null) // return; // if (ButtonClick == null) // return; // _mf.Trans.ProductCode = ((string)bt.Tag).Split('-')[0]; // _mf.Trans.ApplicationTypeCode = ((string)bt.Tag).Split('-')[1]; // ButtonClick(sender, new ButtonClickEventArgs(ButtonType.ApplicationType)); //} void uc_ButtonClick(object sender, ButtonClickEventArgs e) { }
void OnButtonClick(object sender, ButtonClickEventArgs e) { switch (e.Type) { case ButtonType.UnifiOthersPlanCompleted: ShowForm(UserControlType.DocumentUpload); break; case ButtonType.UnifiHyppTvCompleted: ShowForm(UserControlType.UnifiOthersPlan); break; case ButtonType.UnifiCallPlanCompleted: ShowForm(UserControlType.UnifiHyppTv); break; case ButtonType.UnifiMainDetailsCompleted: ShowForm(UserControlType.UnifiCallPlan); break; case ButtonType.DocumentUploadCompleted: ShowForm(UserControlType.TermAndCondition); break; case ButtonType.ServicesCompleted: ShowForm(UserControlType.DocumentUpload); break; case ButtonType.BillingCompleted: switch (Application.ProductTypeEnum) { case ProductTypeEnum.Unifi: ShowForm(UserControlType.UnifiMainDetails); break; case ProductTypeEnum.Streamyx: ShowForm(UserControlType.ServiceDetails); break; } break; case ButtonType.ApplicationDetailCompleted: ShowForm(UserControlType.InstallationDetail); break; case ButtonType.InstallationDetailCompleted: ShowForm(UserControlType.BillingDetail); break; case ButtonType.BillingDetailCompleted: ShowForm(UserControlType.ServiceDetails); break; case ButtonType.ApplicantTypeSelected: { switch (Application.ApplicantTypeEnum) { case ApplicantTypeEnum.Malaysian: ShowForm(UserControlType.ApplicantDetails); break; case ApplicantTypeEnum.NonMalaysian: ShowForm(UserControlType.ApplicantDetails); break; case ApplicantTypeEnum.Oku: ShowForm(UserControlType.ApplicantDetails); //MessageBox.Show("Test"); break; case ApplicantTypeEnum.Tentera: ShowForm(UserControlType.ApplicantDetails); //MessageBox.Show("Test"); break; default: break; } } break; case ButtonType.Syncrhonize: ProcessingForm pf = new ProcessingForm(); pf.Title = "Synchronization"; pf.Message = "Synchronization is in progress..."; pf.ShowDialog(); break; case ButtonType.Dashboard: ShowForm(UserControlType.Dashboard); break; case ButtonType.SaveTrans: { try { //Models.ApplicationModel.Add(Application, UserProfile.IcNo); _applicationSvc.Create(Application); MessageBox.Show("Registration Success!"); RegistrationSlipForm rsf = new RegistrationSlipForm(); rsf.Trans = Application; rsf.Show(); ShowForm(UserControlType.Dashboard); } catch (Exception ex) { MessageBox.Show("Registration Failed! " + ex.Message); } } break; case ButtonType.Start: Application = new Data.Application(); ShowForm(UserControlType.ProductGroup); break; case ButtonType.ApplicantType: ShowForm(UserControlType.ApplicantType); break; case ButtonType.RecentApplication: ShowForm(UserControlType.RecentApplication); break; case ButtonType.IncompleteApplication: ShowForm(UserControlType.IncompleteApplication); break; case ButtonType.MyPerformance: MyPerformanceForm mpf = new MyPerformanceForm(); mpf.Show(); break; default: break; } //switch (e.Type) //{ // case ButtonType.RecentApplication: // ShowForm(UserControlType.RecentApplication); // break; // case ButtonType.IncompleteApplication: // ShowForm(UserControlType.IncompleteApplication); // break; // default: // ShowForm(UserControlType.ProductGroup); // break; //} }
void latestApplicationUC1_ButtonClick(object sender, ButtonClickEventArgs e) { }
private void OutlookBar_Click(object sender, EventArgs e) { if (!(e is MouseEventArgs)) return; // case to MouseEventArgs so position and mousebutton clicked can be used MouseEventArgs mea = (MouseEventArgs) e; // only continue if left mouse button was clicked if (mea.Button != MouseButtons.Left) return; int index = (mea.Y - 1) / (buttonHeight + 1); if (index < 0 || index >= buttons.Count) return; OutlookBarButton button = buttons[index]; if (button == null) return; if (!button.Enabled) return; // ok, all checks passed so assign the new selected button // and raise the event SelectedButton = button; ButtonClickEventArgs bce = new ButtonClickEventArgs(selectedButton, mea); if (Click != null) // only invoke on left mouse click Click.Invoke(this, bce); }
private void latestRegistrationUC1_ButtonClick(object sender, ButtonClickEventArgs e) { if (ButtonClick == null) return; ButtonClick(sender, e); }