EnsureDirectEvent() private method

private EnsureDirectEvent ( ) : void
return void
コード例 #1
0
        protected virtual void SetHideHeaders(bool hide)
        {
            RequestManager.EnsureDirectEvent();

            this.AddScript("{0}.headerCt.setVisible({1});", this.ClientID, JSON.Serialize(!hide));
            this.DoComponentLayout();
        }
コード例 #2
0
ファイル: GridPanelBase.cs プロジェクト: RabbWhite/ExtNet
        public virtual void RefreshView()
        {
            RequestManager.EnsureDirectEvent();

            string template = "{0}.getView().refresh(true);";

            this.AddScript(template, this.ClientID);
        }
コード例 #3
0
        public void SetValue(float?eqValue)
        {
            RequestManager.EnsureDirectEvent();

            string value = "{eq:".ConcatWith(eqValue.HasValue ? JSON.Serialize(eqValue.Value) : "undefined", "}");

            this.AddScript("{0}.getFilter({1}).setValue({2});", this.Plugin.ClientID, JSON.Serialize(this.DataIndex), value);
        }
コード例 #4
0
 public void AddTask(Task task)
 {
     RequestManager.EnsureDirectEvent();
     task.Owner = this;
     task.Listeners.Update.Owner    = this;
     task.DirectEvents.Update.Owner = this;
     this.Call("addTask", new JRawValue(new ClientConfig().Serialize(task)));
 }
コード例 #5
0
        public void SetValue(bool?value)
        {
            RequestManager.EnsureDirectEvent();

            if (this.Plugin != null)
            {
                this.Plugin.AddScript("{0}.getFilter({1}).setValue({2});", this.Plugin.ClientID, JSON.Serialize(this.DataIndex), JSON.Serialize(value));
            }
        }
コード例 #6
0
ファイル: TriggerFieldBase.cs プロジェクト: RabbWhite/ExtNet
        public virtual void ConcealTrigger(int index)
        {
            RequestManager.EnsureDirectEvent();
            this.Triggers[index].HideTrigger = true;

            string template = "{0}.triggers[{1}].hide();";

            this.AddScript(template, this.ClientID, index);
        }
コード例 #7
0
ファイル: TriggerFieldBase.cs プロジェクト: RabbWhite/ExtNet
        public virtual void ShowTrigger(int index)
        {
            RequestManager.EnsureDirectEvent();
            this.Triggers[index].HideTrigger = false;

            string template = "{0}.triggers[{1}].show();";

            this.AddScript(template, this.ClientID, index);
        }
コード例 #8
0
        public void SetValue(string value)
        {
            RequestManager.EnsureDirectEvent();

            if (this.ParentGrid != null)
            {
                this.ParentGrid.AddScript("{0}.getFilterPlugin().getFilter({1}).setValue({2});", this.ParentGrid.ClientID, JSON.Serialize(this.DataIndex), JSON.Serialize(value));
            }
        }
コード例 #9
0
ファイル: ListFilter.cs プロジェクト: RabbWhite/ExtNet
        public void UpdateOptions(string[] options)
        {
            RequestManager.EnsureDirectEvent();

            if (this.ParentGrid != null)
            {
                this.ParentGrid.AddScript("{0}.getFilterPlugin().getFilter({1}).updateOptions({2});", this.ParentGrid.ClientID, JSON.Serialize(this.DataIndex), JSON.Serialize(options));
            }
        }
コード例 #10
0
ファイル: GridFilters.cs プロジェクト: RabbWhite/ExtNet
        public void ClearFilters()
        {
            RequestManager.EnsureDirectEvent();
            GridPanel grid = this.ParentComponent as GridPanel;

            if (grid != null)
            {
                grid.AddScript("{0}.getFilterPlugin().clearFilters();", grid.ClientID);
            }
        }
コード例 #11
0
ファイル: DateFilter.cs プロジェクト: RabbWhite/ExtNet
        public void SetValue(DateTime?onValue)
        {
            RequestManager.EnsureDirectEvent();

            if (this.ParentGrid != null)
            {
                string value = "{on:".ConcatWith(onValue.HasValue ? DateTimeUtils.DateNetToJs(onValue.Value) : "undefined", "}");

                this.ParentGrid.AddScript("{0}.getFilterPlugin().getFilter({1}).setValue({2});", this.ParentGrid.ClientID, JSON.Serialize(this.DataIndex), value);
            }
        }
コード例 #12
0
        public void SetValue(DateTime?onValue)
        {
            RequestManager.EnsureDirectEvent();

            if (this.Plugin != null)
            {
                string value = "{on:".ConcatWith(onValue.HasValue ? JSON.Serialize(onValue.Value, JSON.ScriptConverters) : "undefined", "}");

                this.Plugin.AddScript("{0}.getFilter({1}).setValue({2});", this.Plugin.ClientID, JSON.Serialize(this.DataIndex), value);
            }
        }
