コード例 #1
0
        private void Flows_List_MouseUp(object sender, MouseEventArgs e)
        {
            if (e.Button == MouseButtons.Right)
            {
                var item = Flows_List.IndexFromPoint(e.Location);

                if (item >= 0 && Flows_List.SelectedIndices.Contains(item) == false)
                {
                    Flows_List.ClearSelected();
                    Flows_List.SelectedIndex = item;
                }
            }
        }
コード例 #2
0
        private void Flows_List_DragDrop(object sender, DragEventArgs e)
        {
            Point point = Flows_List.PointToClient(new Point(e.X, e.Y));
            int   index = this.Flows_List.IndexFromPoint(point);

            if (index < 0)
            {
                index = this.Flows_List.Items.Count - 1;
            }
            object data = Flows_List.SelectedItem;

            this.Flows_List.Items.Remove(data);
            this.Flows_List.Items.Insert(index, data);
        }
コード例 #3
0
        private void addFromAnotherCafeToolStripMenuItem_Click(object sender, EventArgs e)
        {
            using (OpenFileDialog openFileDialog = new OpenFileDialog())
            {
                openFileDialog.Filter = "Qc File|*.qc";

                if (openFileDialog.ShowDialog() == DialogResult.OK)
                {
                    using (ZipArchive zip = ZipFile.Open(openFileDialog.FileName, ZipArchiveMode.Read))
                    {
                        foreach (ZipArchiveEntry entry in zip.Entries)
                        {
                            if (entry.Name == "FLOW_NAMES")
                            {
                                VALUES_FROM_CAFE.FLOW_NAMES = (List <string>)XamlServices.Load(entry.Open());
                            }

                            if (VALUES_FROM_CAFE.FLOW_NAMES.Any())
                            {
                                foreach (var flow in VALUES_FROM_CAFE.FLOW_NAMES)
                                {
                                    if (!Flows_List.Items.Contains(flow))
                                    {
                                        Flows_List.Items.Add(flow);
                                        int count = Flows_List.Items.Count;
                                        Flow_Count_ListBox.Items.Add(count + ".");
                                        dataGridView.Rows.Add(flow);
                                    }
                                }

                                Flows_List.ClearSelected();
                                Flow_Empty_Label.Visible = false;
                            }
                            else
                            {
                                Flow_Empty_Label.Visible = true;
                            }
                        }
                    }
                }
            }
        }
コード例 #4
0
        private void JOB_CONTROL_Control_VisibleChanged(object sender, EventArgs e)
        {
            if (VALUES_FROM_CAFE.Cafe != "")
            {
                if (!Cafe_comboBox.Items.Contains(VALUES_FROM_CAFE.Cafe))
                {
                    Cafe_comboBox.Items.Add(VALUES_FROM_CAFE.Cafe);
                    Cafe_comboBox.Items.Add("Add Cafe");
                }
                Cafe_comboBox.SelectedIndex = 0;
            }

            if (VALUES_FROM_CAFE.TitleCode != "")
            {
                label5.Text = "Title Code: " + VALUES_FROM_CAFE.TitleCode;
            }

            if (VALUES_FROM_CAFE.JobNumber != "")
            {
                label4.Text = VALUES_FROM_CAFE.JobNumber;
            }

            checkBox4.Checked = VALUES_FROM_CAFE.Quad_Seeds;

            checkBox2.Checked = VALUES_FROM_CAFE.Validation;

            checkbox1.Checked = VALUES_FROM_CAFE.Ncoa18;

            if (VALUES_FROM_CAFE.Ncoa18_Path != "")
            {
                label10.Text = VALUES_FROM_CAFE.Ncoa18_Path;
            }

            checkBox6.Checked = VALUES_FROM_CAFE.Ncoa48;

            checkBox7.Checked = VALUES_FROM_CAFE.Dsf;

            if (VALUES_FROM_CAFE.Dsf_Path != "")
            {
                label12.Text = VALUES_FROM_CAFE.Dsf_Path;
            }

            checkBox5.Checked = VALUES_FROM_CAFE.Merge_Purge;

            if (VALUES_FROM_CAFE.IMB != "")
            {
                label3.Text = VALUES_FROM_CAFE.IMB;
            }

            if (VALUES_FROM_CAFE.PresortType != "")
            {
                label2.Text = "Presort Type: " + VALUES_FROM_CAFE.PresortType + " - " + VALUES_FROM_CAFE.MailClass;
            }

            if (VALUES_FROM_CAFE.Pick_Up)
            {
                checkBox3.Visible = true;
                checkBox3.Checked = VALUES_FROM_CAFE.Pick_Up;
            }
            if (VALUES_FROM_CAFE.OutputTypeLaser != "")
            {
                Output_Type_Digital.Visible = true;
                Output_Type_Digital.Text    = VALUES_FROM_CAFE.OutputTypeLaser;
            }
            if (VALUES_FROM_CAFE.OutputTypeInkjet != "")
            {
                Output_Type_Inkjet.Visible = true;
                Output_Type_Inkjet.Text    = VALUES_FROM_CAFE.OutputTypeInkjet;
            }
            if (VALUES_FROM_CAFE.PrintLocationLaser != "")
            {
                Print_Location_Digital.Visible = true;
                Print_Location_Digital.Text    = "Print Location: " + VALUES_FROM_CAFE.PrintLocationLaser;
            }
            if (VALUES_FROM_CAFE.PrintLocationInkjet != "")
            {
                Print_Location_Inkjet.Visible = true;
                Print_Location_Inkjet.Text    = "Print Location: " + VALUES_FROM_CAFE.PrintLocationInkjet;
            }

            richTextBox1.Text = VALUES_FROM_CAFE.richText.Text;

            if (VALUES_FROM_CAFE.MEDIA_ID_LIST.Any())
            {
                foreach (var media in VALUES_FROM_CAFE.MEDIA_ID_LIST)
                {
                    if (!Media_Id_List.Items.Contains(media))
                    {
                        Media_Id_List.Items.Add(media);
                        int count = Media_Id_List.Items.Count;
                        Media_Count_ListBox.Items.Add(count + ".");
                    }
                }

                Media_Id_List.ClearSelected();
                Media_Id_Empty_label.Visible = false;
            }
            else
            {
                Media_Id_Empty_label.Visible = true;
            }

            if (VALUES_FROM_CAFE.FLOW_NAMES.Any())
            {
                foreach (var flow in VALUES_FROM_CAFE.FLOW_NAMES)
                {
                    if (!Flows_List.Items.Contains(flow))
                    {
                        Flows_List.Items.Add(flow);
                        int count = Flows_List.Items.Count;
                        Flow_Count_ListBox.Items.Add(count + ".");
                    }
                }

                Flows_List.ClearSelected();
                Flow_Empty_Label.Visible = false;
            }
            else
            {
                Flow_Empty_Label.Visible = true;
            }
        }
コード例 #5
0
 private void JOB_CONTROL_Control_Click(object sender, EventArgs e)
 {
     Media_Id_List.ClearSelected();
     Flows_List.ClearSelected();
 }