예제 #1
0
        static void Main()
        {
            // auto-generated
            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);
#if !DEBUG
            try
            {
#endif
            //create the core of the application
            Core core = new Core();

            // create GUI for the application, giving reference to core
            MainGUI gui = new MainGUI(ref core);

            FirefoxHelper firefox = new FirefoxHelper();
            gui.AddProfile(firefox.getProfiles());

            ChromeHelper chrome = new ChromeHelper();
            gui.AddProfile(chrome.getProfiles());

            ChromiumHelper chromium = new ChromiumHelper();
            gui.AddProfile(chromium.getProfiles());

            IEHelper explorer = new IEHelper();
            gui.AddProfile(explorer.getProfiles());

            OperaHelper opera = new OperaHelper();
            gui.AddProfile(opera.getProfiles());


            // provide core with reference to GUI object
            core.setMainGUI(ref gui);

            // create the application bridge for the updater - decoupling layer
            IApplicationUpdaterBridge application = new cacheCopyUpdaterBridge();

            // new updater, pass references for gui and application.
            IUpdater updater = new Updater((IMessagingGui)gui, application);
            gui.SetUpdater(ref updater);

            Application.Run(gui);

#if !DEBUG
        }

        catch (Exception e)
        {
            Util.WriteToLogFile(e);
        }
#endif
        }
예제 #2
0
        public PatternHelpDialog(MainGUI main)
        {
            InitializeComponent();
            txtHelpDescription.Text = String.Format("* File Naming Pattern option provides you a way to control the way copied files are named. {0}{0}" +
                                                    "* In the pattern you can use any of the symbols allowed in a filename and a set of the wildcard replacements listed below. {0}{0}" +
                                                    "* The file extension can be amended - if it is not set in the pattern string, then it will be added automatically, based on the type " +
                                                    "of file copied.", Environment.NewLine);

            // save the reference to the main screen
            mainGui = main;

            HideTemplateControls();

            CreateControlsTable();
        }
예제 #3
0
파일: Core.cs 프로젝트: trailmax/cacheCopy
 /// <summary>
 /// Setter for GUI object
 /// </summary>
 /// <param name="gui">The GUI object</param>
 public void setMainGUI(ref MainGUI gui)
 {
     mainGUI = gui;
 }