Пример #1
0
        //przekazywanie wiadomości
        void WyswietlKomunikat(string komunikat)
        {
            MessageViewer.Content += komunikat + "\n";
            MessageViewer.ScrollToEnd();

            //ImageBulb.Opacity = 0;
            //ImageBulbBlack.Opacity = 1;
            //DoubleAnimation FadeIn = new DoubleAnimation();
            //FadeIn.From = 0;
            //FadeIn.To = 1;
            //FadeIn.Duration = TimeSpan.FromSeconds(3);

            DoubleAnimation FadeOut = new DoubleAnimation();

            FadeOut.From     = 1;
            FadeOut.To       = 0;
            FadeOut.Duration = TimeSpan.FromSeconds(0.2);

            //ImageBulb.BeginAnimation(OpacityProperty, FadeOut);
            //ImageBulbBlack.BeginAnimation(OpacityProperty, FadeIn);

            RepeatBehavior Repeat = new RepeatBehavior(8.0);

            FadeOut.RepeatBehavior = Repeat;
            ImageBulbBlack.BeginAnimation(OpacityProperty, FadeOut);
            System.Media.SystemSounds.Beep.Play();
        }
Пример #2
0
 public bool ChangePassword()
 {
     //Validamos que no haya errores en el UserControl
     if (!dxErrorProvider1.HasErrors && ValidateUC())
     {
         using (WaitCursorHelper waitn = new WaitCursorHelper(this))
         {
             //Cambiamos el Password
             try
             {
                 SecurityController.UserChangePassword(UserName, txtOldPassword.Text, txtNewPassword.Text);
                 MessageViewer.Show("Su contraseña fue cambiada exitosamente");
             }
             catch (Exception ex)
             {
                 this.ExceptionViewer.Show(ex);
                 return(false);
             }
         }
         return(true);
     }
     else
     {
         return(false);
     }
 }
Пример #3
0
 public DeleteMessageDialog(DiscordMessage message)
 {
     InitializeComponent();
     Content = new MessageViewer()
     {
         Message = message, IsEnabled = false, Background = new SolidColorBrush(Colors.Transparent)
     };
 }
Пример #4
0
 public PinMessageDialog(DiscordMessage message)
 {
     InitializeComponent();
     Title   = message.Pinned ? "Unpin this message?" : "Pin this message?";
     Content = new MessageViewer()
     {
         Message = message, IsEnabled = false, Background = new SolidColorBrush(Colors.Transparent)
     };
 }
Пример #5
0
        private void commonEnumComboBox1_SelectedIndexChanged(object sender, EventArgs e)
        {
            if (cmdAuthMode.EditValue == null)
            {
                return;
            }

            //Seteamos la contraseña en blanco
            txtPassword.Text = string.Empty;

            //Validamos el tipo de Enumeración seleccionada
            switch ((AuthenticationModeEnum)Convert.ToInt32(cmdAuthMode.EditValue))
            {
            case AuthenticationModeEnum.WindowsIntegrated:
                EnableDisableFieldsByAuthenticationMode(true);
                txtUserName.Text    = Environment.UserName;
                txtUserName.Enabled = false;
                _IsEnvironmentUser  = true;
                cmbDominios.Enabled = false;
                EnableDisablePassword();
                btnChangePassword.Enabled = false;
                break;

            case AuthenticationModeEnum.Mixed:
                EnableDisableFieldsByAuthenticationMode(true);
                cmbDominios.Enabled       = false;
                txtPassword.Enabled       = true;
                btnChangePassword.Enabled = true;
                break;

            case AuthenticationModeEnum.LDAP:
                EnableDisableFieldsByAuthenticationMode(true);
                cmbDominios.Enabled       = true;
                txtPassword.Enabled       = true;
                btnChangePassword.Enabled = false;
                break;

            default:
                MessageViewer.Show("El modo de autenticación seleccionado no se encuentra configurado aún.");
                EnableDisableFieldsByAuthenticationMode(false);
                txtUserName.Enabled       = false;
                txtPassword.Enabled       = false;
                cmbDominios.Enabled       = false;
                btnChangePassword.Enabled = false;
                break;
            }

            //Seteamos en blanco los ErrorProviders
            dxErrorProvider1.SetError(txtUserName, string.Empty);
            dxErrorProvider1.SetError(txtPassword, string.Empty);

            txtUserName.Focus();

            //Guardamos el Modo de autenticación seleccionado
            _AuthenticationMode = (AuthenticationModeEnum)Enum.Parse(typeof(AuthenticationModeEnum), cmdAuthMode.EditValue.ToString());
        }
