Ejemplo n.º 1
0
        private void mnPrint_Click(object sender, EventArgs e)
        {
            VezbaEditorBaseForm childForm = this.ActiveMdiChild as VezbaEditorBaseForm;

            if (childForm == null)
            {
                return;
            }

            Cursor.Current = Cursors.WaitCursor;
            Cursor.Show();
            try
            {
                PreviewDialog p = new PreviewDialog();
                p.setIzvestaj(new VezbaIzvestaj(childForm));
                p.ShowDialog();
            }
            catch (InfrastructureException ex)
            {
                MessageDialogs.showError(ex.Message, this.Text);
            }
            catch (Exception ex)
            {
                MessageDialogs.showError(ex.Message, this.Text);
            }
            finally
            {
                Cursor.Hide();
                Cursor.Current = Cursors.Arrow;
            }
        }
Ejemplo n.º 2
0
        private void snimiAktivnuVezbu()
        {
            VezbaEditorBaseForm childForm = this.ActiveMdiChild as VezbaEditorBaseForm;

            if (childForm != null && childForm.Modified)
            {
                childForm.save();
            }
        }
Ejemplo n.º 3
0
        private void brisiAktivnuVezbu()
        {
            VezbaEditorBaseForm childForm = this.ActiveMdiChild as VezbaEditorBaseForm;

            if (childForm != null && childForm.brisiVezbu())
            {
                zatvoriVezbu(childForm);
            }
        }
Ejemplo n.º 4
0
        private void handleChildMerge()
        {
            ToolStripManager.RevertMerge(this.toolStrip1);
            VezbaEditorBaseForm childForm = this.ActiveMdiChild as VezbaEditorBaseForm;

            if (childForm != null)
            {
                ToolStripManager.Merge(childForm.ToolStrip, this.toolStrip1);
            }
        }
Ejemplo n.º 5
0
        public VezbaIzvestaj(VezbaEditorBaseForm vezbaEditor)
        {
            this.vezbaEditor = vezbaEditor;
            DocumentName = vezbaEditor.Vezba.Naziv;

            gimnasticarFont = new Font("Arial", 10, FontStyle.Bold);
            nazivVezbeFont = new Font("Arial", 12);
            spravaFont = new Font("Arial", 10, FontStyle.Bold);
            datumFont = new Font("Arial", 8);
        }
Ejemplo n.º 6
0
 private VezbaEditorBaseForm findOpenedVezba(int vezbaId)
 {
     foreach (Form f in MdiChildren)
     {
         VezbaEditorBaseForm editor = f as VezbaEditorBaseForm;
         if (editor.Vezba != null && editor.Vezba.Id == vezbaId)
         {
             return(editor);
         }
     }
     return(null);
 }
Ejemplo n.º 7
0
        private bool zatvoriVezbu(VezbaEditorBaseForm f)
        {
            if (f == null)
            {
                return(true);
            }
            int before = this.MdiChildren.Length;

            f.Activate();
            f.Close();
            if (this.MdiChildren.Length < before)
            {
                tabControl1.TabPages.Remove(pronadjiTab(f));
                if (this.MdiChildren.Length == 0)
                {
                    panelTab.Visible = false;
                }
                return(true);
            }
            else
            {
                return(false);
            }
        }
Ejemplo n.º 8
0
 public VezbaEditorPresenter(VezbaEditorBaseForm form, Nullable <int> vezbaId)
 {
     this.view    = form as IVezbaEditorView;
     this.vezbaId = vezbaId;
 }
Ejemplo n.º 9
0
 public IzvedbaCaptionCell(int leftColumn, int rightColumn, VezbaEditorBaseForm editorForm)
     : base(leftColumn, rightColumn)
 {
     this.editorForm = editorForm;
 }
Ejemplo n.º 10
0
 private bool zatvoriVezbu(VezbaEditorBaseForm f)
 {
     if (f == null)
         return true;
     int before = this.MdiChildren.Length;
     f.Activate();
     f.Close();
     if (this.MdiChildren.Length < before)
     {
         tabControl1.TabPages.Remove(pronadjiTab(f));
         if (this.MdiChildren.Length == 0)
             panelTab.Visible = false;
         return true;
     }
     else
         return false;
 }
Ejemplo n.º 11
0
 public IzvedbaCaptionCell(int leftColumn, int rightColumn, VezbaEditorBaseForm editorForm)
     : base(leftColumn, rightColumn)
 {
     this.editorForm = editorForm;
 }
Ejemplo n.º 12
0
 public VezbaEditorPresenter(VezbaEditorBaseForm form, Nullable<int> vezbaId)
 {
     this.view = form as IVezbaEditorView;
     this.vezbaId = vezbaId;
 }