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; } }
private void snimiAktivnuVezbu() { VezbaEditorBaseForm childForm = this.ActiveMdiChild as VezbaEditorBaseForm; if (childForm != null && childForm.Modified) { childForm.save(); } }
private void brisiAktivnuVezbu() { VezbaEditorBaseForm childForm = this.ActiveMdiChild as VezbaEditorBaseForm; if (childForm != null && childForm.brisiVezbu()) { zatvoriVezbu(childForm); } }
private void handleChildMerge() { ToolStripManager.RevertMerge(this.toolStrip1); VezbaEditorBaseForm childForm = this.ActiveMdiChild as VezbaEditorBaseForm; if (childForm != null) { ToolStripManager.Merge(childForm.ToolStrip, this.toolStrip1); } }
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); }
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); }
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); } }
public VezbaEditorPresenter(VezbaEditorBaseForm form, Nullable <int> vezbaId) { this.view = form as IVezbaEditorView; this.vezbaId = vezbaId; }
public IzvedbaCaptionCell(int leftColumn, int rightColumn, VezbaEditorBaseForm editorForm) : base(leftColumn, rightColumn) { this.editorForm = editorForm; }
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; }
public IzvedbaCaptionCell(int leftColumn, int rightColumn, VezbaEditorBaseForm editorForm) : base(leftColumn, rightColumn) { this.editorForm = editorForm; }
public VezbaEditorPresenter(VezbaEditorBaseForm form, Nullable<int> vezbaId) { this.view = form as IVezbaEditorView; this.vezbaId = vezbaId; }