BF2Statistics.Notify.Show C# (CSharp) Method

Show() public static method

Shows a custom Toast message with the specified icon
public static Show ( string Message, string SubText, AlertType Type = AlertType.Info ) : void
Message string
SubText string
Type AlertType
return void
        public static void Show(string Message, string SubText, AlertType Type = AlertType.Info)
        {
            Alerts.Enqueue(new NotifyOptions(Message, SubText, Type));
            CheckAlerts();
        }

Usage Example

Example #1
0
        /// <summary>
        /// Exports player XML sheet
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void fromPlayerExportSheetMenuItem_Click(object sender, EventArgs e)
        {
            // Create export directory if it doesnt exist yet
            string sPath = Path.Combine(Paths.DocumentsFolder, "Player Backups");

            if (!Directory.Exists(sPath))
            {
                Directory.CreateDirectory(sPath);
            }

            // Show dialog
            OpenFileDialog Dialog = new OpenFileDialog();

            Dialog.InitialDirectory = sPath;
            Dialog.Title            = "Select Player Import File";
            if (Dialog.ShowDialog() == DialogResult.OK)
            {
                try
                {
                    StatsManager.ImportPlayerXml(Dialog.FileName);
                    Notify.Show("Player Imported Successfully", "Operation Successful", AlertType.Success);
                    BuildList();
                }
                catch (Exception E)
                {
                    using (ExceptionForm EForm = new ExceptionForm(E, false))
                    {
                        EForm.Message = "Unable to import player because an exception was thrown!";
                        EForm.ShowDialog();
                    }
                }
            }
        }
All Usage Examples Of BF2Statistics.Notify::Show