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


C# Zetbox类代码示例

本文整理汇总了C#中Zetbox的典型用法代码示例。如果您正苦于以下问题:C# Zetbox类的具体用法?C# Zetbox怎么用?C# Zetbox使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


Zetbox类属于命名空间,在下文中一共展示了Zetbox类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: ObjectReferencePropertyTemplate

        public ObjectReferencePropertyTemplate(Arebis.CodeGeneration.IGenerationHost _host, IZetboxContext ctx, Zetbox.Generator.Templates.Serialization.SerializationMembersList serializationList, string moduleNamespace, string ownInterface, string name, string implNameUnused, string eventName, string fkBackingName, string fkGuidBackingName, string referencedInterface, string referencedImplementation, string associationNameUnused, string targetRoleNameUnused, string positionPropertyName, string inverseNavigatorName, bool inverseNavigatorIsList, bool notifyInverseCollection, bool eagerLoading, bool relDataTypeExportable, bool callGetterSetterEvents, bool isCalculated, bool disableExport)
            : base(_host)
        {
			this.ctx = ctx;
			this.serializationList = serializationList;
			this.moduleNamespace = moduleNamespace;
			this.ownInterface = ownInterface;
			this.name = name;
			this.implNameUnused = implNameUnused;
			this.eventName = eventName;
			this.fkBackingName = fkBackingName;
			this.fkGuidBackingName = fkGuidBackingName;
			this.referencedInterface = referencedInterface;
			this.referencedImplementation = referencedImplementation;
			this.associationNameUnused = associationNameUnused;
			this.targetRoleNameUnused = targetRoleNameUnused;
			this.positionPropertyName = positionPropertyName;
			this.inverseNavigatorName = inverseNavigatorName;
			this.inverseNavigatorIsList = inverseNavigatorIsList;
			this.notifyInverseCollection = notifyInverseCollection;
			this.eagerLoading = eagerLoading;
			this.relDataTypeExportable = relDataTypeExportable;
			this.callGetterSetterEvents = callGetterSetterEvents;
			this.isCalculated = isCalculated;
			this.disableExport = disableExport;

        }
开发者ID:daszat,项目名称:zetbox,代码行数:27,代码来源:ObjectReferencePropertyTemplate.Designer.cs

示例2: ToImage

        public System.Drawing.Image ToImage(Zetbox.App.GUI.Icon icon)
        {
            if (icon == null) return null;
            if (icon.ObjectState == DataObjectState.New) return null;

            try
            {
                System.Drawing.Image bmp;
                if (!_cache.TryGetValue(icon.ExportGuid, out bmp))
                {
                    var realIcon = Context.FindPersistenceObject<Zetbox.App.GUI.Icon>(icon.ExportGuid);
                    if (realIcon.Blob == null)
                    {
                        Logging.Log.WarnFormat("Icon#{0} has no associated request", realIcon.ID);
                        return null;
                    }
                    bmp = System.Drawing.Image.FromStream(realIcon.Blob.GetStream());
                    _cache[icon.ExportGuid] = bmp;
                }
                return bmp;
            }
            catch (Exception ex)
            {
                Logging.Log.Info("Error while loading Icon", ex);
                return null;
            }
        }
开发者ID:daszat,项目名称:zetbox,代码行数:27,代码来源:IconConverter.cs

示例3: CreateFilterModel

 public static void CreateFilterModel(Zetbox.App.GUI.MonthFilterConfiguration obj, MethodReturnEventArgs<IFilterModel> e, Zetbox.API.IZetboxContext ctx)
 {
     var mdl = MonthValueFilterModel.Create(FrozenContext, obj.GetLabel(), FilterValueSource.FromProperty(obj.Property), obj.IsCurrentMonthDefault ?? false);
     mdl.Required = obj.Required;
     mdl.RefreshOnFilterChanged = obj.RefreshOnFilterChanged;
     e.Result = mdl;
 }
开发者ID:daszat,项目名称:zetbox,代码行数:7,代码来源:MonthFilterConfigurationActions.cs

示例4: Template

        public Template(Arebis.CodeGeneration.IGenerationHost _host, IZetboxContext ctx, Zetbox.App.Base.Module module)
            : base(_host)
        {
			this.ctx = ctx;
			this.module = module;

        }
开发者ID:daszat,项目名称:zetbox,代码行数:7,代码来源:Template.Designer.cs

示例5: CreateReport

        public void CreateReport(Zetbox.App.SchemaMigration.MigrationProject obj)
        {
            this._obj = obj;

            NewHeading1("Summary");
            foreach (var s in obj.StagingDatabases)
            {
                RenderTableMappings(s);
            }

            foreach (var s in obj.StagingDatabases)
            {
                foreach (var tbl in s.SourceTables.Where(i => i.DestinationObjectClass != null).OrderBy(i => i.Name))
                {
                    var r = new SourceTableMappingReport(Section);
                    r.CreateReport(tbl);
                }

                foreach (var tbl in s.SourceTables.Where(i => i.DestinationObjectClass == null && i.Status != MappingStatus.Ignored).OrderBy(i => i.Name))
                {
                    var r = new SourceTableMappingReport(Section);
                    r.CreateReport(tbl);
                }
            }
        }
开发者ID:daszat,项目名称:zetbox,代码行数:25,代码来源:Report.cs

示例6: Open

 public static void Open(Zetbox.App.GUI.Icon obj)
 {
     if (obj.Blob != null)
     {
         obj.Blob.Open();
     }
 }
开发者ID:jrgcubano,项目名称:zetbox,代码行数:7,代码来源:IconActions.cs

示例7: ChooseTypeRefFromAssembly

 /// <summary>
 /// Opens a dialog to let the user choose a type references from the specified assembly.
 /// </summary>
 /// <param name="assembly">the assembly to choose from</param>
 protected void ChooseTypeRefFromAssembly(Zetbox.App.Base.Assembly assembly)
 {
     var regenerateCmd = ViewModelFactory.CreateViewModel<RegenerateTypeRefsCommand.Factory>().Invoke(DataContext, Parent, this);
     var selectionTask = ViewModelFactory.CreateViewModel<DataObjectSelectionTaskViewModel.Factory>().Invoke(
         DataContext,
         Parent,
         typeof(TypeRef).GetObjectClass(FrozenContext),
         () => DataContext.GetQuery<Zetbox.App.Base.TypeRef>(),
         (chosen) =>
         {
             if (chosen != null)
             {
                 this.ParentType.Value = chosen.FirstOrDefault();
             }
         },
         new List<CommandViewModel>() { regenerateCmd }
     );
     //var filter = selectionTask.ListViewModel.Filter.Single(i => i.Property.ExportGuid == new Guid("885BFA97-3D43-48BB-A0AA-1049298714FF"));
     //filter.Value = filter.PossibleValues
     //    .Cast<KeyValuePair<DataObjectViewModel, string>>()
     //    .Where(m => m.Key != null)
     //    .FirstOrDefault(m => m.Key.Object == assembly)
     //    .Key;
     regenerateCmd.ListModel = selectionTask.ListViewModel;
     ViewModelFactory.ShowDialog(selectionTask);
 }
开发者ID:jrgcubano,项目名称:zetbox,代码行数:30,代码来源:TypeRefPropertyViewModel.Commands.cs

示例8: CreateFilterModel

        public static void CreateFilterModel(Zetbox.App.GUI.SinglePropertyFilterConfiguration obj, MethodReturnEventArgs<IFilterModel> e)
        {
            var mdl = new SingleValueFilterModel();
            mdl.Label = obj.GetLabel();
            mdl.Required = obj.Required;
            mdl.ValueSource = FilterValueSource.FromProperty(obj.Property);

            mdl.ViewModelType = obj.ViewModelDescriptor;
            mdl.RequestedKind = obj.RequestedKind;

            mdl.FilterArguments.Add(new FilterArgumentConfig(obj.Property.GetDetachedValueModel(true), /*cfg.ArgumentViewModel ?? */ obj.Property.ValueModelDescriptor));
            if (obj.Property is StringProperty)
            {
                mdl.Operator = FilterOperators.Contains;
            }
            else if (obj.Property is EnumerationProperty)
            {
                mdl.RefreshOnFilterChanged = true;
            }
            else if (obj.Property is ObjectReferenceProperty)
            {
                mdl.RefreshOnFilterChanged = true;
            }
            e.Result = mdl;
        }
开发者ID:jrgcubano,项目名称:zetbox,代码行数:25,代码来源:SinglePropertyFilterConfigurationActions.cs

示例9: Call

        public static new void Call(Arebis.CodeGeneration.IGenerationHost host, IZetboxContext ctx, DataType implementor, Zetbox.App.Base.Method m, int index)
        {
            if (host == null) { throw new ArgumentNullException("host"); }
            string indexSuffix = index == 0 ? String.Empty : index.ToString();
            string eventName = "On" + m.Name + indexSuffix + "_" + implementor.Name;

            host.CallTemplate("ObjectClasses.InvokeServerMethod", ctx, implementor, m, index, indexSuffix, eventName);
        }
开发者ID:daszat,项目名称:zetbox,代码行数:8,代码来源:InvokeServerMethod.cs

示例10: HandleBlobChange

 public static void HandleBlobChange(at.dasz.DocumentManagement.Document obj, MethodReturnEventArgs<Zetbox.App.Base.Blob> e, Zetbox.App.Base.Blob oldBlob, Zetbox.App.Base.Blob newBlob)
 {
     if (oldBlob != null && !obj.Revisions.Contains(oldBlob))
     {
         obj.Revisions.Add(oldBlob);
     }
     e.Result = newBlob;
 }
开发者ID:jrgcubano,项目名称:zetbox,代码行数:8,代码来源:DocumentActions.cs

示例11: ValueCollectionProperty

        public ValueCollectionProperty(Arebis.CodeGeneration.IGenerationHost _host, IZetboxContext ctx, Zetbox.Generator.Templates.Serialization.SerializationMembersList serializationList, Property prop)
            : base(_host)
        {
			this.ctx = ctx;
			this.serializationList = serializationList;
			this.prop = prop;

        }
开发者ID:daszat,项目名称:zetbox,代码行数:8,代码来源:ValueCollectionProperty.Designer.cs

示例12: WrappedZetboxCommand

        /// <summary>
        /// Initializes a new instance of the WrappedZetboxCommand class.
        /// </summary>
        /// <param name="cmd">the command to wrap</param>
        public WrappedZetboxCommand(Zetbox.Client.Presentables.ICommandViewModel cmd)
            : base(cmd == null ? String.Empty : cmd.Label, typeof(WrappedZetboxCommand))
        {
            if (cmd == null) { throw new ArgumentNullException("cmd", "No command to wrap"); }

            _command = cmd;
            _command.CanExecuteChanged += (sender, args) => CommandManager.InvalidateRequerySuggested();
        }
开发者ID:daszat,项目名称:zetbox,代码行数:12,代码来源:WrappedZetboxCommand.cs

示例13: NotifyPreSave

 public static void NotifyPreSave(Zetbox.App.Base.Method obj)
 {
     // TODO: replace with constraint
     if (!System.CodeDom.Compiler.CodeGenerator.IsValidLanguageIndependentIdentifier(obj.Name))
     {
         throw new ArgumentException(string.Format("Method Name {0} has some illegal chars", obj.Name));
     }
 }
开发者ID:daszat,项目名称:zetbox,代码行数:8,代码来源:MethodActions.cs

示例14: GetSummaryReport

 public static void GetSummaryReport(Projekt obj, MethodReturnEventArgs<System.Object> e, string title, Zetbox.App.Base.DateTimeRange range)
 {
     using (var rpt = _rptFactory())
     {
         ProjectReport.Call(rpt);
         rpt.Open("ProjectReport.pdf");
     }
 }
开发者ID:daszat,项目名称:zetbox,代码行数:8,代码来源:ProjektActions.cs

示例15: HandleBlobChange

 public static void HandleBlobChange(ImportedFile obj, MethodReturnEventArgs<Zetbox.App.Base.Blob> e, Zetbox.App.Base.Blob oldBlob, Zetbox.App.Base.Blob newBlob)
 {
     if (oldBlob != null && newBlob != oldBlob)
     {
         throw new InvalidOperationException("Changing blob on imported files is not allowed");
     }
     e.Result = newBlob;
 }
开发者ID:jrgcubano,项目名称:zetbox,代码行数:8,代码来源:ImportedFileActions.cs


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