Exemplo 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);
        }
Exemplo n.º 2
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;
 }