我正在做一些Android开发,我更喜欢Visual Studio,但我必须使用Eclipse.
有没有人制作了一个工具来切换Eclipse的外观和行为更像visual studio?我主要不能忍受它的clippyesqe关于我应该如何编程的建议(是的,我知道我还没有使用过那个私人领域!感谢Eclipse!),或者它令人难以置信的糟糕的智能感知.
例如,在eclipse中,如果我不this先键入,它的intellisense将无法实现我想寻找本地范围的成员.此外,完成VS约定的TAB钻进了我的脑海,Eclipse是完成的,我可以手动切换所有东西,但这需要几个小时,我希望有人有某种主题或已经做过的东西.
所以,我将在一个月左右的时间内获得我的T-Mobile G1,我很高兴能开始为它开发.
有人开始使用它吗?是否有开发维基或其他任何设置?
以下代码应该找到相应的项目标记并将其从XmlDocument中删除,但是当我测试它时,它会说:
要删除的节点不是此节点的子节点.
有谁知道这样做的正确方法?
public void DeleteProject (string projectName)
{
string ccConfigPath = ConfigurationManager.AppSettings["ConfigPath"];
XmlDocument configDoc = new XmlDocument();
configDoc.Load(ccConfigPath);
XmlNodeList projectNodes = configDoc.GetElementsByTagName("project");
for (int i = 0; i < projectNodes.Count; i++)
{
if (projectNodes[i].Attributes["name"] != null)
{
if (projectName == projectNodes[i].Attributes["name"].InnerText)
{
configDoc.RemoveChild(projectNodes[i]);
configDoc.Save(ccConfigPath);
}
}
}
}
Run Code Online (Sandbox Code Playgroud)
UPDATE
固定.我做了两件事:
XmlNode project = configDoc.SelectSingleNode("//project[@name='" + projectName + "']");
Run Code Online (Sandbox Code Playgroud)
用XPath查询替换了For循环,这不是为了修复它,只是因为它是一种更好的方法.
实际修复是:
project.ParentNode.RemoveChild(project);
Run Code Online (Sandbox Code Playgroud)
感谢Pat和Chuck的建议.
在C#泛型之前,每个人都会通过创建实现IEnumerable的集合库来为其业务对象编写集合
IE:
public class CollectionBase : IEnumerable
Run Code Online (Sandbox Code Playgroud)
然后从中派生出他们的Business Object集合.
public class BusinessObjectCollection : CollectionBase
Run Code Online (Sandbox Code Playgroud)
现在使用通用列表类,是否有人只使用它?我发现我使用了两种技术的妥协:
public class BusinessObjectCollection : List<BusinessObject>
Run Code Online (Sandbox Code Playgroud)
我这样做是因为我喜欢强类型名称而不是仅仅传递列表.
你的方法是什么?
当我使用DataContractJsonSerializer序列化枚举值时,它序列化枚举的数值,而不是字符串名称.
IE:
enum foo
{
bar,
baz
}
Run Code Online (Sandbox Code Playgroud)
序列化foo.bar的值将返回"0",而不是"bar".
相反,我更喜欢它,有没有办法覆盖它?
编辑:
因为我不想更改序列化程序,所以我使用了一个简单的解决方法.
我在类中公开了一个属性来序列化,调用ToString值,即:
// Old
[DataMember]
public EnumType Foo
{
get { return _foo; }
set { _foo = value; }
}
// New, I still kept the EnumType but I only serialize the string version
public EnumType Foo
{
get { return _foo; }
set { _foo = value; }
}
[DataMember]
public string FooType
{
get { return _foo.ToString(); }
private set {}
}
Run Code Online (Sandbox Code Playgroud) 我正在尝试绑定List<T>到DataGridView控件,我没有运气创建自定义绑定.
我试过了:
gvProgramCode.DataBindings.Add(new Binding("Opcode",code,"Opcode"));
Run Code Online (Sandbox Code Playgroud)
它抛出一个异常,说该属性名称没有找到任何内容.
相关列的名称是"操作码".List<T>操作码中的属性名称.
回答编辑:问题是我的类中没有可绑定字段作为属性,只有公共字段......显然它不反映字段,只反映属性.
我正在尝试使用SharpZipLib从zip存档中提取指定的文件.我见过的所有例子总是希望你能解压缩整个拉链,并按照以下方式做一些事情:
FileStream fileStreamIn = new FileStream (sourcePath, FileMode.Open, FileAccess.Read);
ZipInputStream zipInStream = new ZipInputStream(fileStreamIn);
ZipEntry entry;
while (entry = zipInStream.GetNextEntry() != null)
{
// Unzip file
}
Run Code Online (Sandbox Code Playgroud)
我想做的是:
ZipEntry entry = zipInStream.SeekToFile("FileName");
Run Code Online (Sandbox Code Playgroud)
因为我的需求涉及使用zip作为包,只根据需要将文件抓取到内存中.
有人熟悉SharpZipLib吗?有没有人知道我是否可以手动完成整个拉链?
I'm looking for something like a Dictionary<K,V> however with a guarantee that it preserves insertion order. Since Dictionary is a hashtable, I do not think it does.
Is there a generic collection for this, or do I need to use one of the old .NET 1.1 collections?
有没有人使用Accurev进行源代码管理?我们正在(最终)从StarTeam切换到Accurev.
我最初的印象是GUI工具严重缺乏,但底层引擎和分支作为流概念是令人难以置信的.
我们面临的最大困难是评估我们自己的与starteam接口的DIY工具,要么用DIY新工具替换它们,要么找到并购买适当的替代品.
此外,是否有人使用AccuWork组件进行问题管理?Starteam有一个非常好的变更请求系统,而AccuWork并没有接近匹配它.我们正在评估使用Accuwork,或购买第三方软件包,如JIRA.
意见?
.net ×4
c# ×4
android ×2
winforms ×2
accurev ×1
class-design ×1
collections ×1
compression ×1
data-binding ×1
eclipse ×1
generics ×1
ide ×1
java ×1
json ×1
sharpziplib ×1
wcf ×1
xml ×1
xmldocument ×1