Пример #6
0
 private void simpleButton2_Click(object sender, EventArgs e)
 {
     if (CheckCierreExist())
     {
         CreateCierreProfecional(list_Propietarios);
         CreateCierreProfecional(list_Externos);
         CreateCierreResetas();
     }
     MessageViewer.Show("Cierre de caja realizado con éxito");
 }
Пример #7
0
 private void OnUnloaded(object sender, RoutedEventArgs e)
 {
     try {
         App.Context.SortOrderChanged -= OnSortOrderChanged;
         DataContext = null;
         MessageViewer.Dispose();
     } catch (Exception ex) {
         Logger.Error(ex);
     }
 }
Пример #8
0
        public ActionResult Message(Payment payment, int amount, int id)
        {
            MessageViewer mv = new MessageViewer
            {
                Payment = payment,
                total   = amount
            };

            return(View(mv));
        }
Пример #9
0
        public bool LoadAuthenticationModes()
        {
            Boolean           wOutBool = false;
            ImageComboBoxItem wImageComboBoxItem;
            string            wDescription;

            //Obtenemos una lista de las Keys en el grupo "AuthenticationMode" del Configuration Manager
            Fwk.Configuration.Common.Group wGroup = Fwk.Configuration.ConfigurationManager.GetGroup("AuthenticationMode");

            List <Fwk.Configuration.Common.Key> wKeyList = null;

            if (wGroup != null)
            {
                wKeyList = wGroup.Keys.Where(p => (!String.IsNullOrEmpty(p.Value.Text) && Boolean.TryParse(p.Value.Text, out wOutBool) && wOutBool == true)).ToList();
            }

            if (wKeyList.Count <= 0)
            {
                MessageViewer.Show("No se encuentran modos de autenticación configurados con Value = true en el archivo de configuración. Por favor verifique.");
                return(false);
            }

            cmdAuthMode.Properties.Items.Clear();

            //Por cada Key obtenida la agregamos al Combo de modos de autenticación
            foreach (Fwk.Configuration.Common.Key wItem in wKeyList)
            {
                wDescription       = Fwk.UI.Common.HelperFunctions.Enumerations.GetDescription(Enum.Parse(typeof(AuthenticationModeEnum), wItem.Name));
                wImageComboBoxItem = new ImageComboBoxItem(wDescription, wItem.Name);
                cmdAuthMode.Properties.Items.Add(wImageComboBoxItem);

                if (Enum.Parse(typeof(AuthenticationModeEnum), wItem.Name).Equals(AuthenticationModeEnum.WindowsIntegrated))
                {
                    _HasWindowsAuthenticationMode = true;
                }
            }

            //Validamos si el combo tiene Modo de autenticación de Windows y cargamos los Dominios
            if (_HasWindowsAuthenticationMode)
            {
                cmdAuthMode.EditValue = Convert.ToInt32(AuthenticationModeEnum.WindowsIntegrated).ToString();
                LoadDomains();
            }
            else
            {
                cmdAuthMode.SelectedIndex = 0;
                cmbDominios.ItemIndex     = 0;
            }

            return(true);
        }
