• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

C# Shell类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C#中Shell的典型用法代码示例。如果您正苦于以下问题:C# Shell类的具体用法?C# Shell怎么用?C# Shell使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



Shell类属于命名空间,在下文中一共展示了Shell类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。

示例1: ShouldRunBatchFileBeforeRunningTargets

        public void ShouldRunBatchFileBeforeRunningTargets()
        {
            UnzipSolution();

            FileSystemTestHelper.RecreateDirectory(@"BeforeBounceFeature\bounce");

            //as there is a circular dependancy between BeforeBounceFeature.sln and the main bounce dll's
            //this needs to be run and built under the same framework version
            #if (FRAMEWORKV35)
            File.WriteAllText(@"BeforeBounceFeature\bounce\beforebounce.bat", @"%SystemRoot%\Microsoft.NET\Framework\v3.5\msbuild.exe BeforeBounceFeature.sln /p:Configuration=Debug_3_5");
            #else
            File.WriteAllText(@"BeforeBounceFeature\bounce\beforebounce.bat", @"%SystemRoot%\Microsoft.NET\Framework\v4.0.30319\msbuild.exe BeforeBounceFeature.sln");
            #endif

            var shell = new Shell(new FakeLog());

            ProcessOutput output = null;

            FileSystemUtils.Pushd(@"BeforeBounceFeature", () => output = shell.Exec(@"..\bounce.exe", "BeforeBounceFeature"));

            Assert.That(output, Is.Not.Null);
            Assert.That(output.ExitCode, Is.EqualTo(0));
            Assert.That(output.Error.Trim(), Is.EqualTo(""));
            Assert.That(output.Output, Is.StringContaining("building before bounce feature"));
        }
开发者ID:nbucket,项目名称:bounce,代码行数:25,代码来源:RunsBatchFileBeforeRunningTargetsFeature.cs


示例2: Main

    public static void Main()
    {
        var shell = new Shell();
        string cmd = string.Empty;
        while(true)
        {
            Console.Write("> ");
            cmd = Console.ReadLine();
            if(cmd == null || cmd == "quit" || cmd == "exit")
            {
                return;
            }

            try
            {
                var success = shell.Command(cmd);
                if(!success)
                {
                    Console.WriteLine("Invalid command " + cmd);
                }
            }
            catch(Exception ex)
            {
                Console.WriteLine(cmd);
                Console.WriteLine(ex);
            }
        }
    }
开发者ID:hythof,项目名称:csharp,代码行数:28,代码来源:MemoryBehavior.cs


示例3: CreateShell

        protected override DependencyObject CreateShell()
        {
            Shell shell = new Shell();
            shell.Show();

            return shell;
        }
开发者ID:selvendiranj,项目名称:compositewpf-copy,代码行数:7,代码来源:Bootstrapper.cs


示例4: FileUploadOrDownload

 public FileUploadOrDownload(IHost host, Shell shellData, string sourceFilePath, string targetFilePath)
 {
     _host = host;
     _shellData = shellData;
     _sourceFilePath = sourceFilePath;
     _targetFilePath = targetFilePath;
 }
开发者ID:kevins1022,项目名称:Altman,代码行数:7,代码来源:FileUploadOrDownload.cs


示例5: PanelDbManager

        public PanelDbManager(IHost host, PluginParameter data)
        {
			_host = host;
			_shellData = (Shell)data[0];
			_shellSqlConn = GetShellSqlConn();

			// init StrRes to translate string
			StrRes.SetHost(_host);
            Init();			

            //绑定事件
			_dbManager = new DbManager(_host, _shellData, _shellSqlConn.type);
			_dbManager.ConnectDbCompletedToDo += DbManagerConnectDbCompletedToDo;
			_dbManager.GetDbNameCompletedToDo += DbManagerGetDbNameCompletedToDo;
			_dbManager.GetDbTableNameCompletedToDo += DbManagerGetTableNameCompletedToDo;
			_dbManager.GetColumnTypeCompletedToDo += DbManagerGetColumnTypeCompletedToDo;
			_dbManager.ExecuteReaderCompletedToDo += DbManagerExecuteReaderCompletedToDo;
			_dbManager.ExecuteNonQueryCompletedToDo += DbManagerExecuteNonQueryCompletedToDo;

			RefreshServerStatus(false);


	        if (string.IsNullOrEmpty(_shellSqlConn.type) || string.IsNullOrEmpty(_shellSqlConn.conn))
	        {
		        MessageBox.Show("shell's sqlConnection is null or space");
	        }
	        else
	        {
				//连接数据库
				_dbManager.ConnectDb(_shellSqlConn.conn);
	        }
        }
