private string GetInfoText(ListOption option, bool source)
        {
            var list = option?.ChannelList;
            var src  = list?.SignalSource ?? 0;
            var sb   = new StringBuilder();

            var sigSource = new[] { SignalSource.Antenna, SignalSource.Cable, SignalSource.Sat, SignalSource.IP, SignalSource.Analog, SignalSource.Digital, SignalSource.Tv, SignalSource.Radio, SignalSource.Data };
            var infoText  = Resources.ReferenceListForm_AntennaCableSatIPAnalogDigitalTVRadio.Split(',');
            var controls  = new[] { cbAntenna, cbCable, cbSat, cbIp, cbAnalog, cbDigital, cbTv, cbRadio, cbData };

            for (int i = 0, c = sigSource.Length; i < c; i++)
            {
                if ((src & sigSource[i]) != 0)
                {
                    sb.Append(", ").Append(infoText[i].TrimEnd());
                }
                else
                {
                    controls[i].Checked = false;
                    if (source || i >= 4)
                    {
                        controls[i].Enabled = false;
                    }
                }
            }

            if (sb.Length >= 2)
            {
                sb.Remove(0, 2);
            }
            return(sb.ToString());
        }
Example #2
0
        public void List_Option(ListOption pAction)
        {
            fAction = pAction;

            switch (fAction)
            {
            case ListOption.notactive:

                if (rdo_notactive.Checked == true)
                {
                    LoadData(CQuotation_exten.Notactive(new DAL()));
                }
                else
                {
                    LoadData(CQuotation_exten.Showall(new DAL()));
                }

                break;

            case ListOption.Search:
                LoadData(CQuotation_exten.Searchby(txt_no.Text, txt_date.Text, txt_Todate.Text, txt_party.Text, new DAL()));
                break;

            default:
                LoadData(CQuotation_exten.Showall(new DAL()));
                break;
            }
        }
Example #3
0
        public void List_Option(ListOption pAction)
        {
            fAction = pAction;

            switch (fAction)
            {
            case ListOption.notactive:

                if (rdo_notactive.Checked == true)
                {
                    LoadData(CStables_exten.NotActive(new SQLITE_DAL()));
                }
                else
                {
                    LoadData(CStables_exten.Active(new SQLITE_DAL()));
                }

                break;

            case ListOption.Search:
                LoadData(CStables_exten.Searchby(txt_database.Text, txt_mtables.Text));
                break;

            default:
                LoadData(CStables_exten.Active(new SQLITE_DAL()));
                break;
            }
        }
 public void OnSelectOption(ListOption Option)
 {
     if (Select != null)
     {
         Select(Option.Value);
     }
 }
Example #5
0
        public void List_Option(ListOption pAction)
        {

           LoadData(COutstanding_exten.GetOutstanding(txt_party_id.Text));


        }
        protected override void FillForm()
        {
            base.FillForm();
            if (option == null)
            {
                return;
            }

            ListOption o = (ListOption)option;

            switch (o.Mode)
            {
            case ListOption.Modes.AND:
                rbAND.Checked = true;
                break;

            case ListOption.Modes.OR:
            default:
                rbOR.Checked = true;
                break;
            }
            foreach (string key in o.GetValues(false))
            {
                keys.Add(key);
            }
            lbRefresh();
        }
Example #7
0
        public void Test_Info_Option_No_Explicit_Options()
        {
            //arrange
            var traceService       = new Mock <ITraceService>();
            var environmentService = new Mock <IEnvironmentService>();

            environmentService.Setup(s => s.GetEnvironmentVariable("YUNIQL_CONNECTION_STRING")).Returns("sqlserver-connection-string");
            var localVersionService = new Mock <ILocalVersionService>();
            var migrationService    = new Mock <IMigrationService>();

            migrationService.Setup(s => s.GetAllVersions(null, null)).Returns(new List <DbVersion> {
                new DbVersion {
                    Version = "v0.00", AppliedOnUtc = DateTime.UtcNow, AppliedByUser = "******"
                }
            });
            var migrationServiceFactory = new Mock <CLI.IMigrationServiceFactory>();

            migrationServiceFactory.Setup(s => s.Create("sqlserver")).Returns(migrationService.Object);

            //act
            var option = new ListOption {
            };
            var sut    = new CommandLineService(migrationServiceFactory.Object, localVersionService.Object, environmentService.Object, traceService.Object);

            sut.RunListOption(option);

            //assert
            migrationService.Verify(s => s.Initialize("sqlserver-connection-string", DEFAULT_CONSTANTS.COMMAND_TIMEOUT_SECS));
            migrationService.Verify(s => s.GetAllVersions(null, null));
        }
Example #8
0
        public async Task ListAsync(LocationBase location, ListOption option, CancellationToken ct)
        {
            option.OutputType = "json";
            var args = $"list {location} {option} --cancel-from-stdin";

            await this.StartAZCopyAsync(args, ct);
        }
