Beispiel #1
0
 /// <summary>
 /// Just call help
 /// </summary>
 /// <returns></returns>
 internal static bool Test1()
 {
     CommandLineSettingsTransformer cmdTransformer = new CommandLineSettingsTransformer();            
     string[] args = new string[] { "?" };
     cmdTransformer.ProceedCommandLineArguments(args);
     return SingletonSettings.Mode == SingletonSettings.ApplicationMode.Help;
 }
Beispiel #2
0
        /// <summary>
        /// Just call help
        /// </summary>
        /// <returns></returns>
        internal static bool Test1()
        {
            CommandLineSettingsTransformer cmdTransformer = new CommandLineSettingsTransformer();

            string[] args = new string[] { "?" };
            cmdTransformer.ProceedCommandLineArguments(args);
            return(SingletonSettings.Mode == SingletonSettings.ApplicationMode.Help);
        }
Beispiel #3
0
 /// <summary>
 /// Unreg operation
 /// </summary>
 /// <returns></returns>
 internal static bool Test3()
 {
     CommandLineSettingsTransformer cmdTransformer = new CommandLineSettingsTransformer();
     string[] args = new string[] { "C:\\MyFile.dll", "unreg:user:false", "codebase", "alert" };
     cmdTransformer.ProceedCommandLineArguments(args);
     if (SingletonSettings.Mode == SingletonSettings.ApplicationMode.Unregister &&
         SingletonSettings.RegMode == SingletonSettings.RegisterMode.User &&
         SingletonSettings.AssemblyPath == "C:\\MyFile.dll" &&
         SingletonSettings.Codebase == true &&
         SingletonSettings.Alert == SingletonSettings.AlertMode.Error)
         return true;
     else
         return false;
 }
Beispiel #4
0
 /// <summary>
 /// Regfile operation
 /// </summary>
 /// <returns></returns>
 internal static bool Test2()
 {
     CommandLineSettingsTransformer cmdTransformer = new CommandLineSettingsTransformer();
     string[] args = new string[] { "C:\\MyFile.dll", "regfile:system:C:\\MyFile.reg", "codebase", "alert:on" };
     cmdTransformer.ProceedCommandLineArguments(args);
     if (SingletonSettings.Mode == SingletonSettings.ApplicationMode.RegFile &&
         SingletonSettings.AssemblyPath == "C:\\MyFile.dll" &&
         SingletonSettings.RegFilePath == "C:\\MyFile.reg" &&
         SingletonSettings.Codebase == true &&
         SingletonSettings.Alert == SingletonSettings.AlertMode.On)
         return true;
     else
         return false;
 }
Beispiel #5
0
        /// <summary>
        /// Unreg operation
        /// </summary>
        /// <returns></returns>
        internal static bool Test3()
        {
            CommandLineSettingsTransformer cmdTransformer = new CommandLineSettingsTransformer();

            string[] args = new string[] { "C:\\MyFile.dll", "unreg:user:false", "codebase", "alert" };
            cmdTransformer.ProceedCommandLineArguments(args);
            if (SingletonSettings.Mode == SingletonSettings.ApplicationMode.Unregister &&
                SingletonSettings.RegMode == SingletonSettings.RegisterMode.User &&
                SingletonSettings.AssemblyPath == "C:\\MyFile.dll" &&
                SingletonSettings.Codebase == true &&
                SingletonSettings.Alert == SingletonSettings.AlertMode.Error)
            {
                return(true);
            }
            else
            {
                return(false);
            }
        }
Beispiel #6
0
        /// <summary>
        /// Regfile operation
        /// </summary>
        /// <returns></returns>
        internal static bool Test2()
        {
            CommandLineSettingsTransformer cmdTransformer = new CommandLineSettingsTransformer();

            string[] args = new string[] { "C:\\MyFile.dll", "regfile:system:C:\\MyFile.reg", "codebase", "alert:on" };
            cmdTransformer.ProceedCommandLineArguments(args);
            if (SingletonSettings.Mode == SingletonSettings.ApplicationMode.RegFile &&
                SingletonSettings.AssemblyPath == "C:\\MyFile.dll" &&
                SingletonSettings.RegFilePath == "C:\\MyFile.reg" &&
                SingletonSettings.Codebase == true &&
                SingletonSettings.Alert == SingletonSettings.AlertMode.On)
            {
                return(true);
            }
            else
            {
                return(false);
            }
        }