private void ObjectDetailContentIOperationEvent(object sender, OperationEventArgs e) { if (IOperationEvent != null) { IOperationEvent(this, e); } }
private void ShowTVI401Object(object AObjectSource, string AStrTVIObjectIDAfter3, bool ABoollanguageChanage) { string LStrOfflineFileType = string.Empty; try { if (ABoollanguageChanage) { return; } TreeViewItem LTreeViewItemOfflineFile = AObjectSource as TreeViewItem; if (LTreeViewItemOfflineFile.DataContext == null) { return; } OperationEventArgs LOperationEventArgs = (OperationEventArgs)LTreeViewItemOfflineFile.DataContext; LStrOfflineFileType = LOperationEventArgs.AppenObjeSource3.ToString(); if (LStrOfflineFileType == "01") { OfflineLanguageFileType01 LOfflineLanguageFileType01 = new OfflineLanguageFileType01(); LOfflineLanguageFileType01.IOperationEvent += ObjectDetailContentIOperationEvent; ITabItemServerObjectDetail.Content = LOfflineLanguageFileType01; LOfflineLanguageFileType01.WriteDataTable2ListView(LOperationEventArgs); } } catch { } }
public void WriteDataTable2ListView(OperationEventArgs e) { string LStrLanguagePackageBody = string.Empty; try { IOperationArgs = e; if (IListObservableCollectionLanguagePackage == null) { IListObservableCollectionLanguagePackage = new ObservableCollection <ListViewItemSingle>(); } IListObservableCollectionLanguagePackage.Clear(); ListViewLanguagePackageDetail.ItemsSource = IListObservableCollectionLanguagePackage; IDataTableLanguagePackage = e.ObjSource as DataTable; App.ShowCurrentStatus(1, App.GetDisplayCharater("M01040"), true); if (IBackgroundWorkerA == null) { IBackgroundWorkerA = new BackgroundWorker(); } IBackgroundWorkerA.RunWorkerCompleted += IBackgroundWorkerA_RunWorkerCompleted; IBackgroundWorkerA.DoWork += IBackgroundWorkerA_DoWork; IBackgroundWorkerA.RunWorkerAsync(); } catch { } }
private void LUCAllOperationsPanel_IOperationEvent(object sender, OperationEventArgs e) { if (IOperationEvent != null) { IOperationEvent(this, e); } }
private void WriteDataTable2ListView(OperationEventArgs e) { try { IDataTableLanguagePackage = e.ObjSource as DataTable; IListObservableCollectionLanguagePackage.Clear(); ListViewLanguagePackageDetail.ItemsSource = IListObservableCollectionLanguagePackage; App.ShowCurrentStatus(1, App.GetDisplayCharater("M01040"), true); if (IBackgroundWorkerA == null) { IBackgroundWorkerA = new BackgroundWorker(); } IBackgroundWorkerA.RunWorkerCompleted += IBackgroundWorkerA_RunWorkerCompleted; IBackgroundWorkerA.DoWork += IBackgroundWorkerA_DoWork; IBackgroundWorkerA.RunWorkerAsync(); } catch { App.ShowCurrentStatus(int.MaxValue, string.Empty, true); if (IBackgroundWorkerA != null) { IBackgroundWorkerA.Dispose(); IBackgroundWorkerA = null; } } }
private void IPageParent_IOperationEvent(object sender, OperationEventArgs e) { string LStrNewValue = string.Empty; List <string> LListStrNewValue = new List <string>(); if (CheckBoxExtension.IsChecked == true) { LListStrNewValue.Add("E"); } if (CheckBoxAgentID.IsChecked == true) { LListStrNewValue.Add("A"); } if (CheckRealExtension.IsChecked == true) { LListStrNewValue.Add("R"); } if (LListStrNewValue.Count <= 0) { return; } LStrNewValue = string.Join(IPageParent.IStrSpliterChar, LListStrNewValue.ToArray()); if (e.StrObjectTag == "Save") { IPageParent.SaveEditedParameterValue(LStrNewValue); } }
private void RadioButton_Checked(object sender, RoutedEventArgs e) { try { //if (IStrMethod == "Change") //{ // IStrMethod = string.Empty; return; //} OperationEventArgs LEventArgs = new OperationEventArgs(); LEventArgs.StrObjectTag = IStrThisName; if (RadioButton1.IsChecked == true) { LEventArgs.ObjectSource0 = "1"; } else { LEventArgs.ObjectSource0 = "2"; } if (IOperationEvent != null) { IOperationEvent(this, LEventArgs); } } catch { } }
private void OperationEventHandler(object sender, OperationEventArgs e) { switch (e.Type) { case OperationType.Copy when GetActiveAndNextTabs().active.IsNotEmpty&& GetActiveAndNextTabs().next.CurrentPath != string.Empty: Copy(); break; case OperationType.Move when GetActiveAndNextTabs().active.IsNotEmpty&& GetActiveAndNextTabs().next.CurrentPath != string.Empty: Move(); break; case OperationType.Rename when GetActiveAndNextTabs().active.IsNotEmpty: Rename(); break; case OperationType.NewFolder when GetActiveAndNextTabs().active.CurrentPath != string.Empty: NewFolder(); break; case OperationType.Search when GetActiveAndNextTabs().active.CurrentPath != string.Empty: SearchFile(); break; } }
protected override void OnMessengerOperationTriggered(object sender, OperationEventArgs e) { if (e.HasError) { Debug.WriteLine(e.Error); } }
private void IBackgroundWorkerA_RunWorkerCompleted(object sender, RunWorkerCompletedEventArgs e) { string LStrMessageBody = string.Empty; try { App.ShowCurrentStatus(int.MaxValue, string.Empty, true); ListViewItemSingleOnlineUser LListViewItemSingleOnlineUser = e.Result as ListViewItemSingleOnlineUser; if (!I00003OperationReturn.BoolReturn) { string[] LStrOperationReturn = I00003OperationReturn.StringReturn.Split(App.GStrSpliterChar.ToCharArray()); LStrMessageBody = string.Format(App.GetDisplayCharater("M01045"), LListViewItemSingleOnlineUser.UserAccount); LStrMessageBody += "\n" + App.GetDisplayCharater(LStrOperationReturn[0]); LStrMessageBody += "\n" + LStrOperationReturn[1]; MessageBox.Show(LStrMessageBody, App.GStrApplicationReferredTo, MessageBoxButton.OK, MessageBoxImage.Error); return; } OperationEventArgs LEventArgs = new OperationEventArgs(); LEventArgs.StrElementTag = "RONLINE"; LEventArgs.ObjSource = LListViewItemSingleOnlineUser; IOperationEvent(this, LEventArgs); LStrMessageBody = string.Format(App.GetDisplayCharater("M01044"), LListViewItemSingleOnlineUser.UserAccount); MessageBox.Show(LStrMessageBody, App.GStrApplicationReferredTo, MessageBoxButton.OK, MessageBoxImage.Information); } catch { } finally { if (IBackgroundWorkerA != null) { IBackgroundWorkerA.Dispose(); IBackgroundWorkerA = null; } } }
private void LUCSingleParameter_IOperationEvent(object sender, OperationEventArgs e) { if (IOperationEvent != null) { IOperationEvent(this, e); } }
private void StudentDetailsViewModel_OpeartaionEvent(object sender, OperationEventArgs e) { if (e.Result == (int)EnumResult.success) { ShowAlert(e.Message); } }
private void IBackgroundWorkerB_RunWorkerCompleted(object sender, RunWorkerCompletedEventArgs e) { string LStrMessageBody = string.Empty; try { App.ShowCurrentStatus(int.MaxValue, string.Empty, true); if (IBackgroundWorkerB != null) { IBackgroundWorkerB.Dispose(); IBackgroundWorkerB = null; } if (I00003OperationReturn.BoolReturn) { OperationEventArgs LOperationEventArgs = new OperationEventArgs(); LOperationEventArgs.StrElementTag = "SSOXL"; LOperationEventArgs.ObjSource = IDataTableLanguagePackage; IOperationEvent(this, LOperationEventArgs); LStrMessageBody = App.GetDisplayCharater("M01047"); MessageBox.Show(LStrMessageBody, App.GStrApplicationReferredTo, MessageBoxButton.OK, MessageBoxImage.Information); } else { string[] LStrOperationReturn = I00003OperationReturn.StringReturn.Split(App.GStrSpliterChar.ToCharArray()); LStrMessageBody = App.GetDisplayCharater(LStrOperationReturn[0]); LStrMessageBody += "\n" + LStrOperationReturn[1]; MessageBox.Show(LStrMessageBody, App.GStrApplicationReferredTo, MessageBoxButton.OK, MessageBoxImage.Error); } } catch { } }
private static void LMenuItemApplicationMenuClicked(object sender, RoutedEventArgs e) { string LStrClickedData = string.Empty; string LStrLanguageID = string.Empty; string LStrStyleID = string.Empty; try { OperationEventArgs LEventArgs = new OperationEventArgs(); MenuItem LMenuItemClicked = sender as MenuItem; LStrClickedData = LMenuItemClicked.DataContext.ToString(); if (LStrClickedData.Substring(0, 2) == "L-") { LEventArgs.StrElementTag = "CLID"; LEventArgs.ObjSource = LStrClickedData.Substring(2); } if (LStrClickedData.Substring(0, 2) == "S-") { LEventArgs.StrElementTag = "CSID"; LEventArgs.ObjSource = LStrClickedData.Substring(2); } GSystemMainWindow.ObjectOperationsEvent(LEventArgs); } catch { } }
private void IBackgroundWorkerA_RunWorkerCompleted(object sender, RunWorkerCompletedEventArgs e) { string LStrMessageBody = string.Empty; MainPanel.IsEnabled = true; IBoolInDoing = false; App.ShowCurrentStatus(int.MaxValue, string.Empty); MainPanel.IsEnabled = true; if (IBackgroundWorkerA != null) { IBackgroundWorkerA.Dispose(); IBackgroundWorkerA = null; } if (!I00003OperationReturn.BoolReturn) { string[] LStrOperationReturn = I00003OperationReturn.StringReturn.Split(App.GStrSpliterChar.ToCharArray()); LStrMessageBody = App.GetDisplayCharater(LStrOperationReturn[0]); MessageBox.Show(LStrMessageBody, App.GStrApplicationReferredTo, MessageBoxButton.OK, MessageBoxImage.Error); return; } if (IOperationEvent != null) { OperationEventArgs LOperationEventArgs = new OperationEventArgs(); LOperationEventArgs.StrElementTag = "RSETTP"; LOperationEventArgs.ObjSource = IListStrArguments; IOperationEvent(this, LOperationEventArgs); } MessageBox.Show(App.GetDisplayCharater("M06009"), App.GStrApplicationReferredTo, MessageBoxButton.OK, MessageBoxImage.Information); CloseThisWindow(); }
private void GridSingleOperation_PreviewMouseLeftButtonDown(object sender, MouseButtonEventArgs e) { try { if (IBoolHaveMoreOperation) { Grid ClickedGrid = sender as Grid; //目标 ClickedGrid.ContextMenu.PlacementTarget = ClickedGrid; //位置 ClickedGrid.ContextMenu.Placement = System.Windows.Controls.Primitives.PlacementMode.MousePoint; //显示菜单 ClickedGrid.ContextMenu.IsOpen = true; } else { if (IOperationEvent != null) { OperationEventArgs LEventArgs = new OperationEventArgs(); LEventArgs.StrElementTag = this.Tag.ToString(); LEventArgs.ObjSource = this.DataContext; IOperationEvent(this, LEventArgs); } } } catch { } }
private void SendMessgeToRefrence(OperationEventArgs AEventArgs) { if (IOperationEvent != null) { IOperationEvent(this, AEventArgs); } }
private void LTreeViewItemFolder_Expanded(object sender, RoutedEventArgs e) { try { TreeViewItem LTreeViewItemExpanded = e.Source as TreeViewItem; if (LTreeViewItemExpanded == null) { return; } if (LTreeViewItemExpanded.Tag.ToString() == "1") { return; } LTreeViewItemExpanded.Tag = "1"; ITreeViewItemExpand = LTreeViewItemExpanded; if (IOperationEvent == null) { return; } OperationEventArgs LEventArgs = new OperationEventArgs(); LEventArgs.StrObjectTag = "C001"; LEventArgs.ObjectSource0 = IStrCurrentFolderType; LEventArgs.ObjectSource1 = LTreeViewItemExpanded.DataContext.ToString(); IOperationEvent(this, LEventArgs); } catch { } }
private void IPageParent_IChangeLanguageEvent(object sender, OperationEventArgs e) { string LStr11001003 = string.Empty; //参数编码 LStr11001003 = IDataRowCurrent["C003"].ToString(); RadioButtonValueX.Content = S1106App.GetDisplayCharater("Page00000A", "Act" + LStr11001003 + "VX"); RadioButtonValue0.Content = S1106App.GetDisplayCharater("Page00000A", "Act" + LStr11001003 + "V0"); }
public virtual void OnOperationDone(RecipeModule.Action.ActionType type) { OperationEventArgs operationEventArgs = new OperationEventArgs(type); if (OperationDone != null) { OperationDone(GetComponent <FoodCharacteristic>(), operationEventArgs); } }
/// <summary> /// <para> /// Handler used to handle new operation event from /// <seealso cref="CimSessionProxy"/> object. /// </para> /// </summary> /// <param name="cimSession"> /// <seealso cref="CimSession"/> object raised the event. /// </param> /// <param name="actionArgs">Event argument.</param> protected void OperationCreatedHandler(object cimSession, OperationEventArgs actionArgs) { DebugHelper.WriteLogEx(); lock (this.a_lock) { this.operationCount++; } }
protected virtual void OnFilesLoading(OperationEventArgs e) { EventHandler <OperationEventArgs> handler = FilesLoading; if (handler != null) { handler(this, e); } }
private void IPageParent_IChangeLanguageEvent(object sender, OperationEventArgs e) { string LStr11001003 = string.Empty; //参数编码 LStr11001003 = IDataRowCurrent["C003"].ToString(); CheckBoxExtension.Content = S1106App.GetDisplayCharater("Page00000A", "Act" + LStr11001003 + "VE"); CheckBoxAgentID.Content = S1106App.GetDisplayCharater("Page00000A", "Act" + LStr11001003 + "VA"); CheckRealExtension.Content = S1106App.GetDisplayCharater("Page00000A", "Act" + LStr11001003 + "VR"); }
protected virtual void OnSnapshotComputing(OperationEventArgs e) { EventHandler <OperationEventArgs> handler = SnapshotComputing; if (handler != null) { handler(this, e); } }
private void ImageCloseOperations_MouseLeftButtonDown(object sender, MouseButtonEventArgs e) { if (IOperationEvent != null) { OperationEventArgs LEventArgs = new OperationEventArgs(); LEventArgs.StrElementTag = ((Image)sender).Tag.ToString(); LEventArgs.ObjSource = (Image)sender; IOperationEvent(this, LEventArgs); } }
public void ExportSolution(ContextService context, string id, ExportSolutionReq request) { var operationEventArgs = new OperationEventArgs(OperationType.ExportSolution, id); OnOperationStarted? .Invoke(this, operationEventArgs); CrmProvider.ExportSolution(Service, request.Managed, request.UniqueName, request.Path); OnOperationCompleted? .Invoke(this, operationEventArgs); }
private void IPageParent_IOperationEvent(object sender, OperationEventArgs e) { string LStrNewValue = string.Empty; LStrNewValue = TextBoxValueInput.Text.Trim(); if (e.StrObjectTag == "Save") { IPageParent.SaveEditedParameterValue(LStrNewValue); } }
private void GSystemMainWindow_IOperationEvent(object sender, OperationEventArgs e) { if (e.StrElementTag == "CLID") { DisplayElementCharacters(true); return; } if (e.StrElementTag == "FEXIT") { CancellationOnlineUser(); return; } }
private void IPageParent_IOperationEvent(object sender, OperationEventArgs e) { string LStrNewValue = string.Empty; LStrNewValue = TextBoxPositiveInteger.GetElementData(); if (e.StrObjectTag == "Save") { IPageParent.SaveEditedParameterValue(LStrNewValue); } }
private void ButtonOpenFile_Click(object sender, RoutedEventArgs e) { string LStrLanguagePackageFile = string.Empty; string LStrDecryptionPassword = string.Empty; bool LBoolCallReturn = true; string LStrCallReturn = string.Empty; try { #region 导入前的逻辑判断 LStrLanguagePackageFile = TextBoxOLanguagePackagePath.Text; if (!File.Exists(LStrLanguagePackageFile)) { MessageBox.Show(App.GetDisplayCharater("E004004"), App.GStrApplicationReferredTo, MessageBoxButton.OK, MessageBoxImage.Error); return; } if (PasswordBoxODecryptPassword.IsEnabled == false) { LStrDecryptionPassword = "******"; } else { LStrDecryptionPassword = PasswordBoxODecryptPassword.Password.Trim(); } if (string.IsNullOrEmpty(LStrDecryptionPassword)) { MessageBox.Show(App.GetDisplayCharater("E004003"), App.GStrApplicationReferredTo, MessageBoxButton.OK, MessageBoxImage.Error); return; } LBoolCallReturn = TryDecryptionLanguagePackage(LStrLanguagePackageFile, LStrDecryptionPassword, ref LStrCallReturn); if (!LBoolCallReturn) { MessageBox.Show(App.GetDisplayCharater("E004002"), App.GStrApplicationReferredTo, MessageBoxButton.OK, MessageBoxImage.Warning); return; } #endregion OperationEventArgs LOperationEventArgs = new OperationEventArgs(); LOperationEventArgs.StrElementTag = "SOLANG"; LOperationEventArgs.ObjSource = IStrLanguagePackageBody; LOperationEventArgs.AppenObjeSource1 = LStrLanguagePackageFile; LOperationEventArgs.AppenObjeSource2 = LStrDecryptionPassword; LOperationEventArgs.AppenObjeSource3 = IStrOfflineFileType; LOperationEventArgs.AppenObjeSource4 = IStrLanguageID; IOperationEvent(this, LOperationEventArgs); this.Close(); } catch (Exception ex) { App.ShowExceptionMessage(ex.Message); } }
private void TaskTree_AfterSelect(object sender, TreeViewEventArgs e) { try { if (e.Node is TaskNode) { TaskNode tn = e.Node as TaskNode; TaskEventArgs te = new TaskEventArgs(); if (tn != null) { te.Task = ConfigCtrl.GetTask(tn.Task.TaskId, tn.Task.TaskName, false); te.Operations = new Collection<OperationInfo>(); foreach (AccountInfo account in te.Task.Accounts) { te.Operations.Add(ConfigCtrl.GetOperation(te.Task.GroupName, account)); } //te.Task = tn.Task; //te.Operations = new Collection<OperationInfo>(); //foreach (OperationNode on in tn.Nodes) //{ // te.Operations.Add(on.Operation); //} } else te.Task = null; OnTaskNodeSelected(te); } else if (this.SelectedNode is TaskNode) { TaskNode tn = this.SelectedNode as TaskNode; TaskEventArgs te = new TaskEventArgs(); if (tn != null) { te.Task = tn.Task; te.Operations = new Collection<OperationInfo>(); foreach (OperationNode on in tn.Nodes) { te.Operations.Add(on.Operation); } } else te.Task = null; OnTaskNodeSelected(te); } else if (this.SelectedNode is OperationNode) { OperationNode on = this.SelectedNode as OperationNode; OperationEventArgs oe = new OperationEventArgs(); if (on != null) oe.Operation = on.Operation; else oe.Operation = null; OnOperationNodeSelected(oe); } else if (this.SelectedNode is BaseNode) { BaseNode bn = this.SelectedNode as BaseNode; if (bn != null) { RootNodeEventArgs re = new RootNodeEventArgs(); re.Tasks = new Collection<TaskInfo>(); foreach (TaskNode tasknode in bn.Nodes) { re.Tasks.Add(tasknode.Task); } OnRootNodeSelected(re); } } } catch (Exception ex) { ErrorHandler.ShowMessageBox(TaskConstants.EXCEPTION_MODULE, ex); } }
public static void afterUpdate(Object sender, OperationEventArgs e) { // something about this makes me nervous mc.loadPendingChangesList(); }
protected virtual void OnOperationNodeSelected(OperationEventArgs e) { if (OperationNodeSelectedEvent != null) OperationNodeSelectedEvent(this, e); }
public static void afterUpdate(Object sender, OperationEventArgs e) { mc.loadPendingChangesList(); }