Пример #10
0
        private void DisplayMessage(MyMessage message)
        {
            AttachmentListView.Items.Clear();
            MessageViewer.Navigate("about:blank");

            foreach (var attachment in message.Message.Attachments)
            {
                var item = new ListViewItem(attachment.Filename)
                {
                    Tag = attachment, BackColor = Color.Orange, ForeColor = Color.WhiteSmoke
                };
                AttachmentListView.Items.Add(item);
            }

            if (message.Message.Views.Count == 0)
            {
                return;
            }

            if (message.Message.HasHtmlView)
            {
                var html = message.Message.GetHtmlView();
                DisplayView(html.Text);
            }
            else
            {
                var plain = message.Message.GetPlainTextView();

                if (plain == null)
                {
                    if (message.Message.Views.Count > 0)
                    {
                        plain = message.Message.Views.First();
                    }
                }

                if (plain == null)
                {
                    LogSafely("No view found ... shouldnt be ...");
                    return;
                }

                // we want line breaks in text documents
                if (string.IsNullOrEmpty(plain.Text))
                {
                    return;
                }

                DisplayView(plain.Text.Replace(Environment.NewLine, "<br />"));
            }
        }
Пример #11
0
 private void aceptCancelButtonBar1_ClickOkCancelEvent(object sender, DialogResult result)
 {
     SelectedProfesionalBE = uc_Profesionales_Grid1.SelectedProfesionalBE;
     if (result == System.Windows.Forms.DialogResult.OK)
     {
         if (uc_Profesionales_Grid1.SelectedProfesionalBE == null)
         {
             MessageViewer.Show("Seleccione algun profesional o precione ESC");
             return;
         }
         this.DialogResult = System.Windows.Forms.DialogResult.OK;
     }
     this.Close();
 }
Пример #12
0
        void WyswietlKomunikat(string komunikat)
        {
            MessageViewer.Content += komunikat + "\n";
            MessageViewer.ScrollToEnd();

            //Odświeżenie wyświetlanej tabeli

            if (komunikat.Contains("Dodano rekord") || komunikat.Contains("Usunięto rekord") || komunikat.Contains("Zaktualizowano rekord"))
            {
                if (komunikat.Contains("Dziennikarze") && currentTable == "Dziennikarze")
                {
                    btnWyswietl1_Click(this, new RoutedEventArgs());
                }
                else if (komunikat.Contains("Redakcje") && currentTable == "Redakcje")
                {
                    btnWyswietl2_Click(this, new RoutedEventArgs());
                }
                else if (komunikat.Contains("Wolontariusze") && currentTable == "Wolontariusze")
                {
                    btnWyswietl3_Click(this, new RoutedEventArgs());
                }
                else if (komunikat.Contains("Pracownicy") && currentTable == "Pracownicy")
                {
                    btnWyswietl4_Click(this, new RoutedEventArgs());
                }
                else if (komunikat.Contains("Działy") && currentTable == "Działy")
                {
                    btnWyswietl5_Click(this, new RoutedEventArgs());
                }
            }

            //animacja żarówki
            DoubleAnimation FadeOut = new DoubleAnimation();

            FadeOut.From     = 1;
            FadeOut.To       = 0;
            FadeOut.Duration = TimeSpan.FromSeconds(0.2);

            RepeatBehavior Repeat = new RepeatBehavior(8.0);

            FadeOut.RepeatBehavior = Repeat;
            ImageBulbBlack.BeginAnimation(OpacityProperty, FadeOut);
            System.Media.SystemSounds.Beep.Play();
        }
Пример #13
0
        private void Main_Load(object sender, EventArgs e)
        {
            try
            {
                this.AddContronToPannel(PanelEnum.LeftPanel_1, "Epiron.Front.Gestion.Sample1.UserControl1,Epiron.Front.Gestion.Sample1", Epiron.Gestion.Properties.Resources.Fotos_1);
                this.AddContronToPannel(PanelEnum.FootherPanel, "Meucci.Front.Alerts.MarqueeUC,Meucci.Front.Alerts", null);
                this.AdjustCulture();

                //ExceptionView.Show(new Exception("ASLDASJDASJDASÑJD "), "<SDFSASAD");
            }
            catch (Exception es)
            {
                MessageViewer.Show(es.Message);
            }

            DialogResult dr = Show("", "", "");
            //if (dr == System.Windows.Forms.DialogResult.Cancel)
            //    this.Close();
        }
