Пример #1
0
        public static int Main(string[] args)
        {
            string base_path = null;
            string target_path = null;

            foreach (string arg in args) {
                if (arg.StartsWith ("--base="))
                    base_path = arg.Substring (7);
                else if (arg.StartsWith ("--target="))
                    target_path = arg.Substring (9);
            }

            ComparisonInfo info = null;
            if (args.Length > 0) {
                if (base_path == null || target_path == null) {
                    Console.Error.WriteLine ("Usage: ilcontrast [--base=<path> --target=<path>]");
                    return 1;
                }
                info = new ComparisonInfo (base_path, target_path);
            }

            Gtk.Application.Init();

            if (!Directory.Exists (DataPath)) {
                Directory.CreateDirectory (DataPath);
                TarArchive tar = TarArchive.CreateInputTarArchive (System.Reflection.Assembly.GetCallingAssembly ().GetManifestResourceStream ("deploy.tar"));
                tar.ExtractContents (DataPath);
            }

            IlContrast.Window win = new IlContrast.Window (info);
            win.Show ();
            Gtk.Application.Run ();
            return 0;
        }
        void Refresh()
        {
            if (info == null)
            {
                info = RequestComparisonInfo();
                if (info == null)
                {
                    return;
                }
            }

            worker = new Thread(new ThreadStart(GenerateHtmlTarget));
            worker.Start();
        }
Пример #3
0
        public static int Main(string[] args)
        {
            string base_path   = null;
            string target_path = null;

            foreach (string arg in args)
            {
                if (arg.StartsWith("--base="))
                {
                    base_path = arg.Substring(7);
                }
                else if (arg.StartsWith("--target="))
                {
                    target_path = arg.Substring(9);
                }
            }

            ComparisonInfo info = null;

            if (args.Length > 0)
            {
                if (base_path == null || target_path == null)
                {
                    Console.Error.WriteLine("Usage: ilcontrast [--base=<path> --target=<path>]");
                    return(1);
                }
                info = new ComparisonInfo(base_path, target_path);
            }

            Gtk.Application.Init();

            if (!Directory.Exists(DataPath))
            {
                Directory.CreateDirectory(DataPath);
                TarArchive tar = TarArchive.CreateInputTarArchive(System.Reflection.Assembly.GetCallingAssembly().GetManifestResourceStream("deploy.tar"));
                tar.ExtractContents(DataPath);
            }

            IlContrast.Window win = new IlContrast.Window(info);
            win.Show();
            Gtk.Application.Run();
            return(0);
        }
        public Window(ComparisonInfo info) : base("ilContrast Assembly Comparison Tool")
        {
            DefaultSize = new Size(450, 450);

            main_vbox = new VBox(false, 0);
            AddActionUI();
#if USE_GECKO
            browser = new Gecko.WebControl();
            main_vbox.PackStart(browser, true, true, 0);
#else
            web_view = new WebKit.WebView();
            ScrolledWindow sw = new ScrolledWindow();
            sw.Add(web_view);
            main_vbox.PackStart(sw, true, true, 0);
#endif
            statusbar = new Statusbar();
            main_vbox.PackStart(statusbar, false, false, 0);
            Add(main_vbox);
            main_vbox.ShowAll();
            first_show = true;
            this.info  = info;
        }
Пример #5
0
		public Window (ComparisonInfo info) : base ("ilContrast Assembly Comparison Tool") 
		{
			DefaultSize = new Size (450, 450);

			main_vbox = new VBox (false, 0);
			AddActionUI ();
#if USE_GECKO
			browser = new Gecko.WebControl ();
			main_vbox.PackStart (browser, true, true, 0);
#else
			web_view = new WebKit.WebView ();
			ScrolledWindow sw = new ScrolledWindow ();
			sw.Add (web_view);
			main_vbox.PackStart (sw, true, true, 0);
#endif
			statusbar = new Statusbar ();
			main_vbox.PackStart (statusbar, false, false, 0);
			Add (main_vbox);
			main_vbox.ShowAll ();
			first_show = true;
			this.info = info;
		}
Пример #6
0
		void Refresh ()
		{
			if (info == null) {
				info = RequestComparisonInfo ();
				if (info == null)
					return;
			}

			worker = new Thread (new ThreadStart (GenerateHtmlTarget));
			worker.Start ();
		}