protected void TabCreating(string tabTitle, XtraForm frm)
        {
            int Index = KiemTraTonTai(tabTitle);

            if (Index >= 0)
            {
                xtraTabControl1.SelectedTabPage      = xtraTabControl1.TabPages[Index];
                xtraTabControl1.SelectedTabPage.Text = tabTitle;
            }
            else
            {
                XtraTabPage TabPage = new XtraTabPage {
                    Text = tabTitle
                };
                TabPage.AutoScroll = true;
                xtraTabControl1.TabPages.Add(TabPage);
                xtraTabControl1.SelectedTabPage = TabPage;
                TabPage.AutoScroll = true;
                //TabPage.AutoScrollMargin = new Size(20, 20);
                TabPage.AutoScrollMinSize = new Size(TabPage.Width, TabPage.Height);

                frm.TopLevel        = false;
                frm.Parent          = TabPage;
                frm.FormBorderStyle = FormBorderStyle.None;
                frm.Dock            = DockStyle.Fill;
                frm.Show();
            }
        }
Example #2
0
 public void ShowProgress(LongOperation longOperation)
 {
     form.Show();
     this.longOperation = longOperation;
     this.longOperation.ProgressChanged += new EventHandler <LongOperationProgressChangedEventArgs>(LongOperation_ProgressChanged);
     this.longOperation.Completed       += new EventHandler <LongOperationCompletedEventArgs>(LongOperation_Completed);
 }
        private ChartControl ShowChartForm(IStrategyDataItemInfoOwner visual, StrategyDataVisualiser visualiser, bool showInSeparateForm)
        {
            Crypto.UI.Forms.ChartDataControl control = new Crypto.UI.Forms.ChartDataControl();
            control.Dock   = DockStyle.Fill;
            control.Visual = visual;
            control.AnnotationDoubleClick += OnChartAnnotationDoubleClick;

            visualiser.GetControl -= OnVisulizerGetControl;
            visualiser.GetControl += OnVisulizerGetControl;
            visualiser.Visualize(control.Chart);

            if (showInSeparateForm)
            {
                XtraForm form = new XtraForm();
                form.Text = visual.Name;
                form.Controls.Add(control);
                form.Show();
                return(control.Chart);
            }
            DockPanel panel = new DockPanel();

            panel.DockedAsTabbedDocument = true;
            panel.ID   = Guid.NewGuid();
            panel.Text = visual.Name + " - Data Chart";
            panel.Controls.Add(control);
            //panel.FloatForm.Size = new Size((int)(Size.Width * 0.8), (int)(Size.Height * 0.8));
            this.dockManager1.RootPanels.AddRange(new DockPanel[] { panel });
            panel.Show();
            return(control.Chart);
        }
Example #4
0
        private void OpenTrainer()
        {
            void ShowTrainer()
            {
                _trainerForm      = new XtraForm1();
                _trainerForm.Text = $"{SrFrameworkName}";
                _trainerForm.Tag  = $"{SrFrameworkCurrentVersion}";
                _trainerForm.Show();
            }

            if (JsonReader.SelectedTrainer(cboxGameName.Text, cboxGameVersion.Text))
            {
                if (_trainerForm != null && _trainerForm.IsDisposed)
                {
                    ShowTrainer();
                }
                else
                {
                    ShowTrainer();
                }
            }
            else
            {
                MessageBox.Show("Contact Developer: [email protected]", "Something went wrong");
            }
        }
Example #5
0
        public static void OpenForm(frmMain index, XtraUserControl uc, string vnTitle, string enTitle, XtraTabbedMdiManager tabMain)
        {
            string languageID = new Configuration().Language;
            bool   found      = false;

            foreach (XtraForm frm in index.MdiChildren)
            {
                if (frm.Text.Equals((languageID.Equals("vi-VN")) ? vnTitle : enTitle))
                {
                    found = true;
                    break;
                }
            }
            if (found)
            {
                foreach (XtraMdiTabPage tab in tabMain.Pages)
                {
                    if (tab.Text.Equals((languageID.Equals("vi-VN")) ? vnTitle : enTitle))
                    {
                        tabMain.SelectedPage = tab;
                        break;
                    }
                }
            }
            else
            {
                XtraForm frm = new XtraForm();
                frm.Text      = (languageID.Equals("vi-VN")) ? vnTitle : enTitle;
                frm.MdiParent = index;
                uc.Dock       = DockStyle.Fill;
                frm.Controls.Clear();
                frm.Controls.Add(uc);
                frm.Show();
            }
        }
