예제 #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);
            }
        }
예제 #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);
            }
        }
예제 #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;
            }
        }
예제 #4
0
 void ControllerMainStoreWindow_AddButtonClicked(object sender, ObjectEventArgs e)
 {
     controllerBookStore.AddBook((Book)e.Data);
 }
예제 #5
0
 void ControllerMainStoreWindow_DeleteButtonClicked(object sender, ObjectEventArgs e)
 {
     controllerBookStore.RemoveBookAt((int)e.Data);
 }
예제 #6
0
 void ControllerMainStoreWindow_EditButtonClicked(object sender, ObjectEventArgs e)
 {
     ControllerMainStoreWindow.EditingBook = controllerBookStore.ReturnBookAt((int)e.Data);
 }
예제 #7
0
 void ControllerMainStoreWindow_ErrorOccurred(object sender, ObjectEventArgs e)
 {
     ControlerMessager.ShowError((string)e.Data);
 }