Example #9
0
        public void List_Option(ListOption pAction)
        {
            if (constructed_flag == false)
            {
                return;
            }

            fAction = pAction;

            switch (fAction)
            {
            case ListOption.refer:

                if (rdo_refer.Checked == true)
                {
                    LoadData(CUpvc_invoice_exten.Refer(new DAL()));
                }
                else
                {
                    LoadData(CUpvc_invoice_exten.Unrefer(new DAL()));
                }

                break;

            case ListOption.showall:

                if (rdo_showall.Checked == true)
                {
                    LoadData(CUpvc_invoice_exten.Showall(new DAL()));
                }
                else
                {
                    LoadData(CUpvc_invoice_exten.Unrefer(new DAL()));
                }

                break;

            case ListOption.notactive:

                if (rdo_notactive.Checked == true)
                {
                    LoadData(CUpvc_invoice_exten.Notactive(new DAL()));
                }
                else
                {
                    LoadData(CUpvc_invoice_exten.Unrefer(new DAL()));
                }

                break;

            case ListOption.Search:
                LoadData(CUpvc_invoice_exten.Searchby(txt_no.Text, txt_date.Text, txt_party.Text, new DAL()));
                break;

            default:
                LoadData(CUpvc_invoice_exten.Unrefer(new DAL()));
                break;
            }
        }
Example #10
0
 /// <summary>
 /// Selects the Provided option, if it is an option for this form.
 /// </summary>
 /// <param name="Option">Option to Select.</param>
 public void Select(ListOption Option)
 {
     if (Option.Parent != this)
     {
         throw new Exception("This is not an option for this form");
     }
     Option.Selected = true;
 }
Example #11
0
        public PluginListOptionViewModel(ListOption <TValue> valueOption, ILocalizationProvider localizationProvider)
            : base(valueOption.NameTextId, valueOption.Value)
        {
            _pluginOptionViewModelImplementation = new PluginOptionViewModelImplementation <TValue>(valueOption, localizationProvider, this);

            _listOption           = valueOption;
            _localizationProvider = localizationProvider;
            _listOption.AvailableValuesChanged += ListOption_AvailableValuesChanged;
        }
Example #12
0
        public void List_Option(ListOption pAction)
        {
            fAction = pAction;

            switch (fAction)
            {
            case ListOption.active:

                if (chk_notactive.Checked == true)
                {
                    LoadData(CVoucher_exten.NotActive(new DAL()));
                }
                else
                {
                    LoadData(CVoucher_exten.Active(new DAL()));
                }

                break;

            case ListOption.notactive:

                if (chk_notactive.Checked == true)
                {
                    LoadData(CVoucher_exten.NotActive(new DAL()));
                }
                else
                {
                    LoadData(CVoucher_exten.Active(new DAL()));
                }

                break;

            case ListOption.Search:

                List <Voucher> list =
                    CVoucher_exten.Searchfilter(
                        txt_voucher_no.Text
                        , txt_voucher_no_1.Text
                        , txt_voucher_date.Text
                        , txt_voucher_date_1.Text
                        , CVouchertype_exten.GetId_Name(txt_vouchertype.Text)
                        , COrder_exten.GetId_Name(txt_orderref.Text)
                        , CLedger_exten.GetId_Name(txt_ledger.Text)
                        , CParty_exten.GetId_Name(txt_party.Text)
                        , txt_purpose.Text
                        , new DAL());

                LoadData(list);

                break;

            default:
                LoadData(CVoucher_exten.Active(new DAL()));
                break;
            }
        }
Example #13
0
        public void List_Option(ListOption pAction)
        {
            fAction = pAction;

            switch (fAction)
            {
            case ListOption.refer:

                if (rdo_refer.Checked == true)
                {
                    LoadData(CPurchase_exten.Refer());
                }
                else
                {
                    LoadData(CPurchase_exten.Unrefer());
                }

                break;

            case ListOption.showall:

                if (rdo_showall.Checked == true)
                {
                    LoadData(CPurchase_exten.Showall());
                }
                else
                {
                    LoadData(CPurchase_exten.Unrefer());
                }

                break;

            case ListOption.notactive:

                if (rdo_notactive.Checked == true)
                {
                    LoadData(CPurchase_exten.Notactive(new DAL()));
                }
                else
                {
                    LoadData(CPurchase_exten.Unrefer());
                }

                break;

            case ListOption.Search:
                LoadData(CPurchase_exten.Searchby(txt_no.Text, txt_date.Text, txt_Todate.Text, txt_party.Text));
                break;

            default:
                LoadData(CPurchase_exten.Unrefer());
                break;
            }
        }