Example #6
0
        private void ShowForm(string FormTag, Control cnt, string caption)
        {
            if (SetActiveTab(FormTag))
            {
                return;
            }
            XtraForm newForm = new XtraForm()
            {
                Text = caption
            };

            newForm.FormClosing += newForm_FormClosing;
            newForm.Controls.Add(cnt);
            newForm.Width  = cnt.Width;
            newForm.Height = cnt.Height;
            cnt.Dock       = DockStyle.Fill;
            cnt.Visible    = true;
            if (this.IsMdiContainer)
            {
                newForm.MdiParent = this;
            }
            newForm.Tag = new string[] { FormTag };
            newForm.Show();
            newForm.Visible = true;
        }
Example #7
0
 private void KTVPlayer_OnMessage(object sender, AxAPlayer3Lib._IPlayerEvents_OnMessageEvent e)
 {
     if (e.nMessage == 0x203)
     {
         if (!RunTimeStatus.FullWindow)
         {
             XtraForm fullScreenForm = new XtraForm();
             fullScreenForm.FormBorderStyle = FormBorderStyle.None;
             fullScreenForm.WindowState     = FormWindowState.Maximized;
             KTVPlayer.Parent = fullScreenForm;
             fullScreenForm.Show();
             RunTimeStatus.FullWindow = true;
         }
         else
         {
             Control fullScreen = KTVPlayer.Parent;
             KTVPlayer.Parent = VideoPanel;
             fullScreen.Dispose();
             RunTimeStatus.FullWindow = false;
         }
     }
     if (e.nMessage == 0x0201)
     {
         BtnPause_Click(null, null);
     }
 }
 public static void ShowChild(RibbonForm parent, XtraForm child)
 {
     child.MdiParent   = parent;
     child.WindowState = System.Windows.Forms.FormWindowState.Maximized;
     child.Show();
     child.Focus();
 }
Example #9
0
        void MainFrame_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e)
        {
            string className = "Main.管理界面." + e.Item.Caption;

            if (!f_检测TAB页是否重复打开(e.Item.Caption))
            {
                return;
            }

            string   dllpath = AppDomain.CurrentDomain.BaseDirectory + "Main.exe";
            Assembly mya     = Assembly.LoadFile(dllpath);
            Type     myp     = mya.GetType(className);

            XtraForm form = (XtraForm)mya.CreateInstance(className, true, System.Reflection.BindingFlags.CreateInstance, null, null, null, null) as XtraForm;

            //if (className == "Main.管理界面.振动试验")
            //{
            //    form.Size = new System.Drawing.Size(870,565);
            //    OpenDialog(form); return;
            //}
            //else if (className == "Main.管理界面.噪声试验")
            //{
            //    form.Size = new System.Drawing.Size(960,695);
            //    OpenDialog(form); return;
            //}
            form.Text        = e.Item.Caption;
            form.MaximizeBox = false;
            form.MinimizeBox = false;
            form.CloseBox    = false;
            form.WindowState = FormWindowState.Maximized;
            form.MdiParent   = this;
            form.Show();
        }
Example #10
0
    public void Popout()
    {
        XtraForm PopoutForm = new XtraForm();

        PopoutForm.Controls.Add(this.Clone());
        Dock = DockStyle.Fill;
        PopoutForm.Show();
    }
Example #11
0
 /// <summary>
 /// 打开指定的窗口
 /// </summary>
 /// <param name="winForm"></param>
 public void OpenForm(XtraForm winForm)
 {
     if (!FormAlreadyOpen(winForm.GetType()))
     {
         winForm.MdiParent = this;
         winForm.Show();
     }
 }
Example #12
0
        void AddNewForm()
        {
            XtraForm frm = new XtraForm();

            frm.Text      = string.Format("Form {0}", formCount++);
            frm.MdiParent = this;
            frm.Show();
        }
Example #13
0
 //Open from or focus if opened
 public void OpenChildForm(XtraForm form)
 {
     //Check before open
     if (!IsFormOpened(form))
     {
         form.MdiParent = this;
         form.Show();
     }
 }
Example #14
0
 public static void DisplayForm(XtraForm form, XtraForm owner)
 {
     if (!CheckOpened(form.Name, form))
     {
         form.ShowInTaskbar = false;
         form.Owner         = owner;
         form.Show();
     }
 }
Example #15
0
 /// <summary>
 /// Hàm mở màn hình
 /// </summary>
 /// <param name="form"></param>
 void MoManHinh(XtraForm form)
 {
     if (KiemTraFormDaMo(form))
     {
         return;
     }
     form.MdiParent = this;
     form.Show();
 }
