Exemplo n.º 1
0
        static void Register(bool perUserInstallation)
        {
            SFGAO DefaultAttributes = SFGAO.SFGAO_FOLDER
                                      | SFGAO.SFGAO_DROPTARGET
                                      | SFGAO.SFGAO_HASSUBFOLDER
                                      | SFGAO.SFGAO_STORAGEANCESTOR
                                      | SFGAO.SFGAO_STORAGE
                                      | SFGAO.SFGAO_STREAM;

            Initializer.ProductGUID         = ProductID;
            Initializer.PerUserInstallation = perUserInstallation;
            Initializer.DisplayName         = "DeviceManagerFolder";
            Initializer.NamespaceLocation   = "MyComputer";
            Initializer.IconLocation        = Path.GetDirectoryName(Path.GetDirectoryName(Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location))) + "\\DeviceManagerFolder.ico";
            Initializer.Attributes          = (long)DefaultAttributes; // This is for sample's purposes. The default value in the component is already equal to this value
            Initializer.Config("RefreshButtonText=Refresh DeviceManagerFolder");
            Initializer.Config("IPCErrorText=DeviceManagerFolder cannot communicate with its server.");
            try
            {
                Initializer.Install();
                Console.WriteLine("Registered");
            }
            catch (Exception ex)
            {
                Console.WriteLine("EXCEPTION: ");
                Console.WriteLine(ex.Message);
            }
        }
Exemplo n.º 2
0
        static void Register(bool perUserInstallation)
        {
            SFGAO DefaultAttributes = SFGAO.SFGAO_FOLDER
                                      | SFGAO.SFGAO_DROPTARGET
                                      | SFGAO.SFGAO_HASSUBFOLDER
                                      | SFGAO.SFGAO_STORAGEANCESTOR
                                      | SFGAO.SFGAO_STORAGE
                                      | SFGAO.SFGAO_STREAM;

            Initializer.ProductGUID         = ProductID;
            Initializer.PerUserInstallation = perUserInstallation;
            Initializer.DisplayName         = "Samples.Mirror";
            Initializer.NamespaceLocation   = "MyComputer";
            Initializer.Attributes          = (long)DefaultAttributes; // This is for sample's purposes. The default value in the component is already equal to this value
            Initializer.Config("RefreshButtonText=Refresh Mirror");
            Initializer.Config("IPCErrorText=Overview cannot communicate with its server.");
            try
            {
                Initializer.Install();
                Console.WriteLine("Registered");
            }
            catch (Exception ex)
            {
                Console.WriteLine("EXCEPTION: ");
                Console.WriteLine(ex.Message);
            }
        }