private bool _isFirst = true; //最初の1回だげ実行する #endregion Fields #region Constructors // public View(Kernel kernel, MainForm mainForm, ListView listView, NotifyIcon notifyIcon) { public View(Kernel kernel, MainForm mainForm, ListView listView, NotifyIcon notifyIcon) { _kernel = kernel; _notifyIcon = notifyIcon; MainForm = mainForm; ListView = listView; if (listView == null){ return; } // for (int i = 0; i < 8; i++) { // listView.addColumn(""); // } // listView.setColWidth(0, 120); // listView.setColWidth(1, 60); // listView.setColWidth(2, 60); // listView.setColWidth(3, 80); // listView.setColWidth(4, 80); // listView.setColWidth(5, 70); // listView.setColWidth(6, 200); // listView.setColWidth(7, 300); }
//�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�̏����� }
//* �ʏ�g�p�����R���X�g���N�^ public Kernel(MainForm mainForm, ListView listViewLog, MenuStrip menuStrip, NotifyIcon notifyIcon) { DefaultInitialize(mainForm, listViewLog, menuStrip, notifyIcon); }