Example #14
0
        public void List_Option(ListOption pAction)
        {
            fAction = pAction;

            switch (fAction)
            {
            //case ListOption.refer:

            //    if (rdo_refer.Checked == true)
            //    {
            //        LoadData(CReceipt_exten.Refer(new DAL()));
            //    }
            //    else
            //    {
            //        LoadData(CReceipt_exten.Unrefer(new DAL()));
            //    }

            //    break;

            case ListOption.showall:

                if (rdo_showall.Checked == true)
                {
                    LoadData(CQreceipt_exten.Showall(new DAL()));
                }
                else
                {
                    LoadData(CQreceipt_exten.Unrefer(new DAL()));
                }

                break;

            case ListOption.notactive:

                if (rdo_notactive.Checked == true)
                {
                    LoadData(CQreceipt_exten.Notactive(new DAL()));
                }
                else
                {
                    LoadData(CQreceipt_exten.Unrefer(new DAL()));
                }

                break;

            case ListOption.Search:
                LoadData(CQreceipt_exten.Searchby(txt_no.Text, txt_date.Text, txt_party.Text, new DAL()));
                break;

            default:
                LoadData(CQreceipt_exten.Showall(new DAL()));
                break;
            }
        }
Example #15
0
        //�I������
        public void Dispose()
        {
            //	        if (RunMode != RunMode.Service && RunMode != RunMode.Remote) {
            //	            //**********************************************
            //	            // ��U�t�@�C����폜���Č��ݗL���Ȃ�̂���������߂�
            //	            //**********************************************
            //	            var iniDb = new IniDb(ProgDir(),"Option");
            //	            iniDb.DeleteIni();

            //Ver5.8.6 Java fix
            if (RunMode == RunMode.Normal)
            {
                var iniTmp = new IniDb(ProgDir(), "$tmp");//�o�b�N�A�b�v��쐬����ini�t�@�C����폜����
                //��U�A�ʃt�@�C���Ɍ��ݗL���Ȃ�̂���������߂�
                ListOption.Save(iniTmp);
                //�㏑������
                File.Copy(iniTmp.Path, IniDb.Path, true);
                iniTmp.Delete();
            }
            else if (RunMode == RunMode.Remote)
            {
                IniDb.Delete(); //$Remote.ini�̍폜
            }


            //**********************************************
            // �j��
            //**********************************************
            ListServer.Dispose(); //�e�T�[�o�͒�~�����
            ListOption.Dispose();
            ListTool.Dispose();
            MailBox = null;
            //	        }
            if (RemoteClient != null)
            {
                RemoteClient.Dispose();
            }

            View.Dispose();
            if (TraceDlg != null)
            {
                TraceDlg.Dispose();
            }
            if (Menu != null)
            {
                Menu.Dispose();
            }
            if (WindowSize != null)
            {
                View.Save(WindowSize);
                WindowSize.Dispose(); //Dispose���Ȃ���Reg.Dispose(�ۑ�)����Ȃ�
            }
        }
Example #16
0
        //終了処理
        public void Dispose()
        {
            //	        if (RunMode != RunMode.Service && RunMode != RunMode.Remote) {
            //	            //**********************************************
            //	            // 一旦ファイルを削除して現在有効なものだけを書き戻す
            //	            //**********************************************
            //	            var iniDb = new IniDb(ProgDir(),"Option");
            //	            iniDb.DeleteIni();

            //Ver5.8.6 Java fix
            if (RunMode == RunMode.Normal)
            {
                var iniTmp = new IniDb(ProgDir(), "$tmp");//バックアップを作成してiniファイルを削除する
                //一旦、別ファイルに現在有効なものだけを書き戻す
                ListOption.Save(iniTmp);
                //上書きする
                File.Copy(iniTmp.Path, IniDb.Path, true);
                iniTmp.Delete();
            }
            else if (RunMode == RunMode.Remote)
            {
                IniDb.Delete(); //$Remote.iniの削除
            }


            //**********************************************
            // 破棄
            //**********************************************
            ListServer.Dispose(); //各サーバは停止される
            ListOption.Dispose();
            ListTool.Dispose();
            MailBox = null;
            //	        }
            if (RemoteClient != null)
            {
                RemoteClient.Dispose();
            }

            View.Dispose();
            if (TraceDlg != null)
            {
                TraceDlg.Dispose();
            }
            if (Menu != null)
            {
                Menu.Dispose();
            }
            if (WindowSize != null)
            {
                View.Save(WindowSize);
                WindowSize.Dispose(); //DisposeしないとReg.Dispose(保存)されない
            }
        }
