public static DialogResult ShowFlyoutMessage(WindowsUIView view, Flyout flyoutMessage, String caption, String description, params FlyoutCommand[] commands) { FlyoutAction messageAction = new FlyoutAction() { Caption = caption, Description = description }; flyoutMessage.Properties.AllowHtmlDraw = DefaultBoolean.True; flyoutMessage.Properties.AppearanceDescription.TextOptions.WordWrap = WordWrap.Wrap; flyoutMessage.Properties.AppearanceDescription.TextOptions.Trimming = Trimming.EllipsisWord; messageAction.Commands.Clear(); if (commands.Length == 0) { messageAction.Commands.Add(FlyoutCommand.OK); } else { foreach (FlyoutCommand command in commands) { messageAction.Commands.Add(command); } } flyoutMessage.Action = messageAction; return view.ShowFlyoutDialog(flyoutMessage); }
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(); } }
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); }
public KZFlyoutDialog(IUnityContainer container) { KZHelper = container.Resolve<IKZHelper>(); action = new FlyoutAction(); CommandYes = new FlyoutCommand {Text = "យល់ព្រម", Result = DialogResult.Yes}; CommandNo = new FlyoutCommand {Text = "មិនយល់ព្រម", Result = DialogResult.No}; action.Commands.Add(CommandYes); action.Commands.Add(CommandNo); properties = new FlyoutProperties(); //properties.Appearance.BackColor = Color.Blue; //properties.Appearance.Options.UseBackColor = true; properties.Appearance.Font = KZHelper.KZFonts.ContentFont; properties.Appearance.Options.UseFont = true; properties.AppearanceCaption.Font = KZHelper.KZFonts.HeaderFont; properties.AppearanceCaption.Options.UseFont = true; properties.AppearanceButtons.Font = KZHelper.KZFonts.ContentFont; properties.AppearanceButtons.Options.UseFont = true; properties.AppearanceDescription.Font = KZHelper.KZFonts.ContentFont; properties.AppearanceDescription.Options.UseFont = true; properties.ButtonSize = new Size(150, 40); properties.Style = FlyoutStyle.MessageBox; }
public static DialogResult ShowForm(FlyoutAction actions, Control UserControleToShow) { OpenFormsDialog customFlyout = new OpenFormsDialog(Program.menuDesign, actions, UserControleToShow); customFlyout.FormClosing += delegate { UserControleToShow.Dispose(); }; return(customFlyout.ShowDialog()); }
private void btnCreateLogin_Click(object sender, EventArgs e) { if (int.Parse(txtEmpDelStatus.Text) == 1) { XtraMessageBox.Show(Cons.ErrorSwitchEmployeeAlready, Cons.CaptionError, MessageBoxButtons.OK, MessageBoxIcon.Error); return; } int employeeId = int.Parse(txtEmpId.EditValue.ToString()); using (SqlConnection connection = new SqlConnection(UtilDB.ConnectionString)) { connection.Open(); using (SqlCommand command = new SqlCommand(MyConfig.SpKiemTraNVCoTaiKhoan, connection)) { command.CommandType = CommandType.StoredProcedure; command.Parameters.AddWithValue("@manv", employeeId); try { command.ExecuteNonQuery(); FlyoutAction flyoutAction = new FlyoutAction() { Caption = Cons.CaptionCreateLogin, }; CustomFlyoutDialog.ShowForm(this, flyoutAction, new frmRegister(employeeId)); } catch (Exception ex) { if (ex is SqlException exAsSqlEx && exAsSqlEx.Number == MyConfig.ErrorMsgNumEmployeeHaveLogin) { XtraMessageBox.Show(exAsSqlEx.Message, Cons.CaptionError, MessageBoxButtons.OK, MessageBoxIcon.Error); }
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 void ShowSuccessMessage(string message) { FlyoutAction action = new FlyoutAction() { Caption = "Success!", Description = message }; FlyoutCommand command1 = new FlyoutCommand() { Text = "OK", Result = System.Windows.Forms.DialogResult.Yes }; action.Commands.Add(command1); FlyoutProperties properties = new FlyoutProperties(); properties.ButtonSize = new Size(100, 40); properties.Style = FlyoutStyle.MessageBox; properties.Appearance.BackColor = Color.Green; properties.Appearance.ForeColor = Color.White; DevExpress.XtraBars.Docking2010.Customization.FlyoutDialog.Show(this, action, properties); if (DevExpress.XtraBars.Docking2010.Customization.FlyoutDialog.Show(this, action, properties) == DialogResult.Yes) { this.Close(); } }
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(); } }
protected override void OnClosing(System.ComponentModel.CancelEventArgs e) { base.OnClosing(e); bool restoreTimerState = false; ucSettings ucSettingsControl = null; if (page.Document != null && page.Document.Control is ucSettings) { ucSettingsControl = page.Document.Control as ucSettings; restoreTimerState = ucSettingsControl.ActivationTimer.Enabled; } FlyoutAction closeAction = CreateCloseAction(); flyout.Action = closeAction; if (restoreTimerState) { ucSettingsControl.ActivationTimer.Enabled = false; } if (windowsUIView.ShowFlyoutDialog(flyout) != System.Windows.Forms.DialogResult.Yes) { e.Cancel = true; if (restoreTimerState) { ucSettingsControl.ActivationTimer.Enabled = true; } } }
public KZFlyoutDialog(IUnityContainer container) { KZHelper = container.Resolve <IKZHelper>(); action = new FlyoutAction(); CommandYes = new FlyoutCommand { Text = "យល់ព្រម", Result = DialogResult.Yes }; CommandNo = new FlyoutCommand { Text = "មិនយល់ព្រម", Result = DialogResult.No }; action.Commands.Add(CommandYes); action.Commands.Add(CommandNo); properties = new FlyoutProperties(); //properties.Appearance.BackColor = Color.Blue; //properties.Appearance.Options.UseBackColor = true; properties.Appearance.Font = KZHelper.KZFonts.ContentFont; properties.Appearance.Options.UseFont = true; properties.AppearanceCaption.Font = KZHelper.KZFonts.HeaderFont; properties.AppearanceCaption.Options.UseFont = true; properties.AppearanceButtons.Font = KZHelper.KZFonts.ContentFont; properties.AppearanceButtons.Options.UseFont = true; properties.AppearanceDescription.Font = KZHelper.KZFonts.ContentFont; properties.AppearanceDescription.Options.UseFont = true; properties.ButtonSize = new Size(150, 40); properties.Style = FlyoutStyle.MessageBox; }
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); } }
FlyoutAction CreateLoginAction() { FlyoutAction loginAction = new FlyoutAction(); loginAction.Caption = Text + " LOGIN"; loginAction.Commands.Add(FlyoutCommand.OK); return(loginAction); }
public CustomFlyoutDialog(Form owner, FlyoutAction actions, Control userControlToShowControl) : base(owner, actions) { this.Properties.HeaderOffset = 0; this.Properties.Alignment = System.Drawing.ContentAlignment.MiddleCenter; this.Properties.Style = FlyoutStyle.Popup; this.FlyoutControl = userControlToShowControl; }
public OpenFormsDialog(Form owner, FlyoutAction actions, Control UserControleToShow) : base(owner, actions) { this.Properties.HeaderOffset = 0; Properties.Alignment = System.Drawing.ContentAlignment.MiddleCenter; Properties.Style = FlyoutStyle.Popup; FlyoutControl = UserControleToShow; }
public static void WindowsMessage(string title, string message, XtraForm frm) { FlyoutAction action = new FlyoutAction(); action.Caption = title; action.Description = message; action.Commands.Add(FlyoutCommand.OK); FlyoutDialog.Show(frm, action); }
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 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 }
public FlyoutAction createCloseAction(Flyout flyout) { FlyoutAction closeaction = new FlyoutAction(); closeaction.Description = "Cerrar esta aplicacion ?"; closeaction.Commands.Add(FlyoutCommand.Yes); closeaction.Commands.Add(FlyoutCommand.No); return(closeaction); }
public override bool Equals(object obj) { FlyoutAction other = obj as FlyoutAction; if (other == null) { return(false); } return(this.Action == other.Action); }
FlyoutAction CreateCloseAction() { FlyoutAction closeAction = new FlyoutAction(); closeAction.Caption = Text; closeAction.Description = "Do you really want to close the demo?"; closeAction.Commands.Add(FlyoutCommand.Yes); closeAction.Commands.Add(FlyoutCommand.No); return(closeAction); }
private void barButtonItem19_ItemClick(object sender, ItemClickEventArgs e) { FlyoutAction action = new FlyoutAction(); action.Caption = "المجموعات"; MyFlyoutDialog dialog = new MyFlyoutDialog(this, action, new GroupForms()); dialog.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowOnly; dialog.StartPosition = FormStartPosition.CenterScreen; dialog.Width = 200; dialog.ShowDialog(); }
public static FlyoutAction CreateCloseAction() { // https://www.devexpress.com/Support/Center/Question/Details/T140795/how-to-show-modal-flyout-with-usercontrol-via-showflyoutdialog-method FlyoutAction closeAction = new FlyoutAction(); closeAction.Caption = "[작업이동]"; closeAction.Image = DevExpress.Images.ImageResourceCache.Default.GetImage("office2013/actions/apply_32x32.png"); closeAction.Description = "정말로 작업이동을 하시겠습니까?"; closeAction.Commands.Add(FlyoutCommand.Yes); closeAction.Commands.Add(FlyoutCommand.No); return(closeAction); }
private void simpleButton1_Click(object sender, EventArgs e) { FlyoutAction action = new FlyoutAction(); action.Caption = "الحسابات"; MainAr c = new MainAr(); MyFlyoutDialog dialog = new MyFlyoutDialog(this.ParentForm, action, new SelectAccounts()); dialog.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowOnly; dialog.StartPosition = FormStartPosition.CenterScreen; dialog.Width = 200; dialog.ShowDialog(); }
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(); } }
private void mainForm_FormClosing(object sender, FormClosingEventArgs e) { var action = new FlyoutAction { Caption = "Confirm", Description = "Close the application?" }; Predicate<DialogResult> predicate = canCloseFunc; var command1 = new FlyoutCommand { Text = "Close", Result = DialogResult.Yes }; var command2 = new FlyoutCommand { Text = "Cancel", Result = DialogResult.No }; action.Commands.Add(command1); action.Commands.Add(command2); var properties = new FlyoutProperties { Style = FlyoutStyle.MessageBox, Alignment = ContentAlignment.MiddleCenter }; e.Cancel = FlyoutDialog.Show(this, action, properties, predicate) != DialogResult.Yes; }
private void btnRegister_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e) { if (!UtilDB.CurrentGroup.Equals(MyConfig.UserGroupName)) { FlyoutAction flyoutAction = new FlyoutAction() { Caption = Cons.CaptionCreateLogin, }; CustomFlyoutDialog.ShowForm(this, flyoutAction, new frmRegister()); } else { XtraMessageBox.Show(Cons.WarningUserCreateTK, Cons.CaptionWarning, MessageBoxButtons.OK, MessageBoxIcon.Warning); } }
/// <summary> /// 確認程式是否重複啟動 /// </summary> public bool CHeckedSoftware() { string ProcessName = Process.GetCurrentProcess().ProcessName; Process[] p = Process.GetProcessesByName(ProcessName); if (p.Length > 1) { FlyoutAction action = new FlyoutAction(); action.Caption = "程式重複啟動"; action.Description = "程式已開啟"; action.Commands.Add(FlyoutCommand.OK); FlyoutDialog.Show(Form1, action); return(true); } else { return(false); } }
private void groupBtn_Click(object sender, EventArgs e) { FlyoutAction action = new FlyoutAction(); action.Caption = "المجموعات"; MyFlyoutDialog dialog = new MyFlyoutDialog(this.ParentForm, action, new GroupForms()); dialog.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowOnly; dialog.StartPosition = FormStartPosition.CenterScreen; dialog.Width = 200; DialogResult f = dialog.ShowDialog(); if (f == DialogResult.Cancel) { dbContextItems = new Purchase.AccountingSystem(); bindingSource3.DataSource = dbContextItems.ItemGroups.ToList(); ItemGroup.Refresh(); } }
private void Export() { var exportAction = new FlyoutAction() { Caption = "Экспорт" }; var exportFlyout = this.View.ContentContainers.FindFirst(t => { var flyout = t as Flyout; if (flyout != null && flyout.Document != null) return "ExportReport".Equals(flyout.Document.ControlName); return false; }) as Flyout; if (exportFlyout != null) { exportFlyout.Action = exportAction; View.ActivateContainer(exportFlyout); } }
private void Close_Form() { try { FlyoutAction action = new FlyoutAction() { Caption = "ยืนยัน", Description = "คุณต้องการปิดโปรแกรม ใช่หรือไม่?" }; Predicate <DialogResult> predicate = SQLData.CloseFunc; FlyoutCommand command1 = new FlyoutCommand() { Text = "ใช่", Result = DialogResult.Yes }; FlyoutCommand command2 = new FlyoutCommand() { Text = "ไม่ใช่", Result = DialogResult.No }; action.Commands.Add(command1); action.Commands.Add(command2); FlyoutProperties properties = new FlyoutProperties { ButtonSize = new Size(100, 40), // properties.Appearance.BackColor = Color.WhiteSmoke Style = FlyoutStyle.Popup }; if (FlyoutDialog.Show(null, action, properties, predicate) == DialogResult.Yes) { Application.ExitThread(); Close(); //System.Environment.Exit(0); } else { return; } } catch (Exception ex) { XtraMessageBox.Show(ex.Message); } }
private void Alert() { try { FlyoutAction action = new FlyoutAction() { Caption = "คำเตือน!", Description = "คุณระบุชื่อผู้ใช้งาน (username) หรือรหัสผ่าน (password) ไม่ถูกต้อง" }; Predicate <DialogResult> predicate = SQLData.CloseFunc; FlyoutCommand command1 = new FlyoutCommand() { Text = "OK", Result = DialogResult.OK }; action.Commands.Add(command1); FlyoutProperties properties = new FlyoutProperties { ButtonSize = new Size(100, 40) }; properties.AppearanceButtons.BackColor = Color.White; properties.AppearanceButtons.ForeColor = Color.Blue; properties.Appearance.BackColor = Color.Orange; properties.Appearance.ForeColor = Color.White; properties.Appearance.BorderColor = Color.Red; properties.Style = FlyoutStyle.Popup; if (FlyoutDialog.Show(null, action, properties, predicate) == DialogResult.OK) { return; } } catch (Exception ex) { XtraMessageBox.Show(ex.Message); } }
public void AlertAuthorized(string caption, string alert) { try { FlyoutAction action = new FlyoutAction() { Caption = caption, Description = alert }; Predicate <DialogResult> predicate = SQLData.CloseFunc; FlyoutCommand command1 = new FlyoutCommand() { Text = "OK", Result = DialogResult.OK }; action.Commands.Add(command1); FlyoutProperties properties = new FlyoutProperties { ButtonSize = new Size(100, 40) }; properties.AppearanceButtons.BackColor = Color.White; properties.AppearanceButtons.ForeColor = Color.Blue; properties.Appearance.BackColor = Color.DarkSeaGreen; properties.Appearance.ForeColor = Color.White; properties.Appearance.BorderColor = Color.Gray; properties.Style = FlyoutStyle.Popup; if (FlyoutDialog.Show(null, action, properties, predicate) == DialogResult.OK) { return; } } catch (Exception ex) { XtraMessageBox.Show(ex.Message); } }
/// <summary> /// Confirmation Dialog /// </summary> /// <param name="container"></param> public KZFlyoutDialog(IUnityContainer container) { KZHelper = container.Resolve<IKZHelper>(); action = new FlyoutAction(); CommandYes = new FlyoutCommand {Text = Resource.translate.OK, Result = DialogResult.Yes}; CommandNo = new FlyoutCommand {Text = Resource.translate.No, Result = DialogResult.No}; action.Commands.Add(CommandYes); action.Commands.Add(CommandNo); properties = new FlyoutProperties(); //properties.Appearance.BackColor = Color.Blue; //properties.Appearance.Options.UseBackColor = true; KZHelper.KZAppearanceSetter.SetAppearance(properties.Appearance, KZHelper.KZFonts.ContentFont); KZHelper.KZAppearanceSetter.SetAppearance(properties.AppearanceCaption, KZHelper.KZFonts.HeaderFont); KZHelper.KZAppearanceSetter.SetAppearance(properties.AppearanceButtons, KZHelper.KZFonts.ButtonFont); KZHelper.KZAppearanceSetter.SetAppearance(properties.AppearanceDescription, KZHelper.KZFonts.ContentFont); properties.ButtonSize = new Size(150, 40); properties.Style = FlyoutStyle.MessageBox; }
private void mainForm_Shown(object sender, EventArgs e) { xtraNavPane.Home = tileContainerMain; var loginAction = new FlyoutAction() { Caption = "Вход", Commands = { FlyoutCommand.OK, FlyoutCommand.Cancel } }; flyoutLogin.Action = loginAction; windowsUIViewMain.ActivateContainer(flyoutLogin); }
private void mainForm_FormClosing(object sender, FormClosingEventArgs e) { var closeAppAction = new FlyoutAction() { Caption = "Выход", Description = "Выйти из приложения?" }; flyoutQuit.Action = closeAppAction; var res = windowsUIViewMain.ShowFlyoutDialog(flyoutQuit); if (res == DialogResult.No) { e.Cancel = true; } else { if (Authentication.Credentials != null) DbLogger.LogLogoutAsync(Authentication.Credentials); } }
void MainMenu_EndItemDragging(object sender, TileItemDragEventArgs e) { FlyoutAction action = new FlyoutAction(); action.Caption = "Confirm"; //action.Commands.Add(FlyoutCommand.OK); //action.Commands.Add(FlyoutCommand.Cancel); MyFlyoutDialog dialog = new MyFlyoutDialog(this, action, new UserControl1()); dialog.ShowDialog(); e.Cancel = String.IsNullOrEmpty(e.TargetGroup.Text); }
public MyFlyoutDialog(Form owner, FlyoutAction action, Control control) : base(owner, action) { FlyoutControl = control; }
public Form1() { InitializeComponent(); if(Components == null) Components = new System.ComponentModel.Container(); this.SuspendLayout(); try { fDocumentManager = new DocumentManager(Components); ((System.ComponentModel.ISupportInitialize)(DocumentManager)).BeginInit(); try { DocumentManager.ContainerControl = this; fMainView = new WindowsUIView(Components); ((System.ComponentModel.ISupportInitialize)(MainView)).BeginInit(); try { MainView.SplashScreenProperties.ShowCaption = true; MainView.SplashScreenProperties.ShowLoadingDescription = true; MainView.SplashScreenProperties.ShowImage = true; MainView.TileContainerProperties.HeaderOffset = -10; MainView.TileContainerProperties.Margin = new Padding(25); MainView.TileContainerProperties.ItemSize = 160; MainView.TileContainerProperties.ItemPadding = new Padding(8); MainView.PageProperties.HeaderOffset = -10; MainView.PageProperties.Margin = new System.Windows.Forms.Padding(0, -15, 0, 0); MainView.AddTileWhenCreatingDocument = DevExpress.Utils.DefaultBoolean.False; MainView.AllowCaptionDragMove = DevExpress.Utils.DefaultBoolean.True; DocumentManager.ViewCollection.Add(MainView); DocumentManager.View = MainView; fMainMenu = new TileContainer(Components); ((System.ComponentModel.ISupportInitialize)(MainMenu)).BeginInit(); try { MainMenu.Properties.AllowDrag = DevExpress.Utils.DefaultBoolean.True; MainMenu.Properties.AllowDragTilesBetweenGroups = DevExpress.Utils.DefaultBoolean.True; MainMenu.Properties.AllowHtmlDraw = DevExpress.Utils.DefaultBoolean.True; MainMenu.Properties.AllowGroupHighlighting = DevExpress.Utils.DefaultBoolean.False; MainMenu.Properties.AllowItemHover = DevExpress.Utils.DefaultBoolean.False; MainMenu.Properties.AllowSelectedItem = DevExpress.Utils.DefaultBoolean.False; MainMenu.Properties.ShowGroupText = DevExpress.Utils.DefaultBoolean.True; MainMenu.Properties.HorizontalContentAlignment = DevExpress.Utils.HorzAlignment.Near; MainMenu.Properties.VerticalContentAlignment = DevExpress.Utils.VertAlignment.Top; MainMenu.EndItemDragging += MainMenu_EndItemDragging; MainView.ContentContainers.Add(MainMenu); { Tile Tile = new Tile(); Tile.Tag = null; Tile.Padding = new Padding(5, 5, 5, 5); Tile.Properties.ItemSize = TileItemSize.Small; Tile.Properties.AllowCheck = DevExpress.Utils.DefaultBoolean.False; { TileItemElement Element = new TileItemElement(); Element.Text = @"Test"; Element.TextAlignment = TileItemContentAlignment.BottomCenter; Tile.Elements.Add(Element); } MainView.Tiles.Add(Tile); MainMenu.Items.Add(Tile); } } finally { ((System.ComponentModel.ISupportInitialize)(MainMenu)).EndInit(); } { Flyout Flyout = new Flyout(); FlyoutAction FlyoutAction = new FlyoutAction(); FlyoutAction.Caption = @"Enter New Group Name"; FlyoutAction.Commands.Add(FlyoutCommand.OK); FlyoutAction.Commands.Add(FlyoutCommand.Cancel); Flyout.Action = FlyoutAction; fQueryGroupNameFlyout = Flyout; MainView.ContentContainers.Add(Flyout); } MainView.ActivateContainer(MainMenu); } finally { ((System.ComponentModel.ISupportInitialize)(MainView)).EndInit(); } } finally { ((System.ComponentModel.ISupportInitialize)(DocumentManager)).EndInit(); } QueryGroupNameFlyout.Document = MainView.AddDocument(new TextEdit()) as Document; } finally { this.ResumeLayout(false); this.PerformLayout(); } }