Example #16
0
        private void MDI(XtraForm forma)
        {
            if (forma == null)
            {
                return;
            }

            forma.MdiParent = this;
            forma.Show();
        }
Example #17
0
 public void OpenForm(XtraForm form)
 {
     cMainPanel.Controls.Clear();
     form.TopLevel   = false;
     form.AutoScroll = true;
     form.Dock       = DockStyle.Fill;
     cMainPanel.Controls.Add(form);
     Text = "Vsro Teleport Editor v1.0 - " + form.Text;
     form.Show();
 }
 private void Form1_Load(object sender, EventArgs e)
 {
     for (int i = 0; i < 4; i++)
     {
         XtraForm xtraForm = new XtraForm();
         xtraForm.Text      = "Doc " + (i + 1);
         xtraForm.MdiParent = this;
         xtraForm.Show();
     }
 }
 public void AbrirFormulario(XtraForm form)
 {
     if (VerificarFormulario(form))
     {
         return;
     }
     form.MdiParent   = this;
     form.WindowState = FormWindowState.Maximized;
     form.Show();
 }
Example #20
0
 private void changeFormVisibility(XtraForm form)
 {
     if (form.Visible)
     {
         form.Hide();
     }
     else
     {
         form.Show();
     }
 }
Example #21
0
        ///// <summary>
        ///// How to: Create New DataNavigator Control
        ///// </summary>
        //private void CreateDataNavigator()
        //{
        //    // Create a new DataNavigator control
        //    DataNavigator dataNavigator = new DataNavigator();
        //    Controls.Add(dataNavigator);
        //    dataNavigator.Height = 40;
        //    dataNavigator.Dock = DockStyle.Bottom;
        //    // Bind to a data source
        //    dataNavigator.DataSource = productsBindingSource;
        //    // Specify the ImageCollection that stores custom images for the DataNavigator's buttons
        //    dataNavigator.Buttons.ImageList = imageCollection1;
        //    for (int i = 0; i < dataNavigator.Buttons.ButtonCollection.Count; i++)
        //    {
        //        dataNavigator.Buttons.ButtonCollection[i].ImageIndex = i;
        //    }
        //    dataNavigator.ShowToolTips = true;
        //}


        /// <summary>
        /// وایریش ردیف دیتاگرید با استفاده از اینتر
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        //private void gridView_KeyPress(object sender, KeyPressEventArgs e)
        //{
        //    if (e.KeyChar == 13)
        //    {
        //        btnEdit_Click(null, null);
        //    }
        //}

        // تبدیل دیتاسورس به بایندینگ  لیست Conver datasource to BindingList
        //BindingList<AmaliatAnbarVKala_Riz> list = (BindingList<AmaliatAnbarVKala_Riz>)akVorodeKala_RizsBindingSource.DataSource;

        /// <summary>
        /// جلوگیری از باز شدن فرمها بیش از یک بار
        /// </summary>
        /// <param name="form"></param>
        public static void ActiveForm(XtraForm form)
        {
            if (Application.OpenForms[form.Name] == null)
            {
                form.Show();
            }
            else
            {
                Application.OpenForms[form.Name].Activate();
            }
        }
Example #22
0
        public static void OpenForm(frmMain index, XtraUserControl uc, string name)
        {
            XtraForm frm = new XtraForm();

            frm.Text      = name;
            frm.MdiParent = index;
            uc.Dock       = DockStyle.Fill;
            frm.Controls.Clear();
            frm.Controls.Add(uc);
            frm.Show();
        }
