示例#1
0
        public void AddNewApplication(string application, string arguments, string friendlyName)
        {
            var app        = DesktopApplicationFactory.CreateApplication(application, arguments, friendlyName);
            var fileViewer = new UserDefinedOpenWithFileViewer(app);

            fileViewer.IsNew = true;

            fileViewers.Add(fileViewer);
        }
        UserDefinedOpenWithFileViewer CreateUserDefinedFileViewer(
            DisplayBindingMappingKey key,
            string application,
            string displayName,
            string arguments,
            bool isDefault)
        {
            var app        = DesktopApplicationFactory.CreateApplication(application, arguments, displayName);
            var fileViewer = new UserDefinedOpenWithFileViewer(app);

            if (isDefault)
            {
                fileViewer.SetAsDefault();
            }

            return(fileViewer);
        }