Пример #14
0
        private void Main_Load(object sender, EventArgs e)
        {
            try
            {
                storage.Load();
                if (storage.StorageObject == null)
                {
                    storage.StorageObject = new UsersBE();
                    storage.Save();
                }
                ShowAuthenticationForm(storage.StorageObject.UserNameLogin, storage.StorageObject.Password);
                this.AddContronToPannel(PanelEnum.LeftPanel_1, "Epiron.Front.Gestion.Sample1.UserControl1,Epiron.Front.Gestion.Sample1", 10);

                this.AddContronToPannel(PanelEnum.FootherPanel, "Meucci.Front.Alerts.MarqueeUC,Meucci.Front.Alerts", null);
                this.AdjustCulture();
            }
            catch (Exception es)
            {
                MessageViewer.Show(es.Message);
            }
        }
Пример #15
0
 public static void Popup(string title, string msg, PopupMessageFormFormat format, int w)
 {
     title = title ?? WinformRes.SystemMessage;
     if (format == PopupMessageFormFormat.RichTextViewer)
     {
         var dlg = new RichTextViewer();
         dlg.Title     = title;
         dlg.Content   = msg;
         dlg.FormWidth = w;
         dlg.ShowDialog();
     }
     else if (format == PopupMessageFormFormat.MessageViewer)
     {
         var dlg = new MessageViewer();
         dlg.Title     = title;
         dlg.Content   = msg;
         dlg.FormWidth = w;
         dlg.ShowDialog();
     }
     else
     {
         MessageBox.Show(msg, title);
     }
 }