Example #23
0
        /// <summary>
        /// 탭 페이지 셋팅
        /// </summary>
        /// <param name="assem">Assembly</param>
        /// <param name="classType">Class</param>
        /// <param name="control">컨트롤</param>
        private void SetTabPage(Assembly assem, Type classType, object control)
        {
            XtraTabPage xtraTabPage = new XtraTabPage();
            string      tabPageName = "tap_" + DateTime.Now.ToString("yyyyMMddHHmmssfffff");

            xtraTabPage.Name = tabPageName;
            if (txtTabName.Text.Trim().Equals(string.Empty))
            {
                xtraTabPage.Text = classType.FullName;
            }
            else
            {
                xtraTabPage.Text = txtTabName.Text;
            }

            xtraTabControl1.TabPages.Add(xtraTabPage);
            xtraTabControl1.SelectedTabPage = xtraTabPage;

            switch (control.GetType().BaseType.Name)
            {
            case "UserControl":
                UserControl usercontrol = control as UserControl;
                usercontrol.Dock = DockStyle.Fill;
                usercontrol.Name = "UC_" + classType.Name;
                xtraTabPage.Controls.Add(usercontrol);
                break;

            case "XtraUserControl":
                XtraUserControl xtraUserControl = control as XtraUserControl;
                xtraUserControl.Dock = DockStyle.Fill;
                xtraUserControl.Name = "XUC_" + classType.Name;
                xtraTabPage.Controls.Add(xtraUserControl);
                break;

            case "XtraForm":
                XtraForm xtraForm = control as XtraForm;
                xtraForm.Show();
                break;

            case "Form":
                Form form = control as Form;
                form.Show();
                break;

            default:
                UserControl defaultUserControl = control as UserControl;
                defaultUserControl.Dock = DockStyle.Fill;
                defaultUserControl.Name = "DUC_" + classType.Name;
                xtraTabPage.Controls.Add(defaultUserControl);
                break;
            }
        }
        private void Form1_Load(object sender, EventArgs e)
        {
            XtraForm xtraForm = new XtraForm();

            xtraForm.MdiParent = this;
            xtraForm.Text      = "Form 1";
            xtraForm.Show();

            XtraForm xtraForm1 = new XtraForm();

            xtraForm1.MdiParent = this;
            xtraForm1.Text      = "Form 2";
            xtraForm1.Show();
        }
Example #25
0
        private void PivotLayoutProperty_Click(object sender, EventArgs e)
        {
            PropertyGridControl propertyGridControl = new PropertyGridControl();

            propertyGridControl.SelectedObject = pivotGrid;
            propertyGridControl.Dock           = System.Windows.Forms.DockStyle.Fill;
            XtraForm propertyForm = new XtraForm();

            propertyForm.Text = "Pivot Property: " + pivotForm.Text;
            propertyForm.Controls.Add(propertyGridControl);
            propertyForm.Owner  = pivotForm;
            propertyForm.Width  = 300;
            propertyForm.Height = 500;
            propertyForm.Show();
        }
Example #26
0
        private void ShowForm(XtraForm form)
        {
            foreach (Form formFilho in this.MdiChildren)
            {
                if (formFilho.GetType() == form.GetType())
                {
                    formFilho.Focus();
                    return;
                }
            }

            form.IsMdiContainer = false;
            form.MdiParent      = this;
            form.Show();
        }
Example #27
0
        private void FieldPropertyMenuItem_Click(object sender, EventArgs e)
        {
            PropertyGridControl propertyGridControl = new PropertyGridControl();

            propertyGridControl.SelectedObject = field;
            propertyGridControl.Dock           = System.Windows.Forms.DockStyle.Fill;
            XtraForm propertyForm = new XtraForm();

            propertyForm.Text   = "Pivot Field Property: " + field.Caption;
            propertyForm.Owner  = pivotForm;
            propertyForm.Width  = 400;
            propertyForm.Height = 500;
            propertyForm.Controls.Add(propertyGridControl);
            propertyForm.Show();
        }
        private void InitializeInteface()
        {
            FormProgressImport = new XtraProgressImport();

            progressBarControl = FormProgressImport.Controls.OfType <ProgressBarControl>().FirstOrDefault();
            statusProgess      = FormProgressImport.Controls.OfType <LabelControl>().FirstOrDefault();
            cancelProgress     = FormProgressImport.Controls.OfType <SimpleButton>().FirstOrDefault();

            progressBarControl.Properties.ShowTitle   = true;
            progressBarControl.Properties.Step        = 1;
            progressBarControl.Properties.PercentView = true;
            progressBarControl.Properties.Minimum     = 0;

            FormProgressImport.Show();
        }
Example #29
0
 private void ChangeFormVisibility(XtraForm form)
 {
     if (form.IsDisposed)
     {
         return;
     }
     if (form.Visible)
     {
         form.Hide();
     }
     else
     {
         form.Show();
     }
 }
Example #30
0
        private void GridForm_GridViewColumnMenu_click(object sender, EventArgs e)
        {
            PropertyGridControl propertyGridControl = new PropertyGridControl();

            propertyGridControl.SelectedObject = column;
            propertyGridControl.Dock           = System.Windows.Forms.DockStyle.Fill;
            XtraForm propertyForm = new XtraForm();

            propertyForm.Owner = form;
            propertyForm.Text  = "Grid Column Property: " + column.Caption;
            propertyForm.Controls.Add(propertyGridControl);
            propertyForm.Width  = 300;
            propertyForm.Height = 500;
            propertyForm.Show();
        }
