/// <summary>
        /// Button zum hinzufügen eines neuen Kunden, laden der jeweiligen Tabseiten und festlegen des ToolbarContents
        /// 
        /// Author: Antonios Fesenmeier
        /// </summary>
        /// <param name="Button"></param>
        private void pbNewClient_Click(Button Button)
        {
            /*  var keyValueList = ClientDataGrid.ToKeyValueList();
              KöTaf.Utils.Printer.CSVExporter csv = new Utils.Printer.CSVExporter(keyValueList);
              var header = csv.GetHeader();
              var content = csv.GetData();
              var csvFull = csv.GetCsv();
              csv.Write();
              */

            // Adding a new tab with the according page shown under this tab
            KPage person = new KöTaf.WPFApplication.Views.Client.pNewClientPerson();
            SimpleTabItem tabPerson = new SimpleTabItem(IniParser.GetSetting("CLIENT", "personalData"), person);
            this._myTabList.Add(tabPerson);

            KPage partnerChild = new KöTaf.WPFApplication.Views.Client.pNewClientPartnerChild();
            SimpleTabItem tabPartnerChild = new SimpleTabItem(IniParser.GetSetting("CLIENT", "partnerAndChildren"), partnerChild);
            this._myTabList.Add(tabPartnerChild);

            KPage revenues = new KöTaf.WPFApplication.Views.Client.pNewClientRevenues();
            SimpleTabItem tabRevenues = new SimpleTabItem(IniParser.GetSetting("CLIENT", "revenue"), revenues);
            this._myTabList.Add(tabRevenues);

            tabPerson.toolbar.addButton(IniParser.GetSetting("BUTTONS", "cancel"), pbAbort_Click);
            tabPerson.toolbar.addButton(IniParser.GetSetting("BUTTONS", "back"), pbBack_Click);
            tabPerson.toolbar.addButton(IniParser.GetSetting("BUTTONS", "next"), pbNext_Click);
            tabPerson.toolbar.addButton(IniParser.GetSetting("BUTTONS", "save"), pbSave_Click);

            tabPartnerChild.toolbar.addButton(IniParser.GetSetting("BUTTONS", "cancel"), pbAbort_Click);
            tabPartnerChild.toolbar.addButton(IniParser.GetSetting("BUTTONS", "back"), pbBack_Click);
            tabPartnerChild.toolbar.addButton(IniParser.GetSetting("BUTTONS", "next"), pbNext_Click);
            tabPartnerChild.toolbar.addButton(IniParser.GetSetting("BUTTONS", "save"), pbSave_Click);

            tabRevenues.toolbar.addButton(IniParser.GetSetting("BUTTONS", "cancel"), pbAbort_Click);
            tabRevenues.toolbar.addButton(IniParser.GetSetting("BUTTONS", "back"), pbBack_Click);
            tabRevenues.toolbar.addButton(IniParser.GetSetting("BUTTONS", "next"), pbNext_Click);
            tabRevenues.toolbar.addButton(IniParser.GetSetting("BUTTONS", "save"), pbSave_Click);

            SinglePage singlePage = new SinglePage(this, IniParser.GetSetting("CLIENT", "createNewClient"), this._myTabList);
        }
        /// <summary>
        /// Generiert die Untertabs und deren ToolbarContent zum Editieren eines Kunden
        /// 
        /// Author: Antonios Fesenmeier, Georg Schmid
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void EditPersonButton_Click(object sender, RoutedEventArgs e)
        {
            //Setzt den Rücksprungwert für das Paging
            pagingStartValue = _DataGridPaging.getStartOfDataGridItems();

            Person currentPerson = ClientDataGrid.SelectedItem as Person;

            // Tabs hinzufügen
            KPage person = new KöTaf.WPFApplication.Views.Client.pEditClientPerson(currentPerson);
            SimpleTabItem tabPerson = new SimpleTabItem(IniParser.GetSetting("CLIENT", "personalData"), person);
            this._myTabListEdit.Add(tabPerson);

            KPage partnerChild = new KöTaf.WPFApplication.Views.Client.pEditClientPartnerChild(currentPerson);
            SimpleTabItem tabPartnerChild = new SimpleTabItem(IniParser.GetSetting("CLIENT", "partnerAndChildren"), partnerChild);
            this._myTabListEdit.Add(tabPartnerChild);

            KPage revenues = new KöTaf.WPFApplication.Views.Client.pEditClientRevenues(currentPerson);
            SimpleTabItem tabRevenues = new SimpleTabItem(IniParser.GetSetting("CLIENT", "revenue"), revenues);
            this._myTabListEdit.Add(tabRevenues);

            tabPerson.toolbar.addButton(IniParser.GetSetting("BUTTONS", "cancel"), pbAbort_Click);
            tabPerson.toolbar.addButton(IniParser.GetSetting("BUTTONS", "back"), pbBack_Click);
            tabPerson.toolbar.addButton(IniParser.GetSetting("BUTTONS", "next"), pbNextEdit_Click);
            tabPerson.toolbar.addButton(IniParser.GetSetting("BUTTONS", "save"), pbSaveEdit_Click);

            tabPartnerChild.toolbar.addButton(IniParser.GetSetting("BUTTONS", "cancel"), pbAbort_Click);
            tabPartnerChild.toolbar.addButton(IniParser.GetSetting("BUTTONS", "back"), pbBack_Click);
            tabPartnerChild.toolbar.addButton(IniParser.GetSetting("BUTTONS", "next"), pbNextEdit_Click);
            tabPartnerChild.toolbar.addButton(IniParser.GetSetting("BUTTONS", "save"), pbSaveEdit_Click);

            tabRevenues.toolbar.addButton(IniParser.GetSetting("BUTTONS", "cancel"), pbAbort_Click);
            tabRevenues.toolbar.addButton(IniParser.GetSetting("BUTTONS", "back"), pbBack_Click);
            tabRevenues.toolbar.addButton(IniParser.GetSetting("BUTTONS", "next"), pbNextEdit_Click);
            tabRevenues.toolbar.addButton(IniParser.GetSetting("BUTTONS", "save"), pbSaveEdit_Click);

            SinglePage singlePage = new SinglePage(this, IniParser.GetSetting("CLIENT", "editClient"), this._myTabListEdit);
        }
