Exemple #1
0
 internal MyLoggingExceptionHandler(string logCategory, int eventId, TraceEventType severity, string title, int priority, 
     Type formatterType, LogWriter writer, DocumentModel doc)
     : base(logCategory, eventId, severity, title, priority, formatterType, writer)
 {
     this.m_Writer = writer;
     this.doc = doc;
 }
Exemple #2
0
 internal RenderWindow(DocumentModel doc)
 {
     this.m_Doc = doc;
     renderer = new SharpGLRenderer();
     doc.Renderer = renderer;
     InitializeComponent();
     this.MouseWheel += new MouseEventHandler(Form1_MouseWheel);
 }
Exemple #3
0
        internal static ExceptionManager BuildExceptionManagerConfig(LogWriter logWriter, DocumentModel doc)
        {
            var loggingAndReplacing = new List<ExceptionPolicyEntry>
            {
                new ExceptionPolicyEntry(typeof (Exception),
                    PostHandlingAction.ThrowNewException,
                    new IExceptionHandler[]
                     {
                       new MyLoggingExceptionHandler("Error", 9000, TraceEventType.Error,
                         "Simulation Exception", 5, typeof(TextExceptionFormatter), logWriter, doc),
                       new ReplaceHandler(ErrorMsg,
                         typeof(Exception))
                     })
            };

            var policies = new List<ExceptionPolicyDefinition>();
            policies.Add(new ExceptionPolicyDefinition("LoggingAndReplacingException", loggingAndReplacing));
            ExceptionManager exManager = new ExceptionManager(policies);
            return exManager;
        }
Exemple #4
0
        public MainForm()
        {
            try // can't be handled by exception manager because it doesn't exist yet
            {
                InitializeComponent();

                m_GlobalModel = new GlobalStateModel();
                m_Document = new DocumentModel();
                m_Document.GlobalModel = m_GlobalModel;
                m_GlobalModel.InitEnterpriseBlocks(m_Document);
            }
            catch (Exception e)
            {
                throw e;
            }
            m_GlobalModel.ExManager.Process(() =>
            {
                Process.GetCurrentProcess().PriorityClass =
               ProcessPriorityClass.High;  	// Prevents "Normal" processes

                OutputWindow f1 = new OutputWindow();
                f1.Show(dockPanel, DockState.DockBottom);
                CodeExplorer f3 = new CodeExplorer();
                f3.Show(dockPanel, DockState.DockRight);
                RenderWindow f2 = new RenderWindow(m_Document);
                f2.CloseButtonVisible = false;
                f2.Show(dockPanel, DockState.Document);
                f4 = new DebugView(m_Document);
                f4.Show(dockPanel, DockState.DockRight);
                f4.Hide();
                ActionView f5 = new ActionView();
                f5.Show(dockPanel, DockState.DockRight);
                f5.Hide();
                m_GlobalModel.AddOutputObserver(f1);
                m_GlobalModel.AddDebugMessageObserver(f4);
                m_Document.AddNCTextObserver(f3);
                m_Document.ReadConfigFile();
                m_Document.AddAnimationStateObserver(this);
                m_GlobalModel.OutputWriter.Write("Application started" + Environment.NewLine, "Output", 0);
            }, "LoggingAndReplacingException");
        }
Exemple #5
0
 internal void InitEnterpriseBlocks(DocumentModel doc)
 {
     LoggingConfiguration loggingConfiguration = LoggingSupport.BuildLoggingConfig(this);
     m_OutputWriter = new LogWriter(loggingConfiguration);
     m_ExManager = ExceptionSupport.BuildExceptionManagerConfig(m_OutputWriter, doc);
 }
Exemple #6
0
 internal Interpreter(string filepath, DocumentModel doc)
 {
     this.filepath = filepath;
     this.m_DocModel = doc;
 }
Exemple #7
0
 internal DebugView(DocumentModel d)
 {
     InitializeComponent();
     doc = d;
     doc.GlobalModel.RestrictFrameRate = !checkBox1.Checked;
 }
Exemple #8
0
 public Animation(DocumentModel documentModel, Object animationLock)
 {
     m_DocumentModel = documentModel;
     m_AnimationLock = animationLock;
     Mesh.Rendering.PerformanceCounter.Reset();
 }
Exemple #9
0
 internal TSVCalculator(DocumentModel m)
 {
 }
Exemple #10
0
 internal Processor(DocumentModel doc)
 {
     Reset();
     this.doc = doc;
 }