示例#1
0
        public void AddElement(Setting_CustomBarCellData data)
        {
            CustomBarCell cell = new CustomBarCell(data, m_cellList.Count);

            cell.m_OnBtnClickEvent += OnBtnClick_Tab;
            m_cellList.Add(cell);
        }
 public void SetAnalysisType(int tabIndex, AnalysisType type)
 {
     if (tabIndex < m_CustomBarCellList.Count)
     {
         Setting_CustomBarCellData cell = m_CustomBarCellList[tabIndex];
         cell.AnalysisType = (int)type;
         IsDrty            = true;
     }
 }
 public void SetLanguageType(int tabIndex, LanguageType type)
 {
     if (tabIndex < m_CustomBarCellList.Count)
     {
         Setting_CustomBarCellData cell = m_CustomBarCellList[tabIndex];
         cell.LanguageType = (int)type;
         IsDrty            = true;
     }
 }
 public bool SetTableCellData(int tabIndex, Setting_CustomBarCellData cell)
 {
     if (tabIndex < m_CustomBarCellList.Count)
     {
         m_CustomBarCellList[tabIndex] = cell;
         IsDrty = true;
         return(true);
     }
     return(false);
 }
示例#5
0
        private void OnBtnClick_EditFinish(object sender, EventArgs e)
        {
            int tabIndex = UserSetting.Instance.curSelectTabIndex;

            if (tabIndex < m_cellList.Count)
            {
                Setting_CustomBarCellData newData = m_cellList[tabIndex].EditComplete();
                UserSetting.Instance.SetTableCellData(tabIndex, newData);
            }
            ShowEditButton(true);
        }
 public bool SavePath(int tabIndex, string path_Excel, string path_OutCode, string path_OutByte)
 {
     if (tabIndex < m_CustomBarCellList.Count)
     {
         Setting_CustomBarCellData cell = m_CustomBarCellList[tabIndex];
         cell.Path_Excel   = path_Excel;
         cell.Path_OutCode = path_OutCode;
         cell.Path_OutByte = path_OutByte;
         IsDrty            = true;
     }
     return(false);
 }
示例#7
0
        /// <summary>
        /// 当第N个方案被选中
        /// </summary>
        private void OnTabSelect(int index)
        {
            if (m_lastSelectTabIndex != index)
            {
                UpdateUserSettingPath();
                m_lastSelectTabIndex = index;
            }

            Setting_CustomBarCellData data = UserSetting.Instance.GetTabCellData(index);

            TextField_ExcelPaths.Text = data.Path_Excel;
            TextField_CodePaths.Text  = data.Path_OutCode;
            TextField_BytesPaths.Text = data.Path_OutByte;



            this.UI_DropList_Language.SelectedIndex = data.LanguageType;
            this.UI_DropList_Use.SelectedIndex      = data.UseType;
            this.UI_DropList_Analysis.SelectedIndex = data.AnalysisType;

            Console.WriteLine("OnTabSelect:" + index.ToString());
        }
示例#8
0
 private void Update_Info(int index)
 {
     if (index == 0)
     {
         this.m_cellInfo = CustomBar.FristCellInfo;
     }
     else
     {
         if (this.m_cellInfo == null)
         {
             this.m_cellInfo = new Setting_CustomBarCellData();
         }
         Setting_Point fristButtonPoint = CustomBar.FristCellInfo.Point_Button;
         Setting_Size  fristButtonSize  = CustomBar.FristCellInfo.Size_Button;
         this.m_cellInfo.Point_Button = new Setting_Point(fristButtonPoint.X + fristButtonSize.Width * index, fristButtonPoint.Y);
         this.m_cellInfo.Size_Button  = fristButtonSize;
         Setting_Point fristTextPoint = CustomBar.FristCellInfo.Point_TextBox;
         Setting_Size  fristTextSize  = CustomBar.FristCellInfo.Size_TextBox;
         this.m_cellInfo.Point_TextBox = new Setting_Point(this.m_cellInfo.Point_Button.X + 3, fristTextPoint.Y);
         this.m_cellInfo.Size_TextBox  = fristTextSize;
     }
 }
 public void AddCustomBarCell(Setting_CustomBarCellData cell)
 {
     m_CustomBarCellList.Add(cell);
     IsDrty = m_CustomBarCellList.Count > 1;
 }
示例#10
0
 public CustomBarCell(Setting_CustomBarCellData data, int index)
 {
     m_cellInfo = data;
     Update(index);
     this.UI_Button.Text = data.Name_Button;
 }