Example #1
0
 public MainPage(int nTrainGraphHourHeight, int nTrainGraphAutoScrollTimeout, int nMaxTimeGap, int nMaxPositionGap, string strPartOfVersionName, string userName)
 {
     this.m_strUserName = userName;
     this.m_strPartOfVersionName = strPartOfVersionName;
     base.add_MouseRightButtonDown(new MouseButtonEventHandler(this, (IntPtr) this.MainPage_MouseRightButtonDown));
     base.add_KeyDown(new KeyEventHandler(this, (IntPtr) this.MainPage_KeyDown));
     this.m_timer = new DispatcherTimer();
     this.m_timer.set_Interval(TimeSpan.FromSeconds(10.0));
     this.m_timer.add_Tick(new EventHandler(this.Timer_Tick));
     this.InitializeComponent();
     this.AddLog("Application started");
     this.trainGraphControl = new TrainGraphControl(nTrainGraphHourHeight, nTrainGraphAutoScrollTimeout, nMaxTimeGap, nMaxPositionGap);
     this.trainGraphControl.SetValue(Grid.RowProperty, 3);
     this.trainGraphControl.SetValue(Grid.ColumnProperty, 0);
     this.trainGraphControl.set_Margin(new Thickness(-4.0, 0.0, 0.0, 0.0));
     this.LayoutRoot.get_Children().Add(this.trainGraphControl);
     AssemblyName name = new AssemblyName(Assembly.GetExecutingAssembly().FullName);
     this.textBlockApplicationViersion.set_Text(string.Format(" v.{0}", name.Version));
     this.TrainGraphStateLoadFromCache(this.CacheVersion);
     this.m_layoutSize = App.LayoutParameters.GetLayoutSize(this.m_layoutSize);
     Application.get_Current().get_Host().get_Content().add_Resized(new EventHandler(this.Content_Resized));
 }
Example #2
0
        public MainPage(int nTrainGraphHourHeight, int nTrainGraphAutoScrollTimeout, int nMaxTimeGap, int nMaxPositionGap, string strPartOfVersionName, string userName)
        {
            this.m_strUserName          = userName;
            this.m_strPartOfVersionName = strPartOfVersionName;
            base.add_MouseRightButtonDown(new MouseButtonEventHandler(this, (IntPtr)this.MainPage_MouseRightButtonDown));
            base.add_KeyDown(new KeyEventHandler(this, (IntPtr)this.MainPage_KeyDown));
            this.m_timer = new DispatcherTimer();
            this.m_timer.set_Interval(TimeSpan.FromSeconds(10.0));
            this.m_timer.add_Tick(new EventHandler(this.Timer_Tick));
            this.InitializeComponent();
            this.AddLog("Application started");
            this.trainGraphControl = new TrainGraphControl(nTrainGraphHourHeight, nTrainGraphAutoScrollTimeout, nMaxTimeGap, nMaxPositionGap);
            this.trainGraphControl.SetValue(Grid.RowProperty, 3);
            this.trainGraphControl.SetValue(Grid.ColumnProperty, 0);
            this.trainGraphControl.set_Margin(new Thickness(-4.0, 0.0, 0.0, 0.0));
            this.LayoutRoot.get_Children().Add(this.trainGraphControl);
            AssemblyName name = new AssemblyName(Assembly.GetExecutingAssembly().FullName);

            this.textBlockApplicationViersion.set_Text(string.Format(" v.{0}", name.Version));
            this.TrainGraphStateLoadFromCache(this.CacheVersion);
            this.m_layoutSize = App.LayoutParameters.GetLayoutSize(this.m_layoutSize);
            Application.get_Current().get_Host().get_Content().add_Resized(new EventHandler(this.Content_Resized));
        }