コード例 #1
0
 private void AddNodeWithFileInfo(RadTreeNode parentNode, List <NFileInfo> fileInfos, NBatchInfo batchInfo)
 {
     foreach (NFileInfo fileInfo in fileInfos)
     {
         batchInfo.LastNO++;
         fileInfo.FileNO = batchInfo.LastNO.ToString();
         RadTreeNode node = parentNode.Nodes.Add(fileInfo.DisplayName);
         node.TextAlignment = ContentAlignment.MiddleCenter;
         node.SetImageIcon(fileInfo.LocalPath, ThumbImgSize, ThumbImgSize);
         node.Tag = fileInfo;
         if (fileInfo.Operation == EOperType.eFROM_SERVER_NOTCHANGE)
         {
             node.ContextMenu = this.fileContextMenu;
         }
         else
         {
             node.ContextMenu = this.fileContextMenu;
         }
         node.ItemHeight       = UISetting.GetInstance().ThumbImgSize;
         node.Checked          = true;
         node.TextAlignment    = ContentAlignment.MiddleCenter;
         node.PropertyChanged += new PropertyChangedEventHandler(this.FileNode_PropertyChanged);
         Application.DoEvents();
     }
 }
コード例 #2
0
        private void SetupBatchNodeMenu()
        {
            RadMenuItem item = new RadMenuItem
            {
                Text = "属性"
            };

            item.Click += new EventHandler(this.FileNode_Property_Click);
            this.batchContextMenu.Items.Add(item);
            if (UISetting.GetInstance().AllowDelMenu)
            {
                RadMenuItem item6 = new RadMenuItem
                {
                    Text = "移除"
                };
                item6.Click += new EventHandler(this.menuBatchNode_DEL_Click);
                this.batchContextMenu.Items.Add(item6);
            }
            RadMenuItem item2 = new RadMenuItem
            {
                Text = "从本地添加文件到批次中"
            };

            item2.Click += new EventHandler(this.BatchNode_AddLocalF_Click);
            this.batchContextMenu.Items.Add(item2);
            RadMenuItem item3 = new RadMenuItem
            {
                Text = "从扫描设备补扫并添加到批次中"
            };

            item3.Click += new EventHandler(this.menuBatchNode_AddScanF_Click);
            this.batchContextMenu.Items.Add(item3);
            RadMenuItem item4 = new RadMenuItem
            {
                Text = "新建分类"
            };

            item4.Click += new EventHandler(this.BatchAddCategory_Click);
            this.batchContextMenu.Items.Add(item4);
            RadMenuItem item5 = new RadMenuItem
            {
                Text = "导出到pdf"
            };

            item5.Click += new EventHandler(this.BatchExportPdf_Click);
            this.batchContextMenu.Items.Add(item5);
        }
コード例 #3
0
        public void InitializeChild()
        {
            bool   designMode = base.DesignMode;
            string str;

            if (designMode)
            {
                str = SystemHelper.GetDesignDirectory();
            }
            else
            {
                str = SystemHelper.GetAssemblesDirectory();
            }
            GroupItems groupItems = GroupItems.UnSerializeFromXML(str + "toolitems.xml");
            bool       flag       = groupItems == null;

            if (!flag)
            {
                List <GroupItem> topBarItems = groupItems.TopBarItems;
                bool             flag2       = topBarItems == null;
                if (!flag2)
                {
                    List <ToolItem> toolItems = topBarItems[0].ToolItems;
                    this._bubbleBar1      = new BubbleBar();
                    this._bubbleBar1.Name = "bubbleBar1";
                    ((ISupportInitialize)this._bubbleBar1).BeginInit();
                    this._bubbleBar1.ForeColor            = Color.Green;
                    this._bubbleBar1.BackColor            = Color.Transparent;
                    this._bubbleBar1.Element.AutoSizeMode = RadAutoSizeMode.FitToAvailableSize;
                    this._bubbleBar1.Dock = DockStyle.Fill;
                    foreach (ToolItem current in toolItems)
                    {
                        bool flag3 = !current.visable;
                        if (!flag3)
                        {
                            RadButtonElement radButtonElement = new RadButtonElement();
                            radButtonElement.CanFocus = true;
                            string text  = SystemHelper.ResourceDir + current.image;
                            bool   flag4 = File.Exists(text);
                            if (flag4)
                            {
                                radButtonElement.Image = DocScanner.ImgUtils.ImageHelper.LoadSizedImage(text, UISetting.GetInstance().ButtonSize, UISetting.GetInstance().ButtonSize, "");
                            }
                            radButtonElement.Name           = current.name;
                            radButtonElement.Padding        = new Padding(2, 2, 2, 8);
                            radButtonElement.ScaleTransform = new SizeF(0.65f, 0.65f);
                            radButtonElement.ShowBorder     = false;
                            radButtonElement.ToolTipText    = current.tip;
                            radButtonElement.Text           = (UISetting.GetInstance().ShowButtonText ? current.text : "");
                            radButtonElement.TextAlignment  = ContentAlignment.BottomCenter;
                            radButtonElement.Tag            = current.action;
                            radButtonElement.MouseDown     += new MouseEventHandler(this.radButtonElement_MouseDown);
                            ((FillPrimitive)radButtonElement.GetChildAt(0)).Visibility = ElementVisibility.Hidden;
                            this._bubbleBar1.Items.Add(radButtonElement);
                        }
                    }
                    string barBackImage = UISetting.GetInstance().BarBackImage;
                    bool   flag5        = File.Exists(barBackImage);
                    if (flag5)
                    {
                        this._bubbleBar1.BackgroundImage = DocScanner.ImgUtils.ImageHelper.LoadLocalImage(barBackImage, true);
                    }
                    else
                    {
                        this._bubbleBar1.Element.FillWithColor(UISetting.GetInstance().BarBackColor);
                    }
                    ((ISupportInitialize)this._bubbleBar1).EndInit();
                    base.Controls.Add(this._bubbleBar1);
                }
            }
        }
コード例 #4
0
        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();
        }