private void reportTree_GloalValueChanged(object sender, IGlobalValue globalValue)
 {
     if (GlobalValueChanged != null)
     {
         GlobalValueChanged(sender, globalValue);
     }
 }
 private void SendInterfaceToGlobalValue(IGlobalValue iGlobalValue)
 {
     if (GlobalValueChanged != null)
     {
         GlobalValueChanged(this, iGlobalValue);
     }
 }
Example #3
0
 /// <summary>
 /// 更新全局变量的值。
 /// </summary>
 /// <param name="iGlobalValue">全局变量。</param>
 public void UpateGlobalValue(IGlobalValue iGlobalValue)
 {
     foreach (IGlobalValueToolStripItem iGlobalValueToolStripItem in globalValueToolStripItems)
     {
         if (iGlobalValueToolStripItem.GlobalValueType == iGlobalValue.GlobalValueType)
         {
             iGlobalValueToolStripItem.SetGlobalValue(iGlobalValue);
         }
     }
 }
Example #4
0
 void QuickReportEditor_GloalValueChanged(object sender, IGlobalValue globalValue)
 {
     //更新全局变量按钮中的内容。
     globalValueToolStripItemProvider.UpateGlobalValue(globalValue);
     //如果更新的是报表的种类,则更新查询报表的控件。
     if (globalValue.GlobalValueType == GlobalValueType.Report)
     {
         UpdateReportSearcherComboBox(globalValue.Value);
     }
 }
        public void SetGlobalValue(IGlobalValue globalValue)
        {
            DropDownItems.Clear();
            List <BaseObject> baseObjects = globalValue.Value;
            SortedList        sl          = new SortedList();

            foreach (BaseObject baseObject in baseObjects)
            {
                sl.Add(baseObject, null);
            }
            foreach (DictionaryEntry de in sl)
            {
                ToolStripMenuItem toolStripMenuItem = GetToolStripMenuItem(de.Key as BaseObject, globalValue.SQLCodeType);
                DropDownItems.Add(toolStripMenuItem);
            }
        }
Example #6
0
 void ReportSettingPlatForm_GloalValueChanged(object sender, IGlobalValue globalValue)
 {
     if (GlobalValueChanged != null)
     {
         GlobalValueChanged(sender, globalValue);
     }
     #region  能由ReportTabControl来做全局变量调控工作,是因为对于单一报表,ReportSettingPlatForm最高等级的设计界面。
     foreach (IGlobalValueAsker iGlobalValueAsker in iGlobalValueAskerList)
     {
         if (iGlobalValueAsker.GlobalValueTypes.Contains(globalValue.GlobalValueType))
         {
             iGlobalValueAsker.SetGlobalValue(globalValue);
         }
     }
     #endregion
 }
Example #7
0
 void reportSettingPlatForm_GloalValueChanged(object sender, IGlobalValue globalValue)
 {
     if (GlobalValueChanged != null)
     {
         GlobalValueChanged(sender, globalValue);
     }
     #region 将设置平台中控件提供的各种全局变量备份起来,以便报表页在激活时,重新将它所包含的全局变量上传至框架。
     if (globalValueBackUp.Contains(sender))
     {
         globalValueBackUp[sender] = globalValue;
     }
     else
     {
         globalValueBackUp.Add(sender, globalValue);
     }
     #endregion
 }
 public void SetGlobalValue(IGlobalValue globalValue)
 {
     if (globalValue.GlobalValueType == GlobalValueType.Column)
     {
         if (canEditColumn)
         {
             columnList = new List <Column>();
             foreach (BaseObject baseObject in globalValue.Value)
             {
                 columnList.Add(baseObject as Column);
             }
             int rowIndex = ReportColumnRowIndex;
             sheetMain.Rows[rowIndex].Tag = columnList;
             DrawReportColumnList();
         }
     }
 }
Example #9
0
 public void SetGlobalValue(IGlobalValue globalValue)
 {
     throw new Exception("The method or operation is not implemented.");
 }
Example #10
0
        /// <summary>
        /// 获得填充后的ToolStripSplitButton。
        /// </summary>
        /// <param name="iGlobalValue">全局变量。</param>
        /// <returns>填充后的ToolStripSplitButton。</returns>
        private IGlobalValueToolStripItem GetIGlobalValueToolStripItem(IGlobalValue iGlobalValue)
        {
            IGlobalValueToolStripItem toolStripItem = null;

            switch (iGlobalValue.GlobalValueType)
            {
            case GlobalValueType.Column:
            {
                toolStripItem = new ToolStripSplitButtonForGlobalValue();
                (toolStripItem as ToolStripSplitButtonForGlobalValue).Image = global::QuickReportLib.Properties.Resources.Column;
                break;
            }

            case GlobalValueType.Condition:
            {
                toolStripItem = new ToolStripSplitButtonForGlobalValue();
                (toolStripItem as ToolStripSplitButtonForGlobalValue).Image = global::QuickReportLib.Properties.Resources.Condition;
                break;
            }

            case GlobalValueType.Date:
            {
                toolStripItem = new ToolStripSplitButtonForGlobalValue();
                (toolStripItem as ToolStripSplitButtonForGlobalValue).Image = global::QuickReportLib.Properties.Resources.Date;
                break;
            }

            case GlobalValueType.DateTime:
            {
                toolStripItem = new ToolStripSplitButtonForGlobalValue();
                (toolStripItem as ToolStripSplitButtonForGlobalValue).Image = global::QuickReportLib.Properties.Resources.DateTime;
                break;
            }

            case GlobalValueType.Department:
            {
                toolStripItem = new ToolStripSplitButtonForGlobalValue();
                (toolStripItem as ToolStripSplitButtonForGlobalValue).Image = global::QuickReportLib.Properties.Resources.Department;
                break;
            }

            case GlobalValueType.Donamic:
            {
                toolStripItem = new ToolStripSplitButtonForGlobalValue();
                (toolStripItem as ToolStripSplitButtonForGlobalValue).Image = global::QuickReportLib.Properties.Resources.Donamic;
                break;
            }

            case GlobalValueType.Person:
            {
                toolStripItem = new ToolStripSplitButtonForGlobalValue();
                (toolStripItem as ToolStripSplitButtonForGlobalValue).Image = global::QuickReportLib.Properties.Resources.Person;
                break;
            }

            case GlobalValueType.Tree:
            {
                toolStripItem = new ToolStripSplitButtonForGlobalValue();
                (toolStripItem as ToolStripSplitButtonForGlobalValue).Image = global::QuickReportLib.Properties.Resources.Tree;
                break;
            }
            }
            if (toolStripItem == null)
            {
                return(null);
            }
            toolStripItem.GlobalValueType = iGlobalValue.GlobalValueType;
            toolStripItem.SetGlobalValue(iGlobalValue);
            toolStripItem.SelectedGlobalValue       += new SelectedGlobalValueHandle(toolStripItem_SelectedGlobalValue);
            (toolStripItem as ToolStripItem).Visible = false;
            return(toolStripItem);
        }