public override void onMetronomeEvent(object sender, metronomeEventArgs e) { if (this.spinBox.InvokeRequired) { UpdateForm updateForm = new UpdateForm(UpdateSpinBox); spinBox.Invoke(updateForm, new object[] { e }); } else { UpdateSpinBox(e); } }
/// <summary> /// Updates a specific feature. /// </summary> /// <param name="update">The feature selected for update.</param> /// <returns>True if feature accepted for update. False if an update is already in progress.</returns> internal bool Run(Feature update) { // Return if we're currently updating something, or we've // hit a problem during rollforward. if (m_Cmd != null || m_Problem != null) return false; // If we prevously had something selected for update, // undo any drawing that we did for it. ErasePainting(); // Remember the specified feature. m_SelectedFeature = update; // If the info dialog has not already been displayed, display it now. if (m_Info == null) { m_Info = new UpdateForm(this); m_Info.Show(); } // Get the info window to display stuff about the selected feature. m_Info.Display(m_SelectedFeature); // Leave keyboard focus with the info dialog. m_Info.Focus(); // Draw stuff. Draw(); ActiveDisplay.PaintNow(); return true; }
/// <summary> /// Initializes a new instance of the <see cref="UpdateUI"/> class. /// </summary> /// <param name="action">The action that initiated this command</param> public UpdateUI(IUserAction action) : base(action) { m_SelectedFeature = null; m_Info = null; m_Cmd = null; m_IsFinishing = false; m_DepOps = null; m_Problem = null; Session s = CadastralMapModel.Current.WorkingSession; m_PreUpdateId = (s.LastOperation == null ? s.Id : s.LastOperation.EditSequence); }
public override void Dispose() { // If a command is running(!), abort it now. if (m_Cmd != null) { m_Cmd.DialAbort(null); m_Cmd = null; } // Get rid of the dialog that shows info about the current update feature. if (m_Info != null) { m_Info.Dispose(); m_Info = null; } base.Dispose(); }
private void 检测更新ToolStripMenuItem_Click(object sender, EventArgs e) { UpdateForm ud = new UpdateForm(); ud.MainAppFileName = Application.ExecutablePath; ud.VersionFileUrl = @"https://github.com/450640526/HtmExplorer/blob/master/HtmExplorer_Release/version.txt?raw=true"; ud.UpdateFileUrl = @"https://github.com/450640526/HtmExplorer/blob/master/HtmExplorer_Release/HtmExplorer.rar?raw=true"; ud.Show(); }