Example #1
0
        public SourceEditDlg(IBaseWindow baseWin)
        {
            InitializeComponent();

            btnAccept.Image = UIHelper.LoadResourceImage("Resources.btn_accept.gif");
            btnCancel.Image = UIHelper.LoadResourceImage("Resources.btn_cancel.gif");

            fNotesList = new GKSheetList(pageNotes);
            fMediaList = new GKSheetList(pageMultimedia);

            fRepositoriesList           = new GKSheetList(pageRepositories);
            fRepositoriesList.OnModify += ModifyReposSheet;

            // SetLang()
            Title                 = LangMan.LS(LSID.LSID_Source);
            btnAccept.Text        = LangMan.LS(LSID.LSID_DlgAccept);
            btnCancel.Text        = LangMan.LS(LSID.LSID_DlgCancel);
            lblShortTitle.Text    = LangMan.LS(LSID.LSID_ShortTitle);
            lblAuthor.Text        = LangMan.LS(LSID.LSID_Author);
            lblTitle.Text         = LangMan.LS(LSID.LSID_Title);
            lblPublication.Text   = LangMan.LS(LSID.LSID_Publication);
            pageCommon.Text       = LangMan.LS(LSID.LSID_Common);
            pageText.Text         = LangMan.LS(LSID.LSID_Text);
            pageRepositories.Text = LangMan.LS(LSID.LSID_RPRepositories);
            pageNotes.Text        = LangMan.LS(LSID.LSID_RPNotes);
            pageMultimedia.Text   = LangMan.LS(LSID.LSID_RPMultimedia);

            fController = new SourceEditDlgController(this);
            fController.Init(baseWin);

            fRepositoriesList.ListModel = new SourceRepositoriesSublistModel(baseWin, fController.LocalUndoman);
            fNotesList.ListModel        = new NoteLinksListModel(baseWin, fController.LocalUndoman);
            fMediaList.ListModel        = new MediaLinksListModel(baseWin, fController.LocalUndoman);
        }