コード例 #13
0
ファイル: NumericFilter.cs プロジェクト: RabbWhite/ExtNet
        public void SetValue(float?greaterThanValue, float?lessThanValue)
        {
            RequestManager.EnsureDirectEvent();

            if (this.ParentGrid != null)
            {
                string value = "{gt:".ConcatWith(greaterThanValue.HasValue ? JSON.Serialize(greaterThanValue.Value) : "undefined",
                                                 ",lt:", lessThanValue.HasValue ? JSON.Serialize(lessThanValue.Value) : "undefined", "}");

                this.ParentGrid.AddScript("{0}.getFilterPlugin().getFilter({1}).setValue({2});", this.ParentGrid.ClientID, JSON.Serialize(this.DataIndex), value);
            }
        }
コード例 #14
0
 /// <summary>
 /// Adds a filter to the collection and observes it for state change.
 /// </summary>
 /// <param name="filter">A filter configuration</param>
 public virtual void AddFilter(GridFilter filter)
 {
     RequestManager.EnsureDirectEvent();
     this.Call("addFilter", new ClientConfig().Serialize(filter));
 }
コード例 #15
0
 public virtual void ClearFilters()
 {
     RequestManager.EnsureDirectEvent();
     this.Call("clearFilters");
 }
コード例 #16
0
 /// <summary>
 ///
 /// </summary>
 public virtual void RemoveAll()
 {
     RequestManager.EnsureDirectEvent();
     this.Call("removeAll");
 }
コード例 #17
0
 /// <summary>
 /// Apply sort
 /// </summary>
 public virtual void ApplySort()
 {
     RequestManager.EnsureDirectEvent();
     this.Call("applySort");
 }
コード例 #18
0
 /// <summary>
 /// Apply grouping
 /// </summary>
 /// <param name="alwaysFireChange">fire datachanged event</param>
 public virtual void ApplyGrouping(bool alwaysFireChange)
 {
     RequestManager.EnsureDirectEvent();
     this.Call("applyGrouping", alwaysFireChange);
 }
コード例 #19
0
 /// <summary>
 /// Groups the data by the specified field.
 /// </summary>
 /// <param name="field">The field name by which to sort the store's data</param>
 public virtual void GroupBy(string field)
 {
     RequestManager.EnsureDirectEvent();
     this.Call("groupBy", field);
 }
コード例 #20
0
        public virtual void RemoveByText(string text)
        {
            RequestManager.EnsureDirectEvent();

            this.Call("removeByText", text);
        }
コード例 #21
0
 /// <summary>
 /// Remove record by id
 /// </summary>
 /// <param name="index">index</param>
 public virtual void RemoveRecord(int index)
 {
     RequestManager.EnsureDirectEvent();
     this.Call("remove", new JRawValue("{0}.getAt({1})".FormatWith(this.ClientID, index)));
 }
コード例 #22
0
 /// <summary>
 /// Remove record by id
 /// </summary>
 /// <param name="id">id</param>
 public virtual void RemoveRecord(object id)
 {
     RequestManager.EnsureDirectEvent();
     this.Call("remove", new JRawValue("{0}.getById({1})".FormatWith(this.ClientID, JSON.Serialize(id))));
 }
コード例 #23
0
ファイル: ObjectHolder.cs プロジェクト: RabbWhite/ExtNet
        public void UpdateData()
        {
            RequestManager.EnsureDirectEvent();

            this.AddScript("{0}={1};", this.ClientID, JSON.Serialize(this.Items));
        }
コード例 #24
0
        public virtual void RemoveByIndex(int index)
        {
            RequestManager.EnsureDirectEvent();

            this.Call("removeByIndex", index);
        }
コード例 #25
0
        public void AddKeyBinding(KeyBinding keyBinding)
        {
            RequestManager.EnsureDirectEvent();

            this.Call("addBinding", keyBinding);
        }
コード例 #26
0
 /// <summary>
 /// Clears any existing grouping and refreshes the data using the default sort.
 /// </summary>
 public virtual void ClearGrouping()
 {
     RequestManager.EnsureDirectEvent();
     this.Call("clearGrouping");
 }
コード例 #27
0
ファイル: GridPanel.cs プロジェクト: RabbWhite/ExtNet
 public void RegisterColumnPlugins()
 {
     RequestManager.EnsureDirectEvent();
     this.Call("initColumnPlugins", new JRawValue(this.GetColumnPlugins()), true);
 }
コード例 #28
0
        public virtual void RemoveByValue(string value)
        {
            RequestManager.EnsureDirectEvent();

            this.Call("removeByValue", value);
        }
コード例 #29
0
 public virtual void UpdateRecordField(object id, string dataIndex, object value)
 {
     RequestManager.EnsureDirectEvent();
     this.AddScript("{0}.getById({1}).set({2},{3});", this.ClientID, JSON.Serialize(id), JSON.Serialize(dataIndex), JSON.Serialize(value));
 }
コード例 #30
0
 public virtual void UpdateRecordId(object id, object newId, bool silent)
 {
     RequestManager.EnsureDirectEvent();
     this.Call("updateRecordId", id, newId, silent);
 }