Exemplo n.º 1
0
 public virtual void Reload(ParameterCollection parameters)
 {
     this.Reload(new
     {
         @params = JRawValue.From(parameters.ToJson())
     });
 }
Exemplo n.º 2
0
 public void HideTab(string id)
 {
     if (id.Contains("."))
     {
         this.Call("closeTab", JRawValue.From(id), "hide");
     }
     else
     {
         this.Call("closeTab", id, "hide");
     }
 }
Exemplo n.º 3
0
        public virtual void Reconfigure(string storeId)
        {
            StringBuilder sb    = new StringBuilder("[");
            var           comma = false;

            foreach (var column in this.ColumnModel.Columns)
            {
                if (comma)
                {
                    sb.Append(",");
                }
                sb.Append(column.ToConfig(Ext.Net.LazyMode.Config));
                comma = true;
            }
            sb.Append("]");

            this.Call("reconfigure", JRawValue.From(storeId.IsEmpty() ? "undefined" : storeId), JRawValue.From(sb.ToString()));
        }
Exemplo n.º 4
0
        public virtual void Reconfigure(AbstractStore store, IEnumerable <ColumnBase> columns)
        {
            StringBuilder sb    = new StringBuilder("[");
            var           comma = false;

            foreach (var column in columns)
            {
                if (comma)
                {
                    sb.Append(",");
                }
                sb.Append(column.ToConfig(Ext.Net.LazyMode.Config));
                comma = true;
            }
            sb.Append("]");

            this.Call("reconfigure", JRawValue.From(store == null ? "undefined" : store.ToConfig(Ext.Net.LazyMode.Instance)), JRawValue.From(sb.ToString()));
        }
Exemplo n.º 5
0
        /// <summary>
        ///
        /// </summary>
        /// <param name="module"></param>
        public virtual void AddModule(DesktopModule module)
        {
            this.Call("addModule", JRawValue.From(module.RenderToString()));

            if (module.Launcher != null)
            {
                var script = DefaultScriptBuilder.Create(module.Launcher).Build(RenderMode.AddTo, "{0}.getModule(\"{1}\")".FormatWith(this.ClientID, module.ModuleID), null, true, false, "addLauncher", true);

                this.AddScript(script);
            }

            if (module.Window.Count > 0)
            {
                var script = DefaultScriptBuilder.Create(module.Window.Primary).Build(RenderMode.AddTo, "{0}.getModule(\"{1}\")".FormatWith(this.ClientID, module.ModuleID), null, true, false, "addWindow", true);

                this.AddScript(script);
            }
        }
Exemplo n.º 6
0
        public virtual void Add(IEnumerable <Sprite> sprites)
        {
            StringBuilder sb = new StringBuilder();

            sb.Append("[");
            foreach (var sprite in sprites)
            {
                sprite.Draw = this;
                sb.Append(new ClientConfig().Serialize(sprite, true, true));
                sb.Append(",");
            }

            if (sb[sb.Length - 1] == ',')
            {
                sb.Remove(sb.Length - 1, 1);
            }

            sb.Append("]");

            this.CallSurface("add", JRawValue.From(sb.ToString()));
        }
Exemplo n.º 7
0
 public virtual void SetStyle(Sprite sprite, Dictionary <string, string> styles)
 {
     sprite.Draw = this;
     this.CallSurface("setStyle", JRawValue.From(sprite.Proxy), styles);
 }
Exemplo n.º 8
0
 public virtual void Remove(Sprite sprite)
 {
     sprite.Draw = this;
     this.CallSurface("remove", JRawValue.From(sprite.Proxy));
 }
Exemplo n.º 9
0
 public virtual void RemoveCls(Sprite sprite, string[] className)
 {
     sprite.Draw = this;
     this.CallSurface("removeCls", JRawValue.From(sprite.Proxy), className);
 }
Exemplo n.º 10
0
 public void ShowTab(string id, int index)
 {
     this.Call("addTab", id.Contains(".") ? JRawValue.From(id) : JRawValue.From("Ext.getCmp('" + id + "')"), index, false);
 }
Exemplo n.º 11
0
 public virtual void AddGradient(Gradient gradient)
 {
     this.CallSurface("addGradient", JRawValue.From(new ClientConfig().Serialize(gradient)));
 }
Exemplo n.º 12
0
 /// <summary>
 ///
 /// </summary>
 /// <param name="windowId"></param>
 public virtual void RestoreWindow(string windowId)
 {
     this.Call("restoreWindow", JRawValue.From(windowId));
 }
Exemplo n.º 13
0
 public void ShowTab(AbstractContainer tab, int index)
 {
     this.Call("addTab", JRawValue.From(tab.ClientID), index, false);
 }
Exemplo n.º 14
0
 public void CloseTab(string id, CloseAction action)
 {
     this.Call("closeTab", JRawValue.From(id), action.ToString().ToLowerInvariant());
 }
Exemplo n.º 15
0
 public virtual void SetAttributes(SpriteAttributes attrs)
 {
     this.CallTemplate("setAttributes", JRawValue.From(attrs.Serialize()));
 }
Exemplo n.º 16
0
 /// <summary>
 /// Shows the built-in event edit form for the passed in event record. This method automatically hides the calendar views and navigation toolbar. To return to the calendar, call hideEditForm.
 /// </summary>
 /// <param name="record">The event record to edit</param>
 public void ShowEditForm(ModelProxy record)
 {
     this.Call("showEditForm", JRawValue.From(record.ModelInstance));
 }
Exemplo n.º 17
0
 /// <summary>
 /// Changes the data store bound to this view and refreshes it.
 /// </summary>
 /// <param name="storeId">The store id to bind to this view</param>
 public virtual void BindStore(string storeId)
 {
     this.Call("bindStore", JRawValue.From(storeId));
 }
Exemplo n.º 18
0
 /// <summary>
 /// Start editing the specified record, using the specified Column definition to define which field is being edited.
 /// </summary>
 /// <param name="record">The Store data record which backs the row to be edited.</param>
 /// <param name="columnIndex">The Column object index defining the column to be edited.</param>
 public virtual void StartEdit(ModelProxy record, int columnIndex)
 {
     this.Call("startEdit", JRawValue.From(record.ModelInstance), columnIndex);
 }
Exemplo n.º 19
0
 /// <summary>
 /// Start editing the specified record, using the specified Column definition to define which field is being edited.
 /// </summary>
 /// <param name="record">The Store data record which backs the row to be edited.</param>
 /// <param name="dataIndex">The Column object dataIndex defining the column to be edited.</param>
 public virtual void StartEdit(ModelProxy record, string dataIndex)
 {
     this.Call("startEdit",
               JRawValue.From(record.ModelInstance),
               new JRawValue("{0}.grid.headerCt.down('gridcolumn[dataIndex={1}]')".FormatWith(this.ClientID, dataIndex)));
 }
Exemplo n.º 20
0
 public void ShowTab(AbstractContainer tab, bool activate)
 {
     this.Call("addTab", JRawValue.From(tab.ClientID), activate);
 }
Exemplo n.º 21
0
 public virtual void SetText(Sprite sprite, string text)
 {
     sprite.Draw = this;
     this.CallSurface("setText", JRawValue.From(sprite.Proxy), text);
 }
Exemplo n.º 22
0
 /// <summary>
 /// Sets the click handler of this item
 /// </summary>
 /// <param name="handler">The handler function</param>
 protected virtual void SetHandler(string handler)
 {
     this.Call("setHandler", JRawValue.From(handler));
 }
Exemplo n.º 23
0
 /// <summary>
 ///
 /// </summary>
 /// <param name="windowId"></param>
 public virtual void MinimizeWindow(string windowId)
 {
     this.Call("minimizeWindow", JRawValue.From(windowId));
 }
Exemplo n.º 24
0
 public virtual void InsertColumn(int index, ColumnBase column)
 {
     this.ColumnModel.Columns.Add(column);
     this.Call("insertColumn", index, JRawValue.From(column.ToConfig(Ext.Net.LazyMode.Config)));
 }
Exemplo n.º 25
0
 /// <summary>
 ///
 /// </summary>
 /// <param name="window"></param>
 /// <param name="instanceOf"></param>
 public virtual void CreateWindow(AbstractWindow window, string instanceOf)
 {
     this.Call("createWindow", window.ToConfig(), JRawValue.From(instanceOf));
 }
Exemplo n.º 26
0
 public void ShowTab(string id, bool activate)
 {
     this.Call("addTab", id.Contains(".") ? JRawValue.From(id) : JRawValue.From("Ext.getCmp('" + id + "')"), activate);
 }
Exemplo n.º 27
0
 public virtual void AddColumn(ColumnBase column)
 {
     this.ColumnModel.Columns.Add(column);
     this.Call("addColumn", JRawValue.From(column.ToConfig(Ext.Net.LazyMode.Config)));
 }
Exemplo n.º 28
0
 public virtual void Add(Sprite sprite)
 {
     sprite.Draw = this;
     this.CallSurface("add", JRawValue.From(new ClientConfig().Serialize(sprite, true, true)));
 }
Exemplo n.º 29
0
 public virtual void UpdateSelectedItems()
 {
     this.Call("setSelectedItems", JRawValue.From(this.SelectedItems.Serialize()));
 }
Exemplo n.º 30
0
 public void CloseTab(AbstractContainer tab, CloseAction action)
 {
     this.Call("closeTab", JRawValue.From(tab.ClientID), action.ToString().ToLowerInvariant());
 }