Пример #1
0
        public UICheckList()
        {
            //
            // The InitializeComponent() call is required for Windows Forms designer support.
            //
            InitializeComponent();


            System.DateTime dt = System.DateTime.Now;
            dateTimePicker1.Value = dt.AddDays(-7);

            List <PersonInfo> datasource_person = PersonDao.getAllPersonInfo();
            PersonInfo        person            = new PersonInfo();

            person.Fullname = "全部责任人";
            person.Id       = 0;
            datasource_person.Insert(0, person);
            this.comboBox2.DataSource    = datasource_person;
            this.comboBox2.DisplayMember = "Fullname";
            this.comboBox2.ValueMember   = "Id";


            List <ModuleInfo> datasource_module = ModuleDao.getAllModuleInfo();
            ModuleInfo        all = new ModuleInfo();

            all.Fullname = "全部模块";
            all.Id       = 0;
            datasource_module.Insert(0, all);
            this.comboBox1.DataSource         = datasource_module;
            this.comboBox1.DisplayMember      = "Fullname";
            this.comboBox1.ValueMember        = "Id";
            this.comboBox1.AutoCompleteSource = AutoCompleteSource.ListItems;
            this.comboBox1.AutoCompleteMode   = AutoCompleteMode.SuggestAppend;

            this.comboBox3.Items.Add("全部状态");
            this.comboBox3.Items.AddRange(Enum.GetNames(typeof(CommonConst.CheckState)));
            this.comboBox3.SelectedIndex = 0;

            this.comboBox3.SelectedIndexChanged += new EventHandler(conditionChanged);
            this.comboBox1.SelectedIndexChanged += new EventHandler(conditionChanged);
            this.comboBox2.SelectedIndexChanged += new EventHandler(conditionChanged);


            this.listView1.DoubleClick        += new EventHandler(ListVew_DoubleClick);
            this.dateTimePicker1.ValueChanged += new EventHandler(conditionChanged);
            this.dateTimePicker2.ValueChanged += new EventHandler(conditionChanged);

            this.currentpage = 1;
            this.label3.Text = string.Format(currentstr, this.currentpage);
            this.label5.Text = string.Format(pagestr, this.pagesize);
            this.label4.Text = string.Format(countstr, (count % pagesize == 0)?count / pagesize:count / pagesize + 1, this.count);

            getUIcheckList();

            //
            // TODO: Add constructor code after the InitializeComponent() call.
            //
        }
Пример #2
0
/**************************版本信息开始*******************************************************************/
        private void getAllModuleInfo()
        {
            datasource_person = PersonDao.getAllPersonInfo();
            PersonInfo person = new PersonInfo();

            person.Fullname = "选择责任人";
            person.Id       = 0;
            datasource_person.Insert(0, person);

            comboBox1.DataSource    = datasource_person;
            comboBox1.DisplayMember = "Fullname";
            comboBox1.ValueMember   = "Id";
            this.textBox1.Text      = null;
            this.textBox2.Text      = null;
            modulelist  = ModuleDao.getAllModuleInfo();
            modulelist2 = ModuleDao.getAllModuleInfo();
            this.listView1.Items.Clear();
            foreach (ModuleInfo module in modulelist)
            {
                ListViewBingForModule(module);
            }
        }
