Exemplo n.º 1
0
        public ILSubfigure()
        {
            m_isInitializing = true;
            // setup trace listener
            string logfile = System.Configuration.ConfigurationManager.AppSettings["logfile"];

            if (!String.IsNullOrEmpty(logfile))
            {
                File.Delete(logfile);
                DefaultTraceListener defTraceListener = new DefaultTraceListener();
                Trace.Listeners.Add(defTraceListener);
                defTraceListener.LogFileName = logfile;
                Trace.WriteLine(String.Format("{0} - ILSubfigure.ctor()", DateTime.Now));
            }
            this.Size            = new Size(500, 400);
            m_panel              = ILPanel.Create(getDefaultDeviceType());
            m_panel.DrawInactive = true;
            if (Trace.IndentLevel > 0)
            {
                Trace.TraceInformation("{0} - ILSubfigure.ctor() - panel created {1}", DateTime.Now, m_panel.GraphicDeviceType);
            }
            m_colorbar = new ILColorBar(m_panel.Colormap);
            m_colorbar.RegisterRangeSource(m_panel.Graphs.Limits);
            m_panel.ColormapChanged += new EventHandler(m_panel_ColormapChanged);
            m_title = new ILBorderFitLabel();
            m_panel.Graphs.CollectionChanged += new ILGraphCollectionChangedEvent(Graphs_CollectionChanged);
            SetDefaults();
            m_panel.Invalidate();
            m_isInitializing = false;
        }
Exemplo n.º 2
0
 public ILSubfigure () {
     m_isInitializing = true; 
     // setup trace listener 
     string logfile = System.Configuration.ConfigurationManager.AppSettings["logfile"];
     if (!String.IsNullOrEmpty(logfile)) {
         File.Delete(logfile); 
         DefaultTraceListener defTraceListener = new DefaultTraceListener();
         Trace.Listeners.Add(defTraceListener); 
         defTraceListener.LogFileName = logfile; 
         Trace.WriteLine(String.Format("{0} - ILSubfigure.ctor()",DateTime.Now));
     }
     this.Size = new Size(500,400);
     m_panel = ILPanel.Create(getDefaultDeviceType()); 
     m_panel.DrawInactive = true; 
     if (Trace.IndentLevel > 0) 
         Trace.TraceInformation("{0} - ILSubfigure.ctor() - panel created {1}",DateTime.Now,m_panel.GraphicDeviceType);
     m_colorbar = new ILColorBar(m_panel.Colormap); 
     m_colorbar.RegisterRangeSource(m_panel.Graphs.Limits);
     m_panel.ColormapChanged += new EventHandler(m_panel_ColormapChanged);
     m_title = new ILBorderFitLabel();
     m_panel.Graphs.CollectionChanged += new ILGraphCollectionChangedEvent(Graphs_CollectionChanged);
     SetDefaults(); 
     m_panel.Invalidate();
     m_isInitializing = false; 
 }