예제 #1
0
파일: GriderApp.cs 프로젝트: diva/Grider
        static void Main(string[] args)
        {
            ReadPreferences();

            Console.WriteLine("-----------------------------------------------");
            Console.WriteLine("  Grider -- the client for the safe Hypergrid");
            Console.WriteLine("-----------------------------------------------");
            Console.WriteLine("Default viewer is " + viewerPath);
            if (!preferences)
            {
                Console.WriteLine("Enter a new viewer path or hit <enter>");
                Console.Write(">> ");
                string input = Console.ReadLine();
                if (input.Length > 10)
                    viewerPath = input;
            }

            if (!File.Exists(viewerPath))
            {
                Console.WriteLine("The provided path is not valid.");
                return;
            }

            WritePreferences();

            Console.WriteLine("Launching viewer...");
            Process viewer = Process.Start(viewerPath, "-loginuri http://localhost:8080 -multiple");

            GriderProxyFrame p = new GriderProxyFrame(args);
            GriderProxyPlugin gridSurfer = new Grider(p, viewer);
            gridSurfer.Init();
            p.proxy.Start();
        }
예제 #2
0
파일: Grider.cs 프로젝트: diva/Grider
 public Grider(GriderProxyFrame frame, Process viewer)
 {
     this.frame = frame;
     this.proxy = frame.proxy;
     this.Viewer = viewer;
 }