当前位置: 首页>>代码示例>>C#>>正文


C# SystemMessages.ShowPopup方法代码示例

本文整理汇总了C#中openPDCManager.ModalDialogs.SystemMessages.ShowPopup方法的典型用法代码示例。如果您正苦于以下问题:C# SystemMessages.ShowPopup方法的具体用法?C# SystemMessages.ShowPopup怎么用?C# SystemMessages.ShowPopup使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在openPDCManager.ModalDialogs.SystemMessages的用法示例。


在下文中一共展示了SystemMessages.ShowPopup方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: 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

示例2: 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

示例3: 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

示例4: 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

示例5: 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

示例6: 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

示例7: 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

示例8: 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

示例9: GetCompanies

 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.ShowPopup();
     }
 }
开发者ID:JiahuiGuo,项目名称:openPDC,代码行数:17,代码来源:NodesUserControl.cs

示例10: 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

示例11: GetVendors

 void GetVendors()
 {
     try
     {
         ComboBoxVendor.ItemsSource = CommonFunctions.GetVendors(null, false);
         if (ComboBoxVendor.Items.Count > 0)
             ComboBoxVendor.SelectedIndex = 0;
     }
     catch (Exception ex)
     {
         CommonFunctions.LogException(null, "WPF.GetVendors", ex);
         SystemMessages sm = new SystemMessages(new Message() { UserMessage = "Failed to Retrieve Vendors", SystemMessage = ex.Message, UserMessageType = MessageType.Error },
                 ButtonType.OkOnly);
         sm.Owner = Window.GetWindow(this);
         sm.WindowStartupLocation = WindowStartupLocation.CenterOwner;
         sm.ShowPopup();
     }
 }
开发者ID:JiahuiGuo,项目名称:openPDC,代码行数:18,代码来源:VendorDevicesUserControl.cs

示例12: 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

示例13: 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

示例14: 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

示例15: AddDevices

        void AddDevices()
        {
            SystemMessages sm;
            try
            {
                string result = CommonFunctions.AddDevices(null, m_sourceOutputStreamID, m_devicesToBeAdded, (bool)CheckAddDigitals.IsChecked, (bool)CheckAddAnalog.IsChecked);
                sm = new SystemMessages(new Message() { UserMessage = result, SystemMessage = string.Empty, UserMessageType = MessageType.Success },
                        ButtonType.OkOnly);
                sm.Owner = Window.GetWindow(this);
                sm.WindowStartupLocation = WindowStartupLocation.CenterOwner;
                sm.ShowPopup();

                GetDevicesForOutputStream();
            }
            catch (Exception ex)
            {
                CommonFunctions.LogException(null, "WPF.AddDevices", ex);
                sm = new SystemMessages(new Message() { UserMessage = "Failed to Add Output Stream Device(s)", SystemMessage = ex.Message, UserMessageType = MessageType.Error },
                           ButtonType.OkOnly);
                sm.Owner = Window.GetWindow(this);
                sm.WindowStartupLocation = WindowStartupLocation.CenterOwner;
                sm.ShowPopup();
            }
        }
开发者ID:JiahuiGuo,项目名称:openPDC,代码行数:24,代码来源:AddDevicesUserControl.cs


注:本文中的openPDCManager.ModalDialogs.SystemMessages.ShowPopup方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。