Exemple #1
0
    internal void MessagePopupShow(string content, EventCallback0 callback, int type, bool isSystem, string confirmStr = "确定", string cancleStr = "取消")
    {
        MessagePopup popup = MessagePopup.Instance;

        popup.SetContent(content, callback, type, confirmStr, cancleStr);
        if (isSystem)
        {
            popup.Show(LayerManager.SystemPopLayer);
        }
        else
        {
            popup.Show(LayerManager.HighestLayer);
        }
    }
Exemple #2
0
 public void DoSaveCommand()
 {
     if (new ServiceGroupControl().Save(SerivceGroups) != 0)
     {
         ResourceLoader resourceLoader = ResourceLoader.GetForCurrentView("MessageResources");
         string         message        = resourceLoader.GetString("Success");
         MessagePopup   messageopup    = new MessagePopup(message);
         messageopup.Show();
     }
 }
 public void DoSaveCommand()
 {
     if (new StaffBookTimeControl().Upate(BookTimes) != 0)
     {
         ResourceLoader resourceLoader = ResourceLoader.GetForCurrentView("MessageResources");
         string         message        = resourceLoader.GetString("Success");
         MessagePopup   messageopup    = new MessagePopup(message);
         messageopup.Show();
     }
 }
 public void DoSaveCommand()
 {
     if (new StaffControl().Save(StaffInfos) != 0)
     {
         ResourceLoader resourceLoader = ResourceLoader.GetForCurrentView("MessageResources");
         string         message        = resourceLoader.GetString("Success");
         MessagePopup   messageopup    = new MessagePopup(message);
         messageopup.Show();
         StaffInfos = new StaffControl().GetAllStaffInfos();
     }
 }
Exemple #5
0
 private void SaveButton_Click(object sender, RoutedEventArgs e)
 {
     try
     {
         int            res            = new SalonControl().SaveSalonService(Code, Serivces);
         ResourceLoader resourceLoader = ResourceLoader.GetForCurrentView("MessageResources");
         string         message        = resourceLoader.GetString("Success");
         MessagePopup   messageopup    = new MessagePopup(message);
         messageopup.Show();
     }
     catch (AppException appex)
     {
         MessagePopup messageopup = new MessagePopup(appex.ToString());
         messageopup.Show();
     }
 }
Exemple #6
0
 private void PasswordBox_KeyUp(object sender, KeyRoutedEventArgs e)
 {
     if (e.Key.Equals(VirtualKey.Enter))
     {
         if (START_NO.Equals(EncryptHelper.EncryptToSHA1(passwordBox.Password, Encoding.UTF8)))
         {
             Frame.Navigate(typeof(LoginPage));
         }
         else
         {
             ResourceLoader resourceLoader = ResourceLoader.GetForCurrentView("MessageResources");
             string         message        = resourceLoader.GetString("BootError");
             MessagePopup   messageopup    = new MessagePopup(message);
             messageopup.Show();
             passwordBox.Password = "";
         }
     }
 }
        /// <summary>
        /// 用于执行对应的命令,只有在CanExecute可以返回true的情况下才可以被执行
        /// </summary>
        /// <param name="parameter"></param>
        public void Execute(object parameter)
        {
            try
            {
                this.MyExecute(parameter);
            }
            catch (AppException appex)
            {
                MessagePopup messageopup = new MessagePopup(appex.ToString());
                messageopup.Show();
            }
            catch (Exception ex)
            {
#if DEBUG
                Debug.WriteLine(ex.Message);
#endif
            }
        }
Exemple #8
0
 public void Login(object sender, KeyRoutedEventArgs e)
 {
     if (e.Key.Equals(VirtualKey.Enter))
     {
         if (new LoginControl().Login(LoginUser))
         {
             Frame root = Window.Current.Content as Frame;//获取当前激活页面
             root.Navigate(typeof(MainMenu), new { Permission = Permission.Master });
         }
         else
         {
             ResourceLoader resourceLoader = ResourceLoader.GetForCurrentView("MessageResources");
             string         message        = resourceLoader.GetString("BootError");
             MessagePopup   messageopup    = new MessagePopup(message);
             messageopup.Show();
             LoginUser.Password = "";
         }
     }
 }
Exemple #9
0
 void Show(string msg)
 {
     msgPopup.Show(msg);
     gameObject.SetActive(false);
 }