Example #17
0
        public void List_Option(ListOption pAction)
        {
            fAction = pAction;

            switch (fAction)
            {
            case ListOption.active:

                if (chk_notactive.Checked == true)
                {
                    LoadData(CVouchertype_exten.NotActive(new DAL()));
                }
                else
                {
                    LoadData(CVouchertype_exten.Active(new DAL()));
                }

                break;

            case ListOption.notactive:

                if (chk_notactive.Checked == true)
                {
                    LoadData(CVouchertype_exten.NotActive(new DAL()));
                }
                else
                {
                    LoadData(CVouchertype_exten.Active(new DAL()));
                }

                break;

            case ListOption.Search:
                if (txt_vouchertype_name.Text != "")
                {
                    List <Vouchertype> list = new List <Vouchertype>
                    {
                        CVouchertype_exten.SearchName(txt_vouchertype_name.Text, new DAL())
                    };
                    LoadData(list);
                }
                else
                {
                    LoadData(CVouchertype_exten.Active(new DAL()));
                }
                break;

            default:
                LoadData(CVouchertype_exten.Active(new DAL()));
                break;
            }
        }
Example #18
0
        public void List_Option(ListOption pAction)
        {
            fAction = pAction;

            switch (fAction)
            {
            case ListOption.active:

                if (chk_notactive.Checked == true)
                {
                    LoadData(CNamespaces_exten.NotActive());
                }
                else
                {
                    LoadData(CNamespaces_exten.Active());
                }

                break;

            case ListOption.notactive:

                if (chk_notactive.Checked == true)
                {
                    LoadData(CNamespaces_exten.NotActive());
                }
                else
                {
                    LoadData(CNamespaces_exten.Active());
                }

                break;

            case ListOption.Search:
                if (txt_namespaces_name.Text != "")
                {
                    List <Namespaces> list = new List <Namespaces>
                    {
                        CNamespaces_exten.SearchName(txt_namespaces_name.Text)
                    };
                    LoadData(list);
                }
                else
                {
                    LoadData(CNamespaces_exten.Active());
                }
                break;

            default:
                LoadData(CNamespaces_exten.Active());
                break;
            }
        }
Example #19
0
        public void List_Option(ListOption action)
        {
            fAction = action;

            switch (fAction)
            {
            case ListOption.active:

                if (chk_notactive.Checked == true)
                {
                    LoadData(CCash_in_hand_exten.NotActive());
                }
                else
                {
                    LoadData(CCash_in_hand_exten.Active());
                }

                break;

            case ListOption.notactive:

                if (chk_notactive.Checked == true)
                {
                    LoadData(CCash_in_hand_exten.NotActive());
                }
                else
                {
                    LoadData(CCash_in_hand_exten.Active());
                }

                break;

            case ListOption.Search:
                if (txt_cash_in_hand_id.Text != "")
                {
                    List <Cash_in_hand> list = new List <Cash_in_hand>
                    {
                        CCash_in_hand_exten.SearchName(txt_cash_in_hand_id.Text)
                    };
                    LoadData(list);
                }
                else
                {
                    LoadData(CCash_in_hand_exten.Active());
                }
                break;

            default:
                LoadData(CCash_in_hand_exten.Active());
                break;
            }
        }
Example #20
0
        public void List_Option(ListOption pAction)
        {
            fAction = pAction;

            switch (fAction)
            {
            case ListOption.active:

                if (chk_notactive.Checked == true)
                {
                    LoadData(CSpath_exten.NotActive(new SQLITE_DAL()));
                }
                else
                {
                    LoadData(CSpath_exten.Active(new SQLITE_DAL()));
                }

                break;

            case ListOption.notactive:

                if (chk_notactive.Checked == true)
                {
                    LoadData(CSpath_exten.NotActive(new SQLITE_DAL()));
                }
                else
                {
                    LoadData(CSpath_exten.Active(new SQLITE_DAL()));
                }

                break;

            case ListOption.Search:
                if (txt_mtables_id.Text != "")
                {
                    List <Spath> list = new List <Spath>
                    {
                        CSpath_exten.SearchName(txt_mtables_id.Text, new SQLITE_DAL())
                    };
                    LoadData(list);
                }
                else
                {
                    LoadData(CSpath_exten.Active(new SQLITE_DAL()));
                }
                break;

            default:
                LoadData(CSpath_exten.Active(new SQLITE_DAL()));
                break;
            }
        }
        internal ConnectionOptions()
        {
            odbc                = new BooleanOption();
            host                = new ListOption();
            uid                 = new StringOption();
            pwd                 = new StringOption();
            database            = new StringOption();
            charset             = new StringOption();
            encrypt             = new StringOption();
            persistSecurityInfo = new BooleanOption();
            connectionTimeout   = new IntegerOption();
            connectionLifetime  = new IntegerOption();
            minPoolSize         = new IntegerOption();
            maxPoolSize         = new IntegerOption();
            pooling             = new BooleanOption();
            enlist              = new BooleanOption();
            roundrobin          = new BooleanOption();
            Reset();

            options = CollectionsUtil.CreateCaseInsensitiveHashtable(23);
            options.Add(ODBC, odbc);
            options.Add(HOST, host);
            options.Add(DATASOURCE, host);
            options.Add(SERVER, host);
            options.Add(ADDRESS, host);
            options.Add(NETWORKADDRESS, host);
            options.Add(UID, uid);
            options.Add(USER_ID, uid);
            options.Add(USERID, uid);
            options.Add(PWD, pwd);
            options.Add(PASSWORD, pwd);
            options.Add(DATABASE, database);
            options.Add(INITIALCATALOG, database);
            options.Add(CHARSET, charset);
            options.Add(ENCRYPT, encrypt);
            options.Add(PERSISTSECURITYINFO, persistSecurityInfo);
            options.Add(PERSIST_SECURITY_INFO, persistSecurityInfo);
            options.Add(CONNECTTIMEOUT, connectionTimeout);
            options.Add(CONNECT_TIMEOUT, connectionTimeout);
            options.Add(CONNECTIONTIMEOUT, connectionTimeout);
            options.Add(CONNECTION_TIMEOUT, connectionTimeout);
            options.Add(CONNECTIONLIFETIME, connectionLifetime);
            options.Add(CONNECTION_LIFETIME, connectionLifetime);
            options.Add(MINPOOLSIZE, minPoolSize);
            options.Add(MIN_POOL_SIZE, minPoolSize);
            options.Add(MAXPOOLSIZE, maxPoolSize);
            options.Add(MAX_POOL_SIZE, maxPoolSize);
            options.Add(POOLING, pooling);
            options.Add(ENLIST, enlist);
            options.Add(ROUNDROBIN, roundrobin);
            options.Add(ROUND_ROBIN, roundrobin);
        }
