Exemple #1
0
 //テスト用
 public Logger()
 {
     _logLimit = null;
     _logFile = null;
     _logView = null;
     _isJp = true;
     _nameTag = "";
     _useDetailsLog = false;
     _useLimitString = false;
     _logger = null;
 }
Exemple #2
0
 //コンストラクタ
 //kernelの中でCreateLogger()を定義して使用する
 public Logger(Kernel kernel, LogLimit logLimit, LogFile logFile, LogView logView, bool isJp, String nameTag,
               bool useDetailsLog, bool useLimitString, ILogger logger)
 {
     _kernel = kernel;
     _logLimit = logLimit;
     _logFile = logFile;
     _logView = logView;
     _isJp = isJp;
     _nameTag = nameTag;
     _useDetailsLog = useDetailsLog;
     _useLimitString = useLimitString;
     _logger = logger;
 }
Exemple #3
0
        //�N�����ɁA�R���X�g���N�^����Ăяo����鏉����
        private void DefaultInitialize(MainForm mainForm, ListView listViewLog, MenuStrip menuStrip, NotifyIcon notifyIcon)
        {
            RunMode = RunMode.Normal;
            RemoteConnect = null;//�����[�g����Őڑ�����Ă��鎞���������������

            //logger�����������܂ł̃��O��ꎞ�I�ɕۊǂ���
            //ArrayList<LogTemporary> tmpLogger = new ArrayList<>();

            //�v���Z�X�N�����ɏ����������
            View = new View(this, mainForm, listViewLog, notifyIcon);
            //logView = new LogView(listViewLog);
            LogView = new LogView(this,listViewLog);
            Menu = new Menu(this, menuStrip); //�����ł́A�I�u�W�F�N�g�̐����̂݁Amenu.Initialize()�́AlistInitialize()�̒��ŌĂяo�����
            DnsCache = new DnsCache();
            Wait = new Wait();

            Ver = new Ver(); //�o�[�W�����Ǘ�

            //Java fix
            //RunMode�̏�����
            if (mainForm == null){
                RunMode = RunMode.Service; //�T�[�r�X�N��
            } else{
                if (Environment.GetCommandLineArgs().Length > 1){
                    RunMode = RunMode.Remote; //�����[�g�N���C�A���g
                } else{
                    //�T�[�r�X�o�^�̏�Ԃ�擾����
                    var setupService = new SetupService(this);
                    if (setupService.IsRegist)
                        RunMode = RunMode.NormalRegist; //�T�[�r�X�o�^�������
                }
            }

            //Ver5.8.6 Java fix
            //OptionIni.Create(this); //�C���X�^���X�̏�����

            IniDb = new IniDb(ProgDir(), (RunMode == RunMode.Remote) ? "$remote" : "Option");

            MailBox = null;

            ListInitialize(); //�T�[�o�ċN���ŁA�ēx���s����鏉����

            if (_isTest){
                return;
            }

            //�E�C���h�T�C�Y�̕���
            var path = string.Format("{0}\\BJD.ini", ProgDir());
            try{
                //�E�C���h�E�̊O�ς�ۑ��E����(View���O�ɏ���������)
                WindowSize = new WindowSize(new Conf(ListOption.Get("Basic")), path);
                View.Read(WindowSize);
            } catch (IOException){
                WindowSize = null;
                // �w�肳�ꂽWindow���ۑ��t�@�C��(BJD.ini)��IO�G���[���������Ă���
                _logger.Set(LogKind.Error, null, 9000022, path);
            }

            //TraceDlg = new TraceDlg(this, (mainForm != null) ? mainForm.getFrame() : null); //�g���[�X�\��
            TraceDlg = new TraceDlg(this); //�g���[�X�\��

            switch (RunMode){
                case RunMode.Normal:
                    MenuOnClick("StartStop_Start"); //���j���[�I��C�x���g
                    break;
                case RunMode.Remote:
                    RemoteClient = new RemoteClient(this);
                    RemoteClient.Start();
                    break;
                //Java fix Ver5.8.3
                case RunMode.NormalRegist:
                case RunMode.Service:
                    break;
                default:
                    Util.RuntimeException("Kernel.defaultInitialize() not implement (RunMode)");
                    break;
            }

            //Java fix Ver5.8.3
            View.SetColor();//�E�C���h�F�̏�����
        }