private void layoutView1_FieldValueClick(object sender, DevExpress.XtraGrid.Views.Layout.Events.FieldValueClickEventArgs e) { if (e.Column.ToString() == "Plugin") { if (Properties.Settings.Default.HaloOnlineFolder != "") { if (e.Column.ToString() != null) { string key = e.FieldValue.ToString(); if (ProgramGlobals._Plugins.ContainsKey(key)) { DarkPlugin plugin = ProgramGlobals._Plugins[key]; RunDarkPlugin(plugin); } } } else { DevExpress.XtraEditors.XtraMessageBox.Show("Please first setup your Halo Online folder in `File -> Settings`."); ConsoleLog.WriteLine("Please first setup your Halo Online folder in `File -> Settings`."); } } else if (e.Column.ToString() == "URL") { Process.Start(e.FieldValue.ToString(), ""); } }
private async void layoutView1_FieldValueClick(object sender, DevExpress.XtraGrid.Views.Layout.Events.FieldValueClickEventArgs e) { string Readstatus = (layoutView1.GetRowCellValue(layoutView1.FocusedRowHandle, "Read_Staus")).ToString(); int messageid = Convert.ToInt32(layoutView1.GetRowCellValue(layoutView1.FocusedRowHandle, "Message_Id")); string message = (layoutView1.GetRowCellValue(layoutView1.FocusedRowHandle, "Message")).ToString(); messageform form = new messageform(message); form.ShowDialog(); if (Readstatus == "UnRead") { try { SplashScreenManager.ShowForm(this, typeof(WaitForm1), true, true, false); var dictionary = new Dictionary <string, object>() { { "@Trans", "Insert" }, { "@Message_Id", messageid }, { "@User_Id", User_Id } }; var data = new StringContent(JsonConvert.SerializeObject(dictionary), Encoding.UTF8, "application/json"); using (var httpClient = new HttpClient()) { var response = await httpClient.PostAsync(Base_Url.Url + "/Notification/Create", data); if (response.IsSuccessStatusCode) { if (response.StatusCode == HttpStatusCode.OK) { General_Notification_Load(sender, e); } } } } catch (Exception ex) { SplashScreenManager.CloseForm(false); throw ex; } finally { SplashScreenManager.CloseForm(false); } } }