当前位置: 首页>>代码示例>>C#>>正文


C# IBackend类代码示例

本文整理汇总了C#中IBackend的典型用法代码示例。如果您正苦于以下问题:C# IBackend类的具体用法?C# IBackend怎么用?C# IBackend使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


IBackend类属于命名空间,在下文中一共展示了IBackend类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的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


注:本文中的IBackend类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。