Example #22
0
        private void PopulatePlatforms(IConfigurationService dcCfg)
        {
            var noneOption = new ListOption("(None)", null);
            var platforms  = new ListOption[] { noneOption }
            .Concat(
                dcCfg.GetEnvironments()
                .OfType <PlatformDefinition>()
                .OrderBy(p => p.Description)
                .Where(p => !string.IsNullOrEmpty(p.Name))
                .Select(p => new ListOption(p.Description, p)));

            dlg.Platforms.DataSource = new ArrayList(platforms.ToArray());
        }
        protected void lbRefresh()
        {
            ListOption o = (ListOption)option;

            lb.Items.Clear();
            string s;

            foreach (string key in keys)
            {
                s = (lb.Items.Count > 0 ? (rbAND.Checked ? Environment.StringResources.GetString("And") + " " : Environment.StringResources.GetString("Or") + " ") : "");
                lb.Items.Add(s + o.GetItemText(key));
            }
        }
Example #24
0
        //�e�X�g�p�R���X�g���N�^(MailBox�̂ݏ�����)
        public Kernel(String option)
        {
            _isTest = true;
            DefaultInitialize(null, null, null, null);

            if (option.IndexOf("MailBox") != -1)
            {
                var op      = ListOption.Get("MailBox");
                var conf    = new Conf(op);
                var dir     = ReplaceOptionEnv((String)conf.Get("dir"));
                var datUser = (Dat)conf.Get("user");
                MailBox = new MailBox(null, datUser, dir);
            }
        }
Example #25
0
        public void Test_List_Option_No_Explicit_Options()
        {
            //arrange
            var traceService       = new Mock <ITraceService>();
            var environmentService = new Mock <IEnvironmentService>();

            environmentService.Setup(s => s.GetEnvironmentVariable("YUNIQL_CONNECTION_STRING")).Returns("sqlserver-connection-string");
            var workspaceService = new Mock <IWorkspaceService>();

            var configuration = Configuration.Instance;

            configuration.Workspace        = @"C:\temp\yuniql";
            configuration.Platform         = SUPPORTED_DATABASES.SQLSERVER;
            configuration.ConnectionString = "sqlserver-connection-string";

            var configurationService = new Mock <IConfigurationService>();

            configurationService.Setup(s => s.GetValueOrDefault(null, ENVIRONMENT_VARIABLE.YUNIQL_PLATFORM, SUPPORTED_DATABASES.SQLSERVER)).Returns(SUPPORTED_DATABASES.SQLSERVER);

            var migrationService = new Mock <IMigrationService>();

            migrationService.Setup(s => s.GetAllVersions(null, null)).Returns(new List <DbVersion> {
                new DbVersion {
                    Version = "v0.00", AppliedOnUtc = DateTime.UtcNow, AppliedByUser = "******"
                }
            });
            var migrationServiceFactory = new Mock <CLI.IMigrationServiceFactory>();

            migrationServiceFactory.Setup(s => s.Create("sqlserver")).Returns(migrationService.Object);

            var dataService        = new Mock <IDataService>();
            var dataServiceFactory = new Mock <CLI.IDataServiceFactory>();

            dataServiceFactory.Setup(s => s.Create("sqlserver")).Returns(dataService.Object);

            var manifest        = new Mock <ManifestData>();
            var manifestFactory = new Mock <IManifestFactory>();

            manifestFactory.Setup(s => s.Create("sqlserver")).Returns(manifest.Object);

            //act
            var option = new ListOption {
            };
            var sut    = new CommandLineService(migrationServiceFactory.Object, dataServiceFactory.Object, manifestFactory.Object, workspaceService.Object, environmentService.Object, traceService.Object, configurationService.Object);

            sut.RunListOption(option);

            //assert
            migrationService.Verify(s => s.GetAllVersions(null, null));
        }
