diff --git a/AA-Forms/FormEinstellung.Designer.cs b/AA-Forms/FormEinstellung.Designer.cs index 2d811f9..970dc4f 100644 --- a/AA-Forms/FormEinstellung.Designer.cs +++ b/AA-Forms/FormEinstellung.Designer.cs @@ -105,6 +105,10 @@ this.label15 = new System.Windows.Forms.Label(); this.tabPageAllgemein = new System.Windows.Forms.TabPage(); this.panelButtons = new System.Windows.Forms.Panel(); + this.comboBoxTourenlisteDrucker = new System.Windows.Forms.ComboBox(); + this.label24 = new System.Windows.Forms.Label(); + this.groupBoxPfade = new System.Windows.Forms.GroupBox(); + this.tabPageExpedit = new System.Windows.Forms.TabPage(); ((System.ComponentModel.ISupportInitialize)(this.numUpDownMinWert)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.numUpDownMaxWert)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.numUpDownAnzahl)).BeginInit(); @@ -120,6 +124,7 @@ this.groupBoxRegeln.SuspendLayout(); this.tabPageAllgemein.SuspendLayout(); this.panelButtons.SuspendLayout(); + this.groupBoxPfade.SuspendLayout(); this.SuspendLayout(); // // buttonVarKost @@ -514,7 +519,7 @@ // textBoxSortiment // this.textBoxSortiment.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.textBoxSortiment.Location = new System.Drawing.Point(181, 75); + this.textBoxSortiment.Location = new System.Drawing.Point(170, 34); this.textBoxSortiment.Margin = new System.Windows.Forms.Padding(2); this.textBoxSortiment.Name = "textBoxSortiment"; this.textBoxSortiment.Size = new System.Drawing.Size(422, 26); @@ -527,7 +532,7 @@ // textBoxRatingbild // this.textBoxRatingbild.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.textBoxRatingbild.Location = new System.Drawing.Point(181, 104); + this.textBoxRatingbild.Location = new System.Drawing.Point(170, 63); this.textBoxRatingbild.Margin = new System.Windows.Forms.Padding(2); this.textBoxRatingbild.Name = "textBoxRatingbild"; this.textBoxRatingbild.Size = new System.Drawing.Size(422, 26); @@ -546,7 +551,7 @@ this.buttonSortiment.FlatStyle = System.Windows.Forms.FlatStyle.Flat; this.buttonSortiment.Font = new System.Drawing.Font("Microsoft Sans Serif", 7.8F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.buttonSortiment.ForeColor = System.Drawing.Color.White; - this.buttonSortiment.Location = new System.Drawing.Point(16, 75); + this.buttonSortiment.Location = new System.Drawing.Point(5, 34); this.buttonSortiment.Margin = new System.Windows.Forms.Padding(2); this.buttonSortiment.Name = "buttonSortiment"; this.buttonSortiment.Size = new System.Drawing.Size(160, 24); @@ -564,7 +569,7 @@ this.buttonRatingbild.FlatStyle = System.Windows.Forms.FlatStyle.Flat; this.buttonRatingbild.Font = new System.Drawing.Font("Microsoft Sans Serif", 7.8F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.buttonRatingbild.ForeColor = System.Drawing.Color.White; - this.buttonRatingbild.Location = new System.Drawing.Point(16, 104); + this.buttonRatingbild.Location = new System.Drawing.Point(5, 63); this.buttonRatingbild.Margin = new System.Windows.Forms.Padding(2); this.buttonRatingbild.Name = "buttonRatingbild"; this.buttonRatingbild.Size = new System.Drawing.Size(160, 24); @@ -795,7 +800,7 @@ // this.label13.AutoSize = true; this.label13.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.label13.Location = new System.Drawing.Point(22, 37); + this.label13.Location = new System.Drawing.Point(5, 37); this.label13.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0); this.label13.Name = "label13"; this.label13.Size = new System.Drawing.Size(73, 13); @@ -806,7 +811,7 @@ // this.label14.AutoSize = true; this.label14.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.label14.Location = new System.Drawing.Point(22, 64); + this.label14.Location = new System.Drawing.Point(5, 64); this.label14.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0); this.label14.Name = "label14"; this.label14.Size = new System.Drawing.Size(78, 13); @@ -833,6 +838,8 @@ // // groupBoxDrucker // + this.groupBoxDrucker.Controls.Add(this.comboBoxTourenlisteDrucker); + this.groupBoxDrucker.Controls.Add(this.label24); this.groupBoxDrucker.Controls.Add(this.numericUpDownSWSKopien); this.groupBoxDrucker.Controls.Add(this.label1); this.groupBoxDrucker.Controls.Add(this.comboBoxSWSDrucker); @@ -842,7 +849,7 @@ this.groupBoxDrucker.Font = new System.Drawing.Font("Microsoft Sans Serif", 15.75F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.groupBoxDrucker.Location = new System.Drawing.Point(14, 32); this.groupBoxDrucker.Name = "groupBoxDrucker"; - this.groupBoxDrucker.Size = new System.Drawing.Size(547, 90); + this.groupBoxDrucker.Size = new System.Drawing.Size(547, 123); this.groupBoxDrucker.TabIndex = 48; this.groupBoxDrucker.TabStop = false; this.groupBoxDrucker.Text = "Standart Drucker"; @@ -871,11 +878,12 @@ this.tabControlEinstellung.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) | System.Windows.Forms.AnchorStyles.Left) | System.Windows.Forms.AnchorStyles.Right))); + this.tabControlEinstellung.Controls.Add(this.tabPageAllgemein); this.tabControlEinstellung.Controls.Add(this.tabPageFarben); this.tabControlEinstellung.Controls.Add(this.tabPageDeckungsbeitrag); this.tabControlEinstellung.Controls.Add(this.tabPageDrucker); this.tabControlEinstellung.Controls.Add(this.tabPageTourenplanung); - this.tabControlEinstellung.Controls.Add(this.tabPageAllgemein); + this.tabControlEinstellung.Controls.Add(this.tabPageExpedit); this.tabControlEinstellung.Location = new System.Drawing.Point(0, 0); this.tabControlEinstellung.Name = "tabControlEinstellung"; this.tabControlEinstellung.SelectedIndex = 0; @@ -1137,10 +1145,7 @@ // // tabPageAllgemein // - this.tabPageAllgemein.Controls.Add(this.buttonSortiment); - this.tabPageAllgemein.Controls.Add(this.textBoxSortiment); - this.tabPageAllgemein.Controls.Add(this.textBoxRatingbild); - this.tabPageAllgemein.Controls.Add(this.buttonRatingbild); + this.tabPageAllgemein.Controls.Add(this.groupBoxPfade); this.tabPageAllgemein.Location = new System.Drawing.Point(4, 22); this.tabPageAllgemein.Name = "tabPageAllgemein"; this.tabPageAllgemein.Size = new System.Drawing.Size(1184, 597); @@ -1158,6 +1163,49 @@ this.panelButtons.Size = new System.Drawing.Size(1192, 49); this.panelButtons.TabIndex = 50; // + // comboBoxTourenlisteDrucker + // + this.comboBoxTourenlisteDrucker.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.comboBoxTourenlisteDrucker.FormattingEnabled = true; + this.comboBoxTourenlisteDrucker.Location = new System.Drawing.Point(123, 83); + this.comboBoxTourenlisteDrucker.Name = "comboBoxTourenlisteDrucker"; + this.comboBoxTourenlisteDrucker.Size = new System.Drawing.Size(195, 21); + this.comboBoxTourenlisteDrucker.TabIndex = 51; + // + // label24 + // + this.label24.AutoSize = true; + this.label24.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.label24.Location = new System.Drawing.Point(5, 91); + this.label24.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0); + this.label24.Name = "label24"; + this.label24.Size = new System.Drawing.Size(100, 13); + this.label24.TabIndex = 50; + this.label24.Text = "Tourenliste-Drucker"; + // + // groupBoxPfade + // + this.groupBoxPfade.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left))); + this.groupBoxPfade.Controls.Add(this.textBoxSortiment); + this.groupBoxPfade.Controls.Add(this.buttonSortiment); + this.groupBoxPfade.Controls.Add(this.buttonRatingbild); + this.groupBoxPfade.Controls.Add(this.textBoxRatingbild); + this.groupBoxPfade.Location = new System.Drawing.Point(8, 454); + this.groupBoxPfade.Name = "groupBoxPfade"; + this.groupBoxPfade.Size = new System.Drawing.Size(652, 131); + this.groupBoxPfade.TabIndex = 34; + this.groupBoxPfade.TabStop = false; + this.groupBoxPfade.Text = "Pfade für Dokumente"; + // + // tabPageExpedit + // + this.tabPageExpedit.Location = new System.Drawing.Point(4, 22); + this.tabPageExpedit.Name = "tabPageExpedit"; + this.tabPageExpedit.Size = new System.Drawing.Size(1184, 597); + this.tabPageExpedit.TabIndex = 5; + this.tabPageExpedit.Text = "Expedit"; + this.tabPageExpedit.UseVisualStyleBackColor = true; + // // FormEinstellung // this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); @@ -1191,8 +1239,9 @@ this.groupBoxRegeln.ResumeLayout(false); this.groupBoxRegeln.PerformLayout(); this.tabPageAllgemein.ResumeLayout(false); - this.tabPageAllgemein.PerformLayout(); this.panelButtons.ResumeLayout(false); + this.groupBoxPfade.ResumeLayout(false); + this.groupBoxPfade.PerformLayout(); this.ResumeLayout(false); } @@ -1275,5 +1324,9 @@ private System.Windows.Forms.ComboBox comboBox3; private System.Windows.Forms.ComboBox comboBox4; private System.Windows.Forms.Label label22; + private System.Windows.Forms.ComboBox comboBoxTourenlisteDrucker; + private System.Windows.Forms.Label label24; + private System.Windows.Forms.GroupBox groupBoxPfade; + private System.Windows.Forms.TabPage tabPageExpedit; } } \ No newline at end of file diff --git a/AA-Forms/FormEinstellung.cs b/AA-Forms/FormEinstellung.cs index 4a1e8ef..1b66028 100644 --- a/AA-Forms/FormEinstellung.cs +++ b/AA-Forms/FormEinstellung.cs @@ -1,4 +1,5 @@ -using Deckungsbeitrag.Properties; +using DatenDB; +using Deckungsbeitrag.Properties; using System; using System.Collections.Generic; using System.ComponentModel; @@ -21,6 +22,7 @@ namespace Deckungsbeitrag string fixmietkosten = ConfigurationManager.AppSettings["FixMiete"]; public bool changed = false; public bool validating = true; + private Benutzer benutzer; public FormEinstellung() { @@ -35,12 +37,15 @@ namespace Deckungsbeitrag } else { - if (x.GetType() == typeof(FormExpedit)) + if (x.GetType() == typeof(Benutzer)) { - foreach(Control ctr in this.Controls) + this.benutzer = (Benutzer)x; + if (benutzer.Rolle == BenutzerRolle.Expedit) { - if (ctr.Name.Contains("Drucker") || ctr.Name.Contains("Speichern") || ctr.Name.Contains("Abbrechen")) ctr.Enabled = true; - else ctr.Enabled = false; + foreach (TabPage tP in this.tabControlEinstellung.TabPages) + { + if (!tP.Name.Contains("Drucker")) this.tabControlEinstellung.Controls.Remove(tP); + } } } } @@ -53,6 +58,7 @@ namespace Deckungsbeitrag { this.comboBoxEtikettDrucker.Items.Add(printer); this.comboBoxSWSDrucker.Items.Add(printer); + this.comboBoxTourenlisteDrucker.Items.Add(printer); } @@ -74,8 +80,10 @@ namespace Deckungsbeitrag // Ab hier wurde bereits auf UserSettingsManager umgebaut. this.comboBoxEtikettDrucker.SelectedText = _settings.DruckerEtikett; + this.comboBoxTourenlisteDrucker.SelectedText = _settings.DruckerTourenListe; this.comboBoxSWSDrucker.SelectedText = _settings.DruckerSWS; this.numericUpDownSWSKopien.Value = _settings.CopiesSWS; + foreach (Button btn in this.groupBoxFarben.Controls.OfType