/// <summary> /// 是否开启历史轨迹实时绘制 /// </summary> public void SetHistoryLineDrawing(HistoryMode mode, bool isDrawing, bool isAddLine = false) { //Log.Info("SetHistoryLineDrawing", string.Format("")); foreach (LocationHistoryPath_M h in Items) { if (isAddLine) { h.historyPathDrawing.AddLine(); } if (isDrawing) { if (mode == HistoryMode.Drawing) { h.historyPathDrawing.Drawing(); //if (isAddLine) //{ // h.historyPathDrawing.AddLine(); //} } } else { h.historyPathDrawing.PauseDraw(); } } }
private void ExecuteSQL(HistoryMode hMode) { DoInfoNotifications = true; if (cbClearListBeforeExcecute.Checked) { _cmdDone = 0; rtfMELDUNG.Clear(); rtfERRORS.Clear(); } var ri = RunSQL(hMode); _cmd = ri.lastSQL; if (ri.lastCommandType == SQLCommandType.select) { if (_dbReg.Version >= eDBVersion.FB3_32) { RefreshPLAN(); } } if (ri.commandDone) { MemoryusagePerStatement(); } EditMode(cbEditMode.Checked); tabRESULT.Text = $@"Results ({dgvResults.Rows.Count})"; tabHistory.Text = $@"History ({clbHISTORY.Items.Count})"; }
private void VerifyHistoryModeAtTheTimeWasSaveParameter(HistoryMode historyItemHistoryModeAtTheTime) { if (historyItemHistoryModeAtTheTime != HistoryMode.SaveParameterInstance) { throw new InvalidOperationException("Can't GoBack / GoForward without parameter because at the navigation time, " + "the history mode was 'DiscardParameterInstance'. You can use the other overload and specify parameter and viewbag, even if null"); } }
private void AddToFailedHistory(HistoryMode toHistory, string[] cmds) { if (toHistory != HistoryMode.AddToHistory) { return; } foreach (string cmd in cmds) { AddToFailedHistory(toHistory, cmd); } }
private void ExecSqlThread(HistoryMode toHistory) { ThreadStart ts = new ThreadStart(ExecSql); Thread th = new Thread(ts); th.Start(); while (th.ThreadState == ThreadState.Stopped) { Thread.Sleep(100); } }
private void ExecSqlTh(HistoryMode toHistory, string[] cmds) { dataSet1.Clear(); dgvResults.AutoGenerateColumns = true; string term = GetTerm(cmds); string connectionstr = ConnectionStrings.Instance().MakeConnectionString(_dbReg); var ri = _sqLcommand.ExecuteCommandsAddToDataset(dataSet1, cmds, true); dataSet1 = ri.dataSet; AddToHistory(toHistory, cmds); bindingSource1.DataMember = "Table"; }
private SQLCommandsReturnInfoClass RunSQL(HistoryMode hMode) { UserStart(); _obcmd.Clear(); _obcmd.AddRange(txtSQL.Lines); var ri = ExecSql(hMode); if (dgvResults.RowCount > 1) { tcSQLCONTROL.SelectedTab = tabRESULT; } UserBreak(); return(ri); }
private void AddToFailedHistory(HistoryMode toHistory, string cmd) { if (toHistory != HistoryMode.AddToHistory) { return; } if (!clbFAILED_HISTORY.Items.Contains(cmd)) { if (_lastSort == eSort.DESC) { clbFAILED_HISTORY.Items.Insert(0, cmd); } else { clbFAILED_HISTORY.Items.Add(cmd); } } lastCommand = cmd; }
public async Task <IList <HistoryItem> > GetHistory(HistoryMode historyMode, bool forceRefresh = false) { var watches = await _showService.GetWatchedShows(forceRefresh); switch (historyMode) { case HistoryMode.LastWeek: return(GetLastWeekHistory(watches)); case HistoryMode.LastMonth: return(GetLastMonthHistory(watches)); case HistoryMode.LastYear: return(GetLastYearHistory(watches)); default: return(GetLastWeekHistory(watches)); } }
private SQLCommandsReturnInfoClass ExecSql(HistoryMode toHistory) { dataSet1.Clear(); dgvResults.AutoGenerateColumns = true; if (txtSQL.Text.Length <= 0) { return(new SQLCommandsReturnInfoClass()); } _sqLcommand.SetEncoding(cbEncoding.Text); var ri = _sqLcommand.ExecuteCommandWithGlobalConnection(txtSQL.Lines); lblUsedMs.Text = ri.costs.ToString(); dataSet1 = ri.dataSet; if (dataSet1?.Tables.Count > 0) { bindingSource1.DataSource = dataSet1; bindingSource1.DataMember = "Table"; } else if (ri.lastCommandType == SQLCommandType.select) { NotifiesClass.Instance().AddToERROR("SQLViewForm->ExecSql->No datas selected"); _localNotifies?.AddToERROR("SQLViewForm->ExecSql->No datas selected"); } if (ri.commandDone) { AddToHistory(toHistory, ri.lastSQL); } else { AddToFailedHistory(toHistory, ri.lastSQL); } return(ri); }
/// <summary> /// 切换轨迹模式 /// </summary> public void SwithMode(HistoryMode modeT) { mode = modeT; }
public History(HistoryMode mode, Duration?interval = null, Duration?offset = null) { Mode = mode; Interval = interval; Offset = offset; }
void History() { _history = (cbHistory.Checked) ? HistoryMode.AddToHistory : HistoryMode.NoHistory; }