Пример #16
0
 /// <summary>
 /// 设计器支持所需的方法 - 不要
 /// 使用代码编辑器修改此方法的内容。
 /// </summary>
 private void InitializeComponent()
 {
     this.button3 = new System.Windows.Forms.Button();
     this.txbAttach = new TextBoxUnSelectAllable();
     this.button2 = new System.Windows.Forms.Button();
     this.button1 = new System.Windows.Forms.Button();
     this.plButtonsZone = new AhDung.WinForm.MessageBoxEx.MessageForm.PanelBasic();
     this.ckbToggle = new AhDung.WinForm.MessageBoxEx.MessageForm.ToggleButton(this.UseAnimate);
     this.plAttachZone = new AhDung.WinForm.MessageBoxEx.MessageForm.PanelBasic();
     this.lbMsg = new AhDung.WinForm.MessageBoxEx.MessageForm.MessageViewer();
     this.plButtonsZone.SuspendLayout();
     this.plAttachZone.SuspendLayout();
     this.SuspendLayout();
     //
     // button3
     //
     this.button3.Anchor = System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right;
     this.button3.Location = new System.Drawing.Point(320, 8);
     this.button3.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
     this.button3.Name = "button3";
     this.button3.Size = new System.Drawing.Size(85, 27);
     this.button3.TabIndex = 2;
     //
     // txbAttach
     //
     this.txbAttach.Anchor = ((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
                              | System.Windows.Forms.AnchorStyles.Left)
                              | System.Windows.Forms.AnchorStyles.Right;
     this.txbAttach.Location = new System.Drawing.Point(10, 7);
     this.txbAttach.Margin = new System.Windows.Forms.Padding(3, 1, 3, 1);
     this.txbAttach.Name = "txbAttach";
     this.txbAttach.ReadOnly = true;
     this.txbAttach.Multiline = true;
     this.txbAttach.ScrollBars = System.Windows.Forms.ScrollBars.Vertical;
     this.txbAttach.Size = new System.Drawing.Size(395, 105);
     this.txbAttach.TabIndex = 0;
     //
     // button2
     //
     this.button2.Anchor = System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right;
     this.button2.Location = new System.Drawing.Point(229, 8);
     this.button2.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
     this.button2.Name = "button2";
     this.button2.Size = new System.Drawing.Size(85, 27);
     this.button2.TabIndex = 1;
     //
     // button1
     //
     this.button1.Anchor = System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right;
     this.button1.Location = new System.Drawing.Point(138, 8);
     this.button1.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
     this.button1.Name = "button1";
     this.button1.Size = new System.Drawing.Size(85, 27);
     this.button1.TabIndex = 0;
     //
     // plButtonsZone
     //
     this.plButtonsZone.Controls.Add(this.ckbToggle);
     this.plButtonsZone.Controls.Add(this.button1);
     this.plButtonsZone.Controls.Add(this.button2);
     this.plButtonsZone.Controls.Add(this.button3);
     this.plButtonsZone.Dock = System.Windows.Forms.DockStyle.Bottom;
     this.plButtonsZone.Location = new System.Drawing.Point(0, 96);
     this.plButtonsZone.Margin = new System.Windows.Forms.Padding(3, 1, 3, 1);
     this.plButtonsZone.Name = "plButtonsZone";
     this.plButtonsZone.Size = new System.Drawing.Size(415, 36);
     this.plButtonsZone.TabIndex = 1;
     //
     // ckbToggle
     //
     this.ckbToggle.Location = new System.Drawing.Point(10, 8);
     this.ckbToggle.Name = "ckbToggle";
     this.ckbToggle.Size = new System.Drawing.Size(93, 27);
     this.ckbToggle.TabIndex = 3;
     this.ckbToggle.Text = "详细信息(&D)";
     this.ckbToggle.CheckedChanged += this.ckbToggle_CheckedChanged;
     //
     // plAttachZone
     //
     this.plAttachZone.Controls.Add(this.txbAttach);
     this.plAttachZone.Dock = System.Windows.Forms.DockStyle.Fill;
     this.plAttachZone.Location = new System.Drawing.Point(0, 130);
     this.plAttachZone.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
     this.plAttachZone.Name = "plAttachZone";
     this.plAttachZone.Size = new System.Drawing.Size(415, 114);
     this.plAttachZone.TabIndex = 2;
     this.plAttachZone.Visible = false;
     //
     // lbMsg
     //
     this.lbMsg.Dock = System.Windows.Forms.DockStyle.Fill;
     this.lbMsg.Icon = null;
     this.lbMsg.Location = new System.Drawing.Point(0, 0);
     this.lbMsg.Name = "lbMsg";
     this.lbMsg.Padding = new System.Windows.Forms.Padding(21, 18, 21, 18);
     //this.lbMsg.Size = new System.Drawing.Size(415, 96);
     this.lbMsg.TabIndex = 0;
     //
     // FmMsg
     //
     this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.None;
     //this.ClientSize = new System.Drawing.Size(415, 261);
     this.Controls.Add(this.lbMsg);
     this.Controls.Add(this.plButtonsZone);
     this.Controls.Add(this.plAttachZone);
     this.DoubleBuffered = true;
     this.MaximizeBox = false;
     this.Name = "MessageForm";
     this.Padding = new System.Windows.Forms.Padding(0, 0, 0, 17);
     this.ShowIcon = false;
     this.ShowInTaskbar = false;
     this.SizeGripStyle = System.Windows.Forms.SizeGripStyle.Show;
     this.plButtonsZone.ResumeLayout(false);
     this.plAttachZone.ResumeLayout(false);
     this.plAttachZone.PerformLayout();
     this.ResumeLayout(false);
 }
Пример #17
0
        private void OnPrint(object sender, ExecutedRoutedEventArgs e)
        {
            var html = MessageViewer.GetDocument();

            App.Context.Print(html);
        }
Пример #18
0
        /// <summary>
        ///
        /// </summary>
        /// <returns></returns>
        public bool HasErrors()
        {
            dxErrorProvider1.ClearErrors();

            if (String.IsNullOrEmpty(txtMatricula.Text))
            {
                dxErrorProvider1.SetError(txtMatricula, "Ingerse matrícula");
                xtraTabControl1.SelectedTabPage = xtraTabPage1;
                return(dxErrorProvider1.HasErrors);
            }

            if (cmbEspecialidad.EditValue == null)
            {
                dxErrorProvider1.SetError(cmbEspecialidad, "Debe seleccionar especialidad");
                xtraTabControl1.SelectedTabPage = xtraTabPage1;
                return(dxErrorProvider1.HasErrors);
            }

            #region Inicio sesion

            if (this.State == EntityUpdateEnum.NEW)
            {
                try
                {
                    bool exist = SecurityServiceCalls.ValidateUserExist(txtUsername.Text.Trim());

                    if (exist)
                    {
                        dxErrorProvider1.SetError(txtUsername, "El nombre de usuario ya se encuentra registrado \r\n por favor elija otro", DevExpress.XtraEditors.DXErrorProvider.ErrorType.Critical);
                        txtUsername.SelectAll();
                        xtraTabControl1.SelectedTabPage = xtraTabPage_Sesion;
                        btnCheckUserName.Image          = global::Health.Front.Base.Properties.Resource.User_3_Stop;

                        return(dxErrorProvider1.HasErrors);
                    }
                }
                catch (Exception ex)
                {
                    this.ExceptionViewer.Show(ex);
                }

                if (String.IsNullOrEmpty(txtPassword.Text))
                {
                    dxErrorProvider1.SetError(txtConfrirmPassword, "La clave de usuario no puede estar enblanco", DevExpress.XtraEditors.DXErrorProvider.ErrorType.Critical);
                    xtraTabControl1.SelectedTabPage = xtraTabPage_Sesion;
                    MessageViewer.Show(dxErrorProvider1.GetError(txtConfrirmPassword));
                    txtConfrirmPassword.SelectAll();
                    return(true);
                }
                if (!txtConfrirmPassword.Text.Equals(txtPassword.Text))
                {
                    dxErrorProvider1.SetError(txtConfrirmPassword, "La clave y confirmación de la misma deben ser iguales", DevExpress.XtraEditors.DXErrorProvider.ErrorType.Critical);
                    xtraTabControl1.SelectedTabPage = xtraTabPage_Sesion;

                    txtConfrirmPassword.SelectAll();
                    MessageViewer.Show(dxErrorProvider1.GetError(txtConfrirmPassword));
                    return(true);
                }
            }
            #endregion

            //Si tiene permitido modificar seguridad
            if (FormBase.CheckRule("admin_users_change_security") == true)
            {
                if (GetCheckedRolList().Count == 0)
                {
                    dxErrorProvider1.SetError(lblSelRol, "Debe seleccionar al menos un rol para el usuario");

                    xtraTabControl1.SelectedTabPage = xtraTabPage_Sesion;;
                    return(true);
                }
            }
            //Si no tiene permitido modificar admin_professional_sheduling
            if (btnCrearResourceScheduling.Enabled) // -> admin_professional_sheduling
            {
                if (resourceSchedulingList == null || resourceSchedulingList.Count == 0)
                {
                    xtraTabControl1.SelectedTabPage = xtraTabPage2;;
                    MessageViewer.Show("No ah definido la programación de turnos del profesional");

                    return(true);
                }
            }
            return(false);
        }
 void SingleMessagePage_Loaded(object sender, RoutedEventArgs e)
 {
     MessageViewer.NavigateToString(CoreServices.Instance.AddCommentHTML(((Message)DataContext).body));
     MessageViewer.Navigating += new EventHandler <NavigatingEventArgs>(MessageViewer_Navigating);
 }
 public void SelectedMessageChanged(Message newSelection)
 {
     this.DataContext = newSelection;
     MessageViewer.NavigateToString(CoreServices.Instance.AddCommentHTML(newSelection.body));
 }