/// <summary> /// display a confirmation message /// </summary> /// <param name="message"></param> /// <returns></returns> public bool ShowVRConfirmationBox(string message) { if (IsTestMode) { return(true); } RoConfirmationBox msg = new RoConfirmationBox(message); msg.ShowDialog(); return(msg.MessageBoxResult); return(false); }
void btnDelete_Click(object sender, RoutedEventArgs e) { if (grdClients.SelectedItems.Count == 0) { RoAlertBox alertBox = new RoAlertBox(res.ResourceManager.GetString("PleaseSelectFromList")); alertBox.ShowDialog(); return; } RoConfirmationBox msg = new RoConfirmationBox(res.ResourceManager.GetString("AreYouSure")); var r = msg.ShowDialog(); if (msg.DialogResult == false) { return; } IList <int> cls = new List <int>(); foreach (var item in grdClients.SelectedItems) { cls.Add(((Client)item).Id); } PropertyBag["clients"] = cls.ToArray(); IDictionary prop = NavigatorFactory.Navigator.Get("Main", "Delete", PropertyBag); if (prop.Contains("flash")) { Flash flash = (Flash)prop["flash"]; ShowVRAlertBox(flash.Error); } clients.Clear(); var cl = (IQueryable <Client>)prop["clients"]; foreach (var client in cl) { clients.Add(client); } source.Source = null; source.Source = clients; }