Exemple #3
0
        public Examples()
        {
            int x = 1;

            // Untermenü, nur Frame
            if (x == 1)
            {
                SubnavigationPage mySubnavigation = new SubnavigationPage("Seitentitel 123");

                Type pageType1 = typeof(KöTaf.WPFApplication.Views.Formletter.pFormletterAdministration);
                mySubnavigation.addSubnavigation("subpage1", pageType1);

                Type pageType2 = typeof(KöTaf.WPFApplication.Views.pWelcomeScreen);
                mySubnavigation.addSubnavigation("subpage2", pageType2);
            }

            // Untermenü mit Tabs und jeweils einem Frame
            // Jeder Frame hat eine Toolbar mit Buttons und SuchBox
            if (x == 2)
            {
                SubnavigationPage mySubnavigation = new SubnavigationPage("Seitentitel 234");
                List<SimpleTabItem> myTabList = new List<SimpleTabItem>();

                KPage p1 = new KöTaf.WPFApplication.Views.Formletter.pFormletterAdministration();
                KPage p2 = new KöTaf.WPFApplication.Views.pWelcomeScreen();

                SimpleTabItem simpleTabItem1 = new SimpleTabItem("tab1", p1);
                SimpleTabItem simpleTabItem2 = new SimpleTabItem("tab2", p2);

                myTabList.Add(simpleTabItem1);
                myTabList.Add(simpleTabItem2);

                simpleTabItem1.toolbar.addButton("Button1", myButtonFunction);
                simpleTabItem1.toolbar.addButton("Button2", myButtonFunction);
                simpleTabItem1.toolbar.addSearchPanel(mySearchFunction);

                simpleTabItem2.toolbar.addButton("Button3", myButtonFunction);
                simpleTabItem2.toolbar.addButton("Button4", myButtonFunction);
                simpleTabItem2.toolbar.addSearchPanel(mySearchFunction);

                mySubnavigation.addSubnavigation("sometabs", myTabList);
            }

            // Einfache Seite mit einem Frame
            if (x == 3)
            {
                KPage pageFormletterAdmin = new KöTaf.WPFApplication.Views.Formletter.pFormletterAdministration();
                SinglePage singlePage = new SinglePage("Formletter Admin", pageFormletterAdmin);
            }

            // Einfache Seite mit Tabs mit jeweils einem Frame
            if (x == 4)
            {
                List<SimpleTabItem> myTabList = new List<SimpleTabItem>();

                KPage p1 = new KöTaf.WPFApplication.Views.Formletter.pFormletterAdministration();
                myTabList.Add(new SimpleTabItem("tab1", p1));

                KPage p2 = new KöTaf.WPFApplication.Views.pWelcomeScreen();
                myTabList.Add(new SimpleTabItem("tab2", p2));

                SinglePage singlePage = new SinglePage(this, "Formletter Admin", myTabList);
            }
        }
        /// <summary>
        /// Serienbrief-Vorlage speichern
        /// </summary>
        /// <param name="button"></param>
        private void createFormletter_Click(Button button)
        {
            // Liste aller anzuzeigenden Tabs
            List<SimpleTabItem> myTabList = new List<SimpleTabItem>();

            // Füge einen neuen Tab mit der zugehörigen Seite hinzu, die darin angezeigt werden soll
            KPage filter = new pFormletterFilterSelection();
            SimpleTabItem tabFilter = new SimpleTabItem(IniParser.GetSetting("FORMLETTER", "formletterReceiver"), filter);
            myTabList.Add(tabFilter);

            // Füge einen neuen Tab mit der zugehörigen Seite hinzu, die darin angezeigt werden soll
            KPage text = new pFormletterTextFields();
            SimpleTabItem tabText = new SimpleTabItem(IniParser.GetSetting("FORMLETTER", "formletterTextFields"), text);
            myTabList.Add(tabText);

            // Füge einen neuen Tab mit der zugehörigen Seite hinzu, die darin angezeigt werden soll
            KPage file = new pFormletterFileLinking();
            SimpleTabItem tabFile = new SimpleTabItem(IniParser.GetSetting("FORMLETTER", "formletterLinking"), file);
            myTabList.Add(tabFile);

            // Füge drei Buttons hinzu, damit der Speichern-Button unter jedem Tab gleich ist
            tabFilter.toolbar.addButton(IniParser.GetSetting("FORMLETTER", "formletterSave"), saveFormletterTemplate);
            tabFile.toolbar.addButton(IniParser.GetSetting("FORMLETTER", "formletterSave"), saveFormletterTemplate);
            tabText.toolbar.addButton(IniParser.GetSetting("FORMLETTER", "formletterSave"), saveFormletterTemplate);

            tabFilter.toolbar.addButton(IniParser.GetSetting("BUTTONS", "cancel"), cancelFormletterTemplate);
            tabFile.toolbar.addButton(IniParser.GetSetting("BUTTONS", "cancel"), cancelFormletterTemplate);
            tabText.toolbar.addButton(IniParser.GetSetting("BUTTONS", "cancel"), cancelFormletterTemplate);

            // Zeige die Tabs in einer SinglePage an
            SinglePage singlePage = new SinglePage(this, IniParser.GetSetting("FORMLETTER", "formletterNew"), myTabList);
        }