Example #26
0
        //Conf�̐���
        //���O��ListOption���������������K�v������
        public Conf CreateConf(String nameTag)
        {
            if (ListOption == null)
            {
                Util.RuntimeException("createConf() ListOption==null");
                return(null);
            }
            var oneOption = ListOption.Get(nameTag);

            if (oneOption != null)
            {
                return(new Conf(oneOption));
            }
            return(null);
        }
Example #27
0
        public void List_Option(ListOption pAction)
        {
            fAction = pAction;

            switch (fAction)
            {
            case ListOption.active:

                if (chk_notactive.Checked == true)
                {
                    LoadData(CDatabases.TblData(CDatabases_exten.NotActive()));
                }
                else
                {
                    LoadData(CDatabases.TblData(CDatabases_exten.Active()));
                }

                break;

            case ListOption.notactive:

                if (chk_notactive.Checked == true)
                {
                    LoadData(CDatabases.TblData(CDatabases_exten.NotActive()));
                }
                else
                {
                    LoadData(CDatabases.TblData(CDatabases_exten.Active()));
                }

                break;

            case ListOption.Search:
                if (txt_databases_name.Text != "")
                {
                    LoadData(CDatabases.TblData(CDatabases_exten.SearchName(txt_databases_name.Text)));
                }
                else
                {
                    LoadData(CDatabases.TblData(CDatabases_exten.Active()));
                }
                break;

            default:
                LoadData(CDatabases.TblData(CDatabases_exten.Active()));
                break;
            }
        }
Example #28
0
 private void PopulateRawFiles(IConfigurationService dcCfg)
 {
     var unknownOption = new ListOption
     {
         Text = "(Unknown)",
         Value = null,
     };
     var rawFiles = new ListOption[] { unknownOption }
         .Concat(
             dcCfg.GetRawFiles()
             .OfType<RawFileElement>()
             .OrderBy(p => p.Description)
             .Where(p => !string.IsNullOrEmpty(p.Name))
             .Select(p => new ListOption { Text = p.Description, Value = p }));
     dlg.RawFileTypes.DataSource = new ArrayList(rawFiles.ToArray());
 }
Example #29
0
 private void PopulatePlatforms(IConfigurationService dcCfg)
 {
     var noneOption = new ListOption
     {
         Text = "(None)",
         Value = null,
     };
     var platforms = new ListOption[] { noneOption }
         .Concat(
             dcCfg.GetEnvironments()
             .OfType<OperatingEnvironment>()
             .OrderBy(p => p.Description)
             .Where(p => !string.IsNullOrEmpty(p.Name))
             .Select(p => new ListOption { Text = p.Description, Value = p }));
     dlg.Platforms.DataSource = new ArrayList(platforms.ToArray());
 }
Example #30
0
            private void validateList()
            {
                if (_jobName != null)
                {
                    _listOption = ListOption.Builds;

                    if (_matchPattern != String.Empty)
                    {
                        _syntaxResult.ReportError("Match pattern not valid with --job");
                    }
                }
                else
                {
                    _listOption = ListOption.Jobs;
                }
            }
Example #31
0
        private static int RunCommand(ListOption opts)
        {
            int count = 0;

            foreach (MediaDevice device in MediaDevice.GetDevices())
            {
                if (count == 0)
                {
                    if (opts.Detailed)
                    {
                        Console.WriteLine("Friendly Name  \tManufacturer   \tDescription         \tSerial Number  \tModel");
                    }
                    else
                    {
                        Console.WriteLine("Friendly Name  \tManufacturer   \tDescription");
                    }
                }
                count++;
                if (opts.Detailed)
                {
                    try
                    {
                        device.Connect();
                        Console.WriteLine($"{device.FriendlyName,-15}\t{device.Manufacturer,-15}\t{device.Description,-20}\t{device.SerialNumber,-15}\t{device.Model}");


                        device.Disconnect();
                    }
                    catch (Exception ex)
                    {
                        Console.WriteLine($"{device.FriendlyName}: {ex.Message}");
                    }
                    finally
                    {
                        device.Dispose();
                    }
                }
                else
                {
                    Console.WriteLine($"{device.FriendlyName,-15}\t{device.Manufacturer,-15}\t{device.Description}");
                }
            }
            Console.WriteLine("{0} devices found.", count);
            return(0);
        }
