private void Load_UcLoadSale() { try { // 31 8 : สิทธิ์ใช้งานหน้าค้นหาการขาย เข้าใช้งานหน้าค้นหาการขาย int AuthorizeId = 31; if (SQLAuthorized.CheckAuthorized(ClassProperty.permisRoleId, AuthorizeId) == false) { SQLAuthorized.AlertAuthorized("สิทธิ์ใช้งานหน้าค้นหาการขาย", "ไม่มีสิทธิ์เข้าใช้งานหน้าค้นหาการขาย"); return; } ClassProperty.IsOpenBuy = true; FlyoutDialog flyout_Dialog = new FlyoutDialog(FindForm(), new UcLoadSale()); flyout_Dialog.Properties.Style = FlyoutStyle.Popup; { var frm = flyout_Dialog; if (frm.ShowDialog(this) == DialogResult.OK) { } frm.Dispose(); } this.Show(); } catch (Exception ex) { XtraMessageBox.Show(ex.Message); } }
/// <summary> /// 系統設定按鈕 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void SettingbarButtonItem_ItemClick(object sender, ItemClickEventArgs e) { AfterLockFlag = LockFlag; LockFlag = false; if (!FlyoutFlag) { FlyoutFlag = true; PanelControl panelControl = new PanelControl() { Size = new Size(418, 492) }; flyout = new FlyoutDialog(this, panelControl); flyout.Properties.Style = FlyoutStyle.Popup; SystemSettingUserControl systemSettingUserControl = new SystemSettingUserControl(BankAccountSetting) { Form1 = this }; systemSettingUserControl.Parent = panelControl; flyout.Show(); } else { FlyoutFlag = false; flyout.Close(); } }
private void Load_UcCustomerType() { try { // 15 5 : สิทธิ์ใช้งานหน้าสมาชิก เข้าใช้งานหน้าสมาชิก int AuthorizeId = 15; if (SQLAuthorized.CheckAuthorized(ClassProperty.permisRoleId, AuthorizeId) == false) { SQLAuthorized.AlertAuthorized("สิทธิ์ใช้งานหน้าผู้ใช้งาน", "ไม่มีสิทธิ์เข้าใช้งานหน้าสมาชิก"); return; } ClassProperty.IsCusType = 0; ClassProperty.CustomerGroupId = 0; ClassProperty.IsOpenBuy = true; FlyoutDialog flyout_Dialog = new FlyoutDialog(FindForm(), new UcCustomerType()); flyout_Dialog.Properties.Style = FlyoutStyle.Popup; { var frm = flyout_Dialog; if (frm.ShowDialog(this) == DialogResult.OK) { } frm.Dispose(); } this.Show(); } catch (Exception ex) { XtraMessageBox.Show(ex.Message); } }
private void LoginsimpleButton_Click(object sender, EventArgs e) { userSetting = InitialMethod.UserSettings(); if (AccounttextEdit.Text == userSetting[0].UserName) { if (PasswordtextEdit.Text == userSetting[0].UserPassWord) { mainForm.navigationFrame.SelectedPageIndex = 1; } else { FlyoutAction action = new FlyoutAction(); action.Description = "密碼錯誤!"; action.Commands.Add(FlyoutCommand.OK); { FlyoutDialog.Show(FindForm(), action); }; } } else { FlyoutAction action = new FlyoutAction(); action.Description = "帳號密碼錯誤!"; action.Commands.Add(FlyoutCommand.OK); { FlyoutDialog.Show(FindForm(), action); }; } }
public MyFlyoutPanel01() { InitializeComponent(); //flyoutPanel1.ShowPopup(); // https://www.devexpress.com/Support/Center/Question/Details/T333871/flyoutpanel-sample // https://documentation.devexpress.com/WindowsForms/114578/Controls-and-Libraries/Messages-Notifications-and-Dialogs/Flyout-Panel#beak //flyoutPanel1.OwnerControl = this.simpleButton1; this.flyoutPanel2.OwnerControl = this.simpleButton1; this.flyoutPanel2.Showing += FlyoutPanel2_Showing; this.flyoutPanel2.Hidden += FlyoutPanel2_Hidden; // https://www.devexpress.com/Support/Center/Question/Details/T258043/how-to-use-flyoutdialog-with-usercontrol-from-a-usercontrol-not-from-windowsform FlyoutAction action = new FlyoutAction(); action.Commands.Add(FlyoutCommand.OK); action.Commands.Add(FlyoutCommand.Cancel); FlyoutDialog.Show(this.FindForm(), action, new MyButtonEdit01()); FlyoutProperties properties = new FlyoutProperties(); properties.ButtonSize = new Size(100, 10); properties.Style = FlyoutStyle.Popup; FlyoutDialog.Show(this.FindForm(), "", new MyButtonEdit01(), properties, 0, 0); //FlyoutDialog.Show(this.FindForm(), new MyButtonEdit01()); //FlyoutDialog.Show(this.FindForm(), MyDevExpressFunctions.CreateCloseAction(), properties); }
void DisplayChuyenPhongWithSelectedTile(ThuePhongDTO thuePhong = null) { //DTO.PhongDTO phongDTO = new DTO.PhongDTO((int)tileView1.GetRowCellValue(tileView1.GetSelectedRows()[0], "MaPhong"), (string)tileView1.GetRowCellValue(tileView1.GetSelectedRows()[0], "TenPhong"), (int)tileView1.GetRowCellValue(tileView1.GetSelectedRows()[0], "MaLoaiPhong"), tileView1.GetRowCellValue(tileView1.GetSelectedRows()[0], "Tang").ToString(), tileView1.GetRowCellValue(tileView1.GetSelectedRows()[0], "GhiChu").ToString(), (int)tileView1.GetRowCellValue(tileView1.GetSelectedRows()[0], "MaTinhTrangPhong")); ThuePhongDTO thuePhongDto; if (thuePhong == null) { thuePhongDto = listPhongDangThue[(int)danhSachPhong.Rows[tileView1.GetFocusedDataSourceRowIndex()]["MaPhong"]]; } else { thuePhongDto = thuePhong; } ChuyenPhong formChuyenPhong = new ChuyenPhong(thuePhongDto); if (FlyoutDialog.Show(this.FindForm(), formChuyenPhong) == DialogResult.OK) { DisplayTinhTrangPhongWithSelectedTile(formChuyenPhong.GetThuePhongMoi()); } else { } //this.TinhtrangPagecontrol.SelectedPage = PageThanhtoan; }
private void ShearsimpleButton_Click(object sender, EventArgs e) { XtraReportSetting = InitialMethod.InitialXtraReportLoad(); ReportTitleSetting reportTitle = InitialMethod.InitialReportTitleSetting(); if (StartdateEdit.Text != "") { string ttime = string.Empty; if (XtraReportSetting.Day.ToString().Length == 2) { ttime = Convert.ToDateTime(StartdateEdit.EditValue).ToString("yyyy/MM/") + $"{XtraReportSetting.Day} 00:00:00"; } else { ttime = Convert.ToDateTime(StartdateEdit.EditValue).ToString("yyyy/MM/") + $"0{XtraReportSetting.Day} 00:00:00"; } XtraReport xtraReport = new XtraReport(); AnalysisXtraReport analysisXtraReport = new AnalysisXtraReport(); analysisXtraReport.create_XtraReport(MysqlMethod, ttime, reportTitle); analysisXtraReport.CreateDocument(); xtraReport.Pages.AddRange(analysisXtraReport.Pages); documentViewer1.DocumentSource = xtraReport; } else { FlyoutAction action = new FlyoutAction(); action.Caption = "電表資訊-查詢報表錯誤"; action.Description = "請選擇條件再進行瀏覽"; action.Commands.Add(FlyoutCommand.OK); FlyoutDialog.Show(FindForm(), action); } }
private void GridControl1_DoubleClick(object sender, EventArgs e) { try { GridView testView = gridView1 as GridView; //MessageBox.Show(testView.FocusedRowHandle.ToString()); //this.gridControl1.DataSource = new MyDatabaseConnect01().connection8(test.eqpNumber, ""); //DataRow drFocusedRow = testView.GetDataRow(testView.FocusedRowHandle); if (testView.SelectedRowsCount <= 0) { return; } //MyDialog01 dialog = new MyDialog01(eqpId, testView.GetRowCellValue(testView.FocusedRowHandle, "PROCESS_SEQ").ToString(), testView.GetRowCellValue(testView.FocusedRowHandle, "PROD_ORDER_NUMBER").ToString()); //dialog.Show(); FlyoutProperties properties = new FlyoutProperties(); properties.ButtonSize = new Size(100, 10); properties.Style = FlyoutStyle.Popup; FlyoutDialog.Show(this.FindForm(), "", new MyDialog01(eqpId, testView.GetRowCellValue(testView.FocusedRowHandle, "PROCESS_SEQ").ToString(), testView.GetRowCellValue(testView.FocusedRowHandle, "PROD_ORDER_NUMBER").ToString()), properties, 0, 0); //FlyoutDialog.Show(this.FindForm(), new MyButtonEdit01()); } catch (Exception ex) { MessageBox.Show(ex.Message); } }
private void simpleButton1_Click(object sender, EventArgs e) { HttpResponseMessage response = new HttpResponseMessage(); login = textBox1.Text; password = textBox2.Text; Task.Run(async() => { response = await Main.client.GetAsync("api/Client/IsRegister?login="******"&password="******"Пользователь не найден" }; FlyoutCommand command1 = new FlyoutCommand() { Text = "Close", Result = DialogResult.OK }; action.Commands.Add(command1); FlyoutProperties properties = new FlyoutProperties(); properties.ButtonSize = new Size(100, 40); properties.Style = FlyoutStyle.MessageBox; FlyoutDialog.Show(M, action, properties); } else if (response.IsSuccessStatusCode) { client.CLogin = login; client.CPassword = password; this.Close(); } }
public static bool PreviewSale(string alisveriId) { try { EnsureFormLoaded(); using (var db = new Db()) { _saleForm.DataSource = db.GetSaleInvoiceFormDatasource(alisveriId); _saleForm.CreateDocument(); } var control = new UcPrint { Document = _saleForm }; control.Initialize(); WaitFormScope.CloseIfOpened(); return(FlyoutDialog.Show(AppContext.MainForm, control) == DialogResult.OK); } catch (Exception ex) { AppContext.Logger.Error(ex); throw new B2CPackageCollectException(StringResource.OperationFailedRetry); } }
private void Load_UcAddCustomerPrice() { try { FlyoutDialog flyout_Dialog = new FlyoutDialog(FindForm(), new UcAddCustomerPrice()); flyout_Dialog.Properties.Style = FlyoutStyle.Popup; { var frm = flyout_Dialog; if (frm.ShowDialog(this) == DialogResult.OK) { LoadCustomerPrices(sCustomerId); } else { } frm.Dispose(); } this.Show(); } catch (Exception ex) { XtraMessageBox.Show(ex.Message); } }
private void simpleButton1_Click(object sender, EventArgs e) { Film Fi18 = OneFilm.Buy.Where(s => s.FAge == 18).FirstOrDefault(); Film Fi0 = OneFilm.Buy.Where(s => s.FAge < 18).FirstOrDefault(); if (Fi0 != null && Fi18 != null) { FlyoutAction action = new FlyoutAction() { Caption = "Внимание!", Description = "Невозможно завершить покупку. Невозможна одновременая покупка фильмов с рейтингом <18+ и >18+ " }; FlyoutCommand command1 = new FlyoutCommand() { Text = "Close", Result = DialogResult.OK }; action.Commands.Add(command1); FlyoutProperties properties = new FlyoutProperties(); properties.ButtonSize = new Size(100, 40); properties.Style = FlyoutStyle.MessageBox; FlyoutDialog.Show(this, action, properties); } else { Card C = new Card(price - price * sale, this); C.Show(); simpleButton1.Enabled = false; dataGridView2.Rows.Clear(); dataGridView2.Refresh(); //this.Hide(); } }
private void simpleButton1_Click(object sender, EventArgs e) { List <int> f = new List <int>(); foreach (Film p in OneFilm.Buy) { f.Add(p.FId); } JObject r = new JObject( new JProperty("login", Register.client.CLogin), new JProperty("password", Register.client.CPassword), new JProperty("F", new JArray(f)), new JProperty("Cost", JPrice) ); string json = r.ToString(); Task.Run(async() => { response = await Main.client.PostAsJsonAsync("api/Client/Buy", json); }).Wait(); if (response.IsSuccessStatusCode) { string s = "Оплата: " + Price; OneFilm.Buy.Clear(); FlyoutAction action = new FlyoutAction() { Caption = "Спасибо за покупку!", Description = s }; FlyoutCommand command1 = new FlyoutCommand() { Text = "Close", Result = DialogResult.OK }; action.Commands.Add(command1); FlyoutProperties properties = new FlyoutProperties(); properties.ButtonSize = new Size(100, 40); properties.Style = FlyoutStyle.MessageBox; FlyoutDialog.Show(M, action, properties); this.Close(); } else { FlyoutAction action = new FlyoutAction() { Caption = response.StatusCode.ToString() }; FlyoutCommand command1 = new FlyoutCommand() { Text = "Close", Result = DialogResult.OK }; action.Commands.Add(command1); FlyoutProperties properties = new FlyoutProperties(); properties.ButtonSize = new Size(100, 40); properties.Style = FlyoutStyle.MessageBox; FlyoutDialog.Show(M, action, properties); } }
public void ShowMessage(string caption, string messageText) { FlyoutAction action = new FlyoutAction(); action.Caption = caption; action.Description = messageText; action.Commands.Add(FlyoutCommand.OK); FlyoutDialog.Show(this, action); }
private void MainForm_FormClosing(object sender, FormClosingEventArgs e) { DevExpress.XtraBars.Docking2010.Views.WindowsUI.FlyoutAction action = new DevExpress.XtraBars.Docking2010.Views.WindowsUI.FlyoutAction() { Caption = "友情提示", Description = "是否关闭此应用程序?" }; Predicate <DialogResult> predicate = canCloseFunc; DevExpress.XtraBars.Docking2010.Views.WindowsUI.FlyoutCommand command1 = new DevExpress.XtraBars.Docking2010.Views.WindowsUI.FlyoutCommand() { Text = "关闭", Result = System.Windows.Forms.DialogResult.Yes }; DevExpress.XtraBars.Docking2010.Views.WindowsUI.FlyoutCommand command2 = new DevExpress.XtraBars.Docking2010.Views.WindowsUI.FlyoutCommand() { Text = "取消", Result = System.Windows.Forms.DialogResult.No }; DevExpress.XtraBars.Docking2010.Views.WindowsUI.FlyoutCommand command3 = new DevExpress.XtraBars.Docking2010.Views.WindowsUI.FlyoutCommand() { Text = "重启", Result = System.Windows.Forms.DialogResult.Retry }; DevExpress.XtraBars.Docking2010.Views.WindowsUI.FlyoutCommand command4 = new DevExpress.XtraBars.Docking2010.Views.WindowsUI.FlyoutCommand() { Text = "切换用户", Result = System.Windows.Forms.DialogResult.Ignore }; action.Commands.Add(command1); action.Commands.Add(command2); action.Commands.Add(command3); action.Commands.Add(command4); FlyoutProperties properties = new FlyoutProperties(); properties.ButtonSize = new Size(100, 40); properties.Style = FlyoutStyle.MessageBox; properties.Appearance.TextOptions.HAlignment = DevExpress.Utils.HorzAlignment.Center; DialogResult result = FlyoutDialog.Show(this, action, properties, predicate); if (result == System.Windows.Forms.DialogResult.Yes) { this.close = true; e.Cancel = false; } else if (result == System.Windows.Forms.DialogResult.Retry) { System.Diagnostics.Process.Start(System.Reflection.Assembly.GetExecutingAssembly().Location, "restart"); System.Environment.Exit(0); //this.restart = true; //e.Cancel = false; } else if (result == System.Windows.Forms.DialogResult.Ignore) { this.changeuser = true; e.Cancel = false; } else { e.Cancel = true; } }
private void Adddevice_Click(object sender, EventArgs e) { FlyoutDialog dia = new FlyoutDialog(this.FindForm(), new AddDevice(this.SelectedItem)); if (dia.ShowDialog() == DialogResult.OK) { this.RefreshSelected(); } }
public DialogResult ShowFlyoutDialog(FlyoutStyle style = FlyoutStyle.MessageBox) { FlyoutProperties properties = new FlyoutProperties() { Style = style }; return(FlyoutDialog.Show(null, this, properties)); }
private void barListItem1_ListItemClick(object sender, DevExpress.XtraBars.ListItemClickEventArgs e) { #region Help畫面 FlyoutAction action = new FlyoutAction(); action.Description = "版權聲明 Copyright©\r\n著作權© 2020 新茂能源實業有限公司 版權所有。\r\nCopyright© 2020 SIN MAO Energy CO.,LTD All right reserved.\r\n \r\n工程版本:1.0.0"; action.Commands.Add(FlyoutCommand.OK); { FlyoutDialog.Show(FindForm(), action); }; #endregion }
private void Newtask_Click(object sender, EventArgs e) { FlyoutDialog dia = new FlyoutDialog(this.FindForm(), new NewTask()); if (dia.ShowDialog() == DialogResult.OK) { LoadTask();//刷新加载 } }
private void navButtonSettings_ElementClick(object sender, NavElementEventArgs e) { Modules.SettingsUC settingsUC = new Modules.SettingsUC(allowTransition); DialogResult result = FlyoutDialog.Show(this, settingsUC); if (result == System.Windows.Forms.DialogResult.OK) { allowTransition = settingsUC.checkEdit1.Checked; } }
/// <inheritdoc /> public void NotifyError(string errorTitle, string errorMessage) { var dialog = new FlyoutDialog(this, new FlyoutAction(MessageBoxButtons.OK, MessageBoxDefaultButton.Button1) { Caption = errorTitle, Description = errorMessage }); dialog.ShowDialog(); }
private void navButtonSettings_ElementClick(object sender, NavElementEventArgs e) { var settingsUC = new SettingsUC(allowTransition); var result = FlyoutDialog.Show(this, settingsUC); if (result == DialogResult.OK) { allowTransition = settingsUC.checkEdit1.Checked; } }
private void Setting_Click(object sender, EventArgs e) { FlyoutDialog dia = new FlyoutDialog(this.FindForm(), new DbServiceSetting()); if (dia.ShowDialog() == DialogResult.OK) { FlyoutDialog dia2 = new FlyoutDialog(this.FindForm(), new DownloadSelectName()); if (dia2.ShowDialog() == DialogResult.OK) { LoadDevice(); } } }
private void button1_Click(object sender, EventArgs e) { FlyoutAction action = new FlyoutAction(); action.Caption = "Confirm"; //action.Commands.Add(FlyoutCommand.OK); //action.Commands.Add(FlyoutCommand.Cancel); XtraUserControl1 c = new XtraUserControl1(); d = new FlyoutDialog(this, action, c); c.dialog = d; // MyFlyoutDialog dialog = new MyFlyoutDialog(this, action, new UserControl1()); //dialog. d.ShowDialog(); }
public bool DialogMessage(string caption, string messageText) { bool result; FlyoutAction action = new FlyoutAction(); action.Caption = caption; action.Description = messageText; action.Commands.Add(FlyoutCommand.Yes); action.Commands.Add(FlyoutCommand.No); result = (FlyoutDialog.Show(this, action) == System.Windows.Forms.DialogResult.Yes); return(result); }
private void simpleButton2_Click(object sender, EventArgs e) { Client tmp = new Client(); HttpResponseMessage response = new HttpResponseMessage(); tmp.CLogin = textBox1.Text; tmp.CPassword = textBox2.Text; Task.Run(async() => { response = await Main.client.PostAsJsonAsync <Client>("api/Client/Register", tmp); }).Wait(); if (!response.IsSuccessStatusCode) { FlyoutAction action = new FlyoutAction() { Caption = "Пользователь уже существует " }; FlyoutCommand command1 = new FlyoutCommand() { Text = "Close", Result = DialogResult.OK }; action.Commands.Add(command1); FlyoutProperties properties = new FlyoutProperties(); properties.ButtonSize = new Size(100, 40); properties.Style = FlyoutStyle.MessageBox; FlyoutDialog.Show(M, action, properties); } else if (response.IsSuccessStatusCode) { FlyoutAction action = new FlyoutAction() { Caption = "Пользователь успешно создан! " }; FlyoutCommand command1 = new FlyoutCommand() { Text = "Close", Result = DialogResult.OK }; action.Commands.Add(command1); FlyoutProperties properties = new FlyoutProperties(); properties.ButtonSize = new Size(100, 40); properties.Style = FlyoutStyle.MessageBox; FlyoutDialog.Show(M, action, properties); OneFilm.Buy.Clear(); client = tmp; this.Close(); } }
void IDocument.Show() { if (dialog == null) { dialog = new FlyoutDialog(Program.MainForm, view, Program.MainForm.MenuManager); dialog.Closed += dialog_Closed; using (dialog) dialog.ShowDialog(); dialog = null; } else { dialog.Activate(); } }
private void FlyoutPanel1_ButtonClick(object sender, FlyoutPanelButtonClickEventArgs e) { try { string caption = e.Button.Caption.ToString(); switch (caption) { case "작업이동": if (FlyoutDialog.Show(this.FindForm(), MyDevExpressFunctions.CreateCloseAction()) == System.Windows.Forms.DialogResult.Yes) { List <DashboardDTO> gridList = this.gridControl2.DataSource as List <DashboardDTO>; IList <DashboardDTO> resultList = new List <DashboardDTO>(); for (int x = 0; x < gridList.Count; x++) { // https://stackoverflow.com/questions/12762617/how-to-get-the-selected-row-values-of-devexpress-xtragrid if (gridList[x].CHK2.ToString() == "True") { DashboardDTO vo = gridList[x]; vo.EQP_ID = gridList[checkedGridView1].EQP_ID; vo.ORDER_COUNT = gridList[checkedGridView1].ORDER_COUNT; resultList.Add(vo); } } this.gridControl3.DataSource = resultList; } ; break; case "적용": //(sender as FlyoutPanel).HidePopup(); //this.panelComparence.Visible = false; this.flyoutPanel1.OptionsButtonPanel.ShowButtonPanel = false; (sender as FlyoutPanel).HidePopup(); this.panelComparence.Visible = false; this.flyoutPanel1.OptionsButtonPanel.ShowButtonPanel = false; this.gridControl3.Visible = false; this.gridControl3.DataSource = null; break; case "취소": // . . . (sender as FlyoutPanel).HidePopup(); this.panelComparence.Visible = false; this.flyoutPanel1.OptionsButtonPanel.ShowButtonPanel = false; this.gridControl3.Visible = false; this.gridControl3.DataSource = null; break; } } catch (Exception ex) { MessageBox.Show(ex.Message); } }
private void AddsimpleButton_Click(object sender, EventArgs e) { if (!FlyoutFlag) { FlyoutFlag = true; PanelControl panelControl = new PanelControl() { Size = new Size(465, 467) }; flyout = new FlyoutDialog(Form1, panelControl); flyout.Properties.Style = FlyoutStyle.Popup; ElectricSettingUserControl1 CaseSettingUserControl = new ElectricSettingUserControl1(this, Form1, Ewatch_MySqlMethod); panelControl.Controls.Add(CaseSettingUserControl); flyout.Show(); } }
private void AddsimpleButton_Click(object sender, EventArgs e) { if (!FlyoutFlag) { FlyoutFlag = true; PanelControl panelControl = new PanelControl() { Size = new Size(459, 178) }; flyout = new FlyoutDialog(Form1, panelControl); flyout.Properties.Style = FlyoutStyle.Popup; DeviceConfigUserControl1 deviceConfigUserControl1 = new DeviceConfigUserControl1(this, Form1, ChungHsin_MySqlMethod); panelControl.Controls.Add(deviceConfigUserControl1); flyout.Show(); } }
/// <summary> /// 設定按鈕觸發 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void SettingbarButtonItem_ItemClick(object sender, ItemClickEventArgs e) { if (!FlyoutFlag) { accordionControl1.Enabled = false; FlyoutFlag = true; PanelControl panelControl = new PanelControl() { Size = new Size(850, 572) }; flyout = new FlyoutDialog(this, panelControl); flyout.Properties.Style = FlyoutStyle.Popup; SettingUserControl settingUserControl = new SettingUserControl(MysqlMethod, this); settingUserControl.Parent = panelControl; flyout.Show(); } }
private void ShowDropDown(Control hostedControl, Color borderColor) { hostedControl.Width = Math.Max(hostedControl.Width, base.EditRegionSize.Width - 2); this._dropDownHolder = new DropDownHolder(hostedControl, base.ActionPanel, borderColor, base.ActionPanel.Font, this); if (base.ActionPanel.RightToLeft != RightToLeft.Yes) { Rectangle r = new Rectangle(Point.Empty, base.EditRegionSize); Size size = this._dropDownHolder.Size; Point point = base.ActionPanel.PointToScreen(base.EditRegionLocation); Rectangle workingArea = Screen.FromRectangle(base.ActionPanel.RectangleToScreen(r)).WorkingArea; size.Width = Math.Max(r.Width + 1, size.Width); point.X = Math.Min(workingArea.Right - size.Width, Math.Max(workingArea.X, (point.X + r.Right) - size.Width)); point.Y += r.Y; if (workingArea.Bottom < ((size.Height + point.Y) + r.Height)) { point.Y -= size.Height + 1; } else { point.Y += r.Height; } this._dropDownHolder.Location = point; } else { this._dropDownHolder.RightToLeft = base.ActionPanel.RightToLeft; Rectangle rectangle3 = new Rectangle(Point.Empty, base.EditRegionSize); Size size2 = this._dropDownHolder.Size; Point point2 = base.ActionPanel.PointToScreen(base.EditRegionLocation); Rectangle rectangle4 = Screen.FromRectangle(base.ActionPanel.RectangleToScreen(rectangle3)).WorkingArea; size2.Width = Math.Max(rectangle3.Width + 1, size2.Width); point2.X = Math.Min(rectangle4.Right - size2.Width, Math.Max(rectangle4.X, point2.X - rectangle3.Width)); point2.Y += rectangle3.Y; if (rectangle4.Bottom < ((size2.Height + point2.Y) + rectangle3.Height)) { point2.Y -= size2.Height + 1; } else { point2.Y += rectangle3.Height; } this._dropDownHolder.Location = point2; } base.ActionPanel.InMethodInvoke = true; base.ActionPanel.SetDropDownActive(true); try { this._dropDownHolder.ShowDropDown(this._button); } finally { this._button.ResetMouseStates(); base.ActionPanel.SetDropDownActive(false); base.ActionPanel.InMethodInvoke = false; } }