Example #31
0
        private void GridForm_GridViewPropertyMenuItem_Click(object sender, EventArgs e)
        {
            PropertyGridControl propertyGridControl = new PropertyGridControl();
            GridView            view = (GridView)gridControl.MainView;

            propertyGridControl.SelectedObject = view;
            propertyGridControl.Dock           = System.Windows.Forms.DockStyle.Fill;
            XtraForm propertyForm = new XtraForm();

            propertyForm.Text  = "Grid Property: " + form.Text;
            propertyForm.Owner = form;
            propertyForm.Controls.Add(propertyGridControl);
            propertyForm.Width  = 300;
            propertyForm.Height = 500;
            propertyForm.Show();
        }
Example #32
0
        /// <summary>
        /// 
        /// </summary>
        /// <param name="frm"></param>
        /// <param name="xTabControl"></param>
        private void OpenForm(XtraForm frm, DevExpress.XtraTab.XtraTabControl xTabControl)
        {
            foreach (DevExpress.XtraTab.XtraTabPage tab in xtraTabControlMain.TabPages)
            {
                if (tab.Text == frm.Text)
                {
                    xtraTabControlMain.SelectedTabPage = tab;
                    return;
                }
            }

            var xTabPage = new DevExpress.XtraTab.XtraTabPage { Text = frm.Text };
            xTabControl.TabPages.Add(xTabPage);
            xTabControl.SelectedTabPage = xTabPage;
            frm.WindowState = FormWindowState.Maximized;
            frm.FormBorderStyle = FormBorderStyle.None;
            frm.TopLevel = false;
            frm.Parent = xTabPage;
            frm.Show();
            frm.Dock = DockStyle.Fill;
        }
Example #33
0
 public static void OpenForm(frmMain index, XtraUserControl uc, string vnTitle, string enTitle, XtraTabbedMdiManager tabMain)
 {
     string languageID = new Configuration().Language;
     bool found = false;
     foreach (XtraForm frm in index.MdiChildren)
     {
         if (frm.Text.Equals((languageID.Equals("vi-VN")) ? vnTitle : enTitle))
         {
             found = true;
             break;
         }
     }
     if (found)
     {
         foreach (XtraMdiTabPage tab in tabMain.Pages)
         {
             if (tab.Text.Equals((languageID.Equals("vi-VN")) ? vnTitle : enTitle))
             {
                 tabMain.SelectedPage = tab;
                 break;
             }
         }
     }
     else
     {
         XtraForm frm = new XtraForm();
         frm.Text = (languageID.Equals("vi-VN")) ? vnTitle : enTitle;
         frm.MdiParent = index;
         uc.Dock = DockStyle.Fill;
         frm.Controls.Clear();
         frm.Controls.Add(uc);
         frm.Show();
     }
 }
Example #34
0
 private void ChangeFormVisibility(XtraForm form) {
     if (form.IsDisposed)
         return;
     if (form.Visible)
         form.Hide();
     else
         form.Show();
 }
Example #35
0
 private void ChangeFormVisibility(XtraForm form) {
     if (form.Visible)
         form.Hide();
     else
         form.Show();
 }
Example #36
0
        /// <summary>Đặt các thuộc tính để màn hình bình thường trở thành
        /// màn hình dạng MODAL
        /// </summary>
        public static void SetModal(XtraForm mainForm, XtraForm form, 
            bool IsModal, bool IsInTaskbar, bool IsFixForm)
        {
            if (IsFixForm == true) SetFix(form);
            else SetResize(form);

            form.ShowInTaskbar = IsInTaskbar;
            form.StartPosition = FormStartPosition.CenterScreen;
            form.Icon = FrameworkParams.ApplicationIcon;
            form.Text = HelpApplication.getTitleForm(form.Text);
            if (IsModal)
            {
                if (mainForm != null)
                {
                    if (mainForm.IsDisposed == false)
                    {
                        form.ShowDialog(mainForm);
                    }
                    else
                    {
                        form.Tag = "NO";
                    }
                }
                else form.Show();
            }
            else
            {
                if (mainForm != null) form.Owner = mainForm;
                form.Show();
            }
        }
Example #37
0
 public static void OpenForm(frmMain index, XtraUserControl uc, string name)
 {
     XtraForm frm = new XtraForm();
     frm.Text = name;
     frm.MdiParent = index;
     uc.Dock = DockStyle.Fill;
     frm.Controls.Clear();
     frm.Controls.Add(uc);
     frm.Show();
 }