Exemplo n.º 1
0
    private void SetupObjectButton(Transform objView)
    {
        ObjectView ov = objView.GetComponent <ObjectView>();

        RenderTexture rt = new RenderTexture(256, 256, 24, RenderTextureFormat.ARGB32);

        rt.Create();

        objView.Find("Camera").GetComponent <Camera>().targetTexture = rt;
        Material mt = new Material(Shader.Find("Unlit/Texture"));

        mt.mainTexture = rt;

        GameObject b = Instantiate(buttonPrefab);

        b.GetComponent <ObjectButton>().SetValues(ov.prefab, ov.itemCount);
        b.GetComponent <Image>().material = mt;
        b.transform.SetParent(buttonContainer.transform, false);

        foreach (Transform untagged in defaultSetup.GetComponentInChildren <Transform>())
        {
            if (untagged.name.Contains(ov.prefab.name))
            {
                untagged.GetComponent <Obj>().buttonReference = b;
            }
        }
    }
Exemplo n.º 2
0
        private static TreeNode AddTree(ObjectView item, TreeNode parent, Dictionary <IObject3D, TreeNode> keyValues, ThemeConfig theme)
        {
            // Suppress MeshWrapper and OperationSource nodes in tree
            bool shouldCollapseToParent = item.Source is ModifiedMeshObject3D || item.Source is OperationSourceObject3D;
            var  contextNode            = (shouldCollapseToParent && parent != null) ? parent : AddItem(item, parent, keyValues, theme);

            using (contextNode.LayoutLock())
            {
                var componentObject3D = item.Source as ComponentObject3D;
                var hideChildren      = item.Source.GetType().GetCustomAttributes(typeof(HideChildrenFromTreeViewAttribute), true).Any();

                if (componentObject3D?.Finalized == false ||
                    !hideChildren)
                {
                    foreach (var child in item.Children)
                    {
                        if (child != null &&
                            !child.GetType().GetCustomAttributes(typeof(HideFromTreeViewAttribute), true).Any())
                        {
                            AddTree(BuildItemView(child), contextNode, keyValues, theme);
                        }
                    }
                }
            }

            return(contextNode);
        }
Exemplo n.º 3
0
        private void contextMenuEstudios_ItemClicked(object sender, ToolStripItemClickedEventArgs e)
        {
            ObjectView <Alumno> obVista =
                listAlumnosBindingSource.Current as ObjectView <Alumno>;

            obVista.Object.EstAlumno = e.ClickedItem.Text;
        }
Exemplo n.º 4
0
        private void button3_Click(object sender, EventArgs e)
        {
            bool cambios = false;

            if (textBox2.Text.Length != 0)
            {
                ObjectView <CTelefono> telefono = bs.Current as ObjectView <CTelefono>;// (bs.Current as CTelefono).Nombre = textBox2.Text;
                telefono.Object._nombre = textBox2.Text;
                cambios = true;
            }
            decimal tef = 0;

            if (textBox3.Text.Length != 0 && Decimal.TryParse(textBox3.Text, out tef))
            {
                ObjectView <CTelefono> telefono = bs.Current as ObjectView <CTelefono>;
                decimal numero = Convert.ToDecimal(textBox3.Text);

                telefono.Object._telefono = numero;
                cambios = true;
            }
            if (cambios)
            {
                bs.CurrencyManager.Refresh();
            }
            .
        }
Exemplo n.º 5
0
        private void btnInicioNormal_Click(object sender, EventArgs e)
        {
            try
            {
                if (ckbProgramacoes.Checked && !(bsProgramacoes.Current is null))
                {
                    ObjectView <Controller.ProgramaMicroondas> vProgramaMicroondas = (ObjectView <Controller.ProgramaMicroondas>)bsProgramacoes.Current;

                    txtTextoArquecido.Text = microondasController.AquecerStringProgramacao(txtTextoAquecimento.Text, vProgramaMicroondas.Object.Id);
                }
                else
                {
                    int tempo    = Convert.ToInt32(nudTempoProcessamento.Value),
                        potencia = Convert.ToInt32(nudPotenciaUtilizada.Value);

                    txtTextoArquecido.Text = microondasController.AquecerString(txtTextoAquecimento.Text, tempo, potencia);
                }

                MessageBox.Show("Texto Aquecido", "Informacao", MessageBoxButtons.OK, MessageBoxIcon.Information);
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message);
            }
        }
Exemplo n.º 6
0
        internal LensWarpCorrectionModel(string text) : base(TypeObject.Model, true)
        {
            this.Triangles = new TriangleInfoList();

            var width  = 12.8 * 10;
            var height = 8 * 10;

            var cubeIndex = 1;

            for (var rowIndex = 0; rowIndex < 7; rowIndex++)
            {
                for (var columnIndex = 0; columnIndex < 7; columnIndex++)
                {
                    CreateMeasureCube(new Vector2(-83.6f + (columnIndex * 25.6f) + 12.8f, -(52) + (rowIndex * 16) + 8f), cubeIndex.ToString(), width, height);

                    cubeIndex++;
                }
            }

            //this.Triangles[0].AddRange((new Cube(192f, 120f, 0.2f)).AsSTLModel3D(new DAL.Materials.Material()).Triangles[0]);

            this.UpdateBoundries();
            this.SupportBasement = true;
            this.BindModel();
            this.UpdateBinding();
            this.Loaded = true;
            this._color = Color.FromArgb(ObjectView.NextObjectIndex, Color.Gray);



            ObjectView.AddModel(this);
        }
Exemplo n.º 7
0
 // For unique selection
 public void SetSelected(ObjectView obj)
 {
     if (obj.isSelected && isSelected)
     {
         SetSelected(false);
     }
 }
Exemplo n.º 8
0
        /**
         * Returns a view for the given game object. If no view exists one is created.
         * and added to the info to be persisted to disk. isOpen is only used when
         * a view is being created, otherwise the given view is returned.
         */
        public ObjectView GetView(GameObject go, bool isOpen)
        {
            ObjectView ov = null;

            if (!viewHash.TryGetValue(go, out ov))
            {
                //We haven't encountered this view. Perhaps we have one persisted to disk?
                long localID = PrefabInspector.GetLocalID(go);
                if (viewIDHash.TryGetValue(localID, out ov))
                {
                    //its in the view id hash but not in the view hash!
                    // Add it.
                    viewHash[go] = ov;
                }
                else
                {
                    //we haven't encountered this object make a new view model and add
                    // to our collections.
                    ov                  = new ObjectView(go, isOpen);
                    viewHash[go]        = ov;
                    viewIDHash[localID] = ov;
                    views.Add(ov);
                }
            }
            ov.obj = go;
            return(ov);
        }
Exemplo n.º 9
0
        private void ObjectView_MouseDown(object sender, MouseEventArgs e)
        {
            if (e.Button == MouseButtons.Left || e.Button == MouseButtons.Right)
            {
                ObjectView.SelectedNode = ObjectView.GetNodeAt(e.X, e.Y);

                if (ObjectView.SelectedNode == null)
                {
                    return;
                }

                if (ObjectView.SelectedNode.Tag is Layer)
                {
                    Layer l = (Layer)ObjectView.SelectedNode.Tag;
                    Editor.Default.selectLayer(l);
                    propertyGrid1.SelectedObject = l;
                }

                if (ObjectView.SelectedNode.Tag is LevelObject)
                {
                    LevelObject lo = (LevelObject)ObjectView.SelectedNode.Tag;
                    Editor.Default.selectLevelObject(lo);
                    selectedLevelObject          = lo;
                    propertyGrid1.SelectedObject = lo;
                    Camera.Position = lo.position;
                }
            }
        }
Exemplo n.º 10
0
    public void createTree()
    {
        TrashManRecycleBin bin = new TrashManRecycleBin();

        bin.instancesToPreallocate = 20;
        bin.prefab     = ballPrefab.gameObject;
        ballPrefab.tag = ObjectType.Player;
        TrashMan.manageRecycleBin(bin);
        Rectangle bound = new Rectangle(0, 0, 800, 480);

        quardTree = new QuardTree(bound, 0);
        for (int i = 0; i < 10; i++)
        {
            for (int j = 0; j < 10; j++)
            {
                ObjectView objectView = TrashMan.spawn(ballPrefab.gameObject).GetComponent <ObjectView>();
                Rectangle  rect       = new Rectangle(200 + i * 50, 120 + j * 50, 20, 20);
                //Rectangle rect = new Rectangle(i * 50, j * 50, 20, 20);
                objectView.setCollisionHandler(rect);
                //objectView.transform.SetParent(this.transform, false);
                Vector3 localPotion = new Vector3(objectView.rect.center.x, objectView.rect.center.y, 0);
                objectView.transform.localPosition = localPotion;
                quardTree.Insert(objectView.rect);
            }
        }
        drawQuardTree(quardTree);
    }
Exemplo n.º 11
0
        private static TreeNode AddTree(ObjectView item, TreeNode parent, ThemeConfig theme)
        {
            // Suppress MeshWrapper and OperationSource nodes in tree
            bool shouldCollapseToParent = item.Source is ModifiedMeshObject3D || item.Source is OperationSourceObject3D;
            var  contextNode            = (shouldCollapseToParent && parent != null) ? parent : AddItem(item, parent, theme);

            using (contextNode.LayoutLock())
            {
                var componentObject3D = item.Source as ComponentObject3D;

                if (componentObject3D?.Finalized == false ||
                    componentObject3D is null && !(item.Source is IVisualLeafNode))
                {
                    foreach (var child in item.Children)
                    {
                        if (child != null)
                        {
                            AddTree(BuildItemView(child), contextNode, theme);
                        }
                    }
                }
            }

            return(contextNode);
        }
Exemplo n.º 12
0
 public void TestSqlResultViewGeneration()
 {
     SqlBuilder sb = new SqlBuilder(StatementType.Select, typeof(MailingList));
     SqlResult  sr = sb.GetStatement().Execute();
     DataView   dv = ObjectView.GetDataView(sr);
     // TODO add stuff to validate the contents of the view
 }
Exemplo n.º 13
0
 public void Remove_throws_for_null_argument()
 {
     var mockEntityCollection = MockHelper.CreateMockEntityCollection<object>(null).Object;
     var objectView = new ObjectView<object>(new ObjectViewEntityCollectionData<object, object>(mockEntityCollection), mockEntityCollection);
     Assert.Equal("value",
         Assert.Throws<ArgumentNullException>(
             () => ((IList)objectView).Remove(null)).ParamName);
 }
Exemplo n.º 14
0
        private void ConfigParameters(ShowViewParameters showViewParameters, ObjectView objectView)
        {
            var parameters = showViewParameters;

            parameters.CreateAllControllers = false;
            parameters.TargetWindow         = TargetWindow.NewWindow;
            parameters.Context     = TemplateContext.PopupWindow;
            parameters.CreatedView = objectView;
        }
Exemplo n.º 15
0
 public void SetNullObject(ObjectView obj)
 {
     if (this.obj == obj)
     {
         GetComponent <CanvasGroup> ().alpha          = 0;
         GetComponent <CanvasGroup> ().interactable   = false;
         GetComponent <CanvasGroup> ().blocksRaycasts = false;
         this.obj = null;
     }
 }
Exemplo n.º 16
0
 private void CatalogGridView_RowStateChanged(object sender, DataGridViewRowStateChangedEventArgs e)
 {
     if (e.Row.Selected)
     {
         var control = (DataGridView)sender;
         ObjectView <BluePrint> bpWrapper = (ObjectView <BluePrint>)e.Row.DataBoundItem;
         string imagePath = bpWrapper.Object.PngPath;
         this.blueprintPreviewPictureBox.Image = System.Drawing.Image.FromFile(imagePath);
     }
 }
Exemplo n.º 17
0
        public void AddNewEditableObjectAndEndNew()
        {
            ViewFactory <SimpleEditableObject> factory = ViewFactory <SimpleEditableObject> .IList();

            ObjectListView <SimpleEditableObject> view = factory.View;

            ObjectView <SimpleEditableObject> added = (ObjectView <SimpleEditableObject>)view.AddNew();

            ((ICancelAddNew)view).EndNew(view.IndexOf(added.Object));
            Assert.AreEqual(2, factory.ListChangedAddedCount);
        }
Exemplo n.º 18
0
        public async void OnViewProfileObjectsCommand()
        {
            var result = await Utilities.GetFirewallProfile();

            var newWin = new ObjectView();
            var obj    = ObjectViewModel.Create();

            obj.SelectedPsObject = result[0];
            newWin.DataContext   = obj;
            newWin.Show();
        }
Exemplo n.º 19
0
        public PrefabInfo(GameObject go)
        {
            name       = go.name;
            guid       = AssetDatabase.AssetPathToGUID(AssetDatabase.GetAssetPath(go));
            views      = new List <ObjectView>();
            viewHash   = new Dictionary <GameObject, ObjectView>();
            viewIDHash = new Dictionary <long, ObjectView>();
            ObjectView ov = GetView(go, true); //default to open for the first object.

            currentID = ov.localID;
        }
Exemplo n.º 20
0
        public virtual void Load(IPortalApplication portalApplication)
        {
            PortalApplication = portalApplication;

            Configuration = PortalApplication.GetSettings<McmModuleConfiguration>(ConfigurationName);

            McmRepository = new McmRepository().WithConfiguration(Configuration.ConnectionString);
            PermissionManager = new InMemoryPermissionManager().WithSynchronization(McmRepository, new IntervalSpecification(10000));

            try
            {
                if (!string.IsNullOrEmpty(Configuration.ObjectCoreName))
                {
                    var objectView = new ObjectView(PermissionManager);

                    portalApplication.AddView(objectView, Configuration.ObjectCoreName);

                    PortalApplication.MapRoute("/v5/Object", () => new Extension.v5.Object(PortalApplication, McmRepository, PermissionManager));
                    PortalApplication.MapRoute("/v6/Object", () => new Extension.v6.Object(PortalApplication, McmRepository, PermissionManager));
                }

                PortalApplication.MapRoute("/v5/Destination", () => new Extension.v6.Destination(PortalApplication, McmRepository, PermissionManager));
                PortalApplication.MapRoute("/v5/File", () => new Extension.v6.File(PortalApplication, McmRepository, PermissionManager));
                PortalApplication.MapRoute("/v5/Folder", () => new Extension.v6.Folder(PortalApplication, McmRepository, PermissionManager));
                PortalApplication.MapRoute("/v5/Format", () => new Extension.v6.Format(PortalApplication, McmRepository, PermissionManager));
                PortalApplication.MapRoute("/v5/Link", () => new Extension.v6.Link(PortalApplication, McmRepository, PermissionManager));
                PortalApplication.MapRoute("/v5/Metadata", () => new Extension.v6.Metadata(PortalApplication, McmRepository, PermissionManager));
                PortalApplication.MapRoute("/v5/MetadataSchema", () => new Extension.v6.MetadataSchema(PortalApplication, McmRepository, PermissionManager));
                PortalApplication.MapRoute("/v5/ObjectRelation", () => new Extension.v6.ObjectRelation(PortalApplication, McmRepository, PermissionManager));
                PortalApplication.MapRoute("/v5/ObjectType", () => new Extension.v6.ObjectType(PortalApplication, McmRepository, PermissionManager));
                PortalApplication.MapRoute("/v5/Mcm", () => new Extension.v6.Mcm(PortalApplication, McmRepository, PermissionManager));
                PortalApplication.MapRoute("/v5/Download", () => new Download(PortalApplication, McmRepository, Configuration));
                PortalApplication.MapRoute("/v5/UserProfile", () => new Extension.v6.UserProfile(PortalApplication, McmRepository, PermissionManager));
                PortalApplication.MapRoute("/v5/UserManagement", () => new Extension.v6.UserManagement(PortalApplication, McmRepository, PermissionManager, Configuration.UserManagement));

                PortalApplication.MapRoute("/v6/Destination", () => new Extension.v6.Destination(PortalApplication, McmRepository, PermissionManager));
                PortalApplication.MapRoute("/v6/File", () => new Extension.v6.File(PortalApplication, McmRepository, PermissionManager));
                PortalApplication.MapRoute("/v6/Folder", () => new Extension.v6.Folder(PortalApplication, McmRepository, PermissionManager));
                PortalApplication.MapRoute("/v6/Format", () => new Extension.v6.Format(PortalApplication, McmRepository, PermissionManager));
                PortalApplication.MapRoute("/v6/Link", () => new Extension.v6.Link(PortalApplication, McmRepository, PermissionManager));
                PortalApplication.MapRoute("/v6/Metadata", () => new Extension.v6.Metadata(PortalApplication, McmRepository, PermissionManager));
                PortalApplication.MapRoute("/v6/MetadataSchema", () => new Extension.v6.MetadataSchema(PortalApplication, McmRepository, PermissionManager));
                PortalApplication.MapRoute("/v6/ObjectRelation", () => new Extension.v6.ObjectRelation(PortalApplication, McmRepository, PermissionManager));
                PortalApplication.MapRoute("/v6/ObjectType", () => new Extension.v6.ObjectType(PortalApplication, McmRepository, PermissionManager));
                PortalApplication.MapRoute("/v6/Mcm", () => new Extension.v6.Mcm(PortalApplication, McmRepository, PermissionManager));
                PortalApplication.MapRoute("/v6/UserProfile", () => new Extension.v6.UserProfile(PortalApplication, McmRepository, PermissionManager));
                PortalApplication.MapRoute("/v6/UserManagement", () => new Extension.v6.UserManagement(PortalApplication, McmRepository, PermissionManager, Configuration.UserManagement));
            }
            catch (System.Exception)
            {
                // Another module already added these
            }
        }
Exemplo n.º 21
0
        public void AddNewAndCancelNew()
        {
            ViewFactory <SimpleClass> factory = ViewFactory <SimpleClass> .IList();

            ObjectListView <SimpleClass> view = factory.View;

            ObjectView <SimpleClass> added = (ObjectView <SimpleClass>)view.AddNew();

            ((ICancelAddNew)view).CancelNew(view.IndexOf(added.Object));
            Assert.AreEqual(1, factory.ListChangedAddedCount);
            Assert.AreEqual(1, factory.ListChangedDeletedCount);
        }
Exemplo n.º 22
0
        public void AddNewEditableObjectAndEndNew()
        {
            ViewFactory    factory = ViewFactory.IListIEditableObjectItems();
            ObjectListView view    = factory.View;

            view.ItemType = factory.ListItemType;

            ObjectView added = (ObjectView)view.AddNew();

            ((ICancelAddNew)view).EndNew(view.IndexOf(added.Object));
            Assert.AreEqual(2, factory.ListChangedAddedCount);
        }
Exemplo n.º 23
0
        private void EditItem()
        {
            ObjectView <日常损耗> view = 日常损耗BindingSource.Current as ObjectView <日常损耗>;

            if (view != null && view.Object != null)
            {
                using (日常损耗Form form = new 日常损耗Form(view.Object))
                {
                    form.ShowDialog(this);
                }
            }
        }
Exemplo n.º 24
0
        private static TreeNode AddItem(ObjectView item, TreeNode parentNode, Dictionary <IObject3D, TreeNode> keyValues, ThemeConfig theme)
        {
            if (item.Source is InsertionGroupObject3D insertionGroup)
            {
                return(new TreeNode(theme)
                {
                    Text = "Loading".Localize(),
                    Tag = item.Source,
                    TextColor = theme.TextColor,
                    PointSize = theme.DefaultFontSize,
                });
            }

            var node = new TreeNode(theme)
            {
                Text      = GetName(item),
                Tag       = item.Source,
                TextColor = theme.TextColor,
                PointSize = theme.DefaultFontSize,
            };

            keyValues.Add(item.Source, node);

            // Check for operation resulting in the given type
            if (ApplicationController.Instance.Thumbnails.OperationIcons.TryGetValue(item.Source.GetType(), out Func <bool, ImageBuffer> iconSource))
            {
                // If exists, use the operation icon
                node.Image = iconSource?.Invoke(theme.InvertIcons);
            }
            else
            {
                node.Image = ApplicationController.Instance.Thumbnails.DefaultThumbnail();
            }

            if (parentNode != null)
            {
                parentNode.Nodes.Add(node);
                if (parentNode.Tag is IObject3D object3D)
                {
                    parentNode.Expanded = object3D.Expanded;
                }
            }

            node.ExpandedChanged += (s, e) =>
            {
                if (item.Source is Object3D object3D)
                {
                    object3D.Expanded = node.Expanded;
                }
            };

            return(node);
        }
Exemplo n.º 25
0
        private void EditItem()
        {
            ObjectView <提醒> view = 提醒BindingSource.Current as ObjectView <提醒>;

            if (view != null && view.Object != null)
            {
                using (提醒Form form = new 提醒Form(view.Object))
                {
                    form.ShowDialog(this);
                }
            }
        }
Exemplo n.º 26
0
        private void EditItem()
        {
            ObjectView <源房抄表> view = 源房抄表BindingSource.Current as ObjectView <源房抄表>;

            if (view != null && view.Object != null)
            {
                using (源房抄表Form form = new 源房抄表Form(view.Object))
                {
                    form.ShowDialog(this);
                }
            }
        }
Exemplo n.º 27
0
        private void EditItem()
        {
            ObjectView <装修明细> view = 装修明细BindingSource.Current as ObjectView <装修明细>;

            if (view != null && view.Object != null)
            {
                using (装修Form form = new 装修Form(view.Object))
                {
                    form.ShowDialog(this);
                }
            }
        }
        void IParentViewPropertyEditor.SetParentView(ObjectView value)
        {
            _parentView = value;
            if (value is ListView listView)
            {
                var gridListEditor = ((ASPxGridListEditor)listView.Editor);

                ClientSideEventsHelper.AssignClientHandlerSafe(gridListEditor.Grid,
                                                               nameof(gridListEditor.Grid.ClientSideEvents.BeginCallback),
                                                               $"function(s,e){{ClearEditorItems('{_clientStorage}','{View}')}}",
                                                               $"{GetType().FullName}{nameof(gridListEditor.Grid.ClientSideEvents.BeginCallback)}");
            }
        }
        private void Frame_ViewChanged(object sender, ViewChangedEventArgs e)
        {
            ActionContainerBarItem printActionContainer = PrintActionContainer;
            ObjectView             objectView           = Frame.View as ObjectView;

            if (printActionContainer != null && objectView != null)
            {
                PrintActionContainer.Manager.Items[printingSettingsStorageSelector.Caption].PaintStyle = BarItemPaintStyle.CaptionGlyph;
                Type objectType = objectView.ObjectTypeInfo.Type;
                bool barVisible = (objectType == typeof(EventDemoObject) || objectType == typeof(GridDemoObject) || objectType == typeof(LayoutDemoObject) || objectType == typeof(TreeListDemoObject));
                GetOwnToolbarForBarItemContainer(PrintActionContainer).Visible = barVisible;
            }
        }
Exemplo n.º 30
0
        private void lstAlumnos_SelectedIndexChanged(object sender, System.EventArgs e)
        {
            ObjectView <alumno> al = odAlumnos.Current as ObjectView <alumno>;

            if (al == null)
            {
                return;
            }
            idAlumnoActual           = al.Object.id_alumno;
            vistaAsignaturas         = provDatos.ObtenerAsignaturas(idAlumnoActual);
            odAsignaturas.DataSource = vistaAsignaturas;
            lstAsignaturas_SelectedIndexChanged(lstAsignaturas, null);
        }
Exemplo n.º 31
0
        private void dgAlumnos_SelectionChanged(object sender, System.EventArgs e)
        {
            bopTodas.Checked = true;
            ObjectView <alumno> al = odAlumnos.Current as ObjectView <alumno>;

            if (al == null)
            {
                return;
            }
            idAlumnoActual           = al.Object.id_alumno;
            vistaAsignaturas         = provDatos.ObtenerAsignaturas(idAlumnoActual);
            odAsignaturas.DataSource = vistaAsignaturas;
        }
Exemplo n.º 32
0
        private void lstAsignaturas_SelectedIndexChanged(object sender, System.EventArgs e)
        {
            ObjectView <asignatura> asig =
                odAsignaturas.Current as ObjectView <asignatura>;

            if (asig == null)
            {
                return;
            }
            idAsignaturaActual    = asig.Object.id_asignatura;
            odAlumAsig.DataSource =
                provDatos.ObtenerAlumAsig(idAlumnoActual, idAsignaturaActual);
        }
        private void OnButton_Click(object sender, System.EventArgs evt)
        {
            var dto = new ClaimDTO() {ActionTemplate = _actionTemplateField.Value.ToString(),ClaimSI = _clamSI.Value};

            try
            {
                AddedObject = _add ? _vm.AddClaim(dto) : _vm.ReplaceClaim(_previousDto,dto);
            }
            catch (Exception e)
            {
                MessageBox.Show(e.Message, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
                return;
            }
            Close();
        }
Exemplo n.º 34
0
 public override void OnCreate()
 {
     view = ObjectView.Create<ObjectView> (this, "M", Color.red);
 }
Exemplo n.º 35
0
 private void ConfigParameters(ShowViewParameters showViewParameters, ObjectView objectView){
     var parameters = showViewParameters;
     parameters.CreateAllControllers = false;
     parameters.TargetWindow = TargetWindow.NewWindow;
     parameters.Context = TemplateContext.PopupWindow;
     parameters.CreatedView=objectView;
 }
Exemplo n.º 36
0
 public ObjectViewPane(ObjectView target)
 {
     this.Target = target;
     InitializeComponent();
 }
        private List<IDbObjectModel> GetObjects(ObjectView objectView)
        {
            List<IDbObjectModel> res = new List<IDbObjectModel>();
            string owner = cmBoxSchema.SelectedValue.ToString();

            switch (objectView)
            {
                case ObjectView.Tables:
                    res.AddRange(GetTables(owner));
                    break;

                case ObjectView.Views:
                    res.AddRange(Getviews(owner));
                    break;

                case ObjectView.All:
                    res.AddRange(GetTables(owner));
                    res.AddRange(Getviews(owner));
                    break;
            }
            return res;
        }
Exemplo n.º 38
0
 /// <summary>
 /// Carga las obras sociales del paciente en cuestión
 /// </summary>
 private void LoadObrasSociales()
 {
     try
     {
         //Construimos la vista para la grilla
         ObjectView ObrasSocialesObjectView = new ObjectView(typeof(ObraSocialXPaciente));
         ObrasSocialesObjectView.AllowRemove = false;
         ObrasSocialesObjectView.Columns.Add("IDObraSocialLookup.RazonSocial", "Obra Social");
         ObrasSocialesObjectView.Columns.Add("NumeroAfiliado", "Numero de Afiliado");
         BindingManagerBase ObrasSocialesManager = dgvObrasSociales.BindingContext[ObrasSocialesObjectView];
         ObrasSocialesObjectView.DataSource = (IList)this.PacienteEntity.ObraSocialXPacientes;
         dgvObrasSociales.DataSource = ObrasSocialesObjectView;
     }
     catch (Exception ex)
     {
         ProcesarExcepcion(ex);
     }
 }
Exemplo n.º 39
0
 /// <summary>
 /// Da formato a la grilla y crea lo necesario para el bindeo
 /// </summary>
 private void InitializeObjectView()
 {
     this.MoldeAudifonoObjectView = new ObjectView(typeof(MoldeAudifono));
     this.MoldeAudifonoObjectView.AllowRemove = false;
     this.MoldeAudifonoObjectView.Columns.Add("ID", "ID");
     this.MoldeAudifonoObjectView.Columns.Add("Nombre", "Nombre");
     this.MoldeAudifonoObjectView.Columns.Add("TipoValue", "Tipo");
     this.MoldeAudifonoObjectView.Columns.Add("MedidaVentilacion", "Medida de Ventilación");
     this.MoldeAudifonoCurrencyManager = this.dgvList.BindingContext[this.MoldeAudifonoObjectView];
 }
 /// <summary>
 /// Da formato a la grilla y crea lo necesario para el bindeo
 /// </summary>
 private void InitializeObjectView()
 {
     this.EstudioObjectView = new ObjectView(typeof(Estudio));
     this.EstudioObjectView.AllowRemove = false;
     this.EstudioObjectView.Columns.Add("ID", "ID");
     this.EstudioObjectView.Columns.Add("Nombre", "Nombre");
     this.EstudioObjectView.Columns.Add("FechaEstudio", "Fecha de Estudio");
     //this.EstudioObjectView.Columns.Add("TipoEstudio", "Tipo de Estudio");
     this.EstudioObjectView.Columns.Add("TipoEstudioValue", "Tipo de Estudio");
     this.EstudioObjectView.Columns.Add("IDHistoriaClinicaLookup.IDPacienteLookup.ApellidoNombre", "Paciente");
     this.EstudioCurrencyManager = this.dgvConsultas.BindingContext[this.EstudioObjectView];
 }
Exemplo n.º 41
0
 public override void OnCreate()
 {
     view = ObjectView.Create<ObjectView> (this, "N", Color.green);
 }
Exemplo n.º 42
0
 public override void OnCreate()
 {
     view = ObjectView.Create<ObjectView>(this, "$", Color.yellow);
 }
Exemplo n.º 43
0
        private void InitializeObjectView()
        {
            this.AudifonoObjectView = new ObjectView(typeof(Audifono));
            this.AudifonoObjectView.AllowRemove = false;
            this.AudifonoObjectView.Columns.Add("NombreModelo", Translate("Nombre"));
            this.AudifonoObjectView.Columns.Add("IDMarcaLookup.Nombre", Translate("Marca"));
            this.AudifonoObjectView.Columns.Add("PresionMaximaSalida", Translate("Presión Salida"));

            this.AudifonoCurrencyManager = this.dgvList.BindingContext[this.AudifonoObjectView];
        }
Exemplo n.º 44
0
 /// <summary>
 /// Carga Los audifonos y molde del paciente en cuestión
 /// </summary>
 private void LoadAudifonoMolde()
 {
     try
     {
         //Construimos la vista para la grilla
         ObjectView AudifonoMoldeObjectView = new ObjectView(typeof(AudifonoPaciente));
         AudifonoMoldeObjectView.AllowRemove = false;
         AudifonoMoldeObjectView.Columns.Add("IDAudifonoLookup.NombreModelo", "Audifono");
         AudifonoMoldeObjectView.Columns.Add("IDMoldeLookup.Nombre", "Molde");
         AudifonoMoldeObjectView.Columns.Add("NroSerie", "NroSerie");
         BindingManagerBase AudifonoMoldeManager = dgvAudifonosMoldes.BindingContext[AudifonoMoldeObjectView];
         AudifonoMoldeObjectView.DataSource = (IList)this.PacienteEntity.AudifonoPacientes;
         dgvAudifonosMoldes.DataSource = AudifonoMoldeObjectView;
     }
     catch (Exception ex)
     {
         ProcesarExcepcion(ex);
     }
 }
Exemplo n.º 45
0
 public ObjectFilter(String name, ObjectView parent)
     : this(name)
 {
     this.ParentView = parent;
     this.ParentFilter = null;
 }
Exemplo n.º 46
0
 private void InitializeObjectView()
 {
     this.PacienteObjectView = new ObjectView(typeof(Paciente));
     this.PacienteObjectView.AllowRemove = false;
     this.PacienteObjectView.Columns.Add("ID", "ID");
     this.PacienteObjectView.Columns.Add("Nombre", "Nombre");
     this.PacienteObjectView.Columns.Add("Apellido", "Apellido");
     this.PacienteObjectView.Columns.Add("Direccion", "Direccion");
     this.PacienteObjectView.Columns.Add("Telefono", "Telefono");
     this.PacienteObjectView.Columns.Add("Celular", "Celular");
     this.PacienteCurrencyManager = this.dgvPacientes.BindingContext[this.PacienteObjectView];
 }
Exemplo n.º 47
0
 ///// <summary>
 ///// Da formato a la grilla.
 ///// </summary>
 //private void BuildColumns()
 //{
 //    try
 //    {
 //        dgvList.AutoGenerateColumns = false;
 //        dgvList.Columns.Clear();
 //        dgvList.Columns.Add("IDRecordatorio", "IDRecordatorio");
 //        dgvList.Columns[0].DataPropertyName= "IDRecordatorio";
 //        dgvList.Columns.Add("Descripcion", "Descripcion");
 //        dgvList.Columns[1].DataPropertyName ="Descripcion";
 //        dgvList.Columns.Add("FechaRecordatorio", "FechaRecordatorio");
 //        dgvList.Columns[2].DataPropertyName= "FechaRecordatorio";
 //        dgvList.Columns.Add("IDVinculado", "IDVinculado");
 //        dgvList.Columns[3].DataPropertyName= "IDVinculado";
 //        dgvList.Columns[3].Visible= false;
 //        dgvList.Columns.Add("TipoVinculado", "TipoVinculado");
 //        dgvList.Columns[4].DataPropertyName= "TipoVinculado";
 //    }
 //    catch(Exception e)
 //    {
 //        ProcesarExcepcion(e);
 //    }
 //}
 private void InitializeObjectView()
 {
     this.RecordatorioObjectView = new ObjectView(typeof(Recordatorio));
     this.RecordatorioObjectView.AllowRemove = false;
     this.RecordatorioObjectView.Columns.Add("ID", "ID Recordatorio");
     this.RecordatorioObjectView.Columns.Add("Descripcion", "Descripcion");
     this.RecordatorioObjectView.Columns.Add("FechaRecordatorio", "Fecha Recordatorio");
     this.RecordatorioObjectView.Columns.Add("TipoVinculadoString", "TipoVinculado");
     this.RecordatorioCurrencyManager = this.dgvList.BindingContext[this.RecordatorioObjectView];
 }
Exemplo n.º 48
0
 public override void OnCreate()
 {
     view = ObjectView.Create<WallView> (this, ">", Color.white);
 }
Exemplo n.º 49
0
        private void InitializeObjectView()
        {
            this.CiudadObjectView = new ObjectView(typeof(Ciudad));
            this.CiudadObjectView.AllowRemove = false;
            this.CiudadObjectView.Columns.Add("Descripcion", Translate("Descripcion"));
            this.CiudadObjectView.Columns.Add("IDProvinciaLookup.Descripcion", Translate("Provincia"));

            this.CiudadCurrencyManager = this.dgvList.BindingContext[this.CiudadObjectView];
        }
Exemplo n.º 50
0
 /// <summary>
 /// Da formato a la grilla y crea lo necesario para el bindeo
 /// </summary>
 private void InitializeObjectView()
 {
     this.UsuarioObjectView = new ObjectView(typeof(Usuario));
     this.UsuarioObjectView.AllowRemove = false;
     this.UsuarioObjectView.Columns.Add("ID", "ID");
     this.UsuarioObjectView.Columns.Add("Nombre", "Nombre");
     this.UsuarioObjectView.Columns.Add("Apellido", "Apellido");
     this.UsuarioObjectView.Columns.Add("Nick", "Nick");
     this.UsuarioCurrencyManager = this.dgvList.BindingContext[this.UsuarioObjectView];
 }