本文整理汇总了C#中IProperties类的典型用法代码示例。如果您正苦于以下问题:C# IProperties类的具体用法?C# IProperties怎么用?C# IProperties使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
IProperties类属于命名空间,在下文中一共展示了IProperties类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。
示例1: GetResponse
public static HttpExtend.HttpHeader GetResponse(IProperties properties)
{
HttpExtend.HttpHeader command = new HttpExtend.HttpHeader();
command.Properties = properties.ToHeaders();
return command;
}
开发者ID:TracyHu,项目名称:IKendeLib,代码行数:7,代码来源:Protocol.cs
示例2: Get
public static HttpExtend.HttpHeader Get(string appName, IProperties properties)
{
HttpExtend.HttpHeader command = new HttpExtend.HttpHeader();
command.Action = COMMAND_GET + " " + appName;
command.Properties = properties.ToHeaders();
return command;
}
开发者ID:hdxhan,项目名称:IKendeLib,代码行数:7,代码来源:Protocol.cs
示例3: ReadValue
protected override void ReadValue(PsdReader reader, object userData, out IProperties value)
{
value = new Properties();
short version = reader.ReadInt16();
int count = reader.ReadInt16();
for (int i = 0; i < count; i++)
{
string _8bim = reader.ReadAscii(4);
string effectType = reader.ReadAscii(4);
int size = reader.ReadInt32();
long p = reader.Position;
switch (effectType)
{
case "dsdw":
{
//ShadowInfo.Parse(reader);
}
break;
case "sofi":
{
//this.solidFillInfo = SolidFillInfo.Parse(reader);
}
break;
}
reader.Position = p + size;
}
}
开发者ID:NtreevSoft,项目名称:psd-parser,代码行数:31,代码来源:Reader_lrFX.cs
示例4: AdjustOriginalSize
public void AdjustOriginalSize(IProperties properties, ref Size size)
{
CropDecoratorSettings settings = new CropDecoratorSettings(properties);
Rectangle? rect = settings.CropRectangle;
if (rect != null)
size = rect.Value.Size;
}
开发者ID:gmilazzoitag,项目名称:OpenLiveWriter,代码行数:7,代码来源:CropDecorator.cs
示例5: ReadValue
protected override void ReadValue(PsdReader reader, object userData, out IProperties value)
{
Properties props = new Properties();
int version = reader.ReadInt32();
if (version != 1)
throw new InvalidFormatException();
props["HorizontalGrid"] = reader.ReadInt32();
props["VerticalGrid"] = reader.ReadInt32();
int guideCount = reader.ReadInt32();
List<int> hg = new List<int>();
List<int> vg = new List<int>();
for (int i = 0; i < guideCount; i++)
{
int n = reader.ReadInt32();
byte t = reader.ReadByte();
if (t == 0)
vg.Add(n);
else
hg.Add(n);
}
props["HorizontalGuides"] = hg.ToArray();
props["VerticalGuides"] = vg.ToArray();
value = props;
}
开发者ID:NtreevSoft,项目名称:psd-parser,代码行数:33,代码来源:Reader_GridAndGuides.cs
示例6: OnPrePublish
public override bool OnPrePublish(IWin32Window dialogOwner, IProperties properties,
IPublishingContext publishingContext, bool publish)
{
var info = (BlogPost) publishingContext.PostInfo;
//look at the publish date.
if (!info.HasDatePublishedOverride)
{
var nextPubDate = new DateTime(DateTime.Now.Year, DateTime.Now.Month, DateTime.Now.Day);
nextPubDate = GetNextDayOccurrence(DayOfWeek.Tuesday, nextPubDate);
var reader = new JsonTextReader(reader: File.OpenText("Plugins\\Throttle.json"));
var json = new Newtonsoft.Json.JsonSerializer();
var config = json.Deserialize<Configuration>(reader);
var wrapper = new MetaWeblogWrapper(config.Url, config.Username, config.Password);
List<Post> recentPosts = wrapper.GetRecentPosts(10).ToList();
while (recentPosts.Any(p => p.DateCreated >= nextPubDate && p.DateCreated < nextPubDate.AddDays(1)))
{
nextPubDate = GetNextDayOccurrence(DayOfWeek.Tuesday, nextPubDate.AddDays(1));
}
var pubDate = new DateTime(nextPubDate.Year, nextPubDate.Month, nextPubDate.Day, 9, 0, 0);
info.DatePublished = pubDate;
info.DatePublishedOverride = pubDate;
}
return base.OnPrePublish(dialogOwner, properties, publishingContext, publish);
}
开发者ID:erichexter,项目名称:ThrottlePlugin,代码行数:27,代码来源:Plugin.cs
示例7: GenerateTypeMetricText
public static string GenerateTypeMetricText(IProperties item)
{
if(item is NamespaceProperties){
return GenerateNamespaceMetricText((NamespaceProperties)item).ToString();
} else if (item is MethodProperties) {
return GenerateMethodMetricText((MethodProperties)item).ToString();
} else if (item is ClassProperties) {
return GenerateClassMetricText((ClassProperties)item).ToString();
} else if (item is InterfaceProperties) {
return GenerateInterfaceMetricText((InterfaceProperties)item).ToString();
} else if (item is EnumProperties) {
return GenerateEnumMetricText((EnumProperties)item).ToString();
} else if (item is DelegateProperties) {
return GenerateDelegateMetricText((DelegateProperties)item).ToString();
} else if (item is StructProperties) {
return GenerateStructMetricText((StructProperties)item).ToString();
}
return "NULL";
}
开发者ID:transformersprimeabcxyz,项目名称:monodevelop-1,代码行数:34,代码来源:CodeMetricsServices.cs
示例8: AddSettings
public void AddSettings(IProperties settings)
{
foreach (string key in settings.Names)
{
SetString(key, settings[key]);
}
}
开发者ID:gmilazzoitag,项目名称:OpenLiveWriter,代码行数:7,代码来源:BlogPostSettingsBag.cs
示例9: OnPostPublish
/// <summary>
/// Notifies the plugin that a blog post was successfully published.
/// </summary>
/// <param name="dialogOwner">Owner for any dialog boxes shown.</param>
/// <param name="properties">Property-set that the plugin can use to get and set properties for this post.</param>
/// <param name="publishingContext">Publishing context for HTML generation.</param>
/// <param name="publish">If false, the post was posted as a draft.</param>
public virtual void OnPostPublish(
IWin32Window dialogOwner,
IProperties properties,
IPublishingContext publishingContext,
bool publish)
{
}
开发者ID:gmilazzoitag,项目名称:OpenLiveWriter,代码行数:14,代码来源:PublishNotificationHook.cs
示例10: SetValueToControl
/// <summary>
/// Retrieves the value from the given control
/// </summary>
/// <param name="control">Editor control</param>
/// <param name="value">Value to set</param>
/// <param name="pluginProperties">Plugin properties</param>
/// <returns>Value</returns>
public override void SetValueToControl(Control control, object value, IProperties pluginProperties)
{
ComboBox comboBox = control as ComboBox;
FillItems(comboBox, (value ?? string.Empty).ToString().Trim(), true,
control.Parent.Controls.OfType<TextBox>().SingleOrDefault(c => c.Tag == Options.CustomLanguagesOption),
Options.StandardLanguageListItems, Options.CustomLanguagesOption, pluginProperties);
}
开发者ID:stevebeauge,项目名称:crayon-syntax-snippet-wlw,代码行数:14,代码来源:LanguageOption.cs
示例11: PropertiesItemViewModel
public PropertiesItemViewModel(string name, IProperties properties, TreeViewItemViewModel parent)
: base(parent)
{
this.name = name;
foreach (var item in properties)
{
object value = item.Value;
if (value is IProperties == true)
{
this.Children.Add(new PropertiesItemViewModel(item.Key, value as IProperties, this));
}
else if (value is IEnumerable == true && value is string == false)
{
int index = 0;
foreach (var i in value as IEnumerable)
{
string n = string.Format("{0}[{1}]", item.Key, index);
if (i is IProperties == true)
this.Children.Add(new PropertiesItemViewModel(n, i as IProperties, this));
else
this.Children.Add(new PropertiesItemViewModel(n, i, this));
index++;
}
}
else
{
this.Children.Add(new PropertiesItemViewModel(item.Key, value, this));
}
}
}
开发者ID:NtreevSoft,项目名称:psd-parser,代码行数:31,代码来源:PropertiesItemViewModel.cs
示例12: LoadEditor
public void LoadEditor(IProperties imageServiceSettings)
{
_loadedState = ControlState.Loading;
_imageServiceSettings = imageServiceSettings;
LoadEditor();
_loadedState = ControlState.Loaded;
}
开发者ID:gmilazzoitag,项目名称:OpenLiveWriter,代码行数:7,代码来源:ImageServiceSettingsEditor.cs
示例13: ReadValue
protected override void ReadValue(PsdReader reader, object userData, out IProperties value)
{
Properties props = new Properties();
int version = reader.ReadInt32();
if (version == 6)
{
var r1 = reader.ReadInt32();
var r2 = reader.ReadInt32();
var r3 = reader.ReadInt32();
var r4 = reader.ReadInt32();
string text = reader.ReadString();
var count = reader.ReadInt32();
List<IProperties> slices = new List<IProperties>(count);
for (int i = 0; i < count; i++)
{
slices.Add(ReadSliceInfo(reader));
}
}
{
var descriptor = new DescriptorStructure(reader) as IProperties;
var items = descriptor["slices.Items[0]"] as object[];
List<IProperties> slices = new List<IProperties>(items.Length);
foreach (var item in items)
{
slices.Add(ReadSliceInfo(item as IProperties));
}
props["Items"] = slices.ToArray();
}
value = props;
}
开发者ID:NtreevSoft,项目名称:psd-parser,代码行数:34,代码来源:Reader_SlicesInfo.cs
示例14: ReadValue
protected override void ReadValue(PsdReader reader, object userData, out IProperties value)
{
Properties props = new Properties();
int count = reader.ReadInt32();
List<DescriptorStructure> dss = new List<DescriptorStructure>();
for (int i = 0; i < count; i++)
{
string s = reader.ReadAscii(4);
string k = reader.ReadAscii(4);
var c = reader.ReadByte();
var p = reader.ReadBytes(3);
var l = reader.ReadInt32();
var p2 = reader.Position;
var ds = new DescriptorStructure(reader);
dss.Add(ds);
reader.Position = p2 + l;
}
props["Items"] = dss;
value = props;
}
开发者ID:NtreevSoft,项目名称:psd-parser,代码行数:25,代码来源:Reader_shmd.cs
示例15: Register
public IProperties Register(IProperties properties)
{
lock (mGroups)
{
TestProperties tp = new TestProperties();
tp.FromHeaders(properties.ToHeaders());
Group group = mGroups.Find(e => e.Name == tp.Group);
if (group == null)
{
group = new Group();
group.Name = tp.Group;
group.Nodes = new List<Node>();
group.Nodes.Add(new Node { Name = tp.Node, Host = tp.Host, Port = tp.Port, LastTrackTime=DateTime.Now });
mGroups.Add(group);
}
else
{
Node node = group.Nodes.Find(n => n.Name== tp.Node );
if(node !=null)
node.LastTrackTime = DateTime.Now;
else
group.Nodes.Add(new Node { Name = tp.Node, Host = tp.Host, Port = tp.Port, LastTrackTime = DateTime.Now });
}
return new Properties();
}
}
开发者ID:hdxhan,项目名称:IKendeLib,代码行数:26,代码来源:TestTackerHandler.cs
示例16: CombineConfigurationPanelWidget
public CombineConfigurationPanelWidget(IProperties CustomizationObject)
: base("Base.glade", "CombineConfigurationsPanel")
{
configuration = (CombineConfiguration)((IProperties)CustomizationObject).GetProperty("Config");
store = new TreeStore (typeof(object), typeof(string), typeof(bool), typeof(string));
configsList.Model = store;
configsList.HeadersVisible = true;
TreeViewColumn col = new TreeViewColumn ();
CellRendererText sr = new CellRendererText ();
col.PackStart (sr, true);
col.Expand = true;
col.AddAttribute (sr, "text", 1);
col.Title = "Solution Item";
configsList.AppendColumn (col);
CellRendererToggle tt = new CellRendererToggle ();
tt.Activatable = true;
tt.Toggled += new ToggledHandler (OnBuildToggled);
configsList.AppendColumn ("Build", tt, "active", 2);
configsList.AppendColumn ("Configuration", new CellRendererText (), "text", 3);
foreach (CombineConfigurationEntry ce in configuration.Entries)
store.AppendValues (ce, ce.Entry.Name, ce.Build, ce.ConfigurationName);
}
开发者ID:slluis,项目名称:monodevelop-prehistoric,代码行数:26,代码来源:CombineConfigurationPanel.cs
示例17: GeneralProjectOptionsWidget
public GeneralProjectOptionsWidget(IProperties CustomizationObject)
: base("Base.glade", "GeneralProjectOptionsPanel")
{
this.project = (Project)((IProperties)CustomizationObject).GetProperty("Project");
nameLabel.UseUnderline = true;
descriptionLabel.UseUnderline = true;
projectNameEntry.Text = project.Name;
projectDescriptionTextView.Buffer.Text = project.Description;
enableViewStateCheckButton.Active = project.EnableViewState;
switch (project.NewFileSearch)
{
case NewFileSearch.None:
newFilesOnLoadCheckButton.Active = false;
autoInsertNewFilesCheckButton.Active = false;
break;
case NewFileSearch.OnLoad:
newFilesOnLoadCheckButton.Active = true;
autoInsertNewFilesCheckButton.Active = false;
break;
default:
newFilesOnLoadCheckButton.Active = true;
autoInsertNewFilesCheckButton.Active = true;
break;
}
newFilesOnLoadCheckButton.Clicked += new EventHandler(AutoLoadCheckBoxCheckedChangeEvent);
AutoLoadCheckBoxCheckedChangeEvent(null, null);
}
开发者ID:slluis,项目名称:monodevelop-prehistoric,代码行数:32,代码来源:GeneralProjectOptions.cs
示例18: DefaultTextEditorProperties
public DefaultTextEditorProperties()
{
properties = ((IProperties)propertyService.GetProperty("NetFocus.DataStructure.TextEditor.Document.DefaultDocumentProperties", new DefaultProperties()));
FontContainer.DefaultFont = FontContainer.ParseFont(properties.GetProperty("DefaultFont", new Font("Courier New", 10).ToString()));
properties.PropertyChanged += new PropertyEventHandler(CheckFontChange);
}
开发者ID:tangxuehua,项目名称:DataStructure,代码行数:7,代码来源:DefaultTextEditorProperties.cs
示例19: PropertyEventArgs
public PropertyEventArgs(IProperties properties, string key, object oldValue, object newValue)
{
this.properties = properties;
this.key = key;
this.oldValue = oldValue;
this.newValue = newValue;
}
开发者ID:tangxuehua,项目名称:DataStructure,代码行数:7,代码来源:PropertyEventArgs.cs
示例20: CopySettings
private void CopySettings(IProperties sourceSettings, IProperties targetSettings)
{
foreach (string key in sourceSettings.Names)
{
targetSettings.SetString(key, sourceSettings.GetString(key, null));
}
}
开发者ID:gmilazzoitag,项目名称:OpenLiveWriter,代码行数:7,代码来源:DefaultImageSettings.cs
注:本文中的IProperties类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论