Exemplo n.º 1
0
        public Form1()
        {
            InitializeComponent();
            ts_setter_ =  new TExcState(this.Handle);

            // Init option_cb_dic_
            opt_cb_dic_[TExcState.AWAY_MODE] = this.checkBox1;
            opt_cb_dic_[TExcState.SYS_REQ] = this.checkBox2;
            opt_cb_dic_[TExcState.DISPLAY_REQ] = this.checkBox3;
            opt_cb_dic_[TExcState.AWAKE_IN_LID_CLODE] = this.checkBox4;

            foreach (KeyValuePair<uint, CheckBox> item in opt_cb_dic_)
            {
                uint opt = item.Key;
                CheckBox cb = item.Value;
                cb_opt_dic_[cb] = opt;
                cb.Text = Public.opt_name_dic_[opt];
                cb.Click += new System.EventHandler(this.OptionCBClick);
            }
            this.Text = Public.kProgramName;
            SetCheckBoxState();

            ts_setter_.AddValChangeCB(
                    new TExcState.ValChangeCB(this.SetCheckBoxState));

            notify_icon_ = new MyNotifyIcon(this, ts_setter_, false);
        }