Exemple #5
0
        public Examples()
        {
            int x = 1;

            // Untermenü, nur Frame
            if (x == 1)
            {
                SubnavigationPage mySubnavigation = new SubnavigationPage("Seitentitel 123");

                Type pageType1 = typeof(KöTaf.WPFApplication.Views.Formletter.pFormletterAdministration);
                mySubnavigation.addSubnavigation("subpage1", pageType1);

                Type pageType2 = typeof(KöTaf.WPFApplication.Views.pWelcomeScreen);
                mySubnavigation.addSubnavigation("subpage2", pageType2);
            }


            // Untermenü mit Tabs und jeweils einem Frame
            // Jeder Frame hat eine Toolbar mit Buttons und SuchBox
            if (x == 2)
            {
                SubnavigationPage    mySubnavigation = new SubnavigationPage("Seitentitel 234");
                List <SimpleTabItem> myTabList       = new List <SimpleTabItem>();

                KPage p1 = new KöTaf.WPFApplication.Views.Formletter.pFormletterAdministration();
                KPage p2 = new KöTaf.WPFApplication.Views.pWelcomeScreen();

                SimpleTabItem simpleTabItem1 = new SimpleTabItem("tab1", p1);
                SimpleTabItem simpleTabItem2 = new SimpleTabItem("tab2", p2);

                myTabList.Add(simpleTabItem1);
                myTabList.Add(simpleTabItem2);

                simpleTabItem1.toolbar.addButton("Button1", myButtonFunction);
                simpleTabItem1.toolbar.addButton("Button2", myButtonFunction);
                simpleTabItem1.toolbar.addSearchPanel(mySearchFunction);

                simpleTabItem2.toolbar.addButton("Button3", myButtonFunction);
                simpleTabItem2.toolbar.addButton("Button4", myButtonFunction);
                simpleTabItem2.toolbar.addSearchPanel(mySearchFunction);

                mySubnavigation.addSubnavigation("sometabs", myTabList);
            }


            // Einfache Seite mit einem Frame
            if (x == 3)
            {
                KPage      pageFormletterAdmin = new KöTaf.WPFApplication.Views.Formletter.pFormletterAdministration();
                SinglePage singlePage          = new SinglePage("Formletter Admin", pageFormletterAdmin);
            }


            // Einfache Seite mit Tabs mit jeweils einem Frame
            if (x == 4)
            {
                List <SimpleTabItem> myTabList = new List <SimpleTabItem>();

                KPage p1 = new KöTaf.WPFApplication.Views.Formletter.pFormletterAdministration();
                myTabList.Add(new SimpleTabItem("tab1", p1));

                KPage p2 = new KöTaf.WPFApplication.Views.pWelcomeScreen();
                myTabList.Add(new SimpleTabItem("tab2", p2));

                SinglePage singlePage = new SinglePage(this, "Formletter Admin", myTabList);
            }
        }