本文整理汇总了C#中IPluginHost.LogMessage方法的典型用法代码示例。如果您正苦于以下问题:C# IPluginHost.LogMessage方法的具体用法?C# IPluginHost.LogMessage怎么用?C# IPluginHost.LogMessage使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类IPluginHost
的用法示例。
在下文中一共展示了IPluginHost.LogMessage方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Form_ManageServices
public Form_ManageServices(IPluginHost pHost)
{
InitializeComponent();
#region DataGrid Services
DataGridViewTextBoxColumn cServiceNameCol = new DataGridViewTextBoxColumn();
cServiceNameCol.DataPropertyName = "servicename";
cServiceNameCol.Name = "servicename";
cServiceNameCol.HeaderText = "Service name";
cServiceNameCol.ReadOnly = true;
cServiceNameCol.Visible = true;
cServiceNameCol.Width = 214;
DGV_Services.Columns.Add(cServiceNameCol);
DataGridViewTextBoxColumn cLowerPortCol = new DataGridViewTextBoxColumn();
cLowerPortCol.DataPropertyName = "lowerport";
cLowerPortCol.Name = "lowerport";
cLowerPortCol.HeaderText = "Lower port";
cLowerPortCol.ReadOnly = true;
cLowerPortCol.Visible = true;
cLowerPortCol.Width = 90;
cLowerPortCol.DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleRight;
DGV_Services.Columns.Add(cLowerPortCol);
DataGridViewTextBoxColumn cUpperPortCol = new DataGridViewTextBoxColumn();
cUpperPortCol.DataPropertyName = "upperport";
cUpperPortCol.Name = "upperport";
cUpperPortCol.HeaderText = "Upper port";
cUpperPortCol.ReadOnly = true;
cUpperPortCol.Visible = true;
// cUpperPortCol.Width = 90;
cUpperPortCol.AutoSizeMode = DataGridViewAutoSizeColumnMode.Fill;
cUpperPortCol.DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleRight;
DGV_Services.Columns.Add(cUpperPortCol);
cServiceRecords = new BindingList<ManageServices.ServiceRecord>();
DGV_Services.DataSource = cServiceRecords;
#endregion
cHost = pHost;
cTask = TaskFacade.getInstance();
cTask.addObserver(this);
try
{
cTask.readServicesPatterns();
}
catch (FileNotFoundException lEx)
{
cHost.LogMessage(String.Format("Form_ManageServices() : {0}", lEx.Message));
}
catch (Exception lEx)
{
MessageBox.Show(String.Format("Error occurred while opening services definition file\r\nMessage: {0}", lEx.Message), "Warning", MessageBoxButtons.OK, MessageBoxIcon.Warning);
cHost.LogMessage(String.Format("Form_ManageServices() : {0}", lEx.Message));
}
}