Example #1
0
 public PortableConfig(EngineQuery engine)
 {
     FileStream stream = File.Open(ConfigPath, FileMode.OpenOrCreate);
     XmlSerializer serializer = new XmlSerializer(typeof(Dictionary<string,string>));
     m_Config = (Dictionary<string,string>)serializer.Deserialize(stream);
     stream.Close();
 }
Example #2
0
        public PortableConfig(EngineQuery engine)
        {
            FileStream    stream     = File.Open(ConfigPath, FileMode.OpenOrCreate);
            XmlSerializer serializer = new XmlSerializer(typeof(Dictionary <string, string>));

            m_Config = (Dictionary <string, string>)serializer.Deserialize(stream);
            stream.Close();
        }
Example #3
0
        public Parser(string initdir, EngineQuery ineq)
        {
            this.eq = ineq;

            this.isstillgood = this.getfilenames(initdir);
        }
Example #4
0
        static void Main(string[] args)
        {
            string dir;

            if (args.Length == 0)
            {
                Console.WriteLine("No arguments were supplied.\n");
                dir = ImprovedGetAssembly();
            }
            else
            {
                dir = args[0];
            }

            if (valdir(dir) == false)
            {
                Console.WriteLine("First argument needs to be a valid directory.");
                return;
            }
            else
            {
                EngineQuery eq = new EngineQuery();
                eq.server = "167.71.172.36";
                eq.user   = "******";

                bool goodpw = false;

                int pwii = 0;

                while (goodpw == false)
                {
                    if (pwii != 0)
                    {
                        if (pwii > 5 || eq.password.Equals("x"))
                        {
                            string close = "C";

                            if (eq.password != "x")
                            {
                                close = "Five or more bad passwords, c";
                            }

                            Console.WriteLine("\n" + close + "losing now.");
                            Console.ReadLine();
                            return;
                        }

                        Console.WriteLine("\nBad Password. Enter 'x' to exit.");
                    }

                    eq.password = GetPassword();

                    goodpw = MYSQLEngine.CheckPW(eq);

                    pwii++;
                }

                Parser _parser = new Parser(dir, eq);

                _parser.Initialize();

                if (_parser.isstillgood == true)
                {
                    MYSQLEngine.WriteManifest(_parser);

                    MYSQLEngine.WriteSource(_parser);

                    Console.WriteLine("");

                    for (int ii = 0; ii < 3; ii++)
                    {
                        Thread.Sleep(1000);

                        Console.WriteLine("" + (ii + 1) + "...");
                    }

                    Console.WriteLine("");

                    _parser.ComputeBuyList();
                }

                Console.ReadLine();
            }
        }
Example #5
0
 public DynamicConfig(EngineQuery engine)
 {
     Config = new Dictionary<int, string>();
     this.engine = engine;
 }
Example #6
0
 public DynamicConfig(EngineQuery engine)
 {
     Config      = new Dictionary <int, string>();
     this.engine = engine;
 }