本文整理汇总了C#中SirenOfShame.Lib.Settings.SirenOfShameSettings类的典型用法代码示例。如果您正苦于以下问题:C# SirenOfShameSettings类的具体用法?C# SirenOfShameSettings怎么用?C# SirenOfShameSettings使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
SirenOfShameSettings类属于SirenOfShame.Lib.Settings命名空间,在下文中一共展示了SirenOfShameSettings类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: RefreshDisplayNames
public void RefreshDisplayNames(SirenOfShameSettings settings)
{
foreach (var buildStatusDto in BuildStatusDtos)
{
buildStatusDto.SetDisplayName(settings);
}
}
示例2: ConfigureSounds
public ConfigureSounds(SirenOfShameSettings settings)
{
_settings = settings;
InitializeComponent();
RefreshSoundList();
}
示例3: GetMostRecentNewsItems
public void GetMostRecentNewsItems(SirenOfShameSettings settings, Action<IList<NewNewsItemEventArgs>> onGetNewsItems)
{
var location = GetEventsLocation();
if (!FileAdapter.Exists(location)) onGetNewsItems(new List<NewNewsItemEventArgs>());
var context = TaskScheduler.FromCurrentSynchronizationContext();
var newsItemGetter = new Task<List<NewNewsItemEventArgs>>(() => FileAdapter.ReadAllLines(location)
.Select(i => NewNewsItemEventArgs.FromCommaSeparated(i, settings))
.Where(i => i != null)
.Reverse()
.ToList());
newsItemGetter.ContinueWith(result => onGetNewsItems(result.Result), new CancellationToken(), TaskContinuationOptions.OnlyOnRanToCompletion, context);
newsItemGetter.ContinueWith(t =>
{
if (t.Exception != null)
{
var exception = t.Exception.InnerExceptions.First();
if (!(exception is FileNotFoundException))
_log.Error(exception);
}
onGetNewsItems(new List<NewNewsItemEventArgs>());
}, new CancellationToken(), TaskContinuationOptions.OnlyOnFaulted, context);
newsItemGetter.Start();
}
示例4: ConfigureSosOnline
public ConfigureSosOnline(SirenOfShameSettings settings)
{
_settings = settings;
InitializeComponent();
_alwaysOffline.Checked = _settings.SosOnlineAlwaysOffline;
LoadChildControl();
}
示例5: AddRule
public AddRule(SirenOfShameSettings settings)
{
IocContainer.Instance.Compose(this);
_settings = settings;
InitializeComponent();
EnableAudioSettings(enable: false);
EnableLightSettings(enable: false);
_when.DataSource = Rule.TriggerTypes.Select(i => new KeyValuePair<TriggerType, string>(i.Key, i.Value )).ToList();
_when.DisplayMember = "Value";
var buildDefinitions = _settings.CiEntryPointSettings
.SelectMany(i => i.BuildDefinitionSettings)
.Where(bd => bd.Active)
.ToList();
buildDefinitions.Insert(0, _anyBuild);
_build.DataSource = buildDefinitions;
_build.DisplayMember = "Name";
_audio.DataSource = SirenOfShameDevice.AudioPatterns.ToList();
_audio.DisplayMember = "Name";
_windowsAudio.DataSource = new[] { new AudioFile { DisplayName = "None"}}
.Concat(ResourceManager.InternalAudioFiles)
.ToList();
_windowsAudio.DisplayMember = "DisplayName";
_lights.DataSource = SirenOfShameDevice.LedPatterns.ToList();
_lights.DisplayMember = "Name";
_who.DataSource = _settings.AllUsersMinusMappedOnes();
}
示例6: RulesEngine
public RulesEngine(SirenOfShameSettings settings)
{
ResetPreviousWorkingOrBrokenStatuses();
_settings = settings;
_timer.Interval = 1000;
_timer.Tick += TimerTick;
}
示例7: ConfigureServer
public ConfigureServer(SirenOfShameSettings settings, CiEntryPointSetting ciEntryPointSetting)
{
_adding = ciEntryPointSetting == null;
if (_adding)
{
ciEntryPointSetting = new CiEntryPointSetting();
}
Settings = settings;
_ciEntryPointSetting = ciEntryPointSetting;
IocContainer.Instance.Compose(this);
InitializeComponent();
_ciServerPanel.Visible = _adding;
ICiEntryPoint[] ciEntryPoints = CIEntryPoints.ToArray();
if (_adding)
{
_serverType.DataSource = ciEntryPoints;
}
else
{
SetServerType(ciEntryPointSetting.GetCiEntryPoint(settings));
}
_add.Text = _adding ? "Add" : "Update";
_cancel.Visible = _adding;
}
示例8: ConfigureMock
public ConfigureMock(SirenOfShameSettings settings, MockCiEntryPoint mockCiEntryPoint, CiEntryPointSetting ciEntryPointSetting)
: base(settings)
{
InitializeComponent();
_mockCiEntryPoint = mockCiEntryPoint;
_ciEntryPointSetting = ciEntryPointSetting;
}
示例9: ConfigureServerBase
public ConfigureServerBase(SirenOfShameSettings settings)
{
// http://www.codeproject.com/Tips/61966/Control-Resizing-on-a-UserControl-in-WinForms.aspx?msg=3389586
Dock = DockStyle.Fill;
Settings = settings;
}
示例10: ConfigureServers
public ConfigureServers(SirenOfShameSettings settings)
{
_settings = settings;
InitializeComponent();
_servers.DataSource = settings.CiEntryPointSettings;
_servers.DisplayMember = "Url";
}
示例11: ConfigureTravisCi
public ConfigureTravisCi(SirenOfShameSettings sosSettings, TravisCiEntryPoint travisCiEntryPoint, CiEntryPointSetting ciEntryPointSetting)
: base(sosSettings)
{
_travisCiEntryPoint = travisCiEntryPoint;
_ciEntryPointSetting = ciEntryPointSetting;
InitializeComponent();
LoadProjectList();
}
示例12: Write
public void Write(BuildStatus buildStatus, SirenOfShameSettings settings, bool disableWritingToSosDb)
{
if (!disableWritingToSosDb)
{
AppendToFile(buildStatus);
}
UpdateStatsInSettings(buildStatus, settings);
}
示例13: ViewBuildSmall
public ViewBuildSmall(BuildStatusDto buildStatusDto, SirenOfShameSettings settings)
: base(settings)
{
InitializeComponent();
InitializeLabels(buildStatusDto);
FontChanged += OnFontChanged;
StoreInitialFontSizes();
}
示例14: AddMapping
public AddMapping(SirenOfShameSettings settings, string whenISeeDefaultRawName = null)
{
_settings = settings;
InitializeComponent();
AddPeopleToDropdowns();
RemovePeopleThatHaveAlreadyBeenMappedFromDropdowns();
SetWhenISeeDropdownToDefault(whenISeeDefaultRawName);
}
示例15: RulesEngine
public RulesEngine(SirenOfShameSettings settings)
{
DisableSosOnline = false;
DisableWritingToSosDb = false;
ResetPreviousWorkingOrBrokenStatuses();
_settings = settings;
_timer.Interval = 1000;
_timer.Tick += TimerTick;
}