Пример #3
0
        public PackageUI()
        {
            //
            // The InitializeComponent() call is required for Windows Forms designer support.
            //
            InitializeComponent();
            this.listView1.DoubleClick += new EventHandler(Button4Click);
            TreeNode tmp = new TreeNode("全部");

            tmp.Nodes.Add(CommonConst.PACKSTATE_YiJieShou);         //已接收
            tmp.Nodes.Add(CommonConst.PACKSTATE_YiChuLi);           //已处理
            tmp.Nodes.Add(CommonConst.PACKSTATE_YiCeShi);           //已测试
            tmp.Nodes.Add(CommonConst.PACKSTATE_YiFaBu);            //已发布
            tmp.Nodes.Add(CommonConst.PACKSTATE_YiFeiZhi);          //已废止
            treeView1.Nodes.Add(tmp);

            treeView1.SelectedNode = treeView1.Nodes[0].Nodes[0];
            //让选中项背景色呈现蓝色
            treeView1.SelectedNode.BackColor = Color.SteelBlue;
            //前景色为白色
            treeView1.SelectedNode.ForeColor = Color.White;
            treeView1.ExpandAll();
            treeView1.NodeMouseClick += new TreeNodeMouseClickEventHandler(treeView1_NodeMouseClick);
            treeView1.Leave          += new EventHandler(treeView1_Leave);
            treeView1.BeforeSelect   += new TreeViewCancelEventHandler(treeView1_BeforeSelect);


            List <PersonInfo> datasource_person = PersonDao.getAllPersonInfo();
            PersonInfo        person            = new PersonInfo();

            person.Fullname = "全部责任人";
            person.Id       = 0;
            datasource_person.Insert(0, person);
            this.comboBox2.DataSource            = datasource_person;
            this.comboBox2.DisplayMember         = "Fullname";
            this.comboBox2.ValueMember           = "Id";
            this.comboBox2.SelectedIndexChanged += new EventHandler(conditionChanged);

            List <ModuleInfo> datasource_module = ModuleDao.getAllModuleInfo();
            ModuleInfo        all = new ModuleInfo();

            all.Fullname = "全部模块";
            all.Id       = 0;
            datasource_module.Insert(0, all);
            this.comboBox1.DataSource         = datasource_module;
            this.comboBox1.DisplayMember      = "Fullname";
            this.comboBox1.ValueMember        = "Id";
            this.comboBox1.AutoCompleteSource = AutoCompleteSource.ListItems;
            this.comboBox1.AutoCompleteMode   = AutoCompleteMode.SuggestAppend;

            this.comboBox1.SelectedIndexChanged += new EventHandler(conditionChanged);

            System.DateTime dt = System.DateTime.Now;
            dateTimePicker1.Value              = dt.AddDays(-7);
            this.dateTimePicker1.ValueChanged += new EventHandler(conditionChanged);
            this.dateTimePicker2.ValueChanged += new EventHandler(conditionChanged);


            this.currentpage = 1;
            this.label3.Text = string.Format(currentstr, this.currentpage);
            this.label5.Text = string.Format(pagestr, this.pagesize);
            this.label4.Text = string.Format(countstr, (count % pagesize == 0)?count / pagesize:count / pagesize + 1, this.count);
            getAllPackInList();

            //
            // TODO: Add constructor code after the InitializeComponent() call.
            //
        }
Пример #4
0
        public BussinessForm(PackageInfo packageinfo)
        {
            //
            // The InitializeComponent() call is required for Windows Forms designer support.
            //
            //传入更新包
            this.frompath    = packageinfo.Packagepath;
            this.packageinfo = packageinfo;
            this.Closing    += new CancelEventHandler(Form_Closing);


            InitializeComponent();
            this.textBox1.Text = frompath;

            String[] temp = frompath.Split('\\');
            filename = temp[temp.Length - 1];
            /*加载模块选择框*/
            datasource_module = ModuleDao.getAllModuleInfo();
            ModuleInfo all = new ModuleInfo();

            all.Fullname = "选择模块";
            all.Id       = 0;
            datasource_module.Insert(0, all);
            this.comboBox1.DataSource            = datasource_module;
            this.comboBox1.DisplayMember         = "Fullname";
            this.comboBox1.ValueMember           = "Id";
            this.comboBox1.AutoCompleteSource    = AutoCompleteSource.ListItems;
            this.comboBox1.AutoCompleteMode      = AutoCompleteMode.SuggestAppend;
            this.comboBox1.SelectedIndexChanged += new EventHandler(comboBox1_SelectedIndexChanged);

            /*加载责任人选择框*/
            datasource_person = PersonDao.getAllPersonInfo();
            PersonInfo person = new PersonInfo();

            person.Fullname = "选择责任人";
            person.Id       = 0;
            datasource_person.Insert(0, person);
            this.comboBox2.DataSource         = datasource_person;
            this.comboBox2.DisplayMember      = "Fullname";
            this.comboBox2.ValueMember        = "Id";
            this.comboBox2.AutoCompleteSource = AutoCompleteSource.ListItems;
            this.comboBox2.AutoCompleteMode   = AutoCompleteMode.SuggestAppend;
            //测试复杂度
            this.comboBox3.DataSource    = FunctionUtils.Convert(CommonConst.TestRate);
            this.comboBox3.DisplayMember = "col0";
            this.comboBox3.ValueMember   = "col1";

            /*绑定模块*/
            int index_module = 0;

            if (packageinfo.Moduleid != 0)         //更新包已有模块ID
            {
                for (index_module = 0; index_module < datasource_module.Count; index_module++)
                {
                    if (packageinfo.Moduleid == datasource_module[index_module].Id)
                    {
                        this.comboBox1.SelectedItem = this.comboBox1.Items[index_module];
                        isChange = false;
                        break;
                    }
                }
            }
            else            //没有模块ID自动绑定
            {
                string[] fi = filename.Split('(');
                if (fi.Length >= 2)
                {
                    string            name    = fi[0];
                    string[]          fi1     = fi[1].Split(')');
                    string            code    = fi1[0];
                    string            version = fi1[1];
                    List <ModuleInfo> list    = ModuleDao.getAllModuleInfoLikename(name, code);
                    if (list.Count != 0)
                    {
                        ModuleInfo right_module = null;
                        if (list.Count >= 2)
                        {
                            //找到多个模块(可能是使用分组前缀及其他模块),查找出 使用分组前缀的模块
                            for (int i = 0; i < list.Count; i++)
                            {
                                if (list[i].Fullname.Contains("_" + name))                             //是否使用分组前缀
                                {
                                    right_module = list[i];
                                    break;
                                }
                            }
                        }
                        else
                        {
                            right_module = list[0];
                        }
                        for (index_module = 0; index_module < datasource_module.Count; index_module++)
                        {
                            if (right_module.Id == datasource_module[index_module].Id)
                            {
                                this.comboBox1.SelectedItem = this.comboBox1.Items[index_module];
                                //this.packageinfo.Managerid = list[0].Managerid;
                                break;
                            }
                        }
                        //SavePackage();//自动绑定成功。。

                        if (string.IsNullOrEmpty(right_module.Lastversion))
                        {
                        }
                        isChange = true;
                    }
                    else
                    {
                        MessageBox.Show("没能找到与更新包相关的模块,请手动确认");
                    }
                }
                else
                {
                    MessageBox.Show("没能找到与更新包相关的模块,请手动确认");
                }
            }

            /*绑定责任人*/
            int index_manager = 0;

            if (packageinfo.Managerid != 0)
            {
                for (index_manager = 0; index_manager < datasource_module.Count; index_manager++)
                {
                    if (packageinfo.Managerid == datasource_person[index_manager].Id)
                    {
                        this.comboBox2.SelectedItem = this.comboBox2.Items[index_manager];
                        break;
                    }
                }
            }

            if (packageinfo.TestRate != 0)
            {
                int rate_index;
                int rate_lenth = CommonConst.TestRate.GetLength(0);
                for (rate_index = 0; rate_index < rate_lenth; rate_index++)
                {
                    string sel_rate = CommonConst.TestRate[rate_index, 1];
                    if (packageinfo.TestRate == Int32.Parse(sel_rate))
                    {
                        this.comboBox3.SelectedIndex = rate_index;
                        break;
                    }
                }
            }


            getAllProjectPath();

            //
            // TODO: Add constructor code after the InitializeComponent() call.
            //
        }
