コード例 #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 );
        }