コード例 #1
0
ファイル: Session.cs プロジェクト: laszlo-kiss/Dataphor
        public void Add(IFormInterface form)
        {
            FormStack newStack = new FormStack();

            newStack.Push(form);
            AddStackToTop(newStack);
            if (Added != null)
            {
                Added(form, true);
            }
        }
コード例 #2
0
ファイル: Program.cs プロジェクト: branux/veiculoz
        static void Main()
        {
            new Midas.Nucleo.Negocio.Carga().Iniciar();
            new VeiculoZ.Negocio.CargaVeiculoz().Iniciar();

            formStack.Push(typeof(Forms.Inicio));
            try
            {
                formStack.Run();
            }
            catch (Exception e)
            {
                MessageBox.Show(e.Message);
            }
        }
コード例 #3
0
        public void Next(Form currentForm = null, Form nextForm = null)
        {
            if (currentForm == null)
            {
                FormStack.Push(this.MainForm);
            }
            else
            {
                FormStack.Push((Form)nextForm);
                currentForm.Hide();

                if (nextForm.Name.Equals("frmImportFile"))
                {
                    nextForm.Show();
                    var newForm = (frmImportFile)nextForm;
                    newForm.realPropertyTaxProjectionManager = this.MainForm.realPropertyTaxProjectionManager;
                    //newForm.realPropertyTaxProjectionManager.FormSwitch.M
                    //newForm.realPropertyTaxProjectionManager.FormSwitch = this.MainForm.realPropertyTaxProjectionManager.FormSwitch;
                }
            }
        }
コード例 #4
0
ファイル: Session.cs プロジェクト: laszlo-kiss/Dataphor
        /// <summary> Adds the form as modal (top of the stack) over some existing form. </summary>
        /// <param name="parentForm"> A form that is at the top of some stack in the list. </param>
        public void AddModal(IFormInterface form, IFormInterface parentForm)
        {
            FormStack      searchStack = _first;
            IFormInterface topmost;

            while (searchStack != null)
            {
                topmost = searchStack.GetTopmostForm();
                if (parentForm == topmost)
                {
                    topmost.Disable(form);
                    searchStack.Push(form);
                    if (Added != null)
                    {
                        Added(form, false);
                    }
                    return;
                }
                searchStack = searchStack._next;
            }
            throw new ClientException(ClientException.Codes.InvalidParentForm, parentForm.Text);
        }