Example #32
0
        /// <summary>
        /// List the contents of the test cases to the console, based on the provided option and format.
        /// </summary>
        public static void List <TTestCase>(
            IReadOnlyDictionary <string, List <TTestCase> > testCasesByAssembly,
            ListOption listOption,
            ListFormat listFormat)
            where TTestCase : _ITestCaseMetadata
        {
            Action <IReadOnlyDictionary <string, List <TTestCase> >, ListFormat>?lister = listOption switch
            {
                ListOption.Classes => Classes,
                ListOption.Full => Full,
                ListOption.Methods => Methods,
                ListOption.Tests => Tests,
                ListOption.Traits => Traits,
                _ => null
            };

            lister?.Invoke(testCasesByAssembly, listFormat);
        }
Example #33
0
            private void validateList()
            {
                if (_jobName != null)
                {
                    _listOption = ListOption.Builds;

                    if (_matchPattern != String.Empty)
                    {
                        _syntaxResult.ReportError("Match pattern not valid with --job");
                    }
                }
                else
                {
                    _listOption = ListOption.Jobs;
                }
            }
		internal ConnectionOptions ()
		{
			odbc = new BooleanOption ();
			host = new ListOption ();
			uid = new StringOption ();
			pwd = new StringOption ();
			database = new StringOption ();
			charset = new StringOption ();
			encrypt = new StringOption ();
			persistSecurityInfo = new BooleanOption ();
			connectionTimeout = new IntegerOption ();
			connectionLifetime = new IntegerOption ();
			minPoolSize = new IntegerOption ();
			maxPoolSize = new IntegerOption ();
			pooling = new BooleanOption ();
			enlist = new BooleanOption ();
			roundrobin = new BooleanOption ();
			Reset ();

			options = CollectionsUtil.CreateCaseInsensitiveHashtable (23);
			options.Add (ODBC, odbc);
			options.Add (HOST, host);
			options.Add (DATASOURCE, host);
			options.Add (SERVER, host);
			options.Add (ADDRESS, host);
			options.Add (NETWORKADDRESS, host);
			options.Add (UID, uid);
			options.Add (USER_ID, uid);
			options.Add (USERID, uid);
			options.Add (PWD, pwd);
			options.Add (PASSWORD, pwd);
			options.Add (DATABASE, database);
			options.Add (INITIALCATALOG, database);
			options.Add (CHARSET, charset);
			options.Add (ENCRYPT, encrypt);
			options.Add (PERSISTSECURITYINFO, persistSecurityInfo);
			options.Add (PERSIST_SECURITY_INFO, persistSecurityInfo);
			options.Add (CONNECTTIMEOUT, connectionTimeout);
			options.Add (CONNECT_TIMEOUT, connectionTimeout);
			options.Add (CONNECTIONTIMEOUT, connectionTimeout);
			options.Add (CONNECTION_TIMEOUT, connectionTimeout);
			options.Add (CONNECTIONLIFETIME, connectionLifetime);
			options.Add (CONNECTION_LIFETIME, connectionLifetime);
			options.Add (MINPOOLSIZE, minPoolSize);
			options.Add (MIN_POOL_SIZE, minPoolSize);
			options.Add (MAXPOOLSIZE, maxPoolSize);
			options.Add (MAX_POOL_SIZE, maxPoolSize);
			options.Add (POOLING, pooling);
			options.Add (ENLIST, enlist);
			options.Add (ROUNDROBIN, roundrobin);
			options.Add (ROUND_ROBIN, roundrobin);
		}