开发者ID:kevins1022,项目名称:Altman,代码行数:32,代码来源:PanelDbManager.cs


示例6: StreamingFindReferencesPresenter

        public StreamingFindReferencesPresenter(
            Shell.SVsServiceProvider serviceProvider,
            ITextBufferFactoryService textBufferFactoryService,
            IProjectionBufferFactoryService projectionBufferFactoryService,
            IEditorOptionsFactoryService editorOptionsFactoryService,
            ITextEditorFactoryService textEditorFactoryService,
            IContentTypeRegistryService contentTypeRegistryService,
            ClassificationTypeMap typeMap,
            IEditorFormatMapService formatMapService,
            [ImportMany] IEnumerable<Lazy<IAsynchronousOperationListener, FeatureMetadata>> asyncListeners)
        {
            _serviceProvider = serviceProvider;
            _textBufferFactoryService = textBufferFactoryService;
            _projectionBufferFactoryService = projectionBufferFactoryService;
            _editorOptionsFactoryService = editorOptionsFactoryService;
            _contentTypeRegistryService = contentTypeRegistryService;

            _textEditorFactoryService = textEditorFactoryService;
            _typeMap = typeMap;
            _formatMapService = formatMapService;

            _asyncListener = new AggregateAsynchronousOperationListener(
                asyncListeners, FeatureAttribute.ReferenceHighlighting);

            _vsFindAllReferencesService = (IFindAllReferencesService)_serviceProvider.GetService(typeof(SVsFindAllReferences));
        }
开发者ID:tvsonar,项目名称:roslyn,代码行数:26,代码来源:StreamingFindReferencesPresenter.cs


示例7: Main

        static void Main(string[] args) {

			Shell Dispatch = new Shell ();


				if (args.Length == 0) {
					throw new ParserException ("No command specified");
					}

                if (IsFlag(args[0][0])) {


                    switch (args[0].Substring(1).ToLower()) {
						case "mesh/recrypt server" : {
							Usage ();
							break;
							}
						case "start" : {
							Handle_Start (Dispatch, args, 1);
							break;
							}
						case "about" : {
							Handle_About (Dispatch, args, 1);
							break;
							}
						default: {
							throw new ParserException("Unknown Command: " + args[0]);
                            }
                        }
                    }
                else {
					Handle_Start (Dispatch, args, 0);
                    }
            } // Main
开发者ID:hallambaker,项目名称:Mathematical-Mesh,代码行数:34,代码来源:ServerCommands.cs


示例8: ModifyMetadata

        public override void ModifyMetadata(Shell.ObjectEditing.ExtendedMetadata metadata, IEnumerable<Attribute> attributes)
        {
            base.ModifyMetadata(metadata, attributes);

            // We only want to select folders beneath the Gallery folder (163)
            metadata.EditorConfiguration["roots"] = new[] { new ContentReference(163) };
        }
开发者ID:perhemmingson,项目名称:EPiServerTechForum2013,代码行数:7,代码来源:ImageListBlock.cs


示例9: TwiddlerApplication

        /// <summary>
        /// 	Initializes a new instance of the <see cref="TwiddlerApplication"/> class. 
        /// 	Launches an instance of Twiddler for testing.
        /// </summary>
        /// <param name="newStore">
        /// 	The new Store.
        /// </param>
        /// <returns>
        /// 	The launched instance.
        /// </returns>
        public TwiddlerApplication(bool newStore)
        {
            var args = new StringBuilder();

            args.Append(" /inMemory");
            args.AppendFormat(" /service={0}", DefaultService);

            string path = Path.GetFullPath(ApplicationPath);

            var startInfo = new ProcessStartInfo(path, args.ToString())
                                {
                                    UseShellExecute = false
                                };
            _application = Application.Launch(startInfo);

            try
            {
                Shell = new Shell(GetShellWindow());
            }
            catch (Exception)
            {
                if (!_application.HasExited)
                    _application.Kill();
                throw;
            }
        }
