Ejemplo n.º 1
0
 private void button2_Click(object sender, EventArgs e)
 {
     if (txtFolderDelete.Text != "")
     {
         bool exists = System.IO.Directory.Exists(txtFolderDelete.Text);
         if (exists)
         {
             System.IO.Directory.Delete(txtFolderDelete.Text, true);
             corner.ContentText = string.Format("Completed Process of  Deleting {0} {1} ", txtFolderDelete.Text, DateTime.Now.ToLocalTime());
             string name = corner.ContentText;
             messages.Add(name);
             corner.Popup();
             lsbDelete.DataSource = null;
             lsbDelete.Items.Clear();
             foreach (var item in messages)
             {
                 lsbDelete.Items.Add("" + item);
             }
         }
         else
         {
             MessageBox.Show("Folder does not exist", "Warning", MessageBoxButtons.OK, MessageBoxIcon.Warning);
         }
     }
     else
     {
         MessageBox.Show("Choose a path", "Warning", MessageBoxButtons.OK, MessageBoxIcon.Warning);
     }
 }
Ejemplo n.º 2
0
        public bool Delete(string id)
        {
            PopupNotifier popup = new PopupNotifier();

            popup.TitleText = "Ошибка";
            popup.BodyColor = Color.LightGray;
            gr691_invert db = new gr691_invert();

            try
            {
                int num = Convert.ToInt32(id);
                var d_e = db.Equipment.Where(i => i.id == num).FirstOrDefault();
                if (d_e == null)
                {
                    popup.ContentText = "Вы не выбрали строку";
                    popup.Popup();
                    return(false);
                }
                else
                {
                    db.Equipment.Remove(d_e);
                    db.SaveChanges();
                }
            }
            catch
            {
                popup.ContentText = "ОШИБКА";
                popup.Popup();
                return(false);
            }
            return(true);
        }
Ejemplo n.º 3
0
        private void Auth_Enter(object sender, RoutedEventArgs e)
        {
            PopupNotifier popup = new PopupNotifier();

            popup.TitleText = "Ошибка авторизации";
            popup.BodyColor = Color.LightGray;
            if (string.IsNullOrWhiteSpace(Auth_Login.Text) || string.IsNullOrWhiteSpace(Auth_Password.Password))
            {
                popup.ContentText = "Не все поля заполнены";
                popup.Popup();
                return;
            }
            var auth_check = db.User.FirstOrDefault(ch => ch.login == Auth_Login.Text && ch.password == Auth_Password.Password);

            if (auth_check == null)
            {
                popup.ContentText = "Логин или пароль введены не верно";
                popup.Popup();
                return;
            }
            else
            {
                Hide();
                new Invert_Cabinet().ShowDialog();
            }
        }
Ejemplo n.º 4
0
        private void fileSystemWatcher1_Changed(object sender, System.IO.FileSystemEventArgs e)
        {
            corner.ContentText = string.Format(" A File Changed {0} {1} at {2}", e.FullPath, e.Name, DateTime.Now.ToLocalTime());
            string name = corner.ContentText;

            messages.Add(name);
            corner.Popup();
        }
Ejemplo n.º 5
0
 /// <summary>
 /// Сворачивание окна в трей
 /// </summary>
 /// <param name="sender">объект</param>
 /// <param name="e">событие</param>
 private void MinimizeMenu(object sender, RoutedEventArgs e)
 {
     WindowState             = WindowState.Minimized;
     notify.Visible          = true;
     newNotifier.TitleText   = "Planner";
     newNotifier.ContentText = "Приложение свёрнуто в трей";
     newNotifier.Popup();
     this.Hide();
 }
