| | |
| | | //初始化皮肤颜色 |
| | | private void InitSkin() |
| | | { |
| | | ButtonFactory.CreatePrimary(this.button10); |
| | | ButtonFactory.CreatePrimary(this.button30); |
| | | ButtonFactory.CreateDefault(this.button12); |
| | | ButtonFactory.CreateDefault(this.button9); |
| | | //this.textBox |
| | | } |
| | | private void InitData() |
| | |
| | | SQLiteDataBaseUtil.getInstance().AddConfig(cf); |
| | | } |
| | | } |
| | | |
| | | }); |
| | | //初始化模板编辑 |
| | | setDocTemplateState(false); |
| | | |
| | | //初始化采集设置 |
| | | CollectSettings timeSettings= CollectSettingUtil.GetCollectTime(); |
| | | //采集时间设置 |
| | | if (timeSettings.Open) { |
| | | this.ucSwitch1.Checked = true; |
| | | }else |
| | | this.ucSwitch1.Checked = false; |
| | | this.numericUpDown1.Value = timeSettings.TimeSpan; |
| | | this.dateTimePicker1.Value = DateTime.Parse(timeSettings.StartTime); |
| | | this.dateTimePicker2.Value = DateTime.Parse(timeSettings.EndTime); |
| | | |
| | | |
| | | UpDownBase up = (UpDownBase)this.numericUpDown1; |
| | | up.TextChanged += new EventHandler(this.numbericUpAndDown_TextChanged); |
| | | |
| | | } |
| | | |
| | | //设置收藏时间 |
| | | private void setCollectTimeSetting() { |
| | | |
| | | CollectSettings settings = new CollectSettings(); |
| | | settings.TimeSpan =Convert.ToInt32( this.numericUpDown1.Value); |
| | | settings.TimeValid = this.checkBox3.Checked; |
| | | settings.Open = this.ucSwitch1.Checked; |
| | | settings.StartTime =TimeUtil.GetGeneralTime(this.dateTimePicker1.Value ,"HH:mm"); |
| | | settings.EndTime = TimeUtil.GetGeneralTime(this.dateTimePicker2.Value, "HH:mm"); |
| | | |
| | | CollectSettingUtil.setCollectTime(settings); |
| | | } |
| | | |
| | | //验证登录 |
| | |
| | | this.dataGridView1.Columns[2].Width = 70; |
| | | this.dataGridView1.Columns[3].Width = 70; |
| | | this.dataGridView1.Columns[4].Width = 75; |
| | | this.dataGridView1.Columns[5].Width = 70; |
| | | this.dataGridView1.Columns[6].Width = 55; |
| | | this.dataGridView1.Columns[7].Width = 65; |
| | | this.dataGridView1.Columns[8].Width = 75; |
| | | this.dataGridView1.Columns[9].Width = 75; |
| | | this.dataGridView1.Columns[5].Width = 75; |
| | | this.dataGridView1.Columns[6].Width = 100; |
| | | this.dataGridView1.Columns[7].Width = 100; |
| | | this.dataGridView1.Columns[8].Width = 65; |
| | | this.dataGridView1.Columns[9].Width = 40; |
| | | System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle1 = new System.Windows.Forms.DataGridViewCellStyle(); |
| | | dataGridViewCellStyle1.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft; |
| | | dataGridViewCellStyle1.BackColor = System.Drawing.SystemColors.Menu; |
| | |
| | | dataGridViewCellStyle1.SelectionForeColor = System.Drawing.SystemColors.HighlightText; |
| | | dataGridViewCellStyle1.WrapMode = System.Windows.Forms.DataGridViewTriState.True; |
| | | this.dataGridView1.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle1; |
| | | |
| | | } |
| | | |
| | | |
| | |
| | | { |
| | | if (!IsLogin()) |
| | | return; |
| | | button5_Click_2(sender,e); |
| | | // InputDialog input = new InputDialog("应用筛选命名", "应用筛选是自动生成文案云发单必要设置", new OnSuccess((String result)=> { |
| | | |
| | | InputDialog input = new InputDialog("应用筛选命名", "应用筛选是自动生成文案云发单必要设置", new OnSuccess((String result)=> { |
| | | |
| | | //TODO 插入引单组合 |
| | | FormUtil.ShowDialog(new YingDanSelect()); |
| | | //TODO 插入引单组合 |
| | | // FormUtil.ShowDialog(new YingDanSelect()); |
| | | |
| | | |
| | | })); |
| | | // })); |
| | | |
| | | FormUtil.ShowDialog(input); |
| | | // FormUtil.ShowDialog(input); |
| | | } |
| | | |
| | | |
| | |
| | | private void dataGridView1_CellClick(object sender, DataGridViewCellEventArgs e) |
| | | { |
| | | int index= e.RowIndex; |
| | | if (index > -1&& this.infoList!=null) |
| | | if (index == -1)//头部排序 |
| | | { |
| | | if (this.infoList.Count > index) |
| | | { |
| | | clearSort(e.ColumnIndex); |
| | | DataGridViewColumn sortColumn = this.dataGridView1.Columns[e.ColumnIndex]; |
| | | |
| | | if (sortColumn.SortMode == DataGridViewColumnSortMode.Programmatic) |
| | | { |
| | | if (sortColumn.HeaderCell.SortGlyphDirection == SortOrder.Descending) |
| | | { |
| | | sortColumn.HeaderCell.SortGlyphDirection = SortOrder.None; |
| | | } |
| | | else if (sortColumn.HeaderCell.SortGlyphDirection == SortOrder.Ascending) |
| | | { |
| | | sortColumn.HeaderCell.SortGlyphDirection = SortOrder.Descending; |
| | | } |
| | | else if (sortColumn.HeaderCell.SortGlyphDirection == SortOrder.None) |
| | | { |
| | | sortColumn.HeaderCell.SortGlyphDirection = SortOrder.Ascending; |
| | | } |
| | | //排序 |
| | | |
| | | //TODO 排序 |
| | | / |
| | | |
| | | } |
| | | } |
| | | } |
| | | |
| | | //清空排序 |
| | | private void clearSort(int index) { |
| | | for(int i=0;i<this.dataGridView1.Columns.Count;i++){ |
| | | DataGridViewColumn sortColumn = this.dataGridView1.Columns[i]; |
| | | if (sortColumn.SortMode == DataGridViewColumnSortMode.Programmatic) { |
| | | if(i!=index) |
| | | sortColumn.HeaderCell.SortGlyphDirection = SortOrder.None; |
| | | } |
| | | } |
| | | } |
| | | |
| | | //全选 |
| | | private void checkBox20_CheckedChanged(object sender, EventArgs e) |
| | | { |
| | |
| | | private void logTimer_Tick(object sender, EventArgs e) |
| | | { |
| | | ShowLog(); |
| | | //判断是否有淘宝账号失效 |
| | | if (TBAccountManager.IsHaveOffLine()) |
| | | { |
| | | this.label38.Visible = true; |
| | | } |
| | | else { |
| | | this.label38.Visible = false; |
| | | } |
| | | } |
| | | |
| | | private void Main_FormClosed(object sender, FormClosedEventArgs e) |
| | |
| | | |
| | | private void dataGridView1_CellDoubleClick(object sender, DataGridViewCellEventArgs e) |
| | | { |
| | | MessageBox.Show("双击"); |
| | | if(e.RowIndex>-1) |
| | | MessageBox.Show("双击"); |
| | | } |
| | | |
| | | /** |
| | |
| | | this.button9.Enabled = false; |
| | | this.button16.Enabled = true; |
| | | this.syncFaDanKu_checkBox.Enabled = true; |
| | | this.label5.Enabled = true; |
| | | |
| | | this.textBox13.Text = ""; |
| | | String txt = DocUtil.BuildDoc(); |
| | | this.textBox13.Text = txt; |
| | |
| | | this.button9.Enabled = true; |
| | | this.button16.Enabled = false; |
| | | this.syncFaDanKu_checkBox.Enabled = false; |
| | | this.label5.Enabled = false; |
| | | //载入模板 |
| | | initTemplateParams(false); |
| | | } |
| | | } |
| | | |
| | | //清空文案 |
| | | private void label5_Click(object sender, EventArgs e) |
| | | { |
| | | DocUtil.Clear(); |
| | | initTemplateParams(false); |
| | | } |
| | | //采集是否开启 |
| | | private bool parseOpen = true; |
| | | //采集开关 |
| | | private void ucSwitch1_CheckedChanged(object sender, EventArgs e) |
| | | { |
| | | if (this.ucSwitch1.Checked) |
| | | { |
| | | Constant.parseSDLJOPen = true; |
| | | } |
| | | else { |
| | | Constant.parseSDLJOPen = false; |
| | | } |
| | | |
| | | setCollectTimeSetting(); |
| | | } |
| | | |
| | | private void numbericUpAndDown_TextChanged(object sender, EventArgs e) |
| | | { |
| | | setCollectTimeSetting(); |
| | | } |
| | | |
| | | private void dateTimePicker1_ValueChanged(object sender, EventArgs e) |
| | | { |
| | | setCollectTimeSetting(); |
| | | } |
| | | |
| | | private void checkBox3_CheckedChanged(object sender, EventArgs e) |
| | | { |
| | | setCollectTimeSetting(); |
| | | } |
| | | |
| | | private void dateTimePicker2_ValueChanged(object sender, EventArgs e) |
| | | { |
| | | setCollectTimeSetting(); |
| | | } |
| | | |
| | | //清空排序 |
| | | private void button14_Click(object sender, EventArgs e) |
| | | { |
| | | clearSort(-1); |
| | | } |
| | | |
| | | /** |
| | | * |