Esempio n. 1
0
        private void Initialize()
        {
            UpdateButtonStatus(stopButton, false);
            UpdateButtonStatus(razorButton, false);
            UpdateButtonStatus(addButton, false);

            Closing += new CancelEventHandler(MainWindow_Closing);
            TreeViewUpdater.Initialize(clientTreeView);
            OptionsWindow.OptionsChangedEvent   += new OptionsWindow.dOptionsChanged(OptionsWindow_OptionsChangedEvent);
            OptionsWindow.OptionsCancelledEvent += new OptionsWindow.dOptionsCancelled(OptionsWindow_OptionsCancelledEvent);
            ScriptCompiler.ScriptFinishedEvent  += new ScriptCompiler.dScriptFinished(ScriptCompiler_ScriptFinished);
            aboutWindow      = new About();
            optionsWindow    = new OptionsWindow();
            myCurrentOptions = OptionsData.Deserialize("options.xml");
            CheckOptions(myCurrentOptions);
            if (!UOM.Initialize(this))
            {
                MessageBox.Show(Strings.Errorinitializing, Strings.Error);
                UOM.Dispose();
                UOM.ShutDown();
                return;
            }
            PrepareTextEditor();
            UpdateButtonStatus(addButton, true);
        }
Esempio n. 2
0
 private void MainWindow_Closing(object sender, CancelEventArgs e)
 {
     UOM.SetStatusLabel(Strings.Closing);
     UOM.Dispose();
     aboutWindow.CancelEnabled   = false;
     optionsWindow.CancelEnabled = false;
     aboutWindow.Close();
     optionsWindow.Close();
     if (assemblyPicker != null)
     {
         assemblyPicker.CancelEnabled = false;
         assemblyPicker.Close();
     }
     App.Current.Shutdown();
 }
Esempio n. 3
0
 public static void Main()
 {
     try
     {
         Utility.Log.Initialize("UOMLog" + DateTime.Now.ToString(" [MM-dd-yyyy HH.mm.ss] ") + ".txt");
         App app = new App();
         app.InitializeComponent();
         app.Run();
     }
     catch (Exception ex)
     {
         Utility.Log.LogMessage(ex);
         UOM.Dispose();
         MessageBox.Show("Exception caught, please check log.");
     }
 }
Esempio n. 4
0
 public static void Main()
 {
     //System.Threading.Thread.CurrentThread.CurrentUICulture = new System.Globalization.CultureInfo( "zh" );
     try
     {
         Utility.Log.Initialize("UOMLog" + DateTime.Now.ToString(" [MM-dd-yyyy HH.mm.ss] ") + ".txt");
         App app = new App();
         app.InitializeComponent();
         app.Run();
     }
     catch (Exception ex)
     {
         Utility.Log.LogMessage(ex);
         UOM.Dispose();
         MessageBox.Show(Strings.Exceptioncaught);
     }
 }
Esempio n. 5
0
 private void Initialize()
 {
     myDropShadow             = new DropShadowEffect();
     myDropShadow.ShadowDepth = 0;
     myDropShadow.BlurRadius  = 8;
     myDropShadow.Color       = Colors.Black;
     myStartButtonWidth       = startButton.Width;
     myStopButtonWidth        = stopButton.Width;
     myAddButtonWidth         = addButton.Width;
     myRazorButtonWidth       = razorButton.Width;
     myStartButtonMargin      = startButton.Margin;
     myStopButtonMargin       = stopButton.Margin;
     myAddButtonMargin        = addButton.Margin;
     myRazorButtonMargin      = razorButton.Margin;
     mySteamButtonWidth       = steamButton.Width;
     mySteamButtonMargin      = steamButton.Margin;
     stopButton.IsEnabled     = false;
     razorButton.IsEnabled    = false;
     addButton.IsEnabled      = false;
     stopButton.Opacity       = myDisabledOpacity;
     Closing += new CancelEventHandler(MainWindow_Closing);
     TreeViewUpdater.Initialize(clientTreeView);
     OptionsWindow.OptionsChangedEvent   += new OptionsWindow.dOptionsChanged(OptionsWindow_OptionsChangedEvent);
     OptionsWindow.OptionsCancelledEvent += new OptionsWindow.dOptionsCancelled(OptionsWindow_OptionsCancelledEvent);
     ScriptCompiler.ScriptFinishedEvent  += new ScriptCompiler.dScriptFinished(ScriptCompiler_ScriptFinished);
     aboutWindow      = new About();
     optionsWindow    = new OptionsWindow();
     myCurrentOptions = OptionsData.Deserialize("options.xml");
     CheckOptions(myCurrentOptions);
     if (!UOM.Initialize(this))
     {
         MessageBox.Show("Error initializing UO Machine, please try again.", "Error");
         UOM.Dispose();
         UOM.ShutDown();
         return;
     }
     PrepareTextEditor();
     razorButton.IsEnabled = true;
     addButton.IsEnabled   = true;
 }