Exemple #1
0
        void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target)
        {
            switch (connectionId)
            {
            case 1:
                this.vexe = ((QLBX.FormChucNang.UCPhanQuyen)(target));
                return;

            case 2:
                this.mainPhanQuyen = ((System.Windows.Controls.Grid)(target));
                return;

            case 3:
                this.user_Groupuser = ((System.Windows.Controls.Grid)(target));
                return;

            case 4:
                this.listusercq = ((System.Windows.Controls.ListView)(target));
                return;

            case 5:
                this.cbper = ((System.Windows.Controls.ComboBox)(target));
                return;

            case 6:
                this.listquyen = ((System.Windows.Controls.ListView)(target));
                return;

            case 7:
                this.permisson_groupermisson = ((System.Windows.Controls.Grid)(target));
                return;

            case 8:
                this.listset = ((System.Windows.Controls.ListView)(target));
                return;

            case 9:
                this.ck1 = ((System.Windows.Controls.CheckBox)(target));
                return;

            case 10:
                this.ck2 = ((System.Windows.Controls.CheckBox)(target));
                return;

            case 11:
                this.ck3 = ((System.Windows.Controls.CheckBox)(target));
                return;

            case 12:
                this.ck4 = ((System.Windows.Controls.CheckBox)(target));
                return;

            case 13:
                this.ck5 = ((System.Windows.Controls.CheckBox)(target));
                return;
            }
            this._contentLoaded = true;
        }
Exemple #2
0
        private void Button_Click(object sender, RoutedEventArgs e)
        {
            int index = int.Parse(((Button)e.Source).Uid);

            //GridCursor.Margin = new Thickness(10 + (150 * index), 0, 0, 0);
            Button         a  = sender as Button;
            BrushConverter bc = new BrushConverter();

            //    Brush brush;
            brush = (Brush)bc.ConvertFrom("#003f7d");

            BrushConverter bc1 = new BrushConverter();

            //  Brush brush1;
            brush1 = (Brush)bc1.ConvertFrom("#ffffff");

            a.Foreground = brush;
            switch (index)
            {
            case 0:
                UCQlyNhanvien a1 = new UCQlyNhanvien();
                nhanvien.Background = brush;
                quyen.Background    = brush1;
                gridphan.Children.Clear();
                gridphan.Children.Add(a1);
                break;

            case 1:

                nhanvien.Background = brush1;
                quyen.Background    = brush;
                UCPhanQuyen a2 = new UCPhanQuyen();
                gridphan.Children.Clear();
                gridphan.Children.Add(a2);
                break;
            }
        }