public static void DoTest(object param)
        {
            FormContainer formContainer = new FormContainer();

            formContainer.SetControl(typeof(UCBatchTemplateEdit));
            formContainer.TopMost = true;
        }
        private void menuNoteitem_Click(object sender, EventArgs e)
        {
            bool noPicture = this.NoPicture;

            if (!noPicture)
            {
                UCNote    uCNote       = new UCNote();
                Rectangle selectRegion = this._selection.ToNormalRectangle();
                selectRegion.X      = (int)((float)this._selection.X / this.Curratio);
                selectRegion.Y      = (int)((float)this._selection.Y / this.Curratio);
                selectRegion.Width  = (int)((float)this._selection.Width / this.Curratio);
                selectRegion.Height = (int)((float)this._selection.Height / this.Curratio);
                uCNote.SelectRegion = selectRegion;
                uCNote.ImgInfo      = this._curFileInfo;
                uCNote.CutImg       = this.pictureBox1.Image.ImgCut(this._selection.ToNormalRectangle());
                FormContainer formContainer = new FormContainer();
                formContainer.SetControl(uCNote);
                bool flag = formContainer.ShowDialog() == DialogResult.OK;
                if (flag)
                {
                }
                this._selected = false;
                this.pictureBox1.Refresh();
            }
        }
        public static void ShowSetting(object param = null)
        {
            FormContainer formContainer = new FormContainer();

            formContainer.SetControl(new UCMenuBarDesign());
            formContainer.ShowDialog();
        }
        public static void ShowSetting(SharpAcquirerFactory aptf)
        {
            FormContainer    formContainer = new FormContainer();
            UCAdapterSetting control       = new UCAdapterSetting(aptf);

            formContainer.SetControl(control);
            formContainer.TopLevel = true;
            formContainer.SetKeyEscCloseForm(true);
            formContainer.ShowDialog();
        }
Beispiel #5
0
        private void Menucategorymodiname_Click(object sender, EventArgs e)
        {
            UCCategory    ctrl      = new UCCategory();
            FormContainer container = new FormContainer();

            container.SetControl(ctrl);
            if (container.ShowDialog() == DialogResult.OK)
            {
                navigateTree.SelectedNode.Text = ctrl.CategoryName;
                (navigateTree.SelectedNode.Tag as NCategoryInfo).CategoryName = ctrl.CategoryName;
                if ((navigateTree.SelectedNode.GetBatchNode().Tag as NBatchInfo).Operation == EOperType.eFROM_SERVER_NOTCHANGE)
                {
                }
            }
        }
        private void menusignature_Click(object sender, EventArgs e)
        {
            bool noPicture = this.NoPicture;

            if (!noPicture)
            {
                Image clipBitmap = this.pictureBox1.Image.ImgCut(this._selection);
                UCSignatureInfoRecord uCSignatureInfoRecord = new UCSignatureInfoRecord();
                FormContainer         formContainer         = new FormContainer();
                uCSignatureInfoRecord.ClipBitmap = clipBitmap;
                formContainer.SetControl(uCSignatureInfoRecord);
                formContainer.ShowDialog();
                this._selected = false;
                this.pictureBox1.Refresh();
            }
        }
        private void menusignaturecheck_Click(object sender, EventArgs e)
        {
            bool noPicture = this.NoPicture;

            if (!noPicture)
            {
                Image toCheckBitmap = this.pictureBox1.Image.ImgCut(this._selection);
                UCSignatureInfoCheck uCSignatureInfoCheck = new UCSignatureInfoCheck();
                FormContainer        formContainer        = new FormContainer();
                uCSignatureInfoCheck.ToCheckBitmap = toCheckBitmap;
                formContainer.SetControl(uCSignatureInfoCheck);
                formContainer.ShowDialog();
                this._selected = false;
                this.pictureBox1.Refresh();
            }
        }
        public bool Acquire()
        {
            bool result;

            try
            {
                FormContainer formContainer = new FormContainer();
                UCPreviewer   uCPreviewer   = new UCPreviewer(this);
                uCPreviewer.Start();
                formContainer.SetControl(uCPreviewer);
                formContainer.SetKeyEscCloseForm(true);
                formContainer.Parent = this.Parent;
                bool flag = formContainer.ShowDialog() == DialogResult.OK;
                if (flag)
                {
                    List <string> images = uCPreviewer.GetImages();
                    bool          flag2  = this.OnAcquired != null;
                    if (flag2)
                    {
                        foreach (string current in images)
                        {
                            this.OnAcquired(this, new TEventArg <string>(current));
                        }
                    }
                    result = true;
                }
                else
                {
                    result = false;
                }
            }
            catch (Exception ex)
            {
                bool flag3 = this.OnError != null;
                if (flag3)
                {
                    this.OnError(this, new TEventArg <string>(ex.ToString()));
                }
                result = false;
            }
            return(result);
        }
Beispiel #9
0
        private void BatchAddCategory_Click(object sender, EventArgs e)
        {
            RadTreeNode   parentNode = sender as RadTreeNode;
            UCCategory    ctrl       = new UCCategory();
            FormContainer container  = new FormContainer();

            container.SetControl(ctrl);
            if ((container.ShowDialog() == DialogResult.OK) && !(navigateTree.SelectedNode.Tag is NFileInfo))
            {
                NCategoryInfo categoryInfo = new NCategoryInfo(ctrl.CategoryName);
                RadTreeNode   categoryNode = CreateCategoryNode(parentNode, categoryInfo);
                categoryNode.ContextMenu = this.categoryContextMenu;
                navigateTree.Refresh();
                navigateTree.SelectedNode.ExpandAll();
                Application.DoEvents();
                categoryNode.Selected = true;
                //categoryNode.ExpandAll();
                Application.DoEvents();
            }
        }
        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();
        }