|
using System;
using ProjectFramework;
using System.Windows.Forms;
using System.IO;
using System.Xml;
using System.Reflection;
namespace PFAddin2
{
/// <summary>
/// Summary description for Class1.
/// </summary>
public class IAddin2 : ProjectFramework.IProjectFrameworkAddin
{
private static IProjectFrameworkApp refPFApp;
public IAddin2()
{
//
// TODO: Add constructor logic here
//
}
public void InitializeAddin(ref IProjectFrameworkApp refProjectFrameworkApp, long lSession, bool bFirstLoad)
{
refPFApp=refProjectFrameworkApp;
Assembly thisAssembly = Assembly.GetExecutingAssembly();
//Read the embedded XML menu resource
Stream rgbxml = thisAssembly.GetManifestResourceStream("Addin2.Addin2XMLMenu.xml");
XmlDocument doc = new XmlDocument();
doc.Load(rgbxml);
string strMenuXML=doc.InnerXml;
//Pass the addin dll handle and resource object..
refProjectFrameworkApp.AddCommandsInfo(strMenuXML,lSession,(object)this.GetType().Module,null);
}
public void UnInitializeAddin(long lSession)
{
MessageBox.Show("UnInitializeAddin","Addin 2");
}
public void Function1()
{
MessageBox.Show("Function1","Addin 2");
}
public void Function2()
{
refPFApp.SendMessage("Hi From Bar code Addin 2");
}
public void Function3()
{
MessageBox.Show("Function3","Addin 2");
}
}
}
|
By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.
If a file you wish to view isn't highlighted, and is a text file (not binary), please
let us know and we'll add colourisation support for it.
This article has no explicit license attached to it but may contain usage terms in the article text or the download files themselves. If in doubt please contact the author via the discussion board below.
A list of licenses authors might use can be found here
->9+ Years of Experience in IT Field.
->Basically a C++ Programmer migrating to .NET
->Have Masters degree in Physics and Computer Scince.
-> Doing his Ph.D(Part Time) in Optical Networking)
->Interests: Software product development,Networking, Robotics,Sports Physics, Learning musical instruments, Cricket.
->Resides in kerala ,the gods own country, with his mother and wife.
Home page