Exemple #1
0
        /// <summary>
        /// コンストラクタ
        /// </summary>
        /// <param name="postPro"></param>
        public EigenFValueFrm(FemPostProLogic postPro, string outputPeriodicFilename)
        {
            InitializeComponent();

            // ダブルバッファ制御用のプロパティを強制的に取得する
            System.Reflection.PropertyInfo p;
            p = typeof(System.Windows.Forms.Control).GetProperty(
                         "DoubleBuffered",
                          System.Reflection.BindingFlags.NonPublic | System.Reflection.BindingFlags.Instance);
            // ダブルバッファを有効にする
            p.SetValue(EigenFValuePanel, true, null);

            PostPro = postPro;
            OutputPeriodicFilename = outputPeriodicFilename;
            _FreqNo = -1;
        }
Exemple #2
0
        public MeshViewFrm(Constants.FemElementShapeDV elemShapeDv, int elemOrder, FemPostProLogic postPro)
        {
            InitializeComponent();

            // データを受け取る
            ElemShapeDv = elemShapeDv;
            ElemOrder = elemOrder;
            PostPro = postPro;

            //this.DoubleBuffered = true;
            // ダブルバッファ制御用のプロパティを強制的に取得する
            System.Reflection.PropertyInfo p;
            p = typeof(System.Windows.Forms.Control).GetProperty(
                         "DoubleBuffered",
                          System.Reflection.BindingFlags.NonPublic | System.Reflection.BindingFlags.Instance);

            // ダブルバッファを有効にする
            p.SetValue(panelMesh, true, null);

            // メッシュ形状ラベル
            string shapeStr = "三角形";
            labelElemShape.Text = string.Format("{0}次{1}要素", ElemOrder, shapeStr);
            labelMeshInfo.Text = string.Format("節点数: {0} 要素数: {1}", PostPro.NodeCnt, PostPro.ElementCnt);
        }
Exemple #3
0
        /// <summary>
        /// 初期化処理
        /// </summary>
        private void init()
        {
            CadLgc = new CadLogic(CadPanel);
            CadLgc.Change += new CadLogic.ChangeDeleagte(CadLgc_Change);
            Solver = new FemSolver();
            PostPro = new FemPostProLogic();

            CadModeRadioButtons = new RadioButton[]
            {
                radioBtnNone,
                radioBtnLocation,
                radioBtnArea,
                radioBtnPort,
                radioBtnErase,
                radioBtnIncidentPort,
                radioBtnPortNumbering
            };
            // Cadモードをラジオボタンに紐づける
            CadLogic.CadModeType[] cadModeTypeForRadioButtons = new CadLogic.CadModeType[]
            {
                CadLogic.CadModeType.None,
                CadLogic.CadModeType.Location,
                CadLogic.CadModeType.Area,
                CadLogic.CadModeType.Port,
                CadLogic.CadModeType.Erase,
                CadLogic.CadModeType.IncidentPort,
                CadLogic.CadModeType.PortNumbering
            };
            System.Diagnostics.Debug.Assert(CadModeRadioButtons.Length == cadModeTypeForRadioButtons.Length);
            for (int i = 0; i < CadModeRadioButtons.Length; i++)
            {
                CadModeRadioButtons[i].Tag = cadModeTypeForRadioButtons[i];
            }
            // エリア選択描画モードタイプコンボボックスのItemにCadモードを紐づける
            CellTypeStruct[] cellTypeStructsForImgCBoxCadModeArea = new CellTypeStruct[]
            {
                new CellTypeStruct("真空", CadLogic.CellType.Defect),
                new CellTypeStruct("誘電体ロッド", CadLogic.CellType.Rod),
            };
            // コンボボックスのアイテムをクリア
            imgcbxCellType.Items.Clear();
            foreach (CellTypeStruct cellTypeStruct in cellTypeStructsForImgCBoxCadModeArea)
            {
                // コンボボックスにアイテムを追加
                imgcbxCellType.Items.Add(cellTypeStruct);
                if (CadLgc != null)
                {
                    if (CadLgc.SelectedCellType == cellTypeStruct.CellTypeVal)
                    {
                        imgcbxCellType.SelectedItem = cellTypeStruct;
                    }
                }
            }
            imgcbxCellType.Visible = false;
            btnLoadCancel.Visible = false;

            //TEST 4画面表示
            FValuePanelIndex = FValuePanelFieldDV_ValueDVPairList.Length; //0;
            // 等高線図パネルインデックス変更時の処理
            changeFValuePanelIndexProc(false);

            // アプリケーションの終了イベントハンドラを設定する
            AppDomain.CurrentDomain.ProcessExit += (sender, e) =>
            {
                System.Diagnostics.Debug.WriteLine("Process exiting");
                //System.Diagnostics.Debug.WriteLine("Process exiting");
                // フォームの破棄処理を呼び出す
                this.Dispose();
            };

            // パネルサイズを記憶する
            savePanelSize();

            //this.DoubleBuffered = true;
            // ダブルバッファ制御用のプロパティを強制的に取得する
            System.Reflection.PropertyInfo p;
            p = typeof(System.Windows.Forms.Control).GetProperty(
                         "DoubleBuffered",
                          System.Reflection.BindingFlags.NonPublic | System.Reflection.BindingFlags.Instance);
            // ダブルバッファを有効にする
            p.SetValue(CadPanel, true, null);
            p.SetValue(FValuePanel, true, null);

            // フォームのタイトルを退避
            TitleBaseName = this.Text + " " + MyUtilLib.MyUtil.getAppVersion();

            // ファイル名付きフォームタイトルを設定
            setFrmTitle();

            // GUI初期化
            resetGUI();
        }