Example #1
0
 /// <summary>
 /// 刷新
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 void dpRefersh_MouseLeftButtonDown(object sender, MouseButtonEventArgs e)
 {
     LanManagerWindow.lblState.Content = TryFindResource("Refreshing").ToString();
     //如果需要刷新语言包
     if (LanManagerWindow.dpData.Children.Count > 0)
     {
         UC_LanguageData uc_data = LanManagerWindow.dpData.Children[0] as UC_LanguageData;
         Common.RefershData(uc_data.lvLanguage);
         uc_data.lstViewrSource = uc_data.lvLanguage.ItemsSource as List <LanguageInfo>;
     }
     LanManagerWindow.InitControl();
     LanManagerWindow.lblState.Content = TryFindResource("RefreshDone").ToString();
 }
Example #2
0
        void InstanceBackgroundWorkerImportOnlyRefresh_RunWorkerCompleted(object sender, RunWorkerCompletedEventArgs e)
        {
            if (bIsImportSuccess)
            {
                List <string> lstParams = new List <string>();
                lstParams.Add(App.GCurrentDBServer.DbType.ToString());
                lstParams.Add(App.GCurrentDBServer.Host);
                lstParams.Add(App.GCurrentDBServer.Port);
                lstParams.Add(App.GCurrentDBServer.ServiceName);
                lstParams.Add(App.GCurrentDBServer.LoginName);
                lstParams.Add(App.GCurrentDBServer.Password);
                lstParams.Add(strImportLanguageType);

                ReturnResult result = AboutLanguagesInServer.WCFOperationMthodA("HTTP", App.GCurrentUmpServer.Host, App.GCurrentUmpServer.Port, 7, lstParams);
                MessageBox.Show(this.TryFindResource("Message002").ToString(),
                                this.TryFindResource("Message003").ToString(), MessageBoxButton.OK, MessageBoxImage.Information);
                if (LanManagerWindow.dpData.Children.Count > 0)
                {
                    UC_LanguageData uc_data = LanManagerWindow.dpData.Children[0] as UC_LanguageData;
                    Common.RefershData(uc_data.lvLanguage);
                    uc_data.lstViewrSource = uc_data.lvLanguage.ItemsSource as List <LanguageInfo>;
                }
                LanManagerWindow.InitControl();
            }
            else
            {
                MessageBox.Show(this.TryFindResource("Error005").ToString() + App.GStrLoginUserApplicationDataPath + "\\UMP.PF.MAMT\\Log" + DateTime.Now.Year + DateTime.Now.Month + DateTime.Now.Date + ".log",
                                this.TryFindResource("ErrorMsgTitle").ToString(), MessageBoxButton.OK, MessageBoxImage.Error);
            }

            LanManagerWindow.spOperator.Children.RemoveAt(1);
            UC_DBOpeartionDefault defaultWin = new UC_DBOpeartionDefault(LanManagerWindow);

            LanManagerWindow.spOperator.Children.Add(defaultWin);
            LanManagerWindow.dpDetail.Children.Clear();
        }