本文整理汇总了C#中Mode.Equals方法的典型用法代码示例。如果您正苦于以下问题:C# Mode.Equals方法的具体用法?C# Mode.Equals怎么用?C# Mode.Equals使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Mode
的用法示例。
在下文中一共展示了Mode.Equals方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: EditReportViewModel
/// <summary>
/// Initializes a new instance of the EditReportViewModel class.
/// </summary>
public EditReportViewModel(Mode mode)
{
Mode = mode;
if (mode.Equals(ViewModel.Mode.Edit))
{
LoadReports();
}
}
示例2: DetailReportViewModel
/// <summary>
/// Initializes a new instance of the DetailReportViewModel class.
/// </summary>
public DetailReportViewModel(Mode mode)
{
Mode = mode;
if (mode.Equals(ViewModel.Mode.Edit))
{
LoadReports();
}
else
{
CurrentReport = new Report();
}
}
示例3: ReportViewModel
public ReportViewModel(Mode mode)
{
_mode = mode;
if (_mode.Equals(ViewModels.Mode.Add))
{
}
else
{
}
}
示例4: DetailsPage
public DetailsPage(Mode mode)
{
InitializeComponent();
// setAreaCodeToComboBox();
this.mode = mode;
if (mode.Equals(Mode.EDIT))
{
if (Session.SelectedCustomer != null)
{
_customer = Session.SelectedCustomer;
GridCustomerInfo.DataContext = _customer;
}
}
if (mode.Equals(Mode.VIEW))
{
List<Control> ControlList = HandleControllers.GetLogicalChildCollection<Control>(this);
HandleControllers.enableContent(ControlList, false, false, false, false, false);
CustomerPage.ViewMode = Mode.VIEW;
if (Session.SelectedCustomer != null)
{
_customer = Session.SelectedCustomer;
GridCustomerInfo.DataContext = _customer;
}
}
if (mode.Equals(Mode.NEW))
{
this.mode = mode;
_customer = new customer();
GridCustomerInfo.DataContext = _customer;
}
this.DataContext = this;
_instance = this;
}
示例5: changeMode
private void changeMode(Mode _viewmode)
{
if (_viewmode.Equals(Mode.EDIT))
{
clearLoanIssuePage();
List<Control> ControlList = HandleControllers.GetLogicalChildCollection<Control>(this);
HandleControllers.enableContent(ControlList, true, true, true, true, true);
SelectedEmployee = Session.SelectedLoan.employee;
SelectedCustomer = Session.SelectedLoan.customer;
SelectedLoan = Session.SelectedLoan;
SelectedLoan_Type = Session.SelectedLoan.loan_type;
}
if (_viewmode.Equals(Mode.VIEW))
{
clearLoanIssuePage();
List<Control> ControlList = HandleControllers.GetLogicalChildCollection<Control>(this);
HandleControllers.enableContent(ControlList, false, false, false, false, false);
SelectedEmployee = Session.SelectedLoan.employee;
SelectedCustomer = Session.SelectedLoan.customer;
SelectedLoan = Session.SelectedLoan;
SelectedLoan_Type = Session.SelectedLoan.loan_type;
}
if (_viewmode.Equals(Mode.NEW))
{
clearLoanIssuePage();
List<Control> ControlList = HandleControllers.GetLogicalChildCollection<Control>(this);
HandleControllers.enableContent(ControlList, true, true, true, true, true);
}
CustomerTextBox.IsEnabled = false;
EmployeeTextBox.IsEnabled = false;
LoanTypeTextBox.IsEnabled = false;
}
示例6: toMode
public int toMode(Mode mode)
{
try{
reentrantLock.enter();
if(mode.Equals(Mode.image)){
this.mode=Mode.locking;
while(commandQueue.isNotEmpty()){
Zzz.zzz(100);
}
this.mode=Mode.image;
log.info("ready for image command queue is locked current version is " +currentVersion);
}else{
lock (this){
this.mode=Mode.normal;
commandQueue.addAll(tempCommandQueue);
tempCommandQueue =new CompositeQueue();
System.Threading.Monitor.Pulse(this);
log.info("releasing queue current version is " +currentVersion);
}
}
return currentVersion;
}finally {
reentrantLock.exit();
}
}