Example #35
0
        //�T�[�o�ċN���ŁA�ēx���s����鏉����
        public void ListInitialize()
        {
            //Logger���g�p�ł��Ȃ��Ԃ̃��O�́A������ɕۑ����āA���Logger�ɑ���
            var tmpLogger = new TmpLogger();

            //************************************************************
            // �j��
            //************************************************************
            if (ListOption != null){
                ListOption.Dispose();
                ListOption = null;
            }
            //Java fix
            if (ListTool != null){
                ListTool.Dispose();
                ListTool = null;
            }
            if (ListServer != null){
                ListServer.Dispose();
                ListServer = null;
            }
            if (MailBox != null){
                MailBox = null;
            }
            if (LogFile != null){
                LogFile.Dispose();
                LogFile = null;
            }

            //************************************************************
            // ������
            //************************************************************
            //ListPlugin �́BListOption��ListServer�����������Ԃ�����������
            //isTest=true�̏ꍇ�A�p�X��""�ɂ��āA�v���O�C��0�‚ŏ�������������

            //ListPlugin listPlugin = new ListPlugin((isTest) ? "" : string.Format("%s\\plugins", getProgDir()));
            var listPlugin = new ListPlugin(ProgDir());
            foreach (var o in listPlugin){
                //�����[�g�N���C�A���g�̏ꍇ�A���̃��O�́A��₱�����̂ŕ\�����Ȃ�
                if (RunMode == RunMode.Normal){
                    tmpLogger.Set(LogKind.Detail, null, 9000008, string.Format("{0}Server", o.Name));
                }
            }

            //ListOption�Ŋe�I�v�V���������������O�ɁAisJp�����͏��������Ă����K�v������̂�
            //�ŏ���OptionBasic��lang������ǂݏo��
            //Ver5.8.6 Java fix
            //_isJp = OptionIni.GetInstance().IsJp();
            _isJp = IniDb.IsJp();

            ListOption = new ListOption(this, listPlugin);

            //Ver5.9.1
            //���߂Ă�����ʉ߂���Ƃ��A�ߋ��̃o�[�W������Option��ǂݍ��ނ�
            //���I�v�V�����̓I�u�W�F�N�g�̒���OneOption�ɂ̂ݕێ������
            //���̏�ԂŁA�����̃I�v�V�����w���OK����ƁA���̃I�v�V�����ȊO��
            //Option.ini�ɕۑ�����Ȃ����ߔj������Ă��܂�
            //���̖��ɑΏ����邽�߁A�����ň�x�AOption.ini��ۑ����邱�Ƃɂ���
            if (!_isTest){
                ListOption.Save(IniDb);
            }

            //OptionBasic
            var confBasic = new Conf(ListOption.Get("Basic"));
            EditBrowse = (bool) confBasic.Get("editBrowse");

            //OptionLog
            var confOption = new Conf(ListOption.Get("Log"));
            LogView.SetFont((Font) confOption.Get("font"));

            if (RunMode == RunMode.Normal || RunMode == RunMode.Service){
                //LogFile�̏�����
                var saveDirectory = (String) confOption.Get("saveDirectory");
                saveDirectory = ReplaceOptionEnv(saveDirectory);
                var normalLogKind = (int) confOption.Get("normalLogKind");
                var secureLogKind = (int) confOption.Get("secureLogKind");
                var saveDays = (int) confOption.Get("saveDays");
                //Ver6.0.7
                var useLogFile = (bool)confOption.Get("useLogFile");
                var useLogClear = (bool) confOption.Get("useLogClear");
                if (!useLogClear){
                    saveDays = 0; //���O�̎����폜�������ȏꍇ�AsaveDays��0��Z�b�g����
                }
                if (saveDirectory == ""){
                    tmpLogger.Set(LogKind.Error, null, 9000045, "It is not appointed");
                } else{
                    tmpLogger.Set(LogKind.Detail, null, 9000032, saveDirectory);
                    try{
                        LogFile = new LogFile(saveDirectory, normalLogKind, secureLogKind, saveDays,useLogFile);
                    } catch (IOException e){
                        LogFile = null;
                        tmpLogger.Set(LogKind.Error, null, 9000031, e.Message);
                    }
                }

                //Ver5.8.7 Java fix
                //mailBox������
                foreach (var o in ListOption) {
                    //SmtpServer�Ⴕ���́APop3Server���g�p�����ꍇ�̂݃��[���{�b�N�X�����������
                    if (o.NameTag == "Smtp" || o.NameTag == "Pop3") {
                        if (o.UseServer) {
                            var conf = new Conf(ListOption.Get("MailBox"));
                            var dir = ReplaceOptionEnv((String) conf.Get("dir"));
                            var datUser = (Dat) conf.Get("user");
                            var logger = CreateLogger("MailBox", (bool)conf.Get("useDetailsLog"), null);
                            MailBox = new MailBox(logger,datUser, dir);
                            break;
                        }
                    }
                }

            }
            _logger = CreateLogger("kernel", true, null);
            tmpLogger.Release(_logger);

            //Ver5.8.7 Java fix �����[�g�N���C�A���g�̏ꍇ����[���{�b�N�X��쐬���Ă��܂��o�O��C��
            //            //mailBox������
            //            foreach (var o in ListOption){
            //                //SmtpServer�Ⴕ���́APop3Server���g�p�����ꍇ�̂݃��[���{�b�N�X�����������
            //                if (o.NameTag == "Smtp" || o.NameTag == "Pop3"){
            //                    if (o.UseServer){
            //                        var conf = new Conf(ListOption.Get("MailBox"));
            //                        MailBox = new MailBox(this, conf);
            //                        break;
            //                    }
            //                }
            //            }

            ListServer = new ListServer(this, listPlugin);

            ListTool = new ListTool();
            ListTool.Initialize(this);

            View.SetColumnText(); //Log�r���[�̃J�����e�L�X�g�̏�����
            Menu.Initialize(IsJp()); //���j���[�\�z�i����e�[�u���̏������j

            WebApi = new WebApi();
        }