コード例 #1
0
ファイル: CMM2PX.cs プロジェクト: bryful/MM2PX
 public void SetIMode(MM2PX_IMODE im)
 {
     if (m_imode != im)
     {
         m_imode = im;
     }
     ToInputStr();
     OnModeChanged(new EventArgs());
 }
コード例 #2
0
ファイル: CMM2PX.cs プロジェクト: bryful/MM2PX
 // **************************************************
 public CMM2PX()
 {
     m_imode = MM2PX_IMODE.MM;
     Clear();
 }
コード例 #3
0
        public void SetImode()
        {
            MM2PX_IMODE im = m_cmm.IMODE;

            switch (im)
            {
            case MM2PX_IMODE.MM:
                btnMM.TextColor  = Color.White;
                btnMMS.TextColor = Color.Black;
                btnDPI.TextColor = Color.Black;
                btnPX.TextColor  = Color.Black;

                btnMM.BackgroundColor  = Color.Gray;
                btnMMS.BackgroundColor = Color.LightGray;
                btnDPI.BackgroundColor = Color.LightGray;
                btnPX.BackgroundColor  = Color.LightGray;

                tbMM.BackgroundColor  = Color.FromRgb(0xff - 0x10, 0xff - 0x10, 0xff);
                tbMMS.BackgroundColor = Color.FromRgb(0xEA, 0xEA, 0xEA);
                tbDPI.BackgroundColor = Color.FromRgb(0xff, 0xff, 0xff);
                tbPX.BackgroundColor  = Color.FromRgb(0xEA, 0xEA, 0xEA);

                break;

            case MM2PX_IMODE.MMS:
                btnMM.TextColor  = Color.Black;
                btnMMS.TextColor = Color.White;
                btnDPI.TextColor = Color.Black;
                btnPX.TextColor  = Color.Black;

                btnMM.BackgroundColor  = Color.LightGray;
                btnMMS.BackgroundColor = Color.Gray;
                btnDPI.BackgroundColor = Color.LightGray;
                btnPX.BackgroundColor  = Color.LightGray;
                tbMM.BackgroundColor   = Color.FromRgb(0xff, 0xff, 0xff);
                tbMMS.BackgroundColor  = Color.FromRgb(0xEA - 0x10, 0xEA - 0x10, 0xEA);
                tbDPI.BackgroundColor  = Color.FromRgb(0xff, 0xff, 0xff);
                tbPX.BackgroundColor   = Color.FromRgb(0xEA, 0xEA, 0xEA);

                break;

            case MM2PX_IMODE.DPI:
                btnMM.TextColor  = Color.Black;
                btnMMS.TextColor = Color.Black;
                btnDPI.TextColor = Color.White;
                btnPX.TextColor  = Color.Black;

                btnMM.BackgroundColor  = Color.LightGray;
                btnMMS.BackgroundColor = Color.LightGray;
                btnDPI.BackgroundColor = Color.Gray;
                btnPX.BackgroundColor  = Color.LightGray;
                tbMM.BackgroundColor   = Color.FromRgb(0xff, 0xff, 0xff);
                tbMMS.BackgroundColor  = Color.FromRgb(0xEA, 0xEA, 0xEA);
                tbDPI.BackgroundColor  = Color.FromRgb(0xff - 0x10, 0xff - 0x10, 0xff);
                tbPX.BackgroundColor   = Color.FromRgb(0xEA, 0xEA, 0xEA);
                break;

            case MM2PX_IMODE.PX:
                btnMM.TextColor  = Color.Black;
                btnMMS.TextColor = Color.Black;
                btnDPI.TextColor = Color.Black;
                btnPX.TextColor  = Color.White;

                btnMM.BackgroundColor  = Color.LightGray;
                btnMMS.BackgroundColor = Color.LightGray;
                btnDPI.BackgroundColor = Color.LightGray;
                btnPX.BackgroundColor  = Color.Gray;

                tbMM.BackgroundColor  = Color.FromRgb(0xff, 0xff, 0xff);
                tbMMS.BackgroundColor = Color.FromRgb(0xEA, 0xEA, 0xEA);
                tbDPI.BackgroundColor = Color.FromRgb(0xff, 0xff, 0xff);
                tbPX.BackgroundColor  = Color.FromRgb(0xEA - 0x10, 0xEA - 0x10, 0xEA);
                break;
            }
        }