开发者ID:GraemeF,项目名称:Twiddler,代码行数:36,代码来源:TwiddlerApplication.cs


示例10: FindPath

    //시작하면 스포너별 길찾기
    void FindPath()
    {
        //Assign StartNode and Goal Node
        for (int i = 0; i < 4; i++) {
            startNode[i] = new Shell (GridManager.instance.GetGridCellCenter (GridManager.instance.GetGridIndex (oStart [i].transform.position)));
        }
        goalNode = new Shell(GridManager.instance.GetGridCellCenter(GridManager.instance.GetGridIndex(oEnd.transform.position)));

        //pathArray = AStar.FindPath(startNode, goalNode);
        pathOneArray = AStar.FindPath(startNode[0], goalNode);
        pathTwoArray = AStar.FindPath(startNode[1], goalNode);
        pathThrArray = AStar.FindPath(startNode[2], goalNode);
        pathFourArray = AStar.FindPath(startNode[3], goalNode);

        /*pathOneArray = AStar2.Path(oStart [0].transform.position, oEnd.transform.position);
        foreach(Node i in pathOneArray){
            Debug.Log ("path :"+ i.pos.x +" "+ i.pos.y +" "+ i.pos.z);
        }
        pathTwoArray = AStar2.Path(oStart [1].transform.position, oEnd.transform.position);
        pathThrArray = AStar2.Path(oStart [2].transform.position, oEnd.transform.position);
        pathFourArray = AStar2.Path(oStart [3].transform.position, oEnd.transform.position);*/

        if(bStart == false)
            StartCoroutine ("MoveLeader");

        bStart = true;
    }
开发者ID:gunsct,项目名称:final_project,代码行数:28,代码来源:TestCode.cs


示例11: SolutionRunner

 public SolutionRunner(ILog log, AppSettings settings, PortReservations reservations, Shell shell)
 {
     _log = log;
     _settings = settings;
     _reservations = reservations;
     _shell = shell;
 }
开发者ID:ryascl,项目名称:design-challenge-server-clr,代码行数:7,代码来源:SolutionRunner.cs


示例12: factor

        private double ScaleFactor; //Variable to hold the device scale factor (use to determine phone screen resolution)

        public Splash(SplashScreen splashscreen, Shell shell, bool loadState)
        {
            this.InitializeComponent();

            this.shell = shell;

            // Subscribe to changed size
            Window.Current.SizeChanged += new WindowSizeChangedEventHandler(Splash_OnResize);

            ScaleFactor = (double)DisplayInformation.GetForCurrentView().ResolutionScale / 100;

            splash = splashscreen;

            if (splash != null)
            {
                // Register an event handler to be executed when the splash screen has been dismissed.
                splash.Dismissed += new TypedEventHandler<SplashScreen, Object>(DismissedEventHandler);

                // Retrieve the window coordinates of the splash screen image.
                splashImageRect = splash.ImageLocation;
                PositionImage();
            }

            CheckMedDatabaseUpdateAsync();
        }
开发者ID:swisszeni,项目名称:ProjectEnton,代码行数:27,代码来源:Splash.xaml.cs


示例13: InvokeTestOptions

        private static void InvokeTestOptions(Shell shell, IShellCommand shellCommand, string[] args)
        {
            var prefixes = new[] { "--", "-", "/" };

            var optionsArgs = args
                .TakeWhile(x => prefixes.Any(p => x.StartsWith(p) && x.Length > p.Length))
                .ToList();

            var parser = new OptionSet();

            var options = (dynamic)new ExpandoObject();
            options.Verbosity = 0;

            parser
                .Add("c|config=", "Set config path", s => { if (!string.IsNullOrWhiteSpace(s)) options.ConfigPath = s; })
                .Add("v|verbose", "increase verbosity level", s => { if (s != null) options.Verbosity++; });

            var arguments = new List<string>(parser.Parse(optionsArgs));
            arguments.AddRange(args.Skip(optionsArgs.Count));

            options.Arguments = arguments;

            Console.WriteLine("Options:");
            Console.WriteLine(JsonConvert.SerializeObject(options, Formatting.Indented));
        }
