336x280(권장), 300x250(권장), 250x250, 200x200 크기의 광고 코드만 넣을 수 있습니다.

void ModifyShortcutTargetName(string shortcutFilename)

{

WshShell shell = new WshShell();

FileInfo LinkFile = new FileInfo(shortcutFilename);

if (LinkFile.Exists)

{

IWshShortcut link = (IWshShortcut)shell.CreateShortcut(LinkFile.FullName);

link.TargetPath = link.TargetPath.Replace("AAA.exe", "BBB.exe");

link.Save();

}


// 아래 코드는 Windows XP 에서 실행되지 않는다

/*if (File.Exists(shortcutFilename) == false)

return;


var pathOnly = Path.GetDirectoryName(shortcutFilename);

var filenameOnly = Path.GetFileName(shortcutFilename);


var shell = new Shell32.Shell();

var folder = shell.NameSpace(pathOnly);

if (folder == null)

return;


var folderItem = folder.ParseName(filenameOnly);

if (folderItem == null)

return;


if (folderItem.IsLink == false)

return;


var link = (Shell32.ShellLinkObject)folderItem.GetLink;

link.Path = link.Path.Replace("AAA.exe", "BBB.exe");

link.Save();*/

}

Posted by 역시인생한방
,
336x280(권장), 300x250(권장), 250x250, 200x200 크기의 광고 코드만 넣을 수 있습니다.

void RegisterDLL(string filename)

{

var process = new Process();

process.StartInfo.FileName = "regsvr32.exe";

process.StartInfo.Arguments = "/s \"" + filename + "\"";

process.StartInfo.UseShellExecute = false;

process.StartInfo.CreateNoWindow = true;

process.StartInfo.RedirectStandardOutput = true;

if (6 <= Environment.OSVersion.Version.Major)

process.StartInfo.Verb = "runas";

process.Start();

process.WaitForExit();

process.Close();

}


Posted by 역시인생한방
,
336x280(권장), 300x250(권장), 250x250, 200x200 크기의 광고 코드만 넣을 수 있습니다.
<TextBlock>
    <TextBlock.Text>    
        <MultiBinding StringFormat="{}{0} + {1}">
            <Binding Path="Name" />
            <Binding Path="ID" />
        </MultiBinding>
    </TextBlock.Text>
</TextBlock>


출처 : http://stackoverflow.com/questions/2552853/how-to-bind-multiple-values-to-a-single-wpf-textblock

Posted by 역시인생한방
,