本文整理汇总了C#中System.Windows.Controls.Page类的典型用法代码示例。如果您正苦于以下问题:C# Page类的具体用法?C# Page怎么用?C# Page使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
Page类属于System.Windows.Controls命名空间,在下文中一共展示了Page类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: CreateUserViewModel
/// <summary>
/// constructeur
/// </summary>
public CreateUserViewModel(Page lkView)
{
_linkedView = lkView;
_createCommand = new RelayCommand(param => CreateAccount(), param => IsValidForm());
_imageCommand = new RelayCommand(param => SelectImage(), param => true);
_name = "";
_firstname = "";
_login = "";
_password = "";
_confirmPassword = "";
_availableRoleList = new List<string>();
_availableRoleList.Add("Chirurgien");
_availableRoleList.Add("Infirmière");
_availableRoleList.Add("Medecin");
_availableRoleList.Add("Radiologue");
_role = "Chirurgien";
_iscreatingaccount = false;
_imagepath = "";
_imagesrc = null;
_waitingMessage = "";
}
示例2: MenuPrincipal
public MenuPrincipal(Page pagina,String usuario,int id,String nombre)
{
this.pagina = pagina;
this.usuario=usuario;
this.id = id;
this.nombre = nombre;
}
示例3: MainWindow
public MainWindow()
{
try
{
this.dropNetClient = new DropNetClient(API_KEY, APP_SECRET);
this.dropNetClient.UseSandbox = true;
this.employees = HierarchyGenerator.GenerateEmployees();
InitializeComponent();
this.importDataBtn.Click += (sender, eventArgs) =>
{
var reportsPage = new ReportsPage(employees);
this.pagesFrame.Navigate(reportsPage);
this.currentPage = reportsPage;
};
this.exportToDropBoxBtn.Click += ExportToDropBoxAccount;
this.exportToWordBtn.Click += (sender, e) =>
{
try
{
ExportToWordFile(sender, e);
}
catch (Exception ex)
{
ShowError(ex);
}
};
this.aboutBtn.Click += ShowAboutBox;
}
catch (Exception ex)
{
MessageBox.Show(ex.Message);
}
}
示例4: GetModulePage
public Page GetModulePage(string ModuleKey)
{
Page PageModule = (Page)this.GetModuleItem(ModuleKey).Instance;
if (PageModule == null)
{
try
{
ObjectHandle handle = Activator.CreateInstanceFrom(Assembly.GetExecutingAssembly().Location, this.GetModuleItem(ModuleKey).ClassName);
PageModule = (Page)handle.Unwrap();
this.GetModuleItem(ModuleKey).Instance = PageModule;
}
catch (Exception ex)
{
//If error that means the page is under construction.
LogManager.Instance.LogMessage("Unable to load page: " + ModuleKey, ex);
PageModule = new Page();
i9Label l = new i9Label();
l.Content = ModuleKey + " Coming Soon";
l.FontSize = 18;
l.HorizontalContentAlignment = HorizontalAlignment.Center;
l.VerticalAlignment = VerticalAlignment.Center;
PageModule.Content = l;
this.GetModuleItem(ModuleKey).Instance = PageModule;
}
}
return PageModule;
}
示例5: NavigateToPage
void NavigateToPage(Page p)
{
Frm_Content.Navigate(p);
IPage ip = (IPage)p;
Lbl_Path.Content = ip.Path;
ip.NavigateToPage += new EventHandler<NavigateToPageEventArgs>(NavigateToPage);
}
示例6: LoadPage
protected override void LoadPage(Page page)
{
ClearAndSetup.Execute(null);
IRNId = PresentationUtility.ParseIdFromUrl(page.NavigationService.CurrentSource);
if (IRNId == Guid.Empty)
{
ShowAddVisibility = Visibility.Visible;
ShowConfirmVisibility = Visibility.Visible;
OrderReferencesIsEnabled = true;
EnterLoadNoIsEnabled = true;
CancelAction = "Cancel";
RunLoad();
}
else
{
CancelAction = "Back";
ShowAddVisibility = Visibility.Collapsed;
ShowConfirmVisibility = Visibility.Collapsed;
OrderReferencesIsEnabled = false;
EnterLoadNoIsEnabled = false;
RunLoadGrn();
}
}
示例7: opdrachtPage
public opdrachtPage(Page page, Job job = null)
{
this.previousPage = page;
InitializeComponent();
this.selectedItems = new List<JobObject>();
this.dbhandler = singletonDbHandler.getInstance();
this.brandSelection.ItemsSource = this.dbhandler.getBrands();
if (job != null) {
this.opdracht = job;
this.jobList = new ObservableCollection<JobObject>(this.opdracht.JobObjects);
this.jobTasksViewer.ItemsSource = this.jobList;
this.setPageElements();
this.updateJobViewer();
} else {
this.opdracht = new Job();
this.jobList = new ObservableCollection<JobObject>(this.opdracht.JobObjects);
this.jobTasksViewer.ItemsSource = this.jobList;
this.opdracht.setPrize(helperFunctions.milieukosten);
}
this.environmentCosts.Content = helperFunctions.prizeToString(helperFunctions.milieukosten);
this.subTotalPrize.Content = helperFunctions.prizeToString(helperFunctions.calculateAmountExcl(this.opdracht.JobObjects));
int totalExcl = helperFunctions.exclVAT(this.opdracht.Amount) + helperFunctions.milieukosten;
this.totalExclBtw.Content = helperFunctions.prizeToString(totalExcl);
int totalIncl = this.opdracht.Amount + helperFunctions.inclVAT(helperFunctions.milieukosten);
this.totalPrizeIncl.Content = helperFunctions.prizeToString(totalIncl);
this.btwPrize.Content = helperFunctions.prizeToString(totalIncl - totalExcl);
}
示例8: GoToNextPage
public void GoToNextPage()
{
if (this.currentPage.Name == "NewCartName")
{
this.currentPage = new NewCart2(this);
NaviFrame.NavigationService.Navigate(this.currentPage);
}
else if (this.currentPage.Name == "NewCart2Name")
{
this.currentPage = new Btn(this);
NaviFrame.NavigationService.Navigate(this.currentPage);
}
else if (this.currentPage.Name == "BtnName")
{
this.currentPage = new DataGrid(this);
NaviFrame.NavigationService.Navigate(this.currentPage);
}
else if (this.currentPage.Name == "DataGridName")
{
this.currentPage = new SOP(this);
NaviFrame.NavigationService.Navigate(this.currentPage);
}
else if (this.currentPage.Name == "SOPName") {
this.currentPage = new Scale(this);
NaviFrame.NavigationService.Navigate(this.currentPage);
}
else
{
this.currentPage = new NewCart(this);
NaviFrame.NavigationService.Navigate(this.currentPage);
}
}
示例9: SnapshotItem
public SnapshotItem(Page parentPage)
{
Init();
ParentPage = parentPage;
ParentSnapshot = new Snapshot();
}
示例10: Page1
public Page1(Window1 parent, Page successor)
{
InitializeComponent();
this.parent = parent;
this.next = successor;
this.login.Focus();
}
示例11: ThanksPageViewModel
public ThanksPageViewModel(Page view)
{
this.view = view;
delayTimer = new Timer(1500);
delayTimer.Elapsed += DelayTimerOnElapsed;
}
示例12: FuzzyAutomaton
public FuzzyAutomaton(Window window, Page prevPage)
{
InitializeComponent();
mainWindow = window;
this.prevPage = prevPage;
mainWindow.Height = 325;
}
示例13: Playlist
public Playlist(Page p, string link)
{
InitializeComponent();
previousPage = p;
this.PlayListLink = link;
SetUpPage();
}
示例14: PatientBrowserViewModel
/// <summary>
/// constructeur
/// </summary>
public PatientBrowserViewModel(Page lkView)
{
_linkedView = lkView;
_imageCommand = new RelayCommand(param => ImageAccess(param), param => true);
_createObservationCommand = new RelayCommand(param => NavigateToCreateObservation(param), param => IsButtonAvailable());
_addPatientCommand = new RelayCommand(param => ClickAddPatient(), param => true);
_navigateToHomeCommand = new RelayCommand(param => NavigateToHome(), param => true);
_deletePatientCommand = new RelayCommand(param => NavigateToDeletePatient(param), param => IsButtonAvailable());
/// Definit si les bouton de creation/suppression est disponible ou non
if (NavigationMessenger.GetInstance().IsRWAccount) {
IsAvailableRW = Visibility.Visible;
}
else {
IsAvailableRW = Visibility.Hidden;
}
_listPatient = new ObservableCollection<ServicePatient.Patient>();
BackgroundWorker worker = new BackgroundWorker();
worker.DoWork += new DoWorkEventHandler((object s, DoWorkEventArgs e) =>
{
Debug.WriteLine("DEBUT");
ServicePatient.ServicePatientClient patientService = new ServicePatient.ServicePatientClient();
e.Result = patientService.GetListPatient();
});
worker.RunWorkerCompleted += new RunWorkerCompletedEventHandler((object s, RunWorkerCompletedEventArgs e) =>
{
Debug.WriteLine("FIN");
if (e.Cancelled)
{
}
if (e.Error != null)
{
}
if (e.Result == null)
{
}
else
{
ServicePatient.Patient[] res = e.Result as ServicePatient.Patient[];
if (res != null)
{
foreach (ServicePatient.Patient item in res)
{
_listPatient.Add(item);
}
}
else {
}
}
});
worker.RunWorkerAsync();
}
示例15: InitializeComponent
public void InitializeComponent() {
if (_contentLoaded) {
return;
}
_contentLoaded = true;
System.Windows.Application.LoadComponent(this, new System.Uri("/SilverlightCSharp;component/Views/Vowels.xaml", System.UriKind.Relative));
this.mainPage = ((System.Windows.Controls.Page)(this.FindName("mainPage")));
}