当前位置: 首页>>代码示例>>C#>>正文


C# Mode.Equals方法代码示例

本文整理汇总了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();
     }
 }
开发者ID:da991319,项目名称:GenericreportTransfer,代码行数:11,代码来源:EditReportViewModel.cs

示例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();
     }
 }
开发者ID:da991319,项目名称:GenericreportTransfer,代码行数:15,代码来源:DetailReportViewModel.cs

示例3: ReportViewModel

        public ReportViewModel(Mode mode)
        {
            _mode = mode;

            if (_mode.Equals(ViewModels.Mode.Add))
            {

            }
            else
            {

            }
        }
开发者ID:da991319,项目名称:GenericFileTransferCatel,代码行数:13,代码来源:ReportViewModel.cs

示例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;
        }
开发者ID:sbpallekumbura,项目名称:LoanManagementSystem,代码行数:36,代码来源:DetailsPage.xaml.cs

示例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;
        }
开发者ID:sbpallekumbura,项目名称:LoanManagementSystem,代码行数:36,代码来源:IssueLoan.xaml.cs

示例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();
     }
 }
开发者ID:gidish,项目名称:PlanckDB,代码行数:25,代码来源:CommandQueue.cs


注:本文中的Mode.Equals方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。