Example #1
0
        /// <summary>
        /// 引数チェック
        /// </summary>
        /// <param name="args"></param>
        /// <returns></returns>
        private static bool argumentsAnlyzer(string[] args)
        {
            bool        ret     = false;
            ICmdFactory factory = ICmdFactory.getInstance();

            //-w 検索
            //引数:ウインドウタイトル(部分一致)
            //検索結果のプロセスIDハンドルID
            if (args.Length == 2 && args[0] == "-w")
            {
                command = factory.create(args[0]);
                command.setParameter(args[1]);
                ret = true;
            }

            //-l リスト
            //ウインドウ情報一覧の表示
            if (args.Length == 1 && args[0] == "-l")
            {
                command = factory.create(args[0]);
                command.setParameter();
                ret = true;
            }

            //-m メッセージ出力1
            //引数:親ウインドウのハンドル、コントロールハンドル
            if (args.Length == 3 && args[0] == "-m")
            {
                command = factory.create(args[0]);
                command.setParameter(args[1], args[2]);
                ret = true;
            }

            //-s メッセージ出力2
            //引数:親ウインドウのハンドル、コントロールハンドル
            if (args.Length == 4 && args[0] == "-s")
            {
                command = factory.create(args[0]);
                command.setParameter(args[1], args[2], args[3]);
                ret = true;
            }

            //-g メッセージ出力3
            //引数:親ウインドウのハンドル、コントロールハンドル
            if (args.Length == 3 && args[0] == "-g")
            {
                command = factory.create(args[0]);
                command.setParameter(args[1], args[2]);
                ret = true;
            }

            //-ie メッセージ出力2
            //引数:親ウインドウのハンドル、コントロールハンドル
            if (args.Length == 3 && args[0] == "-ie")
            {
                command = factory.create(args[0]);
                command.setParameter(args[1], args[2]);
                ret = true;
            }

            return(ret);
        }