public MainForm(IGisDataReader dataReader, IDbService dbService, ILogger logger, IGeneralizer generalizer, GeneralizerOptions generalizerOptions, ILinearGeneralizer linearGeneralizer) { InitializeComponent(); _viewModel = new MainFormViewModel(Canvas, dataReader, dbService, logger, generalizer, generalizerOptions, linearGeneralizer); InitializeMetaSection(); InitializeMenu(); _viewModel.MapsUpdatedEvent += MapsUpdatedEventHandler; _scrollTimer = new ScrollTimer(); _scrollTimer.ScrollEvent += _scrollTimer_ScrollEvent; GeneralizeBtn.Anchor = AnchorStyles.Bottom | AnchorStyles.Right; DrawSourceBtn.Anchor = AnchorStyles.Bottom | AnchorStyles.Right; MinDistanceTextBox.Anchor = AnchorStyles.Bottom | AnchorStyles.Right; label1.Anchor = AnchorStyles.Bottom | AnchorStyles.Right; WindowState = FormWindowState.Maximized; }
private void Main_FormClosed(object sender, FormClosedEventArgs e) { logger.Trace("start"); MainMessageRoll_Dispose(); ScrollTimer.Stop(); ScrollTimer.Dispose(); logger.Trace("end"); }
private void Main_Load(object sender, EventArgs e) { logger.Trace("start"); Size borderSize = SystemInformation.BorderSize + SystemInformation.FrameBorderSize + SystemInformation.FixedFrameBorderSize; Width = MessagePictureWidth + borderSize.Width * 2; Height = MessagePictureHeight + SystemInformation.CaptionHeight + borderSize.Height * 2; default_ChromakeyColor = Color.FromArgb(255, 0, 255, 0); operateForm.Show(); ScrollTimer.Start(); logger.Trace("end"); }
private static void BeginPlayback() { DoLogin(World.Player); //ClientCommunication.SetDeathMsg( "You are dead." ); ClientCommunication.BringToFront(ClientCommunication.FindUOWindow()); TimeSpan delay = TimeSpan.FromMilliseconds(m_GZIn.Compressed.ReadInt32()); m_PlayTimer = Timer.DelayedCallback(delay, m_SendNext); m_PlayTimer.Start(); if (m_ScrollTimer == null) { m_ScrollTimer = new ScrollTimer(); } m_ScrollTimer.Start(); m_StartTime = DateTime.UtcNow; m_Elapsed = delay; UpdateTimeText(); btnPlay.Enabled = btnStop.Enabled = true; }
private static void BeginPlayback() { DoLogin( World.Player ); //ClientCommunication.SetDeathMsg( "You are dead." ); ClientCommunication.BringToFront( ClientCommunication.FindUOWindow() ); TimeSpan delay = TimeSpan.FromMilliseconds( m_GZIn.Compressed.ReadInt32() ); m_PlayTimer = Timer.DelayedCallback( delay, m_SendNext ); m_PlayTimer.Start(); if ( m_ScrollTimer == null ) m_ScrollTimer = new ScrollTimer(); m_ScrollTimer.Start(); m_StartTime = DateTime.Now; m_Elapsed = delay; UpdateTimeText(); btnPlay.Enabled = btnStop.Enabled = true; }