static AlertManager() { EnforceImageSize = true; ImageWidth = 48; ImageHeight = 48; _alertWindowOpacityLevel = 1; _alertSync = new object(); _alertControl = new AlertControl { ShowPinButton = false }; _alertControl.AlertClick += new AlertClickEventHandler(mAlertControl_AlertClick); _alertControl.BeforeFormShow += new AlertFormEventHandler(mAlertControl_BeforeFormShow); _alertControl.FormClosing += new AlertFormClosingEventHandler(mAlertControl_FormClosing); //Set the default location of the alert windows based on the location of the taskbar. _alertControl.FormLocation = GetAlertFormLocation(); AlertFormLocation GetAlertFormLocation() { switch (TaskbarHelper.GetTaskbarLocation()) { case TaskbarLocation.Top: return(AlertFormLocation.TopRight); case TaskbarLocation.Left: return(AlertFormLocation.BottomLeft); case TaskbarLocation.Right: case TaskbarLocation.Bottom: default: return(AlertFormLocation.BottomRight); } } }
public OrderSelfEditingPage() { BuyerName = new TextInput(By.Name("to_name")); BuyerPhone = new TextInput(By.Name("to_phone")); BuyerPhoneAdd = new TextInput(By.Name("to_add_phone")); BuyerEmail = new TextInput(By.Name("to_email")); DeclaredPrice = new TextInput(By.Name("declared_price")); PaymentPrice = new TextInput(By.Name("payment_price")); GoodsDescription = new TextInput(By.Name("goods_description")); OrderComment = new TextInput(By.Name("order_comment")); IsCargoVolume = new CheckBox(By.Name("is_cargo_volume")); DeliveryDate = new TextInput(By.Name("delivery_date_new")); ItemsCount = new TextInput(By.Name("items_count")); Weight = new TextInput(By.Name("weight")); Width = new TextInput(By.Name("dimension_side1")); Height = new TextInput(By.Name("dimension_side2")); Length = new TextInput(By.Name("dimension_side3")); OrderNumber = new TextInput(By.Name("shop_refnum")); CanceledButton = new ButtonInput(By.CssSelector("div.form-actions > input.btn.btn-primary.btn-success")); SaveChangeButton = new ButtonInput(By.CssSelector("div.form-actions > input.btn.btn-primary.pull-right")); ActionErrorText = new ErrorActionTextControl(By.ClassName("form-horizontal")); ErrorText = new ErrorTextControl(By.ClassName("form-horizontal")); AletrError = new AlertControl(); }
protected virtual void ShowAlertInfo() { Form mainForm = (Form)Application.MainWindow.Template; AlertInfo info = new AlertInfo("Frohe Weihnachten! (Merry Christmas!)", DateTime.Now.ToString(), ImageLoader.Instance.GetImageInfo("Attention").Image); AlertControl.Show(mainForm, info); }
private static void ShowNotifications(IList notificationInfos, RibbonForm form) { DynamicDataServiceContext dbcontext = new DynamicDataServiceContext(); AlertControl alertControl = new AlertControl(); alertControl.AutoHeight = true; alertControl.AlertClick += (sender, e) => { NotificationData data = (NotificationData)e.Info.Tag; var notificationUser = dbcontext.GetOrNew("NotificationRecipient", data.NotificationRecipientId); notificationUser.AsDyanmic().NotificationStatus = "Readed"; notificationUser.AsDyanmic().ReadedOn = DateTime.Now; dbcontext.SaveChanges(); e.AlertForm.Hide(); }; AlertManage manager = new AlertManage(alertControl, form); foreach (var notificationInfo in notificationInfos) { var notificationUser = dbcontext.GetOrNew("NotificationRecipient", notificationInfo.AsDyanmic().NotificationRecipientId); notificationUser.NotificationStatus = "Opened"; manager.ShowAlert(notificationInfo); } dbcontext.SaveChanges(); }
public UserShopsPage() { ShopsCreate = new Link(By.LinkText("Создать новый магазин")); Table = new ShopsListControl(By.ClassName("table")); AletrDelete = new AlertControl(); }
private void _crawlerWorker_DoWork(object sender, DoWorkEventArgs e) { _logger.Trace("Start _crawlerWorker_DoWork."); VisaRegistrationCzech.Canceled = false; _visaRegistrations.Clear(); var taskList = new List <Task>(); for (var rowId = 0; rowId < gridView1.RowCount; rowId++) { /* * bbenetskyy 07.09.2016 * we need to create new value instead of using global rowId, * because it value will be calculate during execution */ var id = rowId; var visaReg = new VisaRegistrationCzech(); visaReg.ShowAlertMessagEventHandler += ShowAlert; taskList.Add(new Task(() => visaReg.StartWork(gridView1.GetDataRow(id) as VisaDataSet.ClientDataRow))); var alertControl = new AlertControl(); alertControl.AlertClick += _alertControl_AlertClick; alertControl.BeforeFormShow += _alertControl_BeforeFormShow; alertControl.FormLoad += _alertControl_FormLoad; _visaRegistrations.Add(alertControl, visaReg); } taskList.ForEach(task => task.Start()); taskList.ForEach(task => task.Wait()); _logger.Trace("End _crawlerWorker_DoWork."); }
public static void AyarCek() { #region Klasör Ayarları PersonelResim_Yol = @"\PersonelResim\"; if (!Directory.Exists(Sistem.Ayarlar.DosyaSunucusu + PersonelResim_Yol)) { Directory.CreateDirectory(Sistem.Ayarlar.DosyaSunucusu + PersonelResim_Yol); } AracResim_Yol = @"\AracResim\"; if (!Directory.Exists(Sistem.Ayarlar.DosyaSunucusu + AracResim_Yol)) { Directory.CreateDirectory(Sistem.Ayarlar.DosyaSunucusu + AracResim_Yol); } #endregion #region Ana Sitil AnaSitil = new StyleController(); //AnaSitil.AppearanceFocused.BackColor = ColorTranslator.FromHtml("#D7E6C8"); AnaSitil.AppearanceFocused.BackColor = ColorTranslator.FromHtml("#EAFFBF"); AnaSitil.AppearanceDisabled.BackColor = Color.White; #endregion AlertMesaj = new AlertControl(); AlertMesaj.AutoFormDelay = 2500; AlertMesaj.FormLocation = AlertFormLocation.BottomLeft; }
public void Notify(string caption, string message, Action action) { if (Form == null) { return; } var ctr = new AlertControl(); var info = new AlertInfo(caption, message); var handler = new AlertClickEventHandler( (o, e) => { if (action != null) { action.Invoke(); } } ); ctr.AlertClick += handler; ctr.FormClosing += (o, e) => { ctr.AlertClick -= handler; }; Form.Invoke((Action)(() => { ctr.Show(Form, info); })); }
//带参数的初始化 public void controlInit(SpreadsheetControl spreadsheetMain, Dictionary <String, SimpleButton> buttons, Dictionary <String, Label> labels, String path, Dictionary <String, PopupMenu> menus, BarManager barmanager, XtraForm form, AlertControl alert, XSheetUser user) { this.buttons = buttons; this.labels = labels; this.spreadsheetMain = spreadsheetMain; this.menus = menus; this.rightClickBarManager = barmanager; AlertUtil.setAlert(alert, form); this.user = user; this.form = form; this.alert = alert; //CELLCHANGE executer = new CommandExecuter(user); executer.Attach(this); executeState = "OK"; /*加载文档,后续根据不同设置配置,待修改TODO*/ try { DateTime date = new DateTime(); StreamWriter sw = new StreamWriter(@"ConsoleOutput.txt", true); date = DateTime.Now; sw.WriteLine("beforeLoadDoc:" + date.ToString()); if (path.Length > 0) { spreadsheetMain.Document.LoadDocument(path); } sw.Flush(); sw.Close(); } catch (Exception e) { MessageBox.Show(e.ToString()); spreadsheetMain.Dispose(); } }
public BasePage(IWebDriver driver) { elementControl = new ElementControl(); dropdownControl = new DropDownControl(); alertControl = new AlertControl(driver); windowControl = new WindowsControl(driver); }
private void machineItem_OnTransactionEvent(object sender, string EnrollNumber, string EmployeeCode, string EmployeeName, DateTime Date, DateTime Hour, int StateInOut, int MachineID) { string[] employeeName; this.gcList.Refresh(); this.gbList.AddNewRow(); this.gbList.SetFocusedRowCellValue(this.colEnrollNumber, EnrollNumber); this.gbList.SetFocusedRowCellValue(this.colEmployeeCode, EmployeeCode); this.gbList.SetFocusedRowCellValue(this.colEmployeeName, EmployeeName); this.gbList.SetFocusedRowCellValue(this.colStateInOut, StateInOut); this.gbList.SetFocusedRowCellValue(this.colMachineID, MachineID); this.gbList.SetFocusedRowCellValue(this.colHour, Hour); this.gbList.SetFocusedRowCellValue(this.colDate, Date); if (this.clsMachineOption.IsShowMessageInOut) { if (StateInOut != 0) { AlertControl alertControl = this.alertControl1; Form parent = base.Parent as Form; employeeName = new string[] { "<color=blue><b>", EmployeeName, " (", EnrollNumber.ToString(), ")</b></color> <color=blue> 'RA' </color> lúc ", Hour.ToString() }; alertControl.Show(parent, "THông Báo", string.Concat(employeeName)); } else { AlertControl alertControl1 = this.alertControl1; Form form = base.Parent as Form; employeeName = new string[] { "<color=blue><b>", EmployeeName, " (", EnrollNumber.ToString(), ")</b></color> <color=blue> 'VÀO' </color> lúc ", Hour.ToString() }; alertControl1.Show(form, "THông Báo", string.Concat(employeeName)); } } }
private static void ShowNotifications(IList notificationInfos, RibbonForm form) { IObjectSpace objectSpace = new ODataObjectSpace(); AlertControl alertControl = new AlertControl(); alertControl.AutoHeight = true; AlertButton setReaded = new AlertButton(new Bitmap(WinFormsResourceService.GetBitmap("notification"), new Size(16, 16))); setReaded.Style = AlertButtonStyle.CheckButton; setReaded.Down = false; setReaded.Hint = "Mark Readed"; setReaded.Name = "MarkReaded"; alertControl.Buttons.Add(setReaded); AlertButton deleteBtn = new AlertButton(new Bitmap(WinFormsResourceService.GetBitmap("overlay_delete"), new Size(16, 16))); deleteBtn.Style = AlertButtonStyle.CheckButton; deleteBtn.Down = false; deleteBtn.Hint = "Delete Notification"; deleteBtn.Name = "DelNotification"; alertControl.Buttons.Add(deleteBtn); alertControl.ButtonClick += new AlertButtonClickEventHandler(DelButtonClick); alertControl.BeforeFormShow += (sender, e) => { e.AlertForm.BackgroundImage = WinFormsResourceService.GetBitmap("nback"); e.AlertForm.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch; int l = 1; while (e.AlertForm.AlertInfo.Text.Length > 12 * l) { e.AlertForm.AlertInfo.Text = e.AlertForm.AlertInfo.Text.Insert(12 * l, " "); l++; } e.AlertForm.Size = new System.Drawing.Size(320, 300); }; alertControl.AlertClick += (sender, e) => { NotificationDTO data = (NotificationDTO)e.Info.Tag; MarkReaded(objectSpace, data); e.AlertForm.Tag = data; e.AlertForm.Disposed += AlertForm_Disposed; e.AlertForm.Close(); }; AlertManage manager = new AlertManage(alertControl, form); foreach (var notificationInfo in notificationInfos) { var pro = notificationInfo.GetType().GetProperty("NotificationRecipientId"); if (pro == null) { continue; } Guid notificationRecipientId = (Guid)pro.GetValue(notificationInfo, null); var notificationUser = (Katrin.Domain.Impl.NotificationRecipient)objectSpace.GetOrNew("NotificationRecipient", notificationRecipientId, null); notificationUser.NotificationStatus = "Opened"; manager.ShowAlert((NotificationDTO)notificationInfo); } objectSpace.SaveChanges(); }
public static void Error(string pCaption, string pText) { m_AlertDialogError = new AlertControl() { AutoFormDelay = 10000 }; m_AlertDialogError.BeforeFormShow += m_AlertDialogError_BeforeFormShow; m_AlertDialogError.Show(new Form(), pCaption, pText); }
public static void Warning(string pCaption, string pText) { m_AlertDialogWarning = new AlertControl() { AutoFormDelay = 10000 }; m_AlertDialogWarning.BeforeFormShow += m_AlertDialogWarning_BeforeFormShow; m_AlertDialogWarning.Show(new Form(), pCaption, pText); }
public static void Information(string pCaption, string pText) { m_AlertDialogInformation = new AlertControl() { AutoFormDelay = 3000 }; m_AlertDialogInformation.BeforeFormShow += m_AlertDialogInformation_BeforeFormShow; m_AlertDialogInformation.Show(new Form(), pCaption, pText); }
private void button3_Click(object sender, EventArgs e) { AlertControl alert = new AlertControl(); alert.ShowPinButton = false; //alert.ShowCloseButton = false; alert.Show(this, caption: "张三", text: "李四", hotTrackedText: ""); }
public static void CreateTextButton(this AlertControl alertControl, string text, string name) { AlertButton btn = new AlertButton(); btn.Name = name; btn.Image = GetBitmapWithText(alertControl, text); alertControl.Buttons.Add(btn); }
public static void MesajVer(string Mesaj, MesajTipi Tip, XtraForm OwnerForm, int KacSaniye = 3) { a = new AlertControl(); a.FormShowingEffect = AlertFormShowingEffect.SlideVertical; a.AppearanceText.TextOptions.WordWrap = DevExpress.Utils.WordWrap.Wrap; if (Tip == MesajTipi.Uyari) { a.AppearanceText.ForeColor = Color.Blue; } else if (Tip == MesajTipi.Hata) { a.AppearanceText.ForeColor = Color.Red; } a.ShowCloseButton = true; a.ShowPinButton = false; a.AllowHotTrack = false; Font fntBaslik = new Font("Arial", 8.3F, FontStyle.Bold | FontStyle.Underline); a.AppearanceCaption.Font = fntBaslik; Font fntText = new Font("Arial", 8, FontStyle.Regular); a.AppearanceText.Font = fntText; string Baslik = ""; Image img = null; if (Tip == MesajTipi.Bilgi) { img = Resources.Info_32x32; Baslik = "Bilgi"; } else if (Tip == MesajTipi.Hata) { img = Resources.Info_32x32; Baslik = "Hata"; } else if (Tip == MesajTipi.Onay) { img = Resources.Info_32x32; Baslik = "Onay"; } else if (Tip == MesajTipi.Uyari) { img = Resources.Info_32x32; Baslik = "Uyarı"; } AlertInfo info = new AlertInfo(Baslik, Mesaj); info.Image = img; tmr.Tick += tmr_Tick; tmr.Interval = KacSaniye * 1000; tmr.Enabled = true; a.Show(OwnerForm, info); }
public static void ShowAlert(string desc, string title, Form f) { DevExpress.XtraBars.Alerter.AlertControl alertControl1 = new AlertControl(); AlertInfo info = new AlertInfo(title, desc); alertControl1.AutoFormDelay = 300; alertControl1.FormShowingEffect = AlertFormShowingEffect.SlideHorizontal; alertControl1.Show(f, info); }
public xucBase() { base.SetStyle(ControlStyles.SupportsTransparentBackColor, true); this.alc = new AlertControl(); this.alc.AllowHtmlText = true; this.m_Status = Actions.None; this.m_CloseOrNew = CloseOrNew.None; this.m_Menu = new MenuButton(); }
private void InitializeComponent() { this.components = new Container(); this.alc = new AlertControl(this.components); base.SuspendLayout(); this.alc.AllowHtmlText = true; base.Name = "xucBase"; base.ResumeLayout(false); }
private void ShowNotify(string msg) { if (messagebox == null) { messagebox = new AlertControl(); messagebox.AutoFormDelay = 500; messagebox.ShowPinButton = false; } messagebox.Show(this, "信息", msg); }
/// <summary> /// 显示桌面提醒信息 /// </summary> /// <param name="alertController">提醒控件</param> /// <param name="form">所属窗口</param> /// <param name="img">图片</param> /// <param name="caption">标题</param> /// <param name="message">显示消息</param> private static void ShowAlter(AlertControl alertController, Form form, Image img, string caption, string message) { if (alertController.AlertFormList.Count > 0) { alertController.AlertFormList[0].Close(); alertController.AlertFormList.Clear(); } caption = caption ?? "操作提醒"; alertController.Show(form, caption, message, img); }
/// <summary> /// 使用AlertControl弹出显示提示内容 /// </summary> /// <param name="message">标题内容</param> /// <param name="description">正文内容</param> /// <param name="autoFormDelay">延迟</param> /// <param name="formLocation">显示位置</param> public void ShowAlertControl(string message = "操作成功", string description = "", Form owner = null, int autoFormDelay = 1000, AlertFormLocation formLocation = AlertFormLocation.TopRight) { message = JsonLanguage.Default.GetString(message); description = JsonLanguage.Default.GetString(description); AlertControl alert = new AlertControl(); alert.FormLocation = formLocation; alert.AutoFormDelay = autoFormDelay; alert.Show(owner == null ? this.ParentForm : owner, message, string.IsNullOrEmpty(description) ? message : description); }
public static void ShowAlertMessage(Form frmParent, string header, string message) { AlertControl alert = new AlertControl(); alert.ShowPinButton = true; alert.ShowCloseButton = true; alert.Show(frmParent, header, message, true); //alert.Show(frmParent, header, message, "", , msg) }
/// <summary> /// Thực hiện Alert /// </summary> public static void AlertInfo(this ContainerControl frm, string message) { // Tạo thông báo AlertInfo alertInfo = new AlertInfo("Thông báo", message); // Tạo control chứa thông báo AlertControl control = new AlertControl { FormLocation = AlertFormLocation.BottomRight }; control.Show(null, alertInfo); }
public static void ShowError(string mes) { using (var box = new AlertControl()) { var ai = new AlertInfo("Ошибка", mes, Resources.error); box.AutoFormDelay = 3000; box.AllowHotTrack = false; box.FormDisplaySpeed = AlertFormDisplaySpeed.Slow; box.FormLocation = AlertFormLocation.BottomRight; box.AutoHeight = true; box.Show(UtilsUI.CurMainForm, ai); } }
/// <summary> /// 处理抓到的消息 /// </summary> /// <param name="game"></param> /// <param name="msg"></param> private void handleMessage(Game game, string text) { // S14-2版本中不再显示此信息 那也放着吧 if (text.Contains("你的角色大师等级已经超过系统限制")) { return; } string realm = game.Realm; // 服务器 int server = game.Server; // 线路 string mapKey = realm + server; // 存入map的key // 第一次添加key if (!lastServerMsg.ContainsKey(mapKey)) { lastServerMsg.Add(mapKey, text); } // 先从map中获取value 看看和上一次是否重复 if (lastServerMsg[mapKey] == text) { return; } // 不是第一次 更新value lastServerMsg[mapKey] = text;//按照服务器+线路 存入新消息 string formatMsg = string.Format(LOG_FORMAT, DateTime.Now.ToString(), realm, server, text); this.Invoke(new ServerMessageDelegate(listboxAddMsg), this.listBoxControl1, formatMsg); if (MethodUtils.isBossSpawnMsg(text) && Settings.bBossRespawnAlert) { AlertControl alertControl1 = new AlertControl(); alertControl1.AutoFormDelay = Settings.PopupDelayTime * 1000 * 5; alertControl1.LookAndFeel.Style = DevExpress.LookAndFeel.LookAndFeelStyle.Skin; alertControl1.FormLocation = DevExpress.XtraBars.Alerter.AlertFormLocation.BottomRight; // alertControl1.Show(this, DateTime.Now.ToLongTimeString() + " > " + server + "线Boss刷新!", text); BeginInvoke(new MethodInvoker(delegate() { AlertInfo info = new AlertInfo(DateTime.Now.ToLongTimeString() + " > " + server + "线Boss刷新!", text); alertControl1.Show(this, info); })); } if (MethodUtils.isBossSpawnMsg(text) && Settings.bBoosRespawnRecord) { this.Invoke(new ServerMessageDelegate(listboxAddMsg), this.listBoxControl2, string.Format(LOG_FORMAT, DateTime.Now.ToString(), realm, server, text)); } if (MethodUtils.isBossDieMsg(text) && Settings.bBossDieRecord) { this.Invoke(new ServerMessageDelegate(listboxAddMsg), this.listBoxControl2, string.Format(LOG_FORMAT, DateTime.Now.ToString(), realm, server, text)); } }
public static void Error(string pCaption, string pText, int followUpId) { m_AlertDialogError = new AlertControl() { AutoFormDelay = 10000 }; AlertButton btnDiagnose = new AlertButton(Common.Resources.magnifying_glass); btnDiagnose.Hint = "Diagnose audio to see more details"; m_AlertDialogError.Buttons.Add(btnDiagnose); m_AlertDialogError.ButtonClick += new AlertButtonClickEventHandler((sender, e) => AlertButton_Click(sender, e, followUpId)); m_AlertDialogError.BeforeFormShow += m_AlertDialogError_BeforeFormShow; m_AlertDialogError.Show(new Form(), pCaption, pText); }
private void t_aw_Tick(object sender, EventArgs e) { t_aw.Stop(); var chamados = new FChamado_Busca().Buscar_Chamados(); var qtd_abertos = chamados.Where(a => a.ST_CHAMADO == "A").Count(); var qtd_emAtendimento = chamados.Where(a => a.ST_CHAMADO != "A" && a.ST_CHAMADO != "F").Count(); var mensagem = ""; var primeiraLinha = ""; var segundaLinha = ""; if (qtd_abertos > 0) { primeiraLinha = String.Format("Existe{2} {0} chamado{1} não atendido{1}!", qtd_abertos, (qtd_abertos > 1 ? "s" : ""), (qtd_abertos > 0 ? "m" : "")); } if (qtd_emAtendimento > 0) { segundaLinha = String.Format("Você tem {0} chamado{1} ainda em atendimento!", qtd_emAtendimento, (qtd_emAtendimento > 1 ? "s" : "")); } if (primeiraLinha.Length > 0) { mensagem = primeiraLinha; } if (segundaLinha.Length > 0) { mensagem += (mensagem.Length > 0 ? "\n" : "") + segundaLinha; } var ac = new AlertControl() { AutoFormDelay = 2000, ShowPinButton = false, AutoHeight = true, AllowHtmlText = true }; if (mensagem.Length > 0) { ac.Show(this, "<b>#SGC informa:</b>", mensagem); } t_aw.Start(); }
static Image GetBitmapWithText(AlertControl alertControl, string text) { Bitmap image = new Bitmap(1, 1); Graphics g = Graphics.FromImage(image); Size size = g.MeasureString(text, alertControl.AppearanceText.GetFont()).ToSize(); size.Width++; size.Height++; image = new Bitmap(size.Width, size.Height); using (GraphicsCache graphicsCache = new GraphicsCache(Graphics.FromImage(image))) { Rectangle bounds = new Rectangle(new Point(0, 0), size); alertControl.AppearanceText.FillRectangle(graphicsCache, bounds); alertControl.AppearanceText.DrawString(graphicsCache, text, bounds); } return(image); }
private void ShowNotify(string msg) { if (messagebox == null) { messagebox = new AlertControl(); messagebox.AutoFormDelay = 2000; // messagebox.AllowHtmlText = true; messagebox.ShowPinButton = false; AlertButton btn1 = new AlertButton(Resource1.打开文件);// global::DXApplication1.Properties.Resources.open_16x16;); btn1.Hint = "打开文件"; btn1.Name = "buttonOpen"; messagebox.Buttons.Add(btn1); messagebox.ButtonClick += Messagebox_ButtonClick; } messagebox.Show(this.ParentForm, "信息", msg); }
private void ShowItemShortNotification() { //alertControl1.Show(this, "Warning", "Test Data", FIL.Properties.Resources.warning); ProductManager manageProduct = new ProductManager(); DataTable dtShortItems = manageProduct.GetShortItemList(); foreach (DataRow dr in dtShortItems.Rows) { AlertControl crtl = new AlertControl(); crtl.Show(this, "Warning", dr["ProductName"].ToString() + " \n is Out of Stock", FIL.Properties.Resources.warning); Application.DoEvents(); } WarehouseManager manageWarehouse = new WarehouseManager(); StoreId = manageWarehouse.GetWarehouseStoreId(); }
public static void HabarnomaShow(string mes, Image img, Action <int> res) { using (var box = new AlertControl()) { box.AutoFormDelay = 9000; box.AllowHotTrack = false; box.FormDisplaySpeed = AlertFormDisplaySpeed.Slow; box.FormLocation = AlertFormLocation.BottomRight; box.AutoHeight = true; box.AllowHotTrack = true; box.ShowCloseButton = false; box.AlertClick += (s, ex) => { res.Invoke(0); }; box.Show(UtilsUI.CurMainForm, "Информация", mes, img); } }
public static void Show(string mes, string caption = "Информация") { try { using (var box = new AlertControl()) { var ai = new AlertInfo(caption, mes, Resources.Save); box.AutoFormDelay = 3000; box.AllowHotTrack = false; box.FormDisplaySpeed = AlertFormDisplaySpeed.Moderate; box.FormLocation = AlertFormLocation.BottomRight; box.AutoHeight = true; box.Show(UtilsUI.CurMainForm, ai); } } catch (Exception) { } }
public object close(object param) { alert.Dispose(); alert = null; return "NOOP"; }
public static void Alert(AlertControl ctrl, XtraForm frm, string title, string message) { AlertInfo msg = new AlertInfo(title, message); ctrl.AutoFormDelay = 2000; ctrl.Show(frm, msg); }
private void init(Form formMain, int MinuteForDelaying) { //init toolTipStyleController toolTipStyleController = new ToolTipController(); toolTipStyleController.Active = true; toolTipStyleController.AllowHtmlText = true; toolTipStyleController.Rounded = true; toolTipStyleController.ShowBeak = true; toolTipStyleController.ToolTipType = ToolTipType.SuperTip; //controlBroadCast controlBroadCast = new AlertControl(); controlBroadCast.ButtonClick += new AlertButtonClickEventHandler(controlBroadCast_ButtonClick); btnDelete = new AlertButton(HelpImage.getImage2020("stop.png")); btnDelete.Hint = "Không xem lại thông báo lần sau"; btnDelete.Name = "btnDelete"; controlBroadCast.Buttons.Add(btnDelete); this.formMain = formMain; this.delay = MinuteForDelaying * 60000; this.timer = new Timer(); timer.Interval = 2000; timer.Tick += new EventHandler(timer_Tick); }
public override void Initialize(IComponent component) { base.Initialize(component); vm = (AlertControl)component; }
public object open(object param) { alert = new AlertControl(); return "NOOP"; }
private void fileSaveItem1_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e) { AlertControl alert = new AlertControl(); }