Esempio n. 1
0
 public Options(UltraSFV parent)
 {
     _fm = parent;
     InitializeComponent();
     ParseUserSettings();
 }
Esempio n. 2
0
        static void Main(string[] args)
        {
            // Initialize the error log
            Logger = new ErrorLog();

            // Handle unhandled exceptions
            AppDomain.CurrentDomain.UnhandledException += new UnhandledExceptionEventHandler(CurrentDomain_UnhandledException);
            Application.ThreadException += new System.Threading.ThreadExceptionEventHandler(Application_ThreadException);

            // Setup registry
            CheckRegistryValues();

            // Initialize the AutoUpdater
            AppVersion = Assembly.GetExecutingAssembly().GetName().Version;

            RegistryKey key = Registry.CurrentUser.OpenSubKey("Software\\UltraSFV\\Settings");
            Guid guid;
            if (key != null)
            {
                guid = new Guid(key.GetValue("guid", String.Empty).ToString());
            }
            else
            {
                guid = Guid.Empty;
            }
            AutoUpdate = new AutoUpdater(AppVersion, guid);
            key.Close();

            // Setup the visual forms stuff because SingletonApplication creates a form
            // for recieving events, and this cant be done after a form is created
            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);

            // Initialize the main form
            MainForm = new UltraSFV();

            // Singleton application support
            if (Properties.Settings.Default.ReuseWindows)
            {
                if (SingletonApplication.Instance(args, "{C4B3E82C-907B-4525-A71A-5DD97260D94C}"))
                {
                    SingletonApplication.SecondInstanceLoaded += new EventHandler<SingletonApplicationEventArgs>(SingletonApplication_SecondInstanceLoaded);
                    RunUltraSFV(args);
                }
                else
                {
                    Application.Exit();
                }
            }
            else
            {
                RunUltraSFV(args);
            }
        }
Esempio n. 3
0
 public WorkingDialog(UltraSFV parent)
 {
     InitializeComponent();
     _parent = parent;
 }