本文整理汇总了C#中openPDCManager.ModalDialogs.SystemMessages类的典型用法代码示例。如果您正苦于以下问题:C# SystemMessages类的具体用法?C# SystemMessages怎么用?C# SystemMessages使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
SystemMessages类属于openPDCManager.ModalDialogs命名空间,在下文中一共展示了SystemMessages类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。
示例1: GetDevicesForOutputStream
void GetDevicesForOutputStream()
{
try
{
m_deviceList = CommonFunctions.GetDevicesForOutputStream(null, m_sourceOutputStreamID, m_nodeValue);
ListBoxDeviceList.ItemsSource = m_deviceList;
if (ListBoxDeviceList.Items.Count > 0)
ListBoxDeviceList.SelectedIndex = 0;
else
{
SystemMessages sm = new SystemMessages(new Message() { UserMessage = "There are no more devices to add to the Output Stream", SystemMessage = "Click OK to return back to Current Devices For Output Stream list.", UserMessageType = MessageType.Information },
ButtonType.OkOnly);
sm.Owner = Window.GetWindow(this);
sm.WindowStartupLocation = WindowStartupLocation.CenterOwner;
sm.ShowPopup();
(Window.GetWindow(this)).Close();
}
}
catch (Exception ex)
{
CommonFunctions.LogException(null, "WPF.GetDevicesForOutputStream", ex);
SystemMessages sm = new SystemMessages(new Message() { UserMessage = "Failed to Retrieve Device for Output Stream", SystemMessage = ex.Message, UserMessageType = MessageType.Error },
ButtonType.OkOnly);
sm.Owner = Window.GetWindow(this);
sm.WindowStartupLocation = WindowStartupLocation.CenterOwner;
sm.ShowPopup();
}
}
开发者ID:JiahuiGuo,项目名称:openPDC,代码行数:29,代码来源:AddDevicesUserControl.cs
示例2: SaveCompany
void SaveCompany(Company company, bool isNew)
{
SystemMessages sm;
try
{
string result = CommonFunctions.SaveCompany(null, company, isNew);
sm = new SystemMessages(new Message() { UserMessage = result, SystemMessage = string.Empty, UserMessageType = MessageType.Success },
ButtonType.OkOnly);
sm.Owner = Window.GetWindow(this);
sm.ShowPopup();
GetCompanies();
//ClearForm();
//make this newly added or updated item as default selected. So user can click initialize right away.
ListBoxCompanyList.SelectedItem = ((List<Company>)ListBoxCompanyList.ItemsSource).Find(c => c.Acronym == company.Acronym);
}
catch (Exception ex)
{
CommonFunctions.LogException(null, "WPF.SaveCompany", ex);
sm = new SystemMessages(new Message() { UserMessage = "Failed to Save Company Information", SystemMessage = ex.Message, UserMessageType = MessageType.Error },
ButtonType.OkOnly);
sm.Owner = Window.GetWindow(this);
sm.ShowPopup();
}
}
开发者ID:JiahuiGuo,项目名称:openPDC,代码行数:25,代码来源:CompaniesUserControl.cs
示例3: client_SaveCompanyCompleted
void client_SaveCompanyCompleted(object sender, SaveCompanyCompletedEventArgs e)
{
SystemMessages sm;
if (e.Error == null)
{
GetCompanies();
ClearForm();
//(Application.Current.RootVisual as MasterLayoutControl).UserControlSelectNode.RaiseNotification();
sm = new SystemMessages(new Message() { UserMessage = e.Result, SystemMessage = string.Empty, UserMessageType = MessageType.Success },
ButtonType.OkOnly);
}
else
{
if (e.Error is FaultException<CustomServiceFault>)
{
FaultException<CustomServiceFault> fault = e.Error as FaultException<CustomServiceFault>;
sm = new SystemMessages(new Message() { UserMessage = fault.Detail.UserMessage, SystemMessage = fault.Detail.SystemMessage, UserMessageType = MessageType.Error },
ButtonType.OkOnly);
}
else
sm = new SystemMessages(new Message() { UserMessage = "Failed to Save Company Information", SystemMessage = e.Error.Message, UserMessageType = MessageType.Error },
ButtonType.OkOnly);
}
sm.ShowPopup();
}
开发者ID:JiahuiGuo,项目名称:openPDC,代码行数:25,代码来源:CompaniesUserControl.cs
示例4: client_GetOutputStreamDeviceAnalogListCompleted
void client_GetOutputStreamDeviceAnalogListCompleted(object sender, GetOutputStreamDeviceAnalogListCompletedEventArgs e)
{
if (e.Error == null)
{
ListBoxOutputStreamDeviceAnalogList.ItemsSource = e.Result;
if (ListBoxOutputStreamDeviceAnalogList.Items.Count > 0 && m_selectFirst)
{
ListBoxOutputStreamDeviceAnalogList.SelectedIndex = 0;
m_selectFirst = false;
}
}
else
{
SystemMessages sm;
if (e.Error is FaultException<CustomServiceFault>)
{
FaultException<CustomServiceFault> fault = e.Error as FaultException<CustomServiceFault>;
sm = new SystemMessages(new Message() { UserMessage = fault.Detail.UserMessage, SystemMessage = fault.Detail.SystemMessage, UserMessageType = MessageType.Error },
ButtonType.OkOnly);
}
else
sm = new SystemMessages(new Message() { UserMessage = "Failed to Retrieve Ouptu Stream Device Analog List", SystemMessage = e.Error.Message, UserMessageType = MessageType.Error },
ButtonType.OkOnly);
sm.ShowPopup();
}
}
开发者ID:JiahuiGuo,项目名称:openPDC,代码行数:27,代码来源:OutputStreamDeviceAnalogsUserControl.cs
示例5: client_GetCompaniesCompleted
void client_GetCompaniesCompleted(object sender, GetCompaniesCompletedEventArgs e)
{
if (e.Error == null)
ComboboxCompany.ItemsSource = e.Result;
else
{
SystemMessages sm;
if (e.Error is FaultException<CustomServiceFault>)
{
FaultException<CustomServiceFault> fault = e.Error as FaultException<CustomServiceFault>;
sm = new SystemMessages(new Message() { UserMessage = fault.Detail.UserMessage, SystemMessage = fault.Detail.SystemMessage, UserMessageType = MessageType.Error },
ButtonType.OkOnly);
}
else
sm = new SystemMessages(new Message() { UserMessage = "Failed to Retrieve Companies", SystemMessage = e.Error.Message, UserMessageType = MessageType.Error },
ButtonType.OkOnly);
sm.ShowPopup();
}
if (ComboboxCompany.Items.Count > 0)
ComboboxCompany.SelectedIndex = 0;
if (deviceToEdit != null && deviceToEdit.CompanyID.HasValue)
ComboboxCompany.SelectedItem = new KeyValuePair<int, string>((int)deviceToEdit.CompanyID, deviceToEdit.CompanyName);
}
开发者ID:JiahuiGuo,项目名称:openPDC,代码行数:25,代码来源:ManageOtherDevicesUserControl.cs
示例6: ButtonClear_Click
void ButtonClear_Click(object sender, RoutedEventArgs e)
{
//Load Default Settings.
IsolatedStorageManager.SetDefaultStorage(true);
LoadSettingsFromIsolatedStorage();
SystemMessages sm = new SystemMessages(new Message() { UserMessage = "Successfully Restored Default System Settings", SystemMessage = string.Empty, UserMessageType = MessageType.Success },
ButtonType.OkOnly);
sm.Owner = Window.GetWindow(this);
sm.WindowStartupLocation = WindowStartupLocation.CenterOwner;
sm.ShowPopup();
}
开发者ID:JiahuiGuo,项目名称:openPDC,代码行数:13,代码来源:SystemSettings.xaml.cs
示例7: ButtonClear_Click
void ButtonClear_Click(object sender, RoutedEventArgs e)
{
Storyboard sb = new Storyboard();
sb = Application.Current.Resources["ButtonPressAnimation"] as Storyboard;
sb.Completed += new EventHandler(delegate(object obj, EventArgs es) { sb.Stop(); });
Storyboard.SetTarget(sb, ButtonClearTransform);
sb.Begin();
//Load Default Settings.
ProxyClient.SetDefaultSystemSettings(true);
LoadSettingsFromIsolatedStorage();
SystemMessages sm = new SystemMessages(new Message() { UserMessage = "Successfully Restored Default System Settings", SystemMessage = string.Empty, UserMessageType = MessageType.Success },
ButtonType.OkOnly);
sm.ShowPopup();
}
开发者ID:JiahuiGuo,项目名称:openPDC,代码行数:16,代码来源:SystemSettings.xaml.cs
示例8: GetIaonTreeData
void GetIaonTreeData()
{
try
{
TreeViewIaon.ItemsSource = CommonFunctions.GetIaonTreeData(null, ((App)Application.Current).NodeValue);
}
catch (Exception ex)
{
CommonFunctions.LogException(null, "WPF.GetIaonTreeData", ex);
SystemMessages sm = new SystemMessages(new Message() { UserMessage = "Failed to Retrieve Iaon Tree Data", SystemMessage = ex.Message, UserMessageType = MessageType.Error },
ButtonType.OkOnly);
sm.Owner = Window.GetWindow(this);
sm.WindowStartupLocation = WindowStartupLocation.CenterOwner;
sm.ShowPopup();
}
}
开发者ID:JiahuiGuo,项目名称:openPDC,代码行数:16,代码来源:IaonTreeUserControl.xaml.cs
示例9: GetOtherDeviceList
void GetOtherDeviceList()
{
try
{
m_otherDeviceList = new ObservableCollection<OtherDevice>(CommonFunctions.GetOtherDeviceList(null));
ListBoxOtherDeviceList.ItemsSource = m_otherDeviceList;
}
catch (Exception ex)
{
CommonFunctions.LogException(null, "WPF.GetOtherDeviceList", ex);
SystemMessages sm = new SystemMessages(new Message() { UserMessage = "Failed to Retrieve Other Device List", SystemMessage = ex.Message, UserMessageType = MessageType.Error },
ButtonType.OkOnly);
sm.Owner = Window.GetWindow(this);
sm.WindowStartupLocation = WindowStartupLocation.CenterOwner;
sm.ShowPopup();
}
}
开发者ID:JiahuiGuo,项目名称:openPDC,代码行数:17,代码来源:OtherDevicesUserControl.cs
示例10: GetHistorians
void GetHistorians()
{
try
{
ListBoxHistorianList.ItemsSource = CommonFunctions.GetHistorianList(null, m_nodeID);
if (ListBoxHistorianList.Items.Count > 0 && ListBoxHistorianList.SelectedIndex < 0)
ListBoxHistorianList.SelectedIndex = 0;
}
catch (Exception ex)
{
CommonFunctions.LogException(null, "WPF.GetHistorianList", ex);
SystemMessages sm = new SystemMessages(new Message() { UserMessage = "Failed to Save Historian Information", SystemMessage = ex.Message, UserMessageType = MessageType.Error },
ButtonType.OkOnly);
sm.Owner = Window.GetWindow(this);
sm.ShowPopup();
}
}
开发者ID:JiahuiGuo,项目名称:openPDC,代码行数:17,代码来源:HistoriansUserControl.cs
示例11: GetNodes
void GetNodes()
{
try
{
ComboBoxNode.ItemsSource = CommonFunctions.GetNodes(null, true, false);
if (ComboBoxNode.Items.Count > 0)
ComboBoxNode.SelectedIndex = 0;
}
catch (Exception ex)
{
CommonFunctions.LogException(null, "WPF.GetNodes", ex);
SystemMessages sm = new SystemMessages(new Message() { UserMessage = "Failed to Retrieve Nodes", SystemMessage = ex.Message, UserMessageType = MessageType.Error },
ButtonType.OkOnly);
sm.Owner = Window.GetWindow(this);
sm.ShowPopup();
}
}
开发者ID:JiahuiGuo,项目名称:openPDC,代码行数:17,代码来源:HistoriansUserControl.cs
示例12: GetAdapterList
void GetAdapterList()
{
try
{
ListBoxAdapterList.ItemsSource = CommonFunctions.GetAdapterList(null, false, m_adapterType, m_nodeID);
if (ListBoxAdapterList.Items.Count > 0)
ListBoxAdapterList.SelectedIndex = 0;
}
catch (Exception ex)
{
CommonFunctions.LogException(null, "WPF.GetAdapterList", ex);
SystemMessages sm = new SystemMessages(new Message() { UserMessage = "Failed to Retrieve Adapter List", SystemMessage = ex.Message, UserMessageType = MessageType.Error },
ButtonType.OkOnly);
sm.Owner = Window.GetWindow(this);
sm.ShowPopup();
}
}
开发者ID:JiahuiGuo,项目名称:openPDC,代码行数:17,代码来源:AdapterUserControl.cs
示例13: RefreshNodeList
public void RefreshNodeList()
{
try
{
ComboboxNode.ItemsSource = CommonFunctions.GetNodeList(null, true);
SetGlobalVariables();
}
catch (Exception ex)
{
CommonFunctions.LogException(null, "WPF.RefreshNodeList", ex);
SystemMessages sm = new SystemMessages(new Message() { UserMessage = "Failed to Retrieve Nodes", SystemMessage = ex.Message, UserMessageType = MessageType.Error },
ButtonType.OkOnly);
sm.Owner = Window.GetWindow(this);
sm.ShowPopup();
}
m_raiseNodesCollectionChanged = false;
}
开发者ID:JiahuiGuo,项目名称:openPDC,代码行数:17,代码来源:SelectNode.cs
示例14: GetOutputStreamDeviceAnalogList
void GetOutputStreamDeviceAnalogList()
{
try
{
ListBoxOutputStreamDeviceAnalogList.ItemsSource = CommonFunctions.GetOutputStreamDeviceAnalogList(null, m_sourceOutputStreamDeviceID);
if (ListBoxOutputStreamDeviceAnalogList.Items.Count > 0)
ListBoxOutputStreamDeviceAnalogList.SelectedIndex = 0;
}
catch (Exception ex)
{
CommonFunctions.LogException(null, "WPF.GetOutputStreamDeviceAnalogList", ex);
SystemMessages sm = new SystemMessages(new Message() { UserMessage = "Failed to Retrieve Ouptu Stream Device Analog List", SystemMessage = ex.Message, UserMessageType = MessageType.Error },
ButtonType.OkOnly);
sm.Owner = Window.GetWindow(this);
sm.WindowStartupLocation = WindowStartupLocation.CenterOwner;
sm.ShowPopup();
}
}
开发者ID:JiahuiGuo,项目名称:openPDC,代码行数:18,代码来源:OutputStreamDeviceAnalogsUserControl.cs
示例15: GetCompanies
public void GetCompanies()
{
try
{
ComboboxCompany.ItemsSource = CommonFunctions.GetCompanies(null, true);
if (ComboboxCompany.Items.Count > 0)
ComboboxCompany.SelectedIndex = 0;
}
catch (Exception ex)
{
CommonFunctions.LogException(null, "WPF.GetCompanies", ex);
SystemMessages sm = new SystemMessages(new Message() { UserMessage = "Failed to Retrieve Companies", SystemMessage = ex.Message, UserMessageType = MessageType.Error },
ButtonType.OkOnly);
sm.Owner = Window.GetWindow(this);
sm.WindowStartupLocation = WindowStartupLocation.CenterOwner;
sm.ShowPopup();
}
}
开发者ID:JiahuiGuo,项目名称:openPDC,代码行数:18,代码来源:ManageOtherDevicesUserControl.cs
示例16: client_GetIaonTreeDataCompleted
void client_GetIaonTreeDataCompleted(object sender, GetIaonTreeDataCompletedEventArgs e)
{
if (e.Error == null)
TreeViewIaon.ItemsSource = e.Result;
else
{
SystemMessages sm;
if (e.Error is FaultException<CustomServiceFault>)
{
FaultException<CustomServiceFault> fault = e.Error as FaultException<CustomServiceFault>;
sm = new SystemMessages(new Message() { UserMessage = fault.Detail.UserMessage, SystemMessage = fault.Detail.SystemMessage, UserMessageType = MessageType.Error },
ButtonType.OkOnly);
}
else
sm = new SystemMessages(new Message() { UserMessage = "Failed to Retrieve Iaon Tree Data", SystemMessage = e.Error.Message, UserMessageType = MessageType.Error },
ButtonType.OkOnly);
sm.ShowPopup();
}
}
开发者ID:JiahuiGuo,项目名称:openPDC,代码行数:19,代码来源:IaonTree.xaml.cs
示例17: DeleteOutputStreamDeviceAnalog
void DeleteOutputStreamDeviceAnalog(int outputStreamDeviceAnalogID)
{
SystemMessages sm;
try
{
string result = CommonFunctions.DeleteOutputStreamDeviceAnalog(null, outputStreamDeviceAnalogID);
sm = new SystemMessages(new Message() { UserMessage = result, SystemMessage = string.Empty, UserMessageType = MessageType.Success },
ButtonType.OkOnly);
GetOutputStreamDeviceAnalogList();
}
catch (Exception ex)
{
CommonFunctions.LogException(null, "WPF.DeleteOutputStreamDeviceAnalog", ex);
sm = new SystemMessages(new Message() { UserMessage = "Failed to Delete Output Stream Device Analog", SystemMessage = ex.Message, UserMessageType = MessageType.Error },
ButtonType.OkOnly);
}
sm.Owner = Window.GetWindow(this);
sm.WindowStartupLocation = WindowStartupLocation.CenterOwner;
sm.ShowPopup();
}
开发者ID:JiahuiGuo,项目名称:openPDC,代码行数:20,代码来源:OutputStreamDeviceAnalogsUserControl.cs
示例18: client_GetPhasorsCompleted
void client_GetPhasorsCompleted(object sender, GetPhasorsCompletedEventArgs e)
{
if (e.Error == null)
ComboboxDestinationPhasor.ItemsSource = e.Result;
else
{
SystemMessages sm;
if (e.Error is FaultException<CustomServiceFault>)
{
FaultException<CustomServiceFault> fault = e.Error as FaultException<CustomServiceFault>;
sm = new SystemMessages(new Message() { UserMessage = fault.Detail.UserMessage, SystemMessage = fault.Detail.SystemMessage, UserMessageType = MessageType.Error },
ButtonType.OkOnly);
}
else
sm = new SystemMessages(new Message() { UserMessage = "Failed to Retrieve Phasors", SystemMessage = e.Error.Message, UserMessageType = MessageType.Error },
ButtonType.OkOnly);
sm.ShowPopup();
}
if (ComboboxDestinationPhasor.Items.Count > 0)
ComboboxDestinationPhasor.SelectedIndex = 0;
}
开发者ID:JiahuiGuo,项目名称:openPDC,代码行数:21,代码来源:PhasorsUserControl.cs
示例19: GetOutputStreamMeasurementList
void GetOutputStreamMeasurementList()
{
try
{
ListBoxOutputStreamMeasurementList.ItemsSource = CommonFunctions.GetOutputStreamMeasurementList(null, m_sourceOutputStreamID);
if (ListBoxOutputStreamMeasurementList.Items.Count > 0)
ListBoxOutputStreamMeasurementList.SelectedIndex = 0;
else
ClearForm();
}
catch (Exception ex)
{
CommonFunctions.LogException(null, "WPF.GetOutputStreamMeasurementList", ex);
SystemMessages sm = new SystemMessages(new Message() { UserMessage = "Failed to Retrieve Output Stream Measurement List", SystemMessage = ex.Message, UserMessageType = MessageType.Error },
ButtonType.OkOnly);
sm.Owner = Window.GetWindow(this);
sm.WindowStartupLocation = WindowStartupLocation.CenterOwner;
sm.ShowPopup();
}
if (m_activityWindow != null)
m_activityWindow.Close();
}
开发者ID:JiahuiGuo,项目名称:openPDC,代码行数:22,代码来源:OutputStreamMeasurementsUserControl.cs
示例20: client_DeleteOutputStreamDeviceCompleted
void client_DeleteOutputStreamDeviceCompleted(object sender, DeleteOutputStreamDeviceCompletedEventArgs e)
{
SystemMessages sm;
if (e.Error == null)
{
sm = new SystemMessages(new Message() { UserMessage = e.Result, SystemMessage = string.Empty, UserMessageType = MessageType.Success },
ButtonType.OkOnly);
}
else
{
if (e.Error is FaultException<CustomServiceFault>)
{
FaultException<CustomServiceFault> fault = e.Error as FaultException<CustomServiceFault>;
sm = new SystemMessages(new Message() { UserMessage = fault.Detail.UserMessage, SystemMessage = fault.Detail.SystemMessage, UserMessageType = MessageType.Error },
ButtonType.OkOnly);
}
else
sm = new SystemMessages(new Message() { UserMessage = "Failed to Delete Output Stream Device(s)", SystemMessage = e.Error.Message, UserMessageType = MessageType.Error },
ButtonType.OkOnly);
}
sm.ShowPopup();
GetOutputStreamDeviceList();
}
开发者ID:JiahuiGuo,项目名称:openPDC,代码行数:23,代码来源:CurrentDevicesUserControl.cs
注:本文中的openPDCManager.ModalDialogs.SystemMessages类示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论