本文整理汇总了C#中IBackend类的典型用法代码示例。如果您正苦于以下问题:C# IBackend类的具体用法?C# IBackend怎么用?C# IBackend使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
IBackend类属于命名空间,在下文中一共展示了IBackend类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。
示例1: ModelHelpers
public ModelHelpers(IBackend gallifrey, FlyoutsControl flyoutsControl)
{
this.flyoutsControl = flyoutsControl;
Gallifrey = gallifrey;
DialogContext = new DialogContext();
openFlyouts = new List<OpenFlyoutDetails>();
}
开发者ID:BlythMeister,项目名称:Gallifrey,代码行数:7,代码来源:ModelHelpers.cs
示例2: AddTimerWindow
public AddTimerWindow(IBackend gallifrey)
{
this.gallifrey = gallifrey;
InitializeComponent();
calStartDate.MinDate = DateTime.Now.AddDays(gallifrey.AppSettings.KeepTimersForDays*-1);
calStartDate.MaxDate = DateTime.Now.AddDays(gallifrey.AppSettings.KeepTimersForDays);
}
开发者ID:harrisonmeister,项目名称:Gallifrey,代码行数:7,代码来源:AddTimerWindow.cs
示例3: SearchWindow
public SearchWindow(IBackend gallifrey)
{
this.gallifrey = gallifrey;
InitializeComponent();
try
{
cmbUserFilters.Items.Add(string.Empty);
foreach (var jiraFilter in gallifrey.JiraConnection.GetJiraFilters())
{
cmbUserFilters.Items.Add(jiraFilter);
}
cmbUserFilters.Enabled = true;
}
catch (NoResultsFoundException)
{
cmbUserFilters.Enabled = false;
}
try
{
var currentUserIssues = gallifrey.JiraConnection.GetJiraCurrentUserOpenIssues();
lstResults.DataSource = currentUserIssues.Select(issue => new JiraSearchResult(issue)).ToList();
lstResults.Enabled = true;
}
catch (NoResultsFoundException)
{
lstResults.Enabled = false;
btnAddTimer.Enabled = false;
}
TopMost = gallifrey.Settings.UiSettings.AlwaysOnTop;
}
开发者ID:richard-green,项目名称:Gallifrey,代码行数:33,代码来源:SearchWindow.cs
示例4: SearchWindow
public SearchWindow(IBackend gallifrey)
{
this.gallifrey = gallifrey;
InitializeComponent();
try
{
cmbUserFilters.DataSource = gallifrey.JiraConnection.GetJiraFilters().ToList();
cmbUserFilters.Enabled = true;
}
catch (NoResultsFoundException)
{
cmbUserFilters.Enabled = false;
}
try
{
var currentUserIssues = gallifrey.JiraConnection.GetJiraCurrentUserOpenIssues();
lstResults.DataSource = currentUserIssues.Select(issue => new JiraSearchResult(issue)).ToList();
lstResults.Enabled = true;
}
catch (NoResultsFoundException)
{
lstResults.Enabled = false;
}
}
开发者ID:harrisonmeister,项目名称:Gallifrey,代码行数:26,代码来源:SearchWindow.cs
示例5: EditTimerModel
public EditTimerModel(IBackend gallifrey, Guid timerId)
{
var dateToday = DateTime.Now;
var timer = gallifrey.JiraTimerCollection.GetTimer(timerId);
UniqueId = timerId;
JiraReference = timer.JiraReference;
if (gallifrey.Settings.AppSettings.KeepTimersForDays > 0)
{
MinDate = dateToday.AddDays(gallifrey.Settings.AppSettings.KeepTimersForDays * -1);
MaxDate = dateToday.AddDays(gallifrey.Settings.AppSettings.KeepTimersForDays);
}
else
{
MinDate = dateToday.AddDays(-300);
MaxDate = dateToday.AddDays(300);
}
RunDate = timer.DateStarted;
DisplayDate = timer.DateStarted;
Hours = timer.ExactCurrentTime.Hours > 9 ? 9 : timer.ExactCurrentTime.Hours;
Minutes = timer.ExactCurrentTime.Minutes;
DateEditable = timer.HasExportedTime();
JiraReferenceEditable = timer.HasExportedTime();
TimeEditable = !timer.IsRunning;
OriginalJiraReference = JiraReference;
OriginalRunDate = RunDate;
OriginalHours = Hours;
OriginalMinutes = Minutes;
}
开发者ID:richard-green,项目名称:Gallifrey,代码行数:34,代码来源:EditTimerModel.cs
示例6: SetSource
public void SetSource (IListDataSource source, IBackend sourceBackend)
{
var dataSource = sourceBackend as ListDataSource;
if (dataSource != null)
ComboBox.ItemsSource = dataSource;
else
ComboBox.ItemsSource = new ListSourceNotifyWrapper (source);
}
开发者ID:m13253,项目名称:xwt,代码行数:8,代码来源:ComboBoxBackend.cs
示例7: OnStart
public void OnStart(IConfiguration config, IBackend backend)
{
this.backend = backend;
var token = config[Constants.ConfigKey.DiffBotApiKey];
this.apiEndPoint = "http://www.diffbot.com/api/article?summary&token=" + HttpUtility.UrlEncode(token);
}
开发者ID:kfritz,项目名称:bentbot,代码行数:8,代码来源:WebPreview.cs
示例8: AdjustTimerWindow
public AdjustTimerWindow(IBackend gallifrey, Guid timerGuid)
{
this.gallifrey = gallifrey;
timerToShow = gallifrey.JiraTimerCollection.GetTimer(timerGuid);
InitializeComponent();
txtJiraRef.Text = timerToShow.JiraReference;
}
开发者ID:harrisonmeister,项目名称:Gallifrey,代码行数:8,代码来源:AdjustTimerWindow.cs
示例9: OnStart
public void OnStart(IConfiguration config, IBackend backend)
{
this.backend = backend;
if (!String.IsNullOrEmpty(config[Bender.Common.Constants.ConfigKey.WikipediaAlias]))
{
this.regexAlias = new Regex(String.Format(@"^\s*{0},?\s+(.+?)\s*$", config[Bender.Common.Constants.ConfigKey.WikipediaAlias]), RegexOptions.IgnoreCase);
}
}
开发者ID:kfritz,项目名称:Bender,代码行数:8,代码来源:Wikipedia.cs
示例10: SettingsWindow
public SettingsWindow(IBackend gallifrey)
{
this.gallifrey = gallifrey;
InitializeComponent();
if (gallifrey.Settings.JiraConnectionSettings.JiraUrl != null) txtJiraUrl.Text = gallifrey.Settings.JiraConnectionSettings.JiraUrl;
if (gallifrey.Settings.JiraConnectionSettings.JiraUsername != null) txtJiraUsername.Text = gallifrey.Settings.JiraConnectionSettings.JiraUsername;
if (gallifrey.Settings.JiraConnectionSettings.JiraPassword != null) txtJiraPassword.Text = gallifrey.Settings.JiraConnectionSettings.JiraPassword;
chkAlert.Checked = gallifrey.Settings.AppSettings.AlertWhenNotRunning;
chkAutoUpdate.Checked = gallifrey.Settings.AppSettings.AutoUpdate;
txtAlertMins.Text = ((gallifrey.Settings.AppSettings.AlertTimeMilliseconds / 1000) / 60).ToString();
txtTimerDays.Text = gallifrey.Settings.AppSettings.KeepTimersForDays.ToString();
chkUsageTracking.Checked = gallifrey.Settings.AppSettings.UsageTracking;
cmdDefaultExport.SelectedIndex = (int)gallifrey.Settings.ExportSettings.DefaultRemainingValue;
txtCommentPrefix.Text = gallifrey.Settings.ExportSettings.ExportCommentPrefix;
txtDefaultComment.Text = gallifrey.Settings.ExportSettings.EmptyExportComment;
txtTargetHours.Text = gallifrey.Settings.AppSettings.TargetLogPerDay.Hours.ToString();
txtTargetMins.Text = gallifrey.Settings.AppSettings.TargetLogPerDay.Minutes.ToString();
for (var i = 0; i < chklstWorkingDays.Items.Count; i++)
{
var foundItem = gallifrey.Settings.AppSettings.ExportDays.Any(exportDay => exportDay.ToString().ToLower() == chklstWorkingDays.Items[i].ToString().ToLower());
chklstWorkingDays.SetItemChecked(i, foundItem);
}
if (gallifrey.Settings.ExportSettings.ExportPrompt == null)
{
gallifrey.Settings.ExportSettings.ExportPrompt = new ExportPrompt();
}
for (var i = 0; i < chklstExportPrompt.Items.Count; i++)
{
switch (chklstExportPrompt.Items[i].ToString())
{
case "Add Idle Time":
chklstExportPrompt.SetItemChecked(i, gallifrey.Settings.ExportSettings.ExportPrompt.OnAddIdle);
break;
case "Manual Timer Adjustment":
chklstExportPrompt.SetItemChecked(i, gallifrey.Settings.ExportSettings.ExportPrompt.OnManualAdjust);
break;
case "Stop Timer":
chklstExportPrompt.SetItemChecked(i, gallifrey.Settings.ExportSettings.ExportPrompt.OnStop);
break;
case "Add Pre-Loaded Timer":
chklstExportPrompt.SetItemChecked(i, gallifrey.Settings.ExportSettings.ExportPrompt.OnCreatePreloaded);
break;
}
}
chkExportAll.Checked = gallifrey.Settings.ExportSettings.ExportPromptAll;
cmdWeekStart.Text = gallifrey.Settings.AppSettings.StartOfWeek.ToString();
chkAlwaysTop.Checked = gallifrey.Settings.UiSettings.AlwaysOnTop;
}
开发者ID:richard-green,项目名称:Gallifrey,代码行数:58,代码来源:SettingsWindow.cs
示例11: ImportModels
/////////////////////////////////////////////////////////////////////////////////
private IGraph ImportModels(List<String> ecoreFilenames, String grgFilename, IBackend backend, out IActions actions)
{
foreach(String ecoreFilename in ecoreFilenames)
{
String modelText = ParseModel(ecoreFilename);
String modelfilename = ecoreFilename.Substring(0, ecoreFilename.LastIndexOf('.')) + "__ecore.gm";
// Do we have to update the model file (.gm)?
if(!File.Exists(modelfilename) || File.GetLastWriteTime(ecoreFilename) > File.GetLastWriteTime(modelfilename))
{
Console.WriteLine("Writing model file \"" + modelfilename + "\"...");
using(StreamWriter writer = new StreamWriter(modelfilename))
writer.Write(modelText);
}
}
if(grgFilename == null)
{
grgFilename = "";
foreach(String ecoreFilename in ecoreFilenames)
grgFilename += ecoreFilename.Substring(0, ecoreFilename.LastIndexOf('.')) + "_";
grgFilename += "_ecore.grg";
StringBuilder sb = new StringBuilder();
sb.Append("// Automatically generated\n// Do not change, changes will be lost!\n\nusing ");
DateTime grgTime;
if(!File.Exists(grgFilename)) grgTime = DateTime.MinValue;
else grgTime = File.GetLastWriteTime(grgFilename);
bool mustWriteGrg = false;
bool first = true;
foreach(String ecore in ecoreFilenames)
{
if(first) first = false;
else sb.Append(", ");
sb.Append(ecore.Substring(0, ecore.LastIndexOf('.')) + "__ecore");
if(File.GetLastWriteTime(ecore) > grgTime)
mustWriteGrg = true;
}
if(mustWriteGrg)
{
sb.Append(";\n");
using(StreamWriter writer = new StreamWriter(grgFilename))
writer.Write(sb.ToString());
}
}
IGraph graph;
backend.CreateFromSpec(grgFilename, "defaultname", null,
ProcessSpecFlags.UseNoExistingFiles, new List<String>(),
out graph, out actions);
return graph;
}
开发者ID:jblomer,项目名称:GrGen.NET,代码行数:60,代码来源:ECoreImport.cs
示例12: MainViewModel
public MainViewModel(IBackend gallifrey, MainWindow mainWindow)
{
Gallifrey = gallifrey;
MainWindow = mainWindow;
TimerDates = new ObservableCollection<TimerDateModel>();
runningWatcher = new Timer(1000);
runningWatcher.Elapsed += runningWatcherElapsed;
Gallifrey.VersionControl.PropertyChanged += VersionControlPropertyChanged;
}
开发者ID:richard-green,项目名称:Gallifrey,代码行数:9,代码来源:MainViewModel.cs
示例13: SetSource
public override void SetSource (IListDataSource source, IBackend sourceBackend)
{
base.SetSource (source, sourceBackend);
source.RowInserted += HandleColumnSizeChanged;
source.RowDeleted += HandleColumnSizeChanged;
source.RowChanged += HandleColumnSizeChanged;
ResetColumnSize (source);
}
开发者ID:m13253,项目名称:xwt,代码行数:9,代码来源:ListBoxBackend.cs
示例14: SetSource
public void SetSource(ITreeDataSource source, IBackend sourceBackend)
{
TreeStoreBackend b = sourceBackend as TreeStoreBackend;
if (b == null) {
CustomTreeModel model = new CustomTreeModel (source);
Widget.Model = model.Store;
} else
Widget.Model = b.Store;
}
开发者ID:carlosalberto,项目名称:xwt,代码行数:9,代码来源:TreeViewBackend.cs
示例15: SetSource
public void SetSource(IListDataSource source, IBackend sourceBackend)
{
ListStoreBackend b = sourceBackend as ListStoreBackend;
if (b == null) {
CustomListModel model = new CustomListModel (source, Widget);
Widget.Model = model.Store;
} else
Widget.Model = b.Store;
}
开发者ID:RevolutionSmythe,项目名称:xwt,代码行数:9,代码来源:ListViewBackend.cs
示例16: OnStart
public void OnStart(IConfiguration config, IBackend backend)
{
configuration = config;
this.backend = backend;
random = new Random();
regexGetDll = new Regex(@"^\s*load library\s+(.+?)\s*$", RegexOptions.IgnoreCase);
regexEnableModule = new Regex(@"^\s*enable module\s+(.+?)\s*$", RegexOptions.IgnoreCase);
regexDisableModule = new Regex(@"^\s*disable module\s+(.+?)\s*$", RegexOptions.IgnoreCase);
}
开发者ID:kfritz,项目名称:Bender,代码行数:9,代码来源:Extend.cs
示例17: ChangeLogWindow
public ChangeLogWindow(IBackend gallifrey, IDictionary<Version, ChangeLogVersionDetails> changeLog)
{
InitializeComponent();
lblCurrentVersion.Text = string.Format("Current Version: {0}", gallifrey.VersionControl.VersionName);
foreach (var changeLogDetail in changeLog)
{
txtChangeLog.SelectionFont = new Font(txtChangeLog.SelectionFont.FontFamily, 14, FontStyle.Bold);
if (string.IsNullOrWhiteSpace(changeLogDetail.Value.Name))
{
txtChangeLog.AppendText(string.Format("Version: {0}\n", changeLogDetail.Key));
}
else
{
txtChangeLog.AppendText(string.Format("Version: {0} ({1})\n", changeLogDetail.Key, changeLogDetail.Value.Name));
}
if (changeLogDetail.Value.Features.Any())
{
txtChangeLog.SelectionFont = new Font(txtChangeLog.SelectionFont.FontFamily, 12, FontStyle.Underline);
txtChangeLog.AppendText("New Features\n");
txtChangeLog.SelectionFont = new Font(txtChangeLog.SelectionFont.FontFamily, 10, FontStyle.Regular);
foreach (var feature in changeLogDetail.Value.Features)
{
txtChangeLog.AppendText(string.Format(" => {0}\n", feature));
}
}
if (changeLogDetail.Value.Bugs.Any())
{
txtChangeLog.SelectionFont = new Font(txtChangeLog.SelectionFont.FontFamily, 12, FontStyle.Underline);
txtChangeLog.AppendText("Bug Fixes\n");
txtChangeLog.SelectionFont = new Font(txtChangeLog.SelectionFont.FontFamily, 10, FontStyle.Regular);
foreach (var feature in changeLogDetail.Value.Bugs)
{
txtChangeLog.AppendText(string.Format(" => {0}\n", feature));
}
}
if (changeLogDetail.Value.Others.Any())
{
txtChangeLog.SelectionFont = new Font(txtChangeLog.SelectionFont.FontFamily, 12, FontStyle.Underline);
txtChangeLog.AppendText("Other Items\n");
txtChangeLog.SelectionFont = new Font(txtChangeLog.SelectionFont.FontFamily, 10, FontStyle.Regular);
foreach (var feature in changeLogDetail.Value.Others)
{
txtChangeLog.AppendText(string.Format(" => {0}\n", feature));
}
}
txtChangeLog.AppendText("\n");
}
txtChangeLog.Select(0,0);
}
开发者ID:richard-green,项目名称:Gallifrey,代码行数:56,代码来源:ChangeLogWindow.cs
示例18: RenameTimerWindow
public RenameTimerWindow(IBackend gallifrey, Guid timerGuid)
{
this.gallifrey = gallifrey;
timerToShow = gallifrey.JiraTimerCollection.GetTimer(timerGuid);
InitializeComponent();
txtJiraRef.Text = timerToShow.JiraReference;
calStartDate.Value = timerToShow.DateStarted.Date;
txtJiraRef.Enabled = timerToShow.HasExportedTime();
}
开发者ID:harrisonmeister,项目名称:Gallifrey,代码行数:10,代码来源:RenameTimerWindow.cs
示例19: Import
/// <summary>
/// Creates a new graph from the given ECore metamodels.
/// If a grg file is given, the graph will use the graph model declared in it and the according
/// actions object will be associated to the graph.
/// If a xmi file is given, the model instance will be imported into the graph.
/// Any errors will be reported by exception.
/// </summary>
/// <param name="backend">The backend to use to create the graph.</param>
/// <param name="ecoreFilenames">A list of ECore model specification files. It must at least contain one element.</param>
/// <param name="grgFilename">A grg file to be used to create the graph, or null.</param>
/// <param name="xmiFilename">The filename of the model instance to be imported, or null.</param>
/// <param name="noPackageNamePrefix">Prefix the types with the name of the package? Can only be used if names from the packages are disjoint.</param>
/// <param name="actions">Receives the actions object in case a .grg model is given.</param>
public static IGraph Import(IBackend backend, List<String> ecoreFilenames, String grgFilename, String xmiFilename, bool noPackageNamePrefix, out IActions actions)
{
ECoreImport imported = new ECoreImport();
imported.graph = imported.ImportModels(ecoreFilenames, grgFilename, backend, out actions);
if(xmiFilename != null)
{
Console.WriteLine("Importing graph...");
imported.ImportGraph(xmiFilename);
}
return imported.graph;
}
开发者ID:jblomer,项目名称:GrGen.NET,代码行数:24,代码来源:ECoreImport.cs
示例20: BackendRepos
public BackendRepos(IBackend backend)
{
if (backend == null)
throw new ArgumentNullException ("backend");
TaskListRepository = backend.TaskListRepository;
TaskRepository = backend.TaskRepository;
NoteRepository = backend.NoteRepository;
TaskObjectManager = new TaskObjectManager ();
}
开发者ID:antoniusriha,项目名称:Tasque,代码行数:11,代码来源:BackendRepos.cs
注:本文中的IBackend类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论