Пример #5
0
        public PublishUI()
        {
            //
            // The InitializeComponent() call is required for Windows Forms designer support.
            //
            InitializeComponent();

            List <PersonInfo> datasource_person = PersonDao.getAllPersonInfo();
            PersonInfo        person            = new PersonInfo();

            person.Fullname = "全部责任人";
            person.Id       = 0;
            datasource_person.Insert(0, person);
            this.comboBox2.DataSource    = datasource_person;
            this.comboBox2.DisplayMember = "Fullname";
            this.comboBox2.ValueMember   = "Id";


            List <ModuleInfo> datasource_module = ModuleDao.getAllModuleInfo();
            ModuleInfo        all = new ModuleInfo();

            all.Fullname = "全部模块";
            all.Id       = 0;
            datasource_module.Insert(0, all);
            this.comboBox1.DataSource         = datasource_module;
            this.comboBox1.DisplayMember      = "Fullname";
            this.comboBox1.ValueMember        = "Id";
            this.comboBox1.AutoCompleteSource = AutoCompleteSource.ListItems;
            this.comboBox1.AutoCompleteMode   = AutoCompleteMode.SuggestAppend;

            //----------------------------------
            TreeNode root1 = new TreeNode();

            root1.Text = "未发布";
            TreeNode root = new TreeNode();

            root.Text = ftphost;
            string[] list = this.ListDirectory("/");
            if (list != null)
            {
                foreach (var element in list)
                {
                    TreeNode temp = new TreeNode(element);
                    temp.Nodes.Add(new TreeNode());
                    root.Nodes.Add(temp);
                }
            }
            this.treeView1.Nodes.Add(root1);
            this.treeView1.Nodes.Add("今日发布");
            this.treeView1.Nodes.Add(root);
            this.treeView1.Nodes[1].Expand();
            this.treeView1.AfterExpand    += new TreeViewEventHandler(treeView1_AfterExpand);
            this.treeView1.NodeMouseClick += new TreeNodeMouseClickEventHandler(treeView1_NodeMouseClick);
            this.treeView1.Leave          += new EventHandler(treeView1_Leave);
            this.treeView1.BeforeSelect   += new TreeViewCancelEventHandler(treeView1_BeforeSelect);
            treeView1.SelectedNode         = treeView1.Nodes[0];
            //让选中项背景色呈现蓝色
            treeView1.SelectedNode.BackColor = Color.SteelBlue;
            //前景色为白色
            treeView1.SelectedNode.ForeColor = Color.White;

            this.exListView1.MySortBrush      = SystemBrushes.ControlLight;
            this.exListView1.MyHighlightBrush = Brushes.Goldenrod;
            this.exListView1.GridLines        = true;
            this.exListView1.ControlPadding   = 4;

            ImageList colimglst = new ImageList();

            colimglst.ImageSize             = new Size(1, 25); // this will affect the row height
            this.exListView1.SmallImageList = colimglst;

            this.exListView1.Columns.Add(new EXColumnHeader("更新包名称", 200));
            this.exListView1.Columns.Add(new EXEditableColumnHeader("上传路径", 180));
            this.exListView1.Columns.Add(new EXColumnHeader("进度", 120));
            this.exListView1.Columns.Add(new EXColumnHeader("状态", 150));
            this.exListView1.Columns.Add(new EXColumnHeader("操作", 45));

            this.currentpage = 1;
            this.label3.Text = string.Format(currentstr, this.currentpage);
            this.label5.Text = string.Format(pagestr, this.pagesize);
            this.label4.Text = string.Format(countstr, (count % pagesize == 0)?count / pagesize:count / pagesize + 1, this.count);

            System.DateTime dt = System.DateTime.Now;
            dateTimePicker1.Value = dt.AddDays(-7);


            getPublishPackageList();
            //
            // TODO: Add constructor code after the InitializeComponent() call.
            //
        }
