Exemple #1
0
        static void Main()
        {
            //***** 2重起動防止    *****
            if (System.Diagnostics.Process.GetProcessesByName(System.Diagnostics.Process.GetCurrentProcess().ProcessName).Length > 1)
            {
                MessageBox.Show(AppResource.GetString("MSG_DONT_MULTI_START"));
                return;
            }

            //set system language
            var setting = new SystemConfig();
            setting.LoadXmlFile();
            setting.SwitchLanguage(setting.SystemLanguage);
            SystemSetting.LoadInstance();
            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);
            Application.Run(new frmMain());
        }
Exemple #2
0
        /// <summary>
        /// Constructor
        /// </summary>
        /// <param name="log">ログ</param>
        public frmMeasureMain(LogManager log)
        {
            InitializeComponent();

            this.log = log;
            this.systemSetting = new SystemConfig();
            this.systemSetting.LoadXmlFile();

            //測定状態の変更イベント
            testSquence.StatusChanged += new Sequences.TestSequence.StatusChangedEventHander(testSquence_StatusChanged);
        }
Exemple #3
0
        /// <summary>
        /// load settings from xml files
        /// </summary>
        public static void LoadInstance()
        {
            MeasureSetting = new MeasureSetting();
            string xmlFilePath = CommonLib.SystemDirectoryPath.SystemPath + MeasureSetting.FileName;
            if (System.IO.File.Exists(xmlFilePath))
            {
                MeasureSetting = (MeasureSetting)MeasureSetting.Deserialize(xmlFilePath);
                if (MeasureSetting.Mode1_MeasCondition != null)
                {
                    MeasureSetting.Mode1_MeasCondition.IsUpdated = false;
                }
            }
            else
            {
                MeasureSetting = new MeasureSetting() { FilePath = xmlFilePath };
            }

            ChannelsSetting = new ChannelsSetting();
            xmlFilePath = CommonLib.SystemDirectoryPath.SystemPath + ChannelsSetting.FileName;
            if (System.IO.File.Exists(xmlFilePath))
            {
                ChannelsSetting = (ChannelsSetting)ChannelsSetting.Deserialize(xmlFilePath);
            }
            else
            {
                ChannelsSetting = new ChannelsSetting() { FilePath = xmlFilePath };
            }

            ConstantSetting = new ConstantSetting();
            xmlFilePath = CommonLib.SystemDirectoryPath.SystemPath + ConstantSetting.FileName;
            if (System.IO.File.Exists(xmlFilePath))
            {
                ConstantSetting = (ConstantSetting)ConstantSetting.Deserialize(xmlFilePath);
            }
            else
            {
                ConstantSetting = new ConstantSetting() { FilePath = xmlFilePath };
            }

            DataTagSetting = new DataTagSetting();
            xmlFilePath = CommonLib.SystemDirectoryPath.SystemPath + DataTagSetting.FileName;
            if (System.IO.File.Exists(xmlFilePath))
            {
                DataTagSetting = (DataTagSetting)DataTagSetting.Deserialize(xmlFilePath);
            }
            else
            {
                DataTagSetting = new DataTagSetting() { FilePath = xmlFilePath };
            }

            RelationSetting = new TagChannelRelationSetting();
            xmlFilePath = CommonLib.SystemDirectoryPath.SystemPath + TagChannelRelationSetting.FileName;
            if (System.IO.File.Exists(xmlFilePath))
            {
                RelationSetting = (TagChannelRelationSetting)TagChannelRelationSetting.Deserialize(xmlFilePath);
            }
            else
            {
                RelationSetting = new TagChannelRelationSetting() { FilePath = xmlFilePath };
            }

            PositionSetting = new SensorPositionSetting();
            xmlFilePath = CommonLib.SystemDirectoryPath.SystemPath + SensorPositionSetting.FileName;
            if (System.IO.File.Exists(xmlFilePath))
            {
                PositionSetting = (SensorPositionSetting)SensorPositionSetting.Deserialize(xmlFilePath);
            }
            else
            {
                PositionSetting = new SensorPositionSetting() { FilePath = xmlFilePath };
            }

            SystemConfig = new SystemConfig();
            SystemConfig.LoadXmlFile();

            HardInfoStruct = new HardInfoStruct();
            HardInfoStruct.LoadXmlFile();
        }
        /// <summary>
        /// フォームロードイベント
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void frm3DGraphController_Load(object sender, EventArgs e)
        {
            if (this.log != null) this.log.PutLog("frm3DGraphController.frm3DGraphController_Load() - 3D表示制御画面のロードを開始しました。");

            try
            {
                AppResource.SetControlsText(this);
                EnableControlStatus(this.controlState);
                this.trackSpeed.Value = 5;
                this.systemconfig = new SystemConfig();
                systemconfig.LoadXmlFile();

                string[] rval = systemconfig.ValueRate_3D_R.ToString().Split('.');

                if (rval != null && rval.Length == 2)
                {
                    ddlOnePlaces.SelectedItem = rval[0];
                    ddlDecimal.SelectedItem = rval[1];
                }
                else
                {
                    ddlOnePlaces.SelectedItem = "1";
                    ddlDecimal.SelectedItem = "0";
                }

            }
            catch (Exception ex)
            {
                ShowErrorMessage(ex);
            }

            if (this.log != null) this.log.PutLog("frm3DGraphController.frm3DGraphController_Load() - 3D表示制御画面のロードを終了しました。");

            //表示非表示ボタンアイコン初期化
            DisplayButtonImageInit();
            //ボタンアイコン初期化
            ContorolButtonImageInit();

            //Set Stripper show picture and flag as "Show" at default
            this.picShow.Image = imageList1[(int)picShow.Tag + 1];
            this.isHideStripper = false;
        }
Exemple #5
0
        private void frmSettingMenu_Load(object sender, EventArgs e)
        {
            systemconfig = new SystemConfig();
            systemconfig.LoadXmlFile();

            switch (systemconfig.SystemLanguage)
            {
                case DataCommon.CommonResource.LANGUAGE.Chinese:
                    picLanguageButton_Click(picChanese, new EventArgs());
                    break;
                case DataCommon.CommonResource.LANGUAGE.Japanese:
                    picLanguageButton_Click(picJapanese, new EventArgs());
                    break;
                case DataCommon.CommonResource.LANGUAGE.English:
                    picLanguageButton_Click(picEnglish, new EventArgs());
                    break;
            }
        }