Exemple #1
0
        void ControllerMainStoreWindow_HtmlReportButtonClicked(object sender, ObjectEventArgs e)
        {
            string message = string.Empty;

            if (!ControllerXMLManager.TryConvertFromXMLAndResourcesToHTML((string)e.Data, "doc.xml", Challenge.Properties.Resources.bookstoreStyle, controllerBookStore, out message))
            {
                ControlerMessager.ShowMessage(message);
            }
        }
Exemple #2
0
        void ControllerMainStoreWindow_SaveButtonClicked(object sender, ObjectEventArgs e)
        {
            string message;

            string path = (string)e.Data;

            if (!ControllerXMLManager.TrySerializeToXML(path, controllerBookStore, out message))
            {
                ControlerMessager.ShowMessage(message);
            }
        }
Exemple #3
0
        void ControllerMainStoreWindow_OpenButtonClicked(object sender, ObjectEventArgs e)
        {
            string message;

            string path = (string)e.Data;

            if (!ControllerXMLManager.TryDeserializeFromXML(path, ref controllerBookStore, out message))
            {
                ControlerMessager.ShowError(message);
            }
            else
            {
                ControllerMainStoreWindow.DGVStoreSource = controllerBookStore.StoreBooksBindingList;
            }
        }
Exemple #4
0
 void ControllerMainStoreWindow_AddButtonClicked(object sender, ObjectEventArgs e)
 {
     controllerBookStore.AddBook((Book)e.Data);
 }
Exemple #5
0
 void ControllerMainStoreWindow_DeleteButtonClicked(object sender, ObjectEventArgs e)
 {
     controllerBookStore.RemoveBookAt((int)e.Data);
 }
Exemple #6
0
 void ControllerMainStoreWindow_EditButtonClicked(object sender, ObjectEventArgs e)
 {
     ControllerMainStoreWindow.EditingBook = controllerBookStore.ReturnBookAt((int)e.Data);
 }
Exemple #7
0
 void ControllerMainStoreWindow_ErrorOccurred(object sender, ObjectEventArgs e)
 {
     ControlerMessager.ShowError((string)e.Data);
 }