开发者ID:RaveNoX,项目名称:ConsoleShell,代码行数:25,代码来源:Program.cs


示例14: ConvertCaiDaoDataRowToShell

		private static Shell ConvertCaiDaoDataRowToShell(DataRow row)
		{
			var shell = new Shell();

			shell.Id = row["ID"].ToString();
			shell.TargetId = row["Note"].ToString();
			shell.TargetLevel = row["TypeName"].ToString();
			shell.Status = "";

			shell.ShellUrl = row["SiteUrl"].ToString();
			shell.ShellPwd = row["SitePass"].ToString();
			shell.ShellType = GetScriptTypeById(Convert.ToInt32(row["nScript"].ToString()));
			shell.ShellExtraString = row["Config"].ToString();
			shell.ServerCoding = "UTF-8";
			shell.WebCoding = "UTF-8";

			shell.Area = "";
			shell.Remark = row["Note"].ToString();

			// convert time
			DateTime time;
			var success = DateTime.TryParse(row["AccessTime"].ToString(), out time);
			if (!success) time = DateTime.Now;
			var timeStr = time.Date.ToShortDateString();
			if (timeStr.Contains("/"))
			{
				timeStr = timeStr.Replace("/", "-");
			}
			shell.AddTime = timeStr;

			return shell;
		}
开发者ID:kevins1022,项目名称:Altman,代码行数:32,代码来源:Import.cs


示例15: Shell

 public Shell(INavigationService navigationService)
 {
     Instance = this;
     this.InitializeComponent();
     MyHamburgerMenu.NavigationService = navigationService;
     VisualStateManager.GoToState(Instance, Instance.NormalVisualState.Name, true);
     LinkNavigationManager.Start();
 }
开发者ID:Opiumtm,项目名称:DvachBrowser3,代码行数:8,代码来源:Shell.xaml.cs


示例16: QueryState

 public override Shell.Framework.Commands.CommandState QueryState(Shell.Framework.Commands.CommandContext context)
 {
     if ((context.Items == null) || (context.Items.Length != 1))
         return Shell.Framework.Commands.CommandState.Hidden;
     else
         // if single item selected.
         return base.QueryState(context);
 }
开发者ID:mrunalbrahmbhatt,项目名称:Export-as-Package,代码行数:8,代码来源:ExportAsPackage.cs


示例17: CloseShell

 public static void CloseShell()
 {
     if (shell != null)
     {
         shell.CloseSession();
         shell = null;
     }
 }
开发者ID:nhz2f,项目名称:xRAT,代码行数:8,代码来源:CommandHandler.cs


示例18: SetUp

        public void SetUp()
        {
            var registry = new Registry();
            shell = new Shell();
            shell.Register(registry);

            container = new Container(registry);
        }
开发者ID:GaryLCoxJr,项目名称:storyteller,代码行数:8,代码来源:ShellRegistrationIntegrationTester.cs


示例19: Detect

 public void Detect(Shell shell, Tank tank)
 {
     var hit = IsHit(shell.Point, tank.Target);
     if (hit)
     {
         _notifyHitMethod(tank.Owner, shell);
     }
 }
开发者ID:neutmute,项目名称:TankWar,代码行数:8,代码来源:CollisionDetector.cs


示例20: Shell

    public sType type; //셀의 타입

    #endregion Fields

    #region Constructors

    public Shell()
    {
        this.type = sType.NONE;
        this.estimatedCost = 0.0f;
        this.nodeTotalCost = 1.0f;
        this.bObstacle = false;
        this.parent = null;
    }
开发者ID:gunsct,项目名称:final_project,代码行数:14,代码来源:Shell.cs



注:本文中的Shell类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C# ShellObject类代码示例发布时间:2022-05-24
下一篇:
C# Shelisp类代码示例发布时间:2022-05-24
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap