コード例 #1
0
        /// <summary>
        /// Load
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void MainWindow_Loaded(object sender, RoutedEventArgs e)
        {
            this.OkButton.FontSize     = 9;
            this.OkButton.Content      = "\n\n\n選択(F11)";
            this.CancelButton.FontSize = 9;
            this.CancelButton.Content  = "\n\n\n終了(F1)";

            GridOutPut();

            // 画面サイズをタスクバーをのぞいた状態で表示させる
            this.Height = System.Windows.Forms.Screen.PrimaryScreen.WorkingArea.Size.Height;

            // メイン画面と子画面が被ることなく表示できるかチェック
            if (System.Windows.Forms.Screen.PrimaryScreen.WorkingArea.Size.Width < 1024 + 342)
            {
                // 画面の左端に表示させる
                this.Left = System.Windows.Forms.Screen.PrimaryScreen.WorkingArea.Size.Width - this.Width;
            }

            #region 設定項目取得
            ucfg   = AppCommon.GetConfig(this);
            frmcfg = (ConfigSCH01010)ucfg.GetConfigValue(typeof(ConfigSCH01010));
            if (frmcfg == null)
            {
                frmcfg = new ConfigSCH01010();
                ucfg.SetConfigValue(frmcfg);
            }
            else
            {
                //表示できるかチェック
                var WidthCHK = System.Windows.Forms.Screen.PrimaryScreen.Bounds.Width - frmcfg.Left;
                if (WidthCHK > 10)
                {
                    this.Left = frmcfg.Left;
                }
                //表示できるかチェック
                var HeightCHK = System.Windows.Forms.Screen.PrimaryScreen.Bounds.Height - frmcfg.Top;
                if (HeightCHK > 10)
                {
                    this.Top = frmcfg.Top;
                }
                this.Height = frmcfg.Height;
                this.Width  = frmcfg.Width;
            }
            #endregion
        }
コード例 #2
0
        /// <summary>
        /// Load
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void MainWindow_Loaded(object sender, RoutedEventArgs e)
        {
            this.OkButton.FontSize     = 9;
            this.OkButton.Content      = "\n\n\n選択(F11)";
            this.CancelButton.FontSize = 9;
            this.CancelButton.Content  = "\n\n\n終了(F1)";

            AppCommon.SetutpComboboxList(this.OrderColumn, false);
            AppCommon.SetutpComboboxList(this.OrderColumn_Copy, false);
            // 追加
            AppCommon.SetutpComboboxList(this.SUSPENSION, false);

            //呼び出し元から表示区分を取ってくる。
            if (this.TwinTextBox.LinkItem != null)
            {
                //TwinTextLinkItem設定
                表示区分 = AppCommon.IntParse(this.TwinTextBox.LinkItem.ToString());
                this.OrderColumn.SelectedIndex = 表示区分;
                //TwinTokuisaki.Text1IsReadOnly = true;
            }
            else if (multi == 1)
            {
                this.OrderColumn.SelectedIndex = 表示区分;
            }

            GridOutPut();
            this.OrderColumn.SelectionChanged      += this.OrderColumn_SelectionChanged_1;
            this.OrderColumn_Copy.SelectionChanged += this.OrderColumn_SelectionChanged;
            // 追加
            this.SUSPENSION.SelectionChanged += this.SUSPENSION_SelectionChanged;

            //画面サイズをタスクバーをのぞいた状態で表示させる
            this.Height = System.Windows.Forms.Screen.PrimaryScreen.WorkingArea.Size.Height;

            //メイン画面と子画面が被ることなく表示できるかチェック
            if (System.Windows.Forms.Screen.PrimaryScreen.WorkingArea.Size.Width < 1024 + 342)
            {
                //画面の左端に表示させる
                this.Left = System.Windows.Forms.Screen.PrimaryScreen.WorkingArea.Size.Width - this.Width;
            }

            #region 設定項目取得
            ucfg   = AppCommon.GetConfig(this);
            frmcfg = (ConfigSCH01010)ucfg.GetConfigValue(typeof(ConfigSCH01010));
            if (frmcfg == null)
            {
                frmcfg = new ConfigSCH01010();
                ucfg.SetConfigValue(frmcfg);
            }
            else
            {
                //表示できるかチェック
                var WidthCHK = System.Windows.Forms.Screen.PrimaryScreen.Bounds.Width - frmcfg.Left;
                if (WidthCHK > 10)
                {
                    this.Left = frmcfg.Left;
                }
                //表示できるかチェック
                var HeightCHK = System.Windows.Forms.Screen.PrimaryScreen.Bounds.Height - frmcfg.Top;
                if (HeightCHK > 10)
                {
                    this.Top = frmcfg.Top;
                }
                this.Height = frmcfg.Height;
                this.Width  = frmcfg.Width;

                //this.OrderColumn.SelectedIndex = frmcfg.Combo;
                this.OrderColumn_Copy.SelectedIndex = frmcfg.Combo_Copy;
            }
            #endregion

            // 追加 取引中を選択
            this.SUSPENSION.SelectedIndex = 1;
        }