コード例 #1
0
 void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target)
 {
     switch (connectionId)
     {
     case 1:
         this.ReportWd = ((QuanLyKhoByPharm.UserControlReport)(target));
         return;
     }
     this._contentLoaded = true;
 }
コード例 #2
0
        private void ListViewMenu_SelectionChanged(object sender, SelectionChangedEventArgs e)
        {
            UserControl usc = null;

            GridMain.Children.Clear();

            switch (((ListViewItem)((ListView)sender).SelectedItem).Name)
            {
            case "ItemHome":
                usc = new UserControlHome();
                GridMain.Children.Add(usc);
                break;

            case "ItemAdd":
                usc = new UserControlAdd();
                GridMain.Children.Add(usc);
                break;

            case "ItemOut":
                usc = new UserControlOut();
                GridMain.Children.Add(usc);
                break;

            case "ItemUnit":
                usc = new UserControlUnit();
                GridMain.Children.Add(usc);
                break;

            case "ItemObject":
                usc = new UserControlObject();
                GridMain.Children.Add(usc);
                break;

            case "ItemReport":
                usc = new UserControlReport();
                GridMain.Children.Add(usc);
                break;

            default:
                break;
            }
        }