Пример #6
0
        public TestListUI()
        {
            //
            // The InitializeComponent() call is required for Windows Forms designer support.
            //
            InitializeComponent();

            TreeNode tmp = new TreeNode("全部");

            foreach (var element in Enum.GetNames(typeof(CommonConst.TestState)))
            {
                tmp.Nodes.Add(element);
            }
            treeView1.Nodes.Add(tmp);
            treeView1.ExpandAll();
            treeView1.SelectedNode = treeView1.Nodes[0].Nodes[0];
            //让选中项背景色呈现蓝色
            treeView1.SelectedNode.BackColor = Color.SteelBlue;
            //前景色为白色
            treeView1.SelectedNode.ForeColor = Color.White;
            System.DateTime dt = System.DateTime.Now;
            dateTimePicker1.Value = dt.AddDays(-7);

            List <PersonInfo> datasource_person = PersonDao.getAllPersonInfo();
            PersonInfo        person            = new PersonInfo();

            person.Fullname = "全部责任人";
            person.Id       = 0;
            datasource_person.Insert(0, person);
            this.comboBox2.DataSource    = datasource_person;
            this.comboBox2.DisplayMember = "Fullname";
            this.comboBox2.ValueMember   = "Id";


            List <ModuleInfo> datasource_module = ModuleDao.getAllModuleInfo();
            ModuleInfo        all = new ModuleInfo();

            all.Fullname = "全部模块";
            all.Id       = 0;
            datasource_module.Insert(0, all);
            this.comboBox1.DataSource         = datasource_module;
            this.comboBox1.DisplayMember      = "Fullname";
            this.comboBox1.ValueMember        = "Id";
            this.comboBox1.AutoCompleteSource = AutoCompleteSource.ListItems;
            this.comboBox1.AutoCompleteMode   = AutoCompleteMode.SuggestAppend;

            this.comboBox3.Items.Add("全部等级");
            this.comboBox3.Items.AddRange(CommonConst.BUGLEVEL);
            this.comboBox3.SelectedIndex = 0;

            this.comboBox3.SelectedIndexChanged += new EventHandler(conditionChanged);
            this.comboBox1.SelectedIndexChanged += new EventHandler(conditionChanged);
            this.comboBox2.SelectedIndexChanged += new EventHandler(conditionChanged);

            treeView1.NodeMouseClick += new TreeNodeMouseClickEventHandler(treeView1_NodeMouseClick);
            treeView1.Leave          += new EventHandler(treeView1_Leave);
            treeView1.BeforeSelect   += new TreeViewCancelEventHandler(treeView1_BeforeSelect);

            this.listView1.DoubleClick        += new EventHandler(ListVew_DoubleClick);
            this.dateTimePicker1.ValueChanged += new EventHandler(conditionChanged);
            this.dateTimePicker2.ValueChanged += new EventHandler(conditionChanged);

            this.currentpage = 1;
            this.label3.Text = string.Format(currentstr, this.currentpage);
            this.label5.Text = string.Format(pagestr, this.pagesize);
            this.label4.Text = string.Format(countstr, (count % pagesize == 0)?count / pagesize:count / pagesize + 1, this.count);

            getTestUnitList();
            //
            // TODO: Add constructor code after the InitializeComponent() call.
            //
        }