Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR CSHARP

tulpep notification window example c#

public void notifyCriticalItems()
    {
        string critical = "";
        con.conDB.Open();
        cmd = new MySqlCommand("Select count(*) from vwcriticalitems", con.conDB);
        string count = cmd.ExecuteScalar().ToString();
        con.conDB.Close();
        int i = 0;
        con.conDB.Open();
        cmd = new MySqlCommand("Select * from vwcriticalitems", con.conDB);
        dr = cmd.ExecuteReader();
        while (dr.Read())
        {
            i++;
            critical += i + ". " + dr["pdesc"].ToString() + Environment.NewLine;
        }
        dr.Close();
        con.conDB.Close();

        PopupNotifier popup = new PopupNotifier();
        popup.Image = Properties.Resources.icons8_brake_warning_25px_1;
        popup.ContentFont = new System.Drawing.Font("Tahoma", 8F);
        popup.Size = new Size(400, 100);
        popup.ShowGrip = false;
        popup.HeaderHeight = 20;
        popup.TitlePadding = new Padding(3);
        popup.ContentPadding = new Padding(3);
        popup.ImagePadding = new Padding(8);
        popup.AnimationDuration = 1000;
        popup.AnimationInterval = 1;
        popup.HeaderColor = Color.FromArgb(252, 164, 2);
        popup.Scroll = true;
        popup.ShowCloseButton = false;
        popup.TitleText = "CRITICAL ITEM(S)";
        popup.ContentText = critical;
        popup.Popup();
    }
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #tulpep #notification #window
ADD COMMENT
Topic
Name
8+6 =