本文整理汇总了C#中Duplicati.IsLastModNull方法的典型用法代码示例。如果您正苦于以下问题:C# Duplicati.IsLastModNull方法的具体用法?C# Duplicati.IsLastModNull怎么用?C# Duplicati.IsLastModNull使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Duplicati
的用法示例。
在下文中一共展示了Duplicati.IsLastModNull方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: SetSummary
/// <summary>
/// Set the values
/// </summary>
/// <param name="aRow">The job row</param>
/// <param name="aDetails">Text description of the job trigger</param>
public void SetSummary(Duplicati.Scheduler.Data.SchedulerDataSet.JobsRow aRow, string aDetails)
{
this.nameTextBox.Text = aRow.Name;
this.DescriptionTextBox.Text = aDetails;
this.sourceTextBox.Text = aRow.Source;
this.destinationTextBox.Text = aRow.Destination;
this.LastModLabel.Text = (aRow.IsLastModNull() || aRow.LastMod == DateTime.MinValue) ? "Never edited" : "Last edited: " + aRow.LastMod.ToString("ddd, dd MMMM yyyy hh:mm tt");
if (aRow.FullOnly || (aRow.FullRepeatDays == 0 && aRow.FullAfterN == 0)) this.fullRepeatStrTextBox.Text = "Always do full backups";
else this.fullRepeatStrTextBox.Text = aRow.FullRepeatDays > 0 ? aRow.FullRepeatDays + " days " : aRow.FullAfterN.ToString()+" incrementals";
this.MaxFullTextBox.Text = aRow.MaxFulls > 0 ? "the last "+aRow.MaxFulls.ToString("N0") : "all" ;
this.MaxAgeTextBox.Text = aRow.MaxAgeDays > 0 ? aRow.MaxAgeDays.ToString("N0") + " days" : "<no limit>" ;
this.PassRichTextBox.Text = new string[] { "not password protected.", "protected by local password.", "protected by global password." }[aRow.GetCheckSrc()];
}
示例2: GetRow
/// <summary>
/// Populate a JobsRow with results from the controls
/// </summary>
/// <param name="aRow">Row to fill</param>
private void GetRow(Duplicati.Scheduler.Data.SchedulerDataSet.JobsRow aRow)
{
// Now, if User has been in the Destination tab, we may have a new
// set of destination and options, fetch them.
if (GuiControl != null && VisitedDestination)
{
Dictionary<string, string> Opts = new Dictionary<string, string>();
Dictionary<string, string> GuiOpts = new Dictionary<string, string>();
string Dest = string.Empty;
if (GetConfiguration(out Opts, out GuiOpts, out Dest))
{
aRow.SetOptions(Opts);
aRow.SetGuiOptions(GuiOpts);
aRow.Destination = Dest;
}
}
// Get stuff from the controls
aRow.Source = string.Join(System.IO.Path.PathSeparator.ToString(), this.folderSelectControl1.SelectedFolders);
aRow.FullOnly = this.FullAlwaysRadioButton.Checked;
aRow.FullAfterN = this.FullAfterNRadioButton.Checked ? (int)this.FullAfterNNumericUpDown.Value : 0;
aRow.FullRepeatDays = this.FullDaysRadioButton.Checked ? (int)this.FullDaysNumericUpDown.Value : 0;
aRow.FilterLines = this.FilterList;
aRow.MaxFulls = this.MaxFullsCheckBox.Checked ? (int)this.MaxFullsNumericUpDown.Value : 0;
aRow.MaxAgeDays = this.MaxAgeCheckBox.Checked ? (int)this.MaxAgeNnumericUpDown.Value : 0;
aRow.Enabled = this.TaskEditor.GetTrigger().Enabled;
aRow.TriggerXML = TaskEditControl.TriggerToXml(this.TaskEditor.GetTrigger());
if (itsAdvanced.DialogResult == DialogResult.OK)
{
aRow.AutoCleanup = itsAdvanced.AutoDelete;
aRow.MapDrives = itsAdvanced.Map;
}
aRow.Checksum = Settings.Values.Checksum;
aRow.CheckMod = Settings.Values.CheckMod;
aRow.SetCheckSrc(this.PasswordMethodComboBox.SelectedIndex);
// Never edited (?)
if (aRow.IsLastModNull()) aRow.LastMod = DateTime.Now;
}