Пример #1
0
        /// <summary>
        /// 初始化命令列表
        /// </summary>
        private static void SetupWPFCommands()
        {
            WPFCommandNames.FireQuery = typeof(QueryObjectCommand);
            WPFCommandNames.RefreshDataSourceInRDLC = typeof(RefreshDataSourceInRDLC);
            WPFCommandNames.ShowReportData          = typeof(ShowReportData);
            WPFCommandNames.PopupAdd      = typeof(PopupAddCommand);
            WPFCommandNames.Add           = typeof(AddCommand);
            WPFCommandNames.SaveBill      = typeof(SaveBillCommand);
            WPFCommandNames.SaveList      = typeof(SaveListCommand);
            WPFCommandNames.Cancel        = typeof(CancelCommand);
            WPFCommandNames.Refresh       = typeof(RefreshCommand);
            WPFCommandNames.Filter        = typeof(FilterCommand);
            WPFCommandNames.Delete        = typeof(DeleteListObjectCommand);
            WPFCommandNames.Edit          = typeof(EditDetailCommand);
            WPFCommandNames.ExportToExcel = typeof(ExportToExcelCommand);

            WPFCommandNames.MoveUp       = typeof(MoveUpCommand);
            WPFCommandNames.MoveDown     = typeof(MoveDownCommand);
            WPFCommandNames.LevelUp      = typeof(LevelUpCommand);
            WPFCommandNames.LevelDown    = typeof(LevelDownCommand);
            WPFCommandNames.InsertBefore = typeof(InsertBeforeCommand);
            WPFCommandNames.InsertChild  = typeof(AddChildCommand);
            WPFCommandNames.ExpandAll    = typeof(ExpandAllCommand);
            WPFCommandNames.ExpandOne    = typeof(ExpandToLevelOneCommand);
            WPFCommandNames.ExpandTwo    = typeof(ExpandToLevelTwoCommand);
            WPFCommandNames.ExpandThree  = typeof(ExpandToLevelThreeCommand);
            WPFCommandNames.ExpandFour   = typeof(ExpandToLevelFourCommand);

            WPFCommandNames.SelectAll     = typeof(SelectAllCommand);
            WPFCommandNames.SelectReverse = typeof(SelectReverseCommand);

            WPFCommandNames.InitCommonCommands();
        }
Пример #2
0
 /// <summary>
 /// 此方法中会重置整个 Rafy 环境。这样可以保证各插件的注册机制能再次运行。
 /// 例如,当启动过程中出现异常时,可以重新使用 Startup 来启动应用程序开始全新的启动流程。
 /// </summary>
 protected virtual void PrepareToStartup()
 {
     RafyEnvironment.Reset();
     CommonModel.Reset();
     UIModel.Reset();
     WPFCommandNames.Clear();
 }
Пример #3
0
        /// <summary>
        /// 此方法中会重置整个 Rafy 环境。这样可以保证各插件的注册机制能再次运行。
        /// 例如,当启动过程中出现异常时,可以重新使用 Startup 来启动应用程序开始全新的启动流程。
        /// </summary>
        protected virtual void PrepareToStartup()
        {
            PluginTable.DomainLibraries.Unlock();
            PluginTable.UILibraries.Unlock();

            RafyEnvironment.Reset();
            CommonModel.Reset();
            UIModel.Reset();
            WPFCommandNames.Clear();
        }