Ejemplo n.º 6
0
        private void btnViewLectureStudentAnswers_Click(object sender, RoutedEventArgs e)
        {
            // displaying Lecture memo
            try
            {
                cn.Open();
                string query = "select * from ViewMemo";
                cmd = new SqlCommand(query, cn);
                cmd.ExecuteNonQuery();

                SqlDataAdapter dataAdp = new SqlDataAdapter(cmd);
                DataTable      dt      = new DataTable();
                dataAdp.Fill(dt);
                dataGrid1.ItemsSource = dt.DefaultView;
                dataAdp.Update(dt);
                cn.Close();
            }
            catch (Exception ex)
            {
                // using biding notifiaction to display error
                popup.Image       = Properties.Resources.information_2_512;
                popup.TitleText   = "Error";
                popup.ContentText = "Error Loading Memo";
                popup.Popup();
            }

            // displaying student answers
            try
            {
                cn.Open();
                string query = "select * from StudentAnswers";
                cmd = new SqlCommand(query, cn);
                cmd.ExecuteNonQuery();

                SqlDataAdapter dataAdp = new SqlDataAdapter(cmd);
                DataTable      dt      = new DataTable();
                dataAdp.Fill(dt);
                dataGrid2.ItemsSource = dt.DefaultView;
                dataAdp.Update(dt);
                cn.Close();
            }
            catch (Exception ex)
            {
                // using biding notifiaction to display error
                popup.Image       = Properties.Resources.information_2_512;
                popup.TitleText   = "Error";
                popup.ContentText = "Error Loading Student Answers";
                popup.Popup();
            }
        }
Ejemplo n.º 7
0
        private void GuardarDatosButton_Click(object sender, EventArgs e)
        {
            if (!ValidarCampos())
            {
                return;
            }

            var rta = MessageBox.Show("¿Guardar datos?", "Confirmación",
                                      MessageBoxButtons.YesNo, MessageBoxIcon.Question, MessageBoxDefaultButton.Button2);

            if (rta == DialogResult.No)
            {
                return;
            }

            var dCuentaCorriente = new CapaDatos.DCuentaCorriente();


            string msg;
            var    codOrdenCompra = (int)DgvOrdenesCompra.SelectedRows[0].Cells[0].Value;
            var    numFac         = int.Parse(NumFacTextBox.Text.Trim());
            var    importe        = decimal.Parse(ImporteTextBox.Text);
            var    observaciones  = ObservacionesTextBox.Text;

            if (isNueva)
            {
                msg = dFactura.InsertFacturaProv(codOrdenCompra, numFac, DateTime.Now, importe, observaciones, false);

                var popup1 = new PopupNotifier()
                {
                    Image        = msg == "Se ingresó la factura correctamente" ? Properties.Resources.sql_success1 : Properties.Resources.sql_error,
                    TitleText    = "Mensaje",
                    ContentText  = msg,
                    ContentFont  = new Font("Segoe UI Bold", 11F),
                    TitleFont    = new Font("Segoe UI Bold", 10F),
                    ImagePadding = new Padding(10)
                };
                popup1.Popup();
            }
            else
            {
                msg = dFactura.UpdateFactura((int)DgvFacturas.SelectedRows[0].Cells[0].Value, numFac, importe, observaciones);

                var popup1 = new PopupNotifier()
                {
                    Image        = msg == "Se actualizó la factura correctamente" ? Properties.Resources.info100 : Properties.Resources.sql_error,
                    TitleText    = "Mensaje",
                    ContentText  = msg,
                    ContentFont  = new Font("Segoe UI Bold", 11F),
                    TitleFont    = new Font("Segoe UI Bold", 10F),
                    ImagePadding = msg == "Se actualizó la factura correctamente" ? new Padding(10) : new Padding(0)
                };
                popup1.Popup();
            }

            DeshabilitarCampos();
            CargarFacturas();
            CargarOrdenesCompra();
            LimpiarCampos();
        }
Ejemplo n.º 8
0
        //////////TIMER//////////

        // Increment the timer label on each tick
        private void taskTimer_Tick(object sender, EventArgs e)
        {
            this.timerSecs++;
            if (seconds < 60)
            {
                seconds++;
            }
            else
            {
                seconds = 0;
                minutes++;
            }
            lblTimer.Refresh();
            lblTimer.Text = String.Format("{0:D2}:{1:D2}", minutes, seconds);
            // lblTimer.Text = String.Format(timerSecs.ToString());
            /* Add code for popup in each 30 mins*/
            int interval = 30;

            if (minutes > 0 && minutes % interval == 0)
            {
                PopupNotifier popup = new PopupNotifier();
                popup.TitleText   = "Notification";
                popup.ContentText = "Time is up. \nYou will be reminded in every 30 minutes.";
                popup.Popup();
            }
        }
Ejemplo n.º 9
0
        //necessry for show xml data in dataGriedView
        private void frm_view_Load(object sender, EventArgs e)
        {
            string path = "myFilexml.xml";

            ds.ReadXml(path);
            dv.Table = ds.Tables[0];
            dataGridView1.DataSource = dv;

            //رسالة ترحيبية
            foreach (Control ctl in this.Controls)
            {
                if (ctl.GetType() == typeof(MdiClient))
                {
                    ctl.BackColor = Color.CornflowerBlue;
                }
                {
                    PopupNotifier pope = new PopupNotifier();
                    pope.TitleText     = "❦ملحوظه❦";
                    pope.TitleFont     = new Font("Arial", 18, FontStyle.Bold);
                    pope.TitleColor    = Color.White;
                    pope.IsRightToLeft = true;
                    pope.ContentText   = "ابحث اولا عن الكود ثم اضغط عرض";
                    pope.ContentFont   = new Font("Arial", 15, FontStyle.Regular);
                    pope.ContentColor  = Color.White;
                    pope.BodyColor     = Color.MediumPurple;
                    pope.Popup();
                }
            }
        }
Ejemplo n.º 10
0
        private void MemberAdded(object sender, RoutedEventArgs e)
        {
            int  date, hour, month;
            bool isNumeric1 = int.TryParse(txtDay.Text, out date);
            bool isNumeric2 = int.TryParse(txtMonth.Text, out month);
            bool isNumeric3 = int.TryParse(txtHour.Text, out hour);

            if (txtName.Text == "" || txtHour.Text == "" || txtDay.Text == "" || txtMonth.Text == "" || selectOption.SelectedValue == null)
            {
                label1.Content = "You must fill in all the fields!";
            }
            else if (isNumeric1 == false || isNumeric2 == false || isNumeric3 == false)
            {
                label1.Content = "Hour, Date and Month must be numbers!";
            }
            else
            {
                PopupNotifier popup = new PopupNotifier();
                popup.TitleText   = "";
                popup.ContentText = "Event added successfuly!";
                popup.Popup();
                HomeWindow win = new HomeWindow();
                win.Show();
                this.Close();
            }
        }
Ejemplo n.º 11
0
        public void basarisiz()
        {
            this.Hide();
            PopupNotifier popup = new PopupNotifier();

            popup.Image             = Properties.Resources.c;
            popup.AnimationDuration = 1000;
            popup.AnimationInterval = 1;
            popup.BodyColor         = System.Drawing.Color.FromArgb(0, 0, 0);
            popup.BorderColor       = System.Drawing.Color.FromArgb(0, 0, 0);
            popup.ContentColor      = System.Drawing.Color.FromArgb(255, 255, 255);
            popup.ContentFont       = new System.Drawing.Font("Tahoma", 13F);
            popup.ContentHoverColor = System.Drawing.Color.FromArgb(255, 255, 255);
            popup.ContentPadding    = new Padding(0);
            popup.Delay             = 1700;
            popup.GradientPower     = 100;
            popup.HeaderHeight      = 3;
            popup.Scroll            = true;
            popup.ShowCloseButton   = true;
            popup.ShowGrip          = true;
            popup.OptionsMenu       = new ContextMenuStrip();

            popup.ContentText = "İNTERNET Bağlantınız Yok !" + @"
İyi Çalışmalar | TEMSA |";
            popup.Popup();
        }
        public PopupNotification(string title, string body)
        {
            PopupNotifier popup = new PopupNotifier();

            popup.TitleText   = title;
            popup.ContentText = body;

            popup.TitleFont   = new Font("Segoe UI", 20, FontStyle.Bold);
            popup.ContentFont = new Font("Segoe UI", 13, FontStyle.Bold);

            popup.ContentPadding = new Padding(20, 0, 20, 20);
            popup.TitlePadding   = new Padding(20, 20, 20, 20);

            popup.TitleColor        = ColorTranslator.FromHtml(Constants.AppPrimaryColour);
            popup.BodyColor         = ColorTranslator.FromHtml(Constants.MenuButtonSelected);
            popup.ContentColor      = ColorTranslator.FromHtml(Constants.AppSecondaryColour);
            popup.ContentHoverColor = ColorTranslator.FromHtml(Constants.AppSecondaryColour);
            popup.BorderColor       = Color.Black;
            popup.ButtonBorderColor = ColorTranslator.FromHtml(Constants.MenuButtonSelected);

            popup.ShowCloseButton = true;
            popup.Delay           = 5000;
            popup.Size            = new Size(450, 200);
            popup.Popup();
        }
Ejemplo n.º 13
0
 public void AddEmployeeWithUsername()
 {
     try
     {
         Connection.Open();
         SqlDataAdapter Adapter = new SqlDataAdapter("INSERT INTO EmployeeInformation (Name, EmployeeID, EmploymentStatus) VALUES ('" + (_firstName + " " + _middleName + " " + _lastName) + "','" + _employeeID + "','" + _status + "')", Connection);
         Adapter.SelectCommand.ExecuteNonQuery();
         SqlDataAdapter Adapter1 = new SqlDataAdapter("INSERT INTO UserInformation (Username, EmployeeName, Status, EmpID) VALUES ('" + _userName + "','" + (_firstName + " " + _middleName + " " + _lastName) + "','" + _status + "','" + _employeeID + "')", Connection);
         Adapter1.SelectCommand.ExecuteNonQuery();
         SqlDataAdapter Adapter2 = new SqlDataAdapter("INSERT INTO LogInInfo (Username, Password) VALUES ('" + _userName + "','" + _confirmPassword + "')", Connection);
         Adapter2.SelectCommand.ExecuteNonQuery();
         PopupNotifier popup = new PopupNotifier();
         popup.Image           = Properties.Resources.Successfull;
         popup.TitleText       = "Data Saved";
         popup.ContentText     = "Data Sucessfully Saved";
         popup.ShowCloseButton = false;
         popup.Popup();
     }
     catch (Exception ex)
     {
         MessageBox.Show(ex.Message, "Save Employee", MessageBoxButtons.OK, MessageBoxIcon.Error);
         Connection.Close();
     }
     finally
     {
         Connection.Close();
     }
 }
Ejemplo n.º 14
0
 private void AccountClick(object sender, RoutedEventArgs e)
 {
     if (txtPassword1.Password == "" || txtPassword2.Password == "" || txtPassword3.Password == "")
     {
         label1.Content    = "You must fill in all the fields!";
         label1.Visibility = Visibility.Visible;
     }
     else if (txtPassword1.Password == txtPassword2.Password)
     {
         label1.Content    = "Your current password is equal to the new one!";
         label1.Visibility = Visibility.Visible;
     }
     else if (txtPassword2.Password == txtPassword3.Password)
     {
         label1.Content    = "New password doesn't match to its confirmation!";
         label1.Visibility = Visibility.Visible;
     }
     else
     {
         PopupNotifier popup = new PopupNotifier();
         popup.TitleText   = "";
         popup.ContentText = "Password updated successfuly!";
         popup.Popup();
         HomeWindow win = new HomeWindow();
         win.Show();
         this.Close();
     }
 }
Ejemplo n.º 15
0
        public void AfficheMessageNotification(Color couleurFond, string titre, string message)
        {
            PopupNotifier notifier = new PopupNotifier()
            {
                AnimationDuration = 1000,
                AnimationInterval = 10,
                BorderColor       = Color.Transparent,
                BodyColor         = couleurFond,
                ButtonHoverColor  = Color.FromArgb(24, 57, 101),
                ContentColor      = Color.White,
                ContentFont       = new Font(new FontFamily("Century Gothic"), 12),
                ContentHoverColor = Color.Gainsboro,
                ContentPadding    = new Padding(5),
                ContentText       = message,
                Delay             = 3000,
                GradientPower     = 80,
                HeaderColor       = Color.White,
                HeaderHeight      = 10,
                Image             = Resources.system_report_52px,
                ImagePadding      = new Padding(5),
                ImageSize         = new Size(40, 40),
                IsRightToLeft     = false,
                Size         = new Size(400, 150),
                TitleColor   = Color.White,
                TitleFont    = new Font(new FontFamily("Century Gothic"), 14),
                TitlePadding = new Padding(5),
                TitleText    = titre
            };

            notifier.Popup();
        }
Ejemplo n.º 16
0
        public void Hatirlat()
        {
            PopupNotifier popup = new PopupNotifier();

            popup.Image             = Properties.Resources.okk;
            popup.AnimationDuration = 1000;
            popup.AnimationInterval = 1;
            popup.BodyColor         = System.Drawing.Color.FromArgb(0, 0, 0);
            popup.BorderColor       = System.Drawing.Color.FromArgb(0, 0, 0);
            popup.ContentColor      = System.Drawing.Color.FromArgb(255, 255, 255);
            popup.ContentFont       = new System.Drawing.Font("Tahoma", 13F);
            popup.ContentHoverColor = System.Drawing.Color.FromArgb(255, 255, 255);
            popup.ContentPadding    = new Padding(0);
            popup.Delay             = 2000;
            popup.GradientPower     = 100;
            popup.HeaderHeight      = 3;
            popup.Scroll            = true;
            popup.ShowCloseButton   = true;
            popup.ShowGrip          = true;
            popup.OptionsMenu       = new ContextMenuStrip();

            popup.ContentText = "Etkinlik Hatırlatma Saati Ayarlandı !" + @"
İyi Çalışmalar | TEMSA |";
            popup.Popup();
        }
Ejemplo n.º 17
0
        private void notifyIcon1_MouseDoubleClick(object sender, MouseEventArgs e)
        {
            if (InternetGetConnectedState(out Desc, 0))
            {
                Function();
            }
            else
            {
                this.Hide();
                PopupNotifier popup = new PopupNotifier();
                popup.Image             = Properties.Resources.c;
                popup.AnimationDuration = 1000;
                popup.AnimationInterval = 1;
                popup.BodyColor         = System.Drawing.Color.FromArgb(0, 0, 0);
                popup.BorderColor       = System.Drawing.Color.FromArgb(0, 0, 0);
                popup.ContentColor      = System.Drawing.Color.FromArgb(255, 255, 255);
                popup.ContentFont       = new System.Drawing.Font("Tahoma", 13F);
                popup.ContentHoverColor = System.Drawing.Color.FromArgb(255, 255, 255);
                popup.ContentPadding    = new Padding(0);
                popup.Delay             = 1700;
                popup.GradientPower     = 100;
                popup.HeaderHeight      = 3;
                popup.Scroll            = true;
                popup.ShowCloseButton   = true;
                popup.ShowGrip          = true;
                popup.OptionsMenu       = new ContextMenuStrip();

                popup.ContentText = "İNTERNET Bağlantınız Yok !" + @"
İyi Çalışmalar | TEMSA |";
                popup.Popup();
            }
        }
Ejemplo n.º 18
0
        private void OnTimeEvent(object sender, ElapsedEventArgs e)
        {
            // Create notification object.
            var popupNotifier = new PopupNotifier();

            //var test = txtResult.Text;
            Invoke(new Action(() =>
            {
                s += 1;
                if (s == 60)
                {
                    s  = 0;
                    m += 1;
                }
                if (m == 60)
                {
                    m  = 0;
                    h += 1;
                }
                txtResult.Text = string.Format("{0}:{1}:{2}", h.ToString().PadLeft(2, '0'), m.ToString().PadLeft(2, '0'), s.ToString().PadLeft(2, '0'));
                //Compare txtResult.Text with expected time period  txtResult.Text %60 == 0
                if (txtResult.Text == "00:30:00")
                {
                    popupNotifier.TitleText     = "Study session complete!";
                    popupNotifier.ContentText   = $"Congratulation on studying for {m} minutes!";
                    popupNotifier.IsRightToLeft = false;
                    popupNotifier.Popup();
                }
            }));
        }
        private void FileMonitor_Changed(object sender, System.IO.FileSystemEventArgs e)
        {
            DateTime localDate  = DateTime.Now;
            string   ChangeType = e.ChangeType.ToString();

            //display a message box for the appropriate changetype.
            if (ChangeType == "Created")
            {
                filePlugFullPath = e.FullPath;

                PopupNotifier popup = new PopupNotifier();
                popup.TitleText   = "There are new files";
                popup.ContentText = "File: " + e.FullPath + " " + e.ChangeType + " " + localDate.ToString("dd/MM/yyyy hh:mm tt");
                popup.Popup();

                //MessageBox.Show("File: " +  e.FullPath + " " + e.ChangeType + " " + localDate.ToString("dd/MM/yyyy hh:mm:ss tt"), e.Name+" Created" );
            }
            //else if(ChangeType=="Deleted")
            //{
            //   MessageBox.Show("File: " +  e.FullPath + " " + e.ChangeType + " " + localDate.ToString("dd/MM/yyyy hh:mm:ss tt"), e.Name+" Deleted");
            //}
            //else if(ChangeType=="Changed")
            //{
            //    MessageBox.Show("File: " +  e.FullPath + " " + e.ChangeType + " " + localDate.ToString("dd/MM/yyyy hh:mm:ss tt"), e.Name+" Changed" + " " + localDate.ToString("dd/MM/yyyy hh:mm:ss tt"));
            //}
        }
Ejemplo n.º 20
0
        void RenderNotificationPopup(string title, string content)
        {
            popup.TitleText   = title;
            popup.ContentText = content;

            popup.Popup();
        }
Ejemplo n.º 21
0
        public void loadCriticalStocks()
        {
            try
            {
                String critcalVal = "";
                String count      = pos.countCritical();
                int    i          = 0;


                using (reader = pos.loadCriticalStocks())
                {
                    while (reader.Read())
                    {
                        i++;
                        critcalVal += i + "." + reader["description"].ToString() + Environment.NewLine;
                    }
                }

                PopupNotifier pop = new PopupNotifier();
                pop.Image       = Properties.Resources.ekis;
                pop.TitleText   = count + " CRITACAL ITEM(S)";
                pop.ContentText = critcalVal;
                pop.Popup();
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message);
            }
        }
Ejemplo n.º 22
0
        //сравнить два текста, при изменени текста в поле ввода
        private void typingTextChanged(object sender, TextChangedEventArgs e)
        {
            string typingText = this.typingText.Text.Trim().Replace(" ", "|");
            string sampleText = this.exampleText.Text.Trim().Replace(" ", "|");

            if (!getCurrentLetter(typingText.Length, typingText, sampleText))
            {
                popUp             = new PopupNotifier();
                popUp.ContentText = "Неправильный ввод";
                popUp.Popup();
            }
            else
            {
                char nextLetterToShow = nextLetter(typingText, sampleText);

                if (nextLetterToShow.ToString() != "|")
                {
                    popUp             = new PopupNotifier();
                    popUp.ContentText = nextLetterToShow.ToString();
                    popUp.Popup();
                }
                else if (nextLetterToShow.ToString() == "|")
                {
                    this.typingText.Text = this.typingText.Text + "|";
                    popUp             = new PopupNotifier();
                    popUp.ContentText = "Нажмите пробел";
                    popUp.Popup();
                }
            }
        }
Ejemplo n.º 23
0
        private void GETnotiff(DateTime ThisDate)
        {
            string date = ThisDate.ToString("yyyy-MM-dd hh-mm-ss").Remove(10); //2019-12-08 21:00:02
            string time = ThisDate.ToString("HH:mm:ss yyyy-MM-dd").Remove(8);

            //for(int i =2; i<=dataGridView1.Columns.Count;i++)
            for (int j = 0; j < dataGridView1.Rows.Count; j++)
            {
                if (dataGridView1.Rows[j].Cells[1].Value.ToString() == date)
                {
                    string check = dataGridView1.Rows[j].Cells[2].Value.ToString().Remove(8);
                    //MessageBox.Show(check+" / "+ time);
                    if (check == time)
                    {
                        MessBodyText = dataGridView1.Rows[j].Cells[0].Value.ToString(); break;
                    }
                }
            }
            PopupNotifier poop = new PopupNotifier();

            //poop.Image = //Properties.Resources.pepega;
            poop.TitleText   = MessTitleText;
            poop.ContentText = MessBodyText;
            poop.Popup();
        }
Ejemplo n.º 24
0
        public void NotifyCriticalItems()
        {
            string critical = "";

            connect.Open();
            command = new MySqlCommand("SELECT COUNT(*) FROM vwcriticalitems", connect);
            string count = command.ExecuteScalar().ToString();

            connect.Close();

            int i = 0;

            connect.Open();
            command    = new MySqlCommand("SELECT * FROM vwcriticalitems", connect);
            DataReader = command.ExecuteReader();
            while (DataReader.Read())
            {
                i++;
                critical += i + "." + DataReader["pdescription"].ToString() + Environment.NewLine;
            }
            DataReader.Close();
            connect.Close();

            PopupNotifier popup = new PopupNotifier();

            popup.Image       = Properties.Resources.icons8_warning_48;
            popup.TitleText   = count + " CRITICAL ITEM(S)";
            popup.ContentText = critical;
            popup.Popup();
        }
Ejemplo n.º 25
0
        public void DeleteSkill(string Skill)
        {
            try
            {
                Connection.Open();
                SqlDataAdapter Adapter = new SqlDataAdapter("DELETE FROM SkillInformation WHERE SkillID IN(SELECT SkillID FROM SkillInformation WHERE Skill = '" + Skill + "')", Connection);
                Adapter.SelectCommand.ExecuteNonQuery();
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message, "Skill Delete", MessageBoxButtons.OK, MessageBoxIcon.Error);
                Connection.Close();
            }
            finally
            {
                Connection.Close();
            }
            PopupNotifier popup = new PopupNotifier();

            popup.Image           = Properties.Resources.Successfull;
            popup.TitleText       = "Data Delted";
            popup.ContentText     = "Data Sucessfully Deleted";
            popup.ShowCloseButton = false;
            popup.Popup();
        }
        private void btnlogin_Click(object sender, RoutedEventArgs e)
        {
            /*Administracion adm = new Administracion();
             * adm.Owner = this;
             * adm.ShowDialog();*/

            // MessageBox.Show("Bienvenido " + txtnombre.Text);
            usuarioBLL usrbll = new usuarioBLL();
            bool       check  = usrbll.getLogin(txtnombre.Text, txtclave.Password);

            if (check)
            {
                int    rut    = usrbll.Getrut(txtnombre.Text, txtclave.Password);
                string nombre = usrbll.Get_nombrecompleto(rut);

                PopupNotifier popup = new PopupNotifier();
                popup.TitleText         = "Aviso";
                popup.Image             = Properties.Resources.add;
                popup.ContentText       = "Bienvenido" + nombre;
                popup.AnimationDuration = 500;
                popup.Delay             = 3500;
                popup.Popup();
                Administracion adm = new Administracion();
                adm.lb_nombreusuario.Content = nombre;
                Close();
                adm.ShowDialog();
            }
            else
            {
                lb1.Content = "Credenciales o Rol Incorrectos, Intente nuevamente";
            }
        }
Ejemplo n.º 27
0
        public void PlayMusic(Music music)
        {
            InPlaying           = music;
            UIPlayingMusic.Text = InPlaying.Title;
            UIArtist.Text       = InPlaying.Author.Name;
            UIFormat.Text       = InPlaying.Format;
            UIForward.Enabled   = true;
            UIBackward.Enabled  = true;
            player.PlayMusic(InPlaying);
            try
            {
                UIMusicImage.BackgroundImage = Tags.GetMetaImage(player.player.URL);
            }
            catch
            {
                UIMusicImage.BackgroundImage = Properties.Resources.No_Cover_Image;
            }
            PopupNotifier notifier = new PopupNotifier()
            {
                TitleText    = "Playing",
                ContentText  = music.Name,
                Size         = new System.Drawing.Size(200, 40),
                HeaderHeight = 5,
            };

            notifier.Popup();
            TimerMusic.Start();
        }
Ejemplo n.º 28
0
        protected override void WndProc(ref Message m)
        {
            base.WndProc(ref m);
            if (m.Msg == WM_DRAWCLIPBOARD)
            {
                SendMessage(_ClipboardViewerNext, m.Msg, m.WParam, m.LParam);
                if (Clipboard.ContainsText())
                {
                    String TransferTargetText = Clipboard.GetText();

                    string LanguageType = JObject.Parse(GetPaPagoLanguageType(TransferTargetText))["langCode"].ToString();

                    if (LanguageType != "ko")
                    {
                        String  SMTTransferText   = GetPapagoSMTTransferText(TransferTargetText, LanguageType);
                        JObject SMTTransferResult = JObject.Parse(SMTTransferText);
                        String  SMTResultText     = SMTTransferResult["message"]["result"]["translatedText"].ToString();

                        String  NMTTransferText   = GetPapagoNMTTransferText(TransferTargetText, LanguageType);
                        JObject NMTTransferResult = JObject.Parse(NMTTransferText);
                        String  NMTResultText     = NMTTransferResult["message"]["result"]["translatedText"].ToString();

                        PopupNotifier popup = new PopupNotifier();
                        popup.Image       = Properties.Resources.transfer_icon;
                        popup.TitleText   = "This Language is " + LanguageType;
                        popup.ContentText = "[SMT]Transfer:  " + SMTResultText + "\n\n" + "[NMT]Transfer:  " + NMTResultText;
                        popup.Popup();
                    }
                }
            }
            else
            {
                base.WndProc(ref m);
            }
        }
Ejemplo n.º 29
0
        private void BorrarCuentaButton_Click(object sender, EventArgs e)
        {
            if (IsGridEmpty(DgvCuentas, "cuentas"))
            {
                return;
            }

            var rta = MessageBox.Show("¿Borrar cuenta?", "Confirmación", MessageBoxButtons.YesNo, MessageBoxIcon.Question);

            if (rta == DialogResult.No)
            {
                return;
            }

            var codProv = (int)ProveedorComboBox.SelectedValue;

            var msg = cuentaCorriente.DeleteCuentaProveedor(codProv);

            var popup1 = new PopupNotifier()
            {
                Image = msg == "Se borró la cuenta correctamente"
              ? Properties.Resources.info100 : Properties.Resources.sql_error,
                TitleText    = "Mensaje",
                ContentText  = msg,
                ContentFont  = new Font("Segoe UI Bold", 11F),
                TitleFont    = new Font("Segoe UI Bold", 10F),
                ImagePadding = new Padding(0)
            };

            popup1.Popup();

            CargarCuentas();
        }
Ejemplo n.º 30
0
        private void EmitirButton_Click(object sender, EventArgs e)
        {
            if (DgvOrdenesCompra.RowCount == 0)
            {
                MessageBox.Show("No hay órdenes de compra a emitir", "Mensaje", MessageBoxButtons.OK, MessageBoxIcon.Error);
                return;
            }

            var rta = MessageBox.Show("¿Emitir orden de compra?", "Confirmación", MessageBoxButtons.YesNo
                                      , MessageBoxIcon.Question, MessageBoxDefaultButton.Button2);

            if (rta == DialogResult.No)
            {
                return;
            }

            string msg = ordenCompra.EmitirOrdenCompra((int)DgvOrdenesCompra.SelectedRows[0].Cells[0].Value, DateTime.Now);

            var popup1 = new PopupNotifier()
            {
                Image       = msg == "Se emitió la orden de compra correctamente" ? Properties.Resources.info100 : Properties.Resources.sql_error,
                TitleText   = "Mensaje",
                ContentText = msg,
                ContentFont = new Font("Segoe UI Bold", 11F),
                TitleFont   = new Font("Segoe UI Bold", 10F),
            };

            popup1.Popup();

            CargarOrdenes();
        }