本文整理汇总了C#中Class1.GetIncidentCodes方法的典型用法代码示例。如果您正苦于以下问题:C# Class1.GetIncidentCodes方法的具体用法?C# Class1.GetIncidentCodes怎么用?C# Class1.GetIncidentCodes使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Class1
的用法示例。
在下文中一共展示了Class1.GetIncidentCodes方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: initializeIncidentCombo
private void initializeIncidentCombo()
{
Class1 c1 = new Class1();
int count = c1.GetIncidentCodes().Count();
var IncidenceCodes = c1.GetIncidentCodes();
IncidentCombo icbo = new IncidentCombo();
panel1.Controls.Add(icbo);
icbo.Show();
for (int i = 1; i <= count; i++)
{
CustomCombos.Incident inc1 = new CustomCombos.Incident(c1.GetIncidentCodes().Item(i));
DefaultCombo.Items.Add(inc1); // Point #4 Hw1
icbo.Items.Add(inc1); // Point #5 HW1
//var incc = IncidenceCodes.Item(i);
//CustomCombos.Incident inc = new CustomCombos.Incident(IncidenceCodes.Item(i));
//icbo.Items.Add(inc);
}
CoFreeUnusedLibrariesEx(0, 0);
}
示例2: DispatchMain
public DispatchMain()
{
InitializeComponent();
Class1 LegacyClassInterface = new Class1();//instantiate interface? for COM object
VBA.Collection ClassTwos = LegacyClassInterface.GetIncidentCodes();
//MessageBox.Show("Check process explorer for dll"); //for debugging
for (int i = 1; i <= ClassTwos.Count(); i++)
{
//create a new CodeAndName class object and store in the combo box
genericStrongTypeComboBox1.Items.Add(new CodeAndName(ClassTwos.Item(i)));
//MessageBox.Show(designerStrongTypeComboBox1.Items[i-1].ToString());//used for testing
}
//for testing, this should not work
//genericStrongTypeComboBox1.Items.Add("should not work");//for testing
//Get rid of COM OBJECT
Marshal.ReleaseComObject(LegacyClassInterface);
Marshal.ReleaseComObject(ClassTwos);
//Get rid of DLL
CoFreeUnusedLibraries();
}