本文整理汇总了C#中Shell.Personal方法的典型用法代码示例。如果您正苦于以下问题:C# Shell.Personal方法的具体用法?C# Shell.Personal怎么用?C# Shell.Personal使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Shell
的用法示例。
在下文中一共展示了Shell.Personal方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Handle_Personal
private static void Handle_Personal (
Shell Dispatch, string[] args, int index) {
Personal Options = new Personal ();
var Registry = new Goedel.Registry.Registry ();
Options.Portal.Register ("portal", Registry, (int) TagType_Personal.Portal);
Options.Description.Register ("pd", Registry, (int) TagType_Personal.Description);
Options.Verbose.Register ("verbose", Registry, (int) TagType_Personal.Verbose);
Options.Report.Register ("report", Registry, (int) TagType_Personal.Report);
Options.DeviceNew.Register ("new", Registry, (int) TagType_Personal.DeviceNew);
Options.DeviceUDF.Register ("dudf", Registry, (int) TagType_Personal.DeviceUDF);
Options.DeviceID.Register ("did", Registry, (int) TagType_Personal.DeviceID);
Options.DeviceDescription.Register ("dd", Registry, (int) TagType_Personal.DeviceDescription);
// looking for parameter Param.Name}
if (index < args.Length && !IsFlag (args [index][0] )) {
// Have got the parameter, call the parameter value method
Options.Portal.Parameter (args [index]);
index++;
}
// looking for parameter Param.Name}
if (index < args.Length && !IsFlag (args [index][0] )) {
// Have got the parameter, call the parameter value method
Options.Description.Parameter (args [index]);
index++;
}
#pragma warning disable 162
for (int i = index; i< args.Length; i++) {
if (!IsFlag (args [i][0] )) {
throw new System.Exception ("Unexpected parameter: " + args[i]);}
string Rest = args [i].Substring (1);
TagType_Personal TagType = (TagType_Personal) Registry.Find (Rest);
// here have the cases for what to do with it.
switch (TagType) {
case TagType_Personal.Verbose : {
int OptionParams = Options.Verbose.Tag (Rest);
if (OptionParams>0 && ((i+1) < args.Length)) {
if (!IsFlag (args [i+1][0] )) {
i++;
Options.Verbose.Parameter (args[i]);
}
}
break;
}
case TagType_Personal.Report : {
int OptionParams = Options.Report.Tag (Rest);
if (OptionParams>0 && ((i+1) < args.Length)) {
if (!IsFlag (args [i+1][0] )) {
i++;
Options.Report.Parameter (args[i]);
}
}
break;
}
case TagType_Personal.DeviceNew : {
int OptionParams = Options.DeviceNew.Tag (Rest);
if (OptionParams>0 && ((i+1) < args.Length)) {
if (!IsFlag (args [i+1][0] )) {
i++;
Options.DeviceNew.Parameter (args[i]);
}
}
break;
}
case TagType_Personal.DeviceUDF : {
int OptionParams = Options.DeviceUDF.Tag (Rest);
if (OptionParams>0 && ((i+1) < args.Length)) {
if (!IsFlag (args [i+1][0] )) {
i++;
Options.DeviceUDF.Parameter (args[i]);
}
}
break;
}
case TagType_Personal.DeviceID : {
int OptionParams = Options.DeviceID.Tag (Rest);
if (OptionParams>0 && ((i+1) < args.Length)) {
if (!IsFlag (args [i+1][0] )) {
i++;
Options.DeviceID.Parameter (args[i]);
}
}
break;
}
case TagType_Personal.DeviceDescription : {
int OptionParams = Options.DeviceDescription.Tag (Rest);
if (OptionParams>0 && ((i+1) < args.Length)) {
if (!IsFlag (args [i+1][0] )) {
i++;
//.........这里部分代码省略.........