private UCSummary()
 {
     this.InitializeComponent();
     this.propertyGrid1.Visible = SummaryPropertiesSetting.GetInstance().ProperGridVisialbe;
     this.propertyGrid1.Enabled = FunctionSetting.GetInstance().AllowRightPanePropertyGrid;
     this.btnReflash.Click     += new EventHandler(this.Button1_Click);
 }
 public static void Del_Old(string batchno)
 {
     if (FunctionSetting.GetInstance().AllowLogUploaded)
     {
         UploadedBatchLogger localUploaded = UploadedBatchLogger.GetLocalUploaded();
         foreach (UploadedBatchInfo info in localUploaded.BatchNos)
         {
             if (info.BatchNo == batchno)
             {
                 localUploaded.BatchNos.RemoveAll(o => o.BatchNo == batchno);
                 string fname = SystemHelper.GetAssemblesDirectory() + _localuploadebatchsfname;
                 SerializeHelper.SerializeToXML <UploadedBatchLogger>(localUploaded, fname);
                 break;
             }
         }
     }
 }
        /*
         * private void UpdateAllNodeMenu(RadTreeNode node)
         * {
         *  this.SetBatchNodeDefaultProperty(node);
         *  List<RadTreeNode> children = node.GetChildren();
         *  foreach (RadTreeNode node2 in children)
         *  {
         *      this.SetupNodeDefaultProperty(node2);
         *  }
         * }
         */
        /*
         * public void UpdateThumbNail(object param = null)
         * {
         *  RadTreeNode selectedNode = navigateTree.SelectedNode;
         *  if (((selectedNode != null) && (selectedNode.Tag != null)) && (selectedNode.Tag is NFileInfo))
         *  {
         *      NFileInfo tag = selectedNode.Tag as NFileInfo;
         *      selectedNode.SetImageIcon(tag.LocalPath, this._viewfileinfoicon);
         *  }
         * }*/

        public void UploadBatch(object param = null)
        {
            NBatchInfoGroup group = navigateTree.ToBatch();

            if ((group == null) || (group.Batchs.Count == 0))
            {
                LibCommon.AppContext.GetInstance().MS.LogWarning("没有可提交的数据");
            }
            else
            {
                FormUploadBatchs batchs = new FormUploadBatchs
                {
                    Group = group
                };
                if ((batchs.ShowDialog() == DialogResult.OK) && !FunctionSetting.GetInstance().KeepSuccessedUploadNodeInTree)
                // if ((batchs.ShowDialog() == DialogResult.OK) && !FunctionSetting.KeepSuccessedUploadNodeInTree)
                {
                    List <string> uploadSuccessedbatchs = batchs.UploadSuccessedbatchs;
                    //for (int i = navigateTree.Nodes.Count - 1; i >= 0; i--)
                    //{
                    //    if (uploadSuccessedbatchs.Contains((navigateTree.Nodes[i].Tag as NBatchInfo).BatchNO))
                    //    {
                    //        navigateTree.Nodes.Remove(navigateTree.Nodes[i]);
                    //    }
                    //}
                    foreach (RadTreeNode batchNode in navigateTree.GetRadTree().Nodes)
                    {
                        if (uploadSuccessedbatchs.Contains((batchNode.Tag as NBatchInfo).BatchNO))
                        {
                            navigateTree.GetRadTree().Nodes.Remove(batchNode);
                        }
                    }
                }
                if (navigateTree.GetRadTree().Nodes.Count > 0)
                {
                    navigateTree.GetRadTree().Nodes[0].Selected = true;
                    navigateTree.NavigateFirstItem(null);
                }
                else
                {
                    //this.OnItemSelectChanged(this, new TEventArg<RadTreeNode>(null));
                }
                navigateTree.GetRadTree().Focus();
            }
        }
 public static void Add_New(UploadedBatchInfo newBatchNos)
 {
     if (FunctionSetting.GetInstance().AllowLogUploaded)
     {
         UploadedBatchLogger localUploaded = UploadedBatchLogger.GetLocalUploaded();
         bool flag2 = localUploaded.BatchNos.Find((UploadedBatchInfo o) => o.BatchNo == newBatchNos.BatchNo) == null;
         if (flag2)
         {
             localUploaded.BatchNos.Insert(0, newBatchNos);
         }
         string fname = SystemHelper.GetAssemblesDirectory() + UploadedBatchLogger._localuploadebatchsfname;
         try
         {
             SerializeHelper.SerializeToXML <UploadedBatchLogger>(localUploaded, fname);
         }
         catch
         {
         }
     }
 }
        private void ShowAppParams(object param = null)
        {
            FormContainer formContainer = new FormContainer();
            TabControl    tabControl    = new TabControl();
            TabPage       tabPage       = new TabPage();

            tabPage.Text = "快速设置";
            UCSetupWizard uCSetupWizard = new UCSetupWizard();

            uCSetupWizard.Dock = DockStyle.Fill;
            tabPage.Controls.Add(uCSetupWizard);
            tabControl.TabPages.Add(tabPage);
            TabPage tabPage2 = new TabPage();

            tabControl.TabPages.Add(tabPage2);
            UCMultiObjPropertyInfo uCMultiObjPropertyInfo = new UCMultiObjPropertyInfo();

            uCMultiObjPropertyInfo.AddObjs(UISetting.GetInstance().Name, UISetting.GetInstance());
            //uCMultiObjPropertyInfo.AddObjs(this._ucbench.GetSetting().Name, this._ucbench.GetSetting());
            //uCMultiObjPropertyInfo.AddObjs(UISetting.GetInstance().Name, UISetting.GetInstance());
            //uCMultiObjPropertyInfo.AddObjs(this._ucnavigatorbar.GetSetting().Name, this._ucnavigatorbar.GetSetting());
            if (this._uccenterview.Realview != null && this._uccenterview.Realview is UCPictureView)
            {
                UCPictureView.NestSetting setting = (this._uccenterview.Realview as UCPictureView).GetSetting();
                uCMultiObjPropertyInfo.AddObjs(setting.Name, setting);
            }
            uCMultiObjPropertyInfo.AddObjs(this._ucitemtoolbar.GetSetting().Name, this._ucitemtoolbar.GetSetting());
            uCMultiObjPropertyInfo.AddObjs(SummaryPropertiesSetting.GetInstance().Name, SummaryPropertiesSetting.GetInstance());
            uCMultiObjPropertyInfo.AddObjs(this._ucstatusbar.GetSetting().Name, this._ucstatusbar.GetSetting());
            tabPage2.Controls.Add(uCMultiObjPropertyInfo);
            tabPage2.Text = "界面参数设置";
            uCMultiObjPropertyInfo.Dock = DockStyle.Fill;
            TabPage tabPage3 = new TabPage();

            tabControl.TabPages.Add(tabPage3);
            UCMultiObjPropertyInfo uCMultiObjPropertyInfo2 = new UCMultiObjPropertyInfo();

            uCMultiObjPropertyInfo2.AddObjs(UpdateSetting.GetInstance().Name, UpdateSetting.GetInstance());
            uCMultiObjPropertyInfo2.AddObjs(EmailSetting.GetInstance().Name, EmailSetting.GetInstance());
            uCMultiObjPropertyInfo2.AddObjs(AccountSetting.GetInstance().Name, AccountSetting.GetInstance());
            uCMultiObjPropertyInfo2.AddObjs(AppSetting.GetInstance().Name, AppSetting.GetInstance());
            uCMultiObjPropertyInfo2.AddObjs(DebugSetting.GetInstance().Name, DebugSetting.GetInstance());
            //uCMultiObjPropertyInfo2.AddObjs(AbstractSetting<NetSetting>.CurSetting.Name, AbstractSetting<NetSetting>.CurSetting);
            uCMultiObjPropertyInfo2.AddObjs(NetSetting.GetInstance().Name, NetSetting.GetInstance());
            bool showAdvanceSetting = AppSetting.GetInstance().ShowAdvanceSetting;

            uCMultiObjPropertyInfo2.AddObjs(FunctionSetting.GetInstance().Name, FunctionSetting.GetInstance());
            if (showAdvanceSetting)
            {
                uCMultiObjPropertyInfo2.AddObjs(AbstractSetting <ServerIniConfig> .CurSetting.Name, AbstractSetting <ServerIniConfig> .CurSetting);
                uCMultiObjPropertyInfo2.AddObjs(FormAboutMe.Setting.Name, FormAboutMe.Setting);
            }
            tabPage3.Controls.Add(uCMultiObjPropertyInfo2);
            tabPage3.Text = "系统参数参数设置";
            uCMultiObjPropertyInfo2.Dock = DockStyle.Fill;
            bool showAdvanceSetting2 = AppSetting.GetInstance().ShowAdvanceSetting;

            if (showAdvanceSetting2)
            {
                TabPage tabPage4 = new TabPage();
                tabControl.TabPages.Add(tabPage4);
                UCMenuBarDesign uCMenuBarDesign = new UCMenuBarDesign();
                uCMenuBarDesign.Dock = DockStyle.Fill;
                tabPage4.Controls.Add(uCMenuBarDesign);
                tabPage4.Text = "菜单配置";
            }
            tabControl.Dock = DockStyle.Fill;
            formContainer.SetControl(tabControl);
            formContainer.Size = new Size(760, 540);
            formContainer.Text = "系统设置";
            formContainer.SetKeyEscCloseForm(true);
            formContainer.ShowDialog();
        }