private void map_MouseClick(object sender, MouseEventArgs e)
        {
            DialogResult confirm;

            if (choose)
            {
                if (e.Button == System.Windows.Forms.MouseButtons.Left)
                {
                    double lat = map.FromLocalToLatLng(e.X, e.Y).Lat;
                    double lng = map.FromLocalToLatLng(e.X, e.Y).Lng;
                    LocalisationData.lat = lat;
                    LocalisationData.lng = lng;

                    var cnfForm = new ConfirmLocalusation_Form();
                    confirm = cnfForm.ShowDialog();

                    if (confirm == DialogResult.OK)
                    {
                        map.Position = new GMap.NET.PointLatLng(lat, lng);
                        PointLatLng point = new PointLatLng(lat, lng);
                        map.Overlays.Clear();
                        GMapMarker  marker  = new GMarkerGoogle(point, markerIcon);
                        GMapOverlay markers = new GMapOverlay("markers");
                        markers.Markers.Add(marker);
                        map.Overlays.Add(markers);
                        MedecinController.UpdateLocal(Medecin.Id_doc, lat, lng);
                        OperationDone_Form op = new OperationDone_Form();
                        op.ShowDialog();
                    }
                }
            }
        }
Esempio n. 2
0
        private void Login_Form_Load(object sender, EventArgs e)
        {
            //Properties.Settings.Default.UserName = "******";  //String.Empty;
            //Properties.Settings.Default.Save();
            //MessageBox.Show(Properties.Settings.Default.UserName);
            //MedecinController.UpdatePasword("azerty", 23);
            //MessageBox.Show(MedecinController.GetDocData().ToString());
            //MessageBox.Show(MedecinController.error);

            checkInternetConnection();


            this.Name = "MainForm";

            if (Properties.Settings.Default.UserName != String.Empty)
            {
                this.WindowState   = FormWindowState.Minimized;
                this.ShowInTaskbar = false;
                if (MedecinController.GetDocData())
                {
                    hf.Show();
                }

                else
                {
                    Properties.Settings.Default.UserName = String.Empty;
                }
            }
            else
            {
                this.WindowState   = FormWindowState.Normal;
                this.ShowInTaskbar = true;
            }
        }
Esempio n. 3
0
 private void btn_save_Click(object sender, EventArgs e)
 {
     if (txt_NewPass.Text == txt_confNewPass.Text)
     {
         MedecinController.UpdatePasword(txt_NewPass.Text, Medecin.Id_doc);
         OperationDone_Form op = new OperationDone_Form();
         op.ShowDialog();
     }
     else
     {
         label_error.Visible = true;
     }
 }
 private void btn_save_Click(object sender, EventArgs e)
 {
     try
     {
         MedecinController.UpdateData(Medecin.Id_doc, txt_username.Text, text_nom.Text, txt_prenom.Text, txt_tel.Text, txt_email.Text, txt_ville.Text, txt_adresse.Text, txt_facebook.Text, txt_whatsapp.Text, txt_instagram.Text, txt_twitter.Text, txt_linkeden.Text);
         MedecinController.GetDocData();
         Properties.Settings.Default.UserName = txt_username.Text;
         Home_Form.dataUpdated = true;
         OperationDone_Form op = new OperationDone_Form();
         op.ShowDialog();
     }
     catch (Exception ex)
     {
         MessageBox.Show(ex.Message);
     }
 }
Esempio n. 5
0
        private void CheckForNewRV_Tick(object sender, EventArgs e)
        {
            if (Properties.Settings.Default.UserName != String.Empty)
            {
                newrv = MedecinController.NewRV(Medecin.Id_doc);
                if (newrv != -1)
                {
                    label_NewRV.Text = newrv.ToString();
                }
            }

            if (dataUpdated)
            {
                dataUpdated        = false;
                label_welcome.Text = "Bienvenu!\nMr " + Medecin.Nom;
            }
        }
Esempio n. 6
0
        private void Home_Form_Load(object sender, EventArgs e)
        {
            //Properties.Settings.Default.UserName = String.Empty;


            if (Properties.Settings.Default.UserName != String.Empty)
            {
                label_welcome.Text = "Bienvenu!\nMr " + Medecin.Nom;
                if (MedecinController.NewRV(Medecin.Id_doc) != -1)
                {
                    label_NewRV.Text = MedecinController.NewRV(Medecin.Id_doc).ToString();
                    numberOfNewRv[0] = 0;
                    numberOfNewRv[1] = int.Parse(label_NewRV.Text);
                }
                else
                {
                    label_NewRV.Text = "!";
                }
            }
            else
            {
                this.Close();
            }


            notification.Image        = Resources.notificationSmallWhite;
            notification.ImagePadding = new Padding(0, 20, 0, 0);
            notification.TitlePadding = new Padding(0, 20, 0, 0);
            notification.TitleText    = "Nouveau Rendez-Vous";
            notification.ContentText  = "vous avez un nouveau rendez-vous, vous peuvez le valider maintenent";
            notification.TitleColor   = Color.White;
            notification.TitleFont    = new Font("Arial", 16);
            notification.BodyColor    = Color.FromArgb(0, 140, 176);
            notification.BorderColor  = Color.Transparent;
            notification.OptionsMenu  = new ContextMenuStrip();
            notification.OptionsMenu.Items.Add("Never Show again");

            notification.OptionsMenu.Items[0].Click += new EventHandler(this.HideNotification);
        }
Esempio n. 7
0
 private void btn_login_Click(object sender, EventArgs e)
 {
     if (txt_UserName.Text != String.Empty && txt_Password.Text != String.Empty)
     {
         if (MedecinController.Login(txt_UserName.Text, txt_Password.Text) > 0)
         {
             Properties.Settings.Default.UserName = txt_UserName.Text;
             Properties.Settings.Default.Save();
             MedecinController.GetDocData();
             Task.Delay(1000);
             OpenForm();
         }
         else
         {
             //
             MessageBox.Show("incorrect user name or password!", "Error", MessageBoxButtons.OK, MessageBoxIcon.Warning);
         }
     }
     else
     {
         MessageBox.Show("merci de remplire tout les champs!", "Error", MessageBoxButtons.OK, MessageBoxIcon.Warning);
     }
 }