diff --git a/JISP/Data/Ds.Designer.cs b/JISP/Data/Ds.Designer.cs index 8529c1c..c162b58 100644 --- a/JISP/Data/Ds.Designer.cs +++ b/JISP/Data/Ds.Designer.cs @@ -9968,6 +9968,8 @@ public partial class FormAutoFillsDataTable : global::System.Data.TypedTableBase private global::System.Data.DataColumn columnName; + private global::System.Data.DataColumn columnComment; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] public FormAutoFillsDataTable() { @@ -10017,6 +10019,14 @@ protected FormAutoFillsDataTable(global::System.Runtime.Serialization.Serializat } } + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] + public global::System.Data.DataColumn CommentColumn { + get { + return this.columnComment; + } + } + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] [global::System.ComponentModel.Browsable(false)] @@ -10054,11 +10064,12 @@ public void AddFormAutoFillsRow(FormAutoFillsRow row) { [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] - public FormAutoFillsRow AddFormAutoFillsRow(string Name) { + public FormAutoFillsRow AddFormAutoFillsRow(string Name, string Comment) { FormAutoFillsRow rowFormAutoFillsRow = ((FormAutoFillsRow)(this.NewRow())); object[] columnValuesArray = new object[] { null, - Name}; + Name, + Comment}; rowFormAutoFillsRow.ItemArray = columnValuesArray; this.Rows.Add(rowFormAutoFillsRow); return rowFormAutoFillsRow; @@ -10090,6 +10101,7 @@ public FormAutoFillsRow FindByIdFormAutoFill(int IdFormAutoFill) { internal void InitVars() { this.columnIdFormAutoFill = base.Columns["IdFormAutoFill"]; this.columnName = base.Columns["Name"]; + this.columnComment = base.Columns["Comment"]; } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] @@ -10099,6 +10111,8 @@ private void InitClass() { base.Columns.Add(this.columnIdFormAutoFill); this.columnName = new global::System.Data.DataColumn("Name", typeof(string), null, global::System.Data.MappingType.Element); base.Columns.Add(this.columnName); + this.columnComment = new global::System.Data.DataColumn("Comment", typeof(string), null, global::System.Data.MappingType.Element); + base.Columns.Add(this.columnComment); this.Constraints.Add(new global::System.Data.UniqueConstraint("Constraint1", new global::System.Data.DataColumn[] { this.columnIdFormAutoFill}, true)); this.Constraints.Add(new global::System.Data.UniqueConstraint("Constraint2", new global::System.Data.DataColumn[] { @@ -16299,6 +16313,34 @@ public string Name { } } + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] + public string Comment { + get { + try { + return ((string)(this[this.tableFormAutoFills.CommentColumn])); + } + catch (global::System.InvalidCastException e) { + throw new global::System.Data.StrongTypingException("The value for column \'Comment\' in table \'FormAutoFills\' is DBNull.", e); + } + } + set { + this[this.tableFormAutoFills.CommentColumn] = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] + public bool IsCommentNull() { + return this.IsNull(this.tableFormAutoFills.CommentColumn); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] + public void SetCommentNull() { + this[this.tableFormAutoFills.CommentColumn] = global::System.Convert.DBNull; + } + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] public FAF_ItemsRow[] GetFAF_ItemsRows() { diff --git a/JISP/Data/Ds.xsd b/JISP/Data/Ds.xsd index bfbc8d1..3a7cf11 100644 --- a/JISP/Data/Ds.xsd +++ b/JISP/Data/Ds.xsd @@ -388,22 +388,23 @@ - + - - + + + - + - - - - - + + + + + @@ -505,27 +506,27 @@ - + - + - - - - - - - - - - + + + + + + + + + + \ No newline at end of file diff --git a/JISP/Forms/FrmFormAutoInput.Designer.cs b/JISP/Forms/FrmFormAutoInput.Designer.cs index 7355a37..bd48075 100644 --- a/JISP/Forms/FrmFormAutoInput.Designer.cs +++ b/JISP/Forms/FrmFormAutoInput.Designer.cs @@ -35,11 +35,12 @@ private void InitializeComponent() System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle1 = new System.Windows.Forms.DataGridViewCellStyle(); System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle2 = new System.Windows.Forms.DataGridViewCellStyle(); this.tim = new System.Windows.Forms.Timer(this.components); - this.btnSnimanjeStartStop = new System.Windows.Forms.Button(); - this.btnPustanjeStartStop = new System.Windows.Forms.Button(); + this.btnSnimanjeStartStop = new JISP.Controls.UcButton(); + this.btnPustanjeStartStop = new JISP.Controls.UcButton(); this.numDelay = new System.Windows.Forms.NumericUpDown(); this.dgvFAFs = new JISP.Controls.UcDGV(); this.nameDataGridViewTextBoxColumn = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.dgvcFafComment = new System.Windows.Forms.DataGridViewTextBoxColumn(); this.bsFormAutoFills = new System.Windows.Forms.BindingSource(this.components); this.ds = new JISP.Data.Ds(); this.dgvItems = new JISP.Controls.UcDGV(); @@ -48,12 +49,14 @@ private void InitializeComponent() this.Comment = new System.Windows.Forms.DataGridViewTextBoxColumn(); this.bsFAFItems = new System.Windows.Forms.BindingSource(this.components); this.ucExitApp1 = new JISP.Controls.UcExitAppButton(); - this.btnObrisiStavku = new System.Windows.Forms.Button(); + this.btnObrisiStavku = new JISP.Controls.UcButton(); this.pnlLeft = new JISP.Controls.UcLeftPanel(); - this.btnPomeriStavkuNagore = new System.Windows.Forms.Button(); - this.btnPomeriStavkuNadole = new System.Windows.Forms.Button(); + this.chkPrikaziKursor = new System.Windows.Forms.CheckBox(); + this.btnPomeriStavkuNagore = new JISP.Controls.UcButton(); + this.btnPomeriStavkuNadole = new JISP.Controls.UcButton(); this.gbPustanje = new System.Windows.Forms.GroupBox(); this.splitContainer1 = new System.Windows.Forms.SplitContainer(); + this.ttPrikaziKursor = new System.Windows.Forms.ToolTip(this.components); label1 = new System.Windows.Forms.Label(); label2 = new System.Windows.Forms.Label(); label3 = new System.Windows.Forms.Label(); @@ -74,7 +77,7 @@ private void InitializeComponent() // label1 // label1.AutoSize = true; - label1.Location = new System.Drawing.Point(13, 113); + label1.Location = new System.Drawing.Point(13, 69); label1.Name = "label1"; label1.Size = new System.Drawing.Size(69, 18); label1.TabIndex = 7; @@ -105,11 +108,13 @@ private void InitializeComponent() // // btnSnimanjeStartStop // - this.btnSnimanjeStartStop.Location = new System.Drawing.Point(8, 134); + this.btnSnimanjeStartStop.Location = new System.Drawing.Point(8, 90); this.btnSnimanjeStartStop.Name = "btnSnimanjeStartStop"; this.btnSnimanjeStartStop.Size = new System.Drawing.Size(127, 34); this.btnSnimanjeStartStop.TabIndex = 0; this.btnSnimanjeStartStop.Text = "Start"; + this.btnSnimanjeStartStop.ToolTipText = "Zaustavljanje ili pokretanje procesa snimanja tj. dodavanja stavki (klikovi) u ru" + + "tinu tj. listu"; this.btnSnimanjeStartStop.UseVisualStyleBackColor = true; this.btnSnimanjeStartStop.Click += new System.EventHandler(this.BtnSnimanjeStartStop_Click); // @@ -120,11 +125,18 @@ private void InitializeComponent() this.btnPustanjeStartStop.Size = new System.Drawing.Size(117, 34); this.btnPustanjeStartStop.TabIndex = 1; this.btnPustanjeStartStop.Text = "Start"; + this.btnPustanjeStartStop.ToolTipText = "Zaustavljanje ili pokretanje procesa izvršavanja rutine: izvršavaju se sve stavke" + + " do kraja liste počevši od tekuće"; this.btnPustanjeStartStop.UseVisualStyleBackColor = true; this.btnPustanjeStartStop.Click += new System.EventHandler(this.BtnPustanjeStartStop_Click); // // numDelay // + this.numDelay.Increment = new decimal(new int[] { + 100, + 0, + 0, + 0}); this.numDelay.Location = new System.Drawing.Point(4, 83); this.numDelay.Maximum = new decimal(new int[] { 5000, @@ -144,6 +156,7 @@ private void InitializeComponent() 0, 0, 0}); + this.numDelay.ValueChanged += new System.EventHandler(this.NumDelay_ValueChanged); // // dgvFAFs // @@ -153,7 +166,8 @@ private void InitializeComponent() this.dgvFAFs.BackgroundColor = System.Drawing.Color.WhiteSmoke; this.dgvFAFs.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize; this.dgvFAFs.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] { - this.nameDataGridViewTextBoxColumn}); + this.nameDataGridViewTextBoxColumn, + this.dgvcFafComment}); this.dgvFAFs.ColumnsForCopyOnClick = null; this.dgvFAFs.CopyOnCellClick = false; this.dgvFAFs.CtrlDisplayPositionRowCount = null; @@ -168,10 +182,19 @@ private void InitializeComponent() // // nameDataGridViewTextBoxColumn // - this.nameDataGridViewTextBoxColumn.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.Fill; + this.nameDataGridViewTextBoxColumn.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.AllCells; this.nameDataGridViewTextBoxColumn.DataPropertyName = "Name"; this.nameDataGridViewTextBoxColumn.HeaderText = "Rutina"; this.nameDataGridViewTextBoxColumn.Name = "nameDataGridViewTextBoxColumn"; + this.nameDataGridViewTextBoxColumn.Width = 75; + // + // dgvcFafComment + // + this.dgvcFafComment.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.Fill; + this.dgvcFafComment.DataPropertyName = "Comment"; + this.dgvcFafComment.HeaderText = "Komentar"; + this.dgvcFafComment.MinimumWidth = 100; + this.dgvcFafComment.Name = "dgvcFafComment"; // // bsFormAutoFills // @@ -206,6 +229,7 @@ private void InitializeComponent() this.dgvItems.StandardSort = null; this.dgvItems.TabIndex = 4; this.dgvItems.CellDoubleClick += new System.Windows.Forms.DataGridViewCellEventHandler(this.DgvItems_CellDoubleClick); + this.dgvItems.SelectionChanged += new System.EventHandler(this.DgvItems_SelectionChanged); // // itemTypeDataGridViewTextBoxColumn // @@ -256,11 +280,13 @@ private void InitializeComponent() this.btnObrisiStavku.Size = new System.Drawing.Size(127, 34); this.btnObrisiStavku.TabIndex = 6; this.btnObrisiStavku.Text = "Obriši stavku"; + this.btnObrisiStavku.ToolTipText = "Brisanje selektovanih stavki"; this.btnObrisiStavku.UseVisualStyleBackColor = true; this.btnObrisiStavku.Click += new System.EventHandler(this.BtnObrisiStavku_Click); // // pnlLeft // + this.pnlLeft.Controls.Add(this.chkPrikaziKursor); this.pnlLeft.Controls.Add(this.btnPomeriStavkuNagore); this.pnlLeft.Controls.Add(this.btnPomeriStavkuNadole); this.pnlLeft.Controls.Add(this.gbPustanje); @@ -276,6 +302,16 @@ private void InitializeComponent() this.pnlLeft.Size = new System.Drawing.Size(146, 442); this.pnlLeft.TabIndex = 7; // + // chkPrikaziKursor + // + this.chkPrikaziKursor.AutoSize = true; + this.chkPrikaziKursor.Location = new System.Drawing.Point(8, 264); + this.chkPrikaziKursor.Name = "chkPrikaziKursor"; + this.chkPrikaziKursor.Size = new System.Drawing.Size(119, 22); + this.chkPrikaziKursor.TabIndex = 12; + this.chkPrikaziKursor.Text = "Prikaži kursor"; + this.chkPrikaziKursor.UseVisualStyleBackColor = true; + // // btnPomeriStavkuNagore // this.btnPomeriStavkuNagore.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left))); @@ -284,6 +320,7 @@ private void InitializeComponent() this.btnPomeriStavkuNagore.Size = new System.Drawing.Size(127, 34); this.btnPomeriStavkuNagore.TabIndex = 11; this.btnPomeriStavkuNagore.Text = "Pomeri stavku ↑"; + this.btnPomeriStavkuNagore.ToolTipText = "Pomeranje selektovane stavke u listi za 1 poziciju nagore"; this.btnPomeriStavkuNagore.UseVisualStyleBackColor = true; this.btnPomeriStavkuNagore.Click += new System.EventHandler(this.BtnPomeriStavkuNagore_Click); // @@ -295,6 +332,7 @@ private void InitializeComponent() this.btnPomeriStavkuNadole.Size = new System.Drawing.Size(127, 34); this.btnPomeriStavkuNadole.TabIndex = 10; this.btnPomeriStavkuNadole.Text = "Pomeri stavku ↓"; + this.btnPomeriStavkuNadole.ToolTipText = "Pomeranje selektovane stavke u listi za 1 poziciju nadole"; this.btnPomeriStavkuNadole.UseVisualStyleBackColor = true; this.btnPomeriStavkuNadole.Click += new System.EventHandler(this.BtnPomeriStavkuNadole_Click); // @@ -304,7 +342,7 @@ private void InitializeComponent() this.gbPustanje.Controls.Add(label2); this.gbPustanje.Controls.Add(this.btnPustanjeStartStop); this.gbPustanje.Controls.Add(this.numDelay); - this.gbPustanje.Location = new System.Drawing.Point(8, 186); + this.gbPustanje.Location = new System.Drawing.Point(8, 142); this.gbPustanje.Name = "gbPustanje"; this.gbPustanje.Size = new System.Drawing.Size(127, 116); this.gbPustanje.TabIndex = 9; @@ -330,6 +368,10 @@ private void InitializeComponent() this.splitContainer1.SplitterDistance = 168; this.splitContainer1.TabIndex = 8; // + // ttPrikaziKursor + // + this.ttPrikaziKursor.ToolTipTitle = "Prikazivanje kursora"; + // // FrmFormAutoInput // this.AutoScaleDimensions = new System.Drawing.SizeF(9F, 18F); @@ -365,24 +407,27 @@ private void InitializeComponent() #endregion private System.Windows.Forms.Timer tim; - private System.Windows.Forms.Button btnSnimanjeStartStop; - private System.Windows.Forms.Button btnPustanjeStartStop; + private Controls.UcButton btnSnimanjeStartStop; + private Controls.UcButton btnPustanjeStartStop; private System.Windows.Forms.NumericUpDown numDelay; private Controls.UcDGV dgvFAFs; private System.Windows.Forms.BindingSource bsFormAutoFills; private Data.Ds ds; private Controls.UcDGV dgvItems; private System.Windows.Forms.BindingSource bsFAFItems; - private System.Windows.Forms.DataGridViewTextBoxColumn nameDataGridViewTextBoxColumn; private Controls.UcExitAppButton ucExitApp1; - private System.Windows.Forms.Button btnObrisiStavku; + private Controls.UcButton btnObrisiStavku; private Controls.UcLeftPanel pnlLeft; private System.Windows.Forms.SplitContainer splitContainer1; private System.Windows.Forms.DataGridViewTextBoxColumn itemTypeDataGridViewTextBoxColumn; private System.Windows.Forms.DataGridViewTextBoxColumn contentDataGridViewTextBoxColumn; private System.Windows.Forms.DataGridViewTextBoxColumn Comment; private System.Windows.Forms.GroupBox gbPustanje; - private System.Windows.Forms.Button btnPomeriStavkuNagore; - private System.Windows.Forms.Button btnPomeriStavkuNadole; + private Controls.UcButton btnPomeriStavkuNagore; + private Controls.UcButton btnPomeriStavkuNadole; + private System.Windows.Forms.DataGridViewTextBoxColumn nameDataGridViewTextBoxColumn; + private System.Windows.Forms.DataGridViewTextBoxColumn dgvcFafComment; + private System.Windows.Forms.CheckBox chkPrikaziKursor; + private System.Windows.Forms.ToolTip ttPrikaziKursor; } } \ No newline at end of file diff --git a/JISP/Forms/FrmFormAutoInput.cs b/JISP/Forms/FrmFormAutoInput.cs index 64b700c..23da51f 100644 --- a/JISP/Forms/FrmFormAutoInput.cs +++ b/JISP/Forms/FrmFormAutoInput.cs @@ -17,11 +17,15 @@ public FrmFormAutoInput() private void FrmFormAutoInput_Load(object sender, EventArgs e) { - // PromenaSnimanje(); - - bsFormAutoFills.DataSource = AppData.Ds; - dgvFAFs.SelectionMode = dgvItems.SelectionMode = DataGridViewSelectionMode.FullRowSelect; - this.FormStandardSettings(); + try + { + numDelay.Value = int.Parse(AppData.LoadSett(string.Join(":", Name, numDelay.Name), "1000")); + bsFormAutoFills.DataSource = AppData.Ds; + dgvFAFs.SelectionMode = dgvItems.SelectionMode = DataGridViewSelectionMode.FullRowSelect; + ttPrikaziKursor.SetToolTip(chkPrikaziKursor, "Prikazivanje kursora na zadatoj poziciji za Klik stavke u fazi čekanja (ne snimanja ili puštanja)."); + this.FormStandardSettings(); + } + catch (Exception ex) { Utils.ShowMbox(ex, Text); } } [DllImport("user32.dll", CharSet = CharSet.Auto, CallingConvention = CallingConvention.StdCall)] @@ -96,6 +100,8 @@ private void Tim_Tick(object sender, EventArgs e) private void NamestiKursor(Ds.FAF_ItemsRow item, bool uradiKlik) { + if (item.ItemType != AkcijaTip.Klik.ToString()) + return; var koordinate = item.Content.Split(new char[] { ',' }); if (koordinate.Length != 2) throw new Exception("Tacka na ekranu na koju treba kliknuti mora da sadrži 2 koordinate."); @@ -163,17 +169,15 @@ private void BtnSnimanjeStartStop_Click(object sender, EventArgs e) private void BtnPustanjeStartStop_Click(object sender, EventArgs e) { - PromenaPustanje(); - //if (tekuciProces == Proces.Pustanje) - //{ - // tim.Interval = (int)numDelay.Value; - // tim.Start(); - //} + var idx = bsFAFItems.Position; + if (pustanje == ProcesKomanda.Stop || + (idx == 0 || Utils.ShowMboxYesNo($"Selektovana stavka je {idx + 1} po redu. Da li ste sigurni da želite da pokrenete rutinu od te stavke?" + , "Pokretanje rutine (početna pozicija)") == DialogResult.Yes)) + PromenaPustanje(); } private void DgvItems_CellDoubleClick(object sender, DataGridViewCellEventArgs e) { - //B if (e.RowIndex != -1 && bsFAFItems.Position < bsFAFItems.Count - 1) if (e.RowIndex != -1 && !dgvItems.SelectedRows[0].IsNewRow) try { @@ -205,10 +209,10 @@ private void BtnObrisiStavku_Click(object sender, EventArgs e) private void BtnPomeriStavkuNagore_Click(object sender, EventArgs e) { var idxRow = bsFAFItems.Position; - if (dgvItems.SelectedRows[0].IsNewRow) - return; if (idxRow == 0) return; + if (dgvItems.SelectedRows.Count != 1 || dgvItems.SelectedRows[0].IsNewRow) + return; for (int i = 0; i <= 2; i++) ZameniVrednostiCelija(i, -1); bsFAFItems.MovePrevious(); @@ -224,13 +228,27 @@ private void ZameniVrednostiCelija(int idxCol, int deltaRow) private void BtnPomeriStavkuNadole_Click(object sender, EventArgs e) { - if (dgvItems.SelectedRows[0].IsNewRow) - return; if (bsFAFItems.Position == bsFAFItems.Count - 1) return; + if (dgvItems.SelectedRows.Count != 1 || dgvItems.SelectedRows[0].IsNewRow) + return; for (int i = 0; i <= 2; i++) ZameniVrednostiCelija(i, +1); bsFAFItems.MoveNext(); } + + private void DgvItems_SelectionChanged(object sender, EventArgs e) + { + if (tekuciProces != Proces.Cekanje || dgvItems.CurrentRow == null || !chkPrikaziKursor.Checked) + return; + var item = dgvItems.CurrDataRow(); + if (item.ItemType == AkcijaTip.Klik.ToString()) + NamestiKursor(item, false); + } + + private void NumDelay_ValueChanged(object sender, EventArgs e) + { + AppData.SaveSett(string.Join(":", Name, numDelay.Name), numDelay.Value.ToString()); + } } } diff --git a/JISP/Forms/FrmFormAutoInput.resx b/JISP/Forms/FrmFormAutoInput.resx index e75a668..e3bbdc5 100644 --- a/JISP/Forms/FrmFormAutoInput.resx +++ b/JISP/Forms/FrmFormAutoInput.resx @@ -129,18 +129,27 @@ 17, 17 + + True + 150, 17 86, 17 + + 86, 17 + True 289, 17 + + 403, 17 + 64 diff --git a/JISP/Forms/FrmMain.Designer.cs b/JISP/Forms/FrmMain.Designer.cs index cadb03d..d57ce25 100644 --- a/JISP/Forms/FrmMain.Designer.cs +++ b/JISP/Forms/FrmMain.Designer.cs @@ -46,6 +46,7 @@ private void InitializeComponent() this.btnProstorije = new JISP.Controls.UcButton(); this.btnPrikaziPoruke = new System.Windows.Forms.Button(); this.btnTest = new JISP.Controls.UcButton(); + this.btnFormAutoInput = new JISP.Controls.UcButton(); label2 = new System.Windows.Forms.Label(); label1 = new System.Windows.Forms.Label(); label3 = new System.Windows.Forms.Label(); @@ -55,7 +56,7 @@ private void InitializeComponent() // label2 // label2.AutoSize = true; - label2.Location = new System.Drawing.Point(69, 205); + label2.Location = new System.Drawing.Point(69, 227); label2.Name = "label2"; label2.Size = new System.Drawing.Size(143, 18); label2.TabIndex = 6; @@ -64,7 +65,7 @@ private void InitializeComponent() // label1 // label1.AutoSize = true; - label1.Location = new System.Drawing.Point(69, 259); + label1.Location = new System.Drawing.Point(69, 281); label1.Name = "label1"; label1.Size = new System.Drawing.Size(120, 18); label1.TabIndex = 8; @@ -73,7 +74,7 @@ private void InitializeComponent() // label3 // label3.AutoSize = true; - label3.Location = new System.Drawing.Point(69, 286); + label3.Location = new System.Drawing.Point(69, 308); label3.Name = "label3"; label3.Size = new System.Drawing.Size(118, 18); label3.TabIndex = 10; @@ -82,7 +83,7 @@ private void InitializeComponent() // label4 // label4.AutoSize = true; - label4.Location = new System.Drawing.Point(69, 232); + label4.Location = new System.Drawing.Point(69, 254); label4.Name = "label4"; label4.Size = new System.Drawing.Size(60, 18); label4.TabIndex = 6; @@ -91,7 +92,7 @@ private void InitializeComponent() // lblApiTokenCaption // this.lblApiTokenCaption.AutoSize = true; - this.lblApiTokenCaption.Location = new System.Drawing.Point(69, 179); + this.lblApiTokenCaption.Location = new System.Drawing.Point(69, 201); this.lblApiTokenCaption.Name = "lblApiTokenCaption"; this.lblApiTokenCaption.Size = new System.Drawing.Size(80, 18); this.lblApiTokenCaption.TabIndex = 4; @@ -101,20 +102,20 @@ private void InitializeComponent() // this.lblApiToken.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; this.lblApiToken.Cursor = System.Windows.Forms.Cursors.Hand; - this.lblApiToken.Location = new System.Drawing.Point(210, 176); + this.lblApiToken.Location = new System.Drawing.Point(210, 198); this.lblApiToken.Name = "lblApiToken"; this.lblApiToken.Size = new System.Drawing.Size(338, 24); - this.lblApiToken.TabIndex = 4; + this.lblApiToken.TabIndex = 6; this.lblApiToken.Click += new System.EventHandler(this.LblApiToken_Click); // // lblDataFolder // this.lblDataFolder.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; this.lblDataFolder.Cursor = System.Windows.Forms.Cursors.Hand; - this.lblDataFolder.Location = new System.Drawing.Point(210, 202); + this.lblDataFolder.Location = new System.Drawing.Point(210, 224); this.lblDataFolder.Name = "lblDataFolder"; this.lblDataFolder.Size = new System.Drawing.Size(338, 24); - this.lblDataFolder.TabIndex = 5; + this.lblDataFolder.TabIndex = 7; this.lblDataFolder.Click += new System.EventHandler(this.LblDataFolder_Click); // // cmbBrowser @@ -124,18 +125,18 @@ private void InitializeComponent() this.cmbBrowser.Items.AddRange(new object[] { "Chrome", "MS Edge"}); - this.cmbBrowser.Location = new System.Drawing.Point(210, 256); + this.cmbBrowser.Location = new System.Drawing.Point(210, 278); this.cmbBrowser.Name = "cmbBrowser"; this.cmbBrowser.Size = new System.Drawing.Size(121, 25); - this.cmbBrowser.TabIndex = 6; + this.cmbBrowser.TabIndex = 9; this.cmbBrowser.SelectedIndexChanged += new System.EventHandler(this.CmbBrowser_SelectedIndexChanged); // // btnBackup // - this.btnBackup.Location = new System.Drawing.Point(413, 90); + this.btnBackup.Location = new System.Drawing.Point(413, 36); this.btnBackup.Name = "btnBackup"; this.btnBackup.Size = new System.Drawing.Size(135, 48); - this.btnBackup.TabIndex = 3; + this.btnBackup.TabIndex = 4; this.btnBackup.Text = "BackUp"; this.btnBackup.ToolTipText = "Čuvanje podataka iz DataSet-a u posebnom XML fajlu."; this.btnBackup.UseVisualStyleBackColor = true; @@ -143,10 +144,10 @@ private void InitializeComponent() // // btnZaposleni // - this.btnZaposleni.Location = new System.Drawing.Point(69, 90); + this.btnZaposleni.Location = new System.Drawing.Point(69, 36); this.btnZaposleni.Name = "btnZaposleni"; this.btnZaposleni.Size = new System.Drawing.Size(135, 48); - this.btnZaposleni.TabIndex = 1; + this.btnZaposleni.TabIndex = 0; this.btnZaposleni.Text = "&Zaposleni"; this.btnZaposleni.ToolTipText = null; this.btnZaposleni.UseVisualStyleBackColor = true; @@ -154,10 +155,10 @@ private void InitializeComponent() // // btnUcenici // - this.btnUcenici.Location = new System.Drawing.Point(69, 36); + this.btnUcenici.Location = new System.Drawing.Point(69, 90); this.btnUcenici.Name = "btnUcenici"; this.btnUcenici.Size = new System.Drawing.Size(135, 48); - this.btnUcenici.TabIndex = 0; + this.btnUcenici.TabIndex = 1; this.btnUcenici.Text = "&Učenici"; this.btnUcenici.ToolTipText = null; this.btnUcenici.UseVisualStyleBackColor = true; @@ -170,15 +171,15 @@ private void InitializeComponent() this.cmbSkolskaGodina.Items.AddRange(new object[] { "Chrome", "MS Edge"}); - this.cmbSkolskaGodina.Location = new System.Drawing.Point(210, 283); + this.cmbSkolskaGodina.Location = new System.Drawing.Point(210, 305); this.cmbSkolskaGodina.Name = "cmbSkolskaGodina"; this.cmbSkolskaGodina.Size = new System.Drawing.Size(121, 25); - this.cmbSkolskaGodina.TabIndex = 7; + this.cmbSkolskaGodina.TabIndex = 10; this.cmbSkolskaGodina.SelectedIndexChanged += new System.EventHandler(this.CmbSkolskaGodina_SelectedIndexChanged); // // btnProstorije // - this.btnProstorije.Location = new System.Drawing.Point(413, 36); + this.btnProstorije.Location = new System.Drawing.Point(241, 36); this.btnProstorije.Name = "btnProstorije"; this.btnProstorije.Size = new System.Drawing.Size(135, 48); this.btnProstorije.TabIndex = 2; @@ -189,31 +190,43 @@ private void InitializeComponent() // // btnPrikaziPoruke // - this.btnPrikaziPoruke.Location = new System.Drawing.Point(209, 228); + this.btnPrikaziPoruke.Location = new System.Drawing.Point(209, 250); this.btnPrikaziPoruke.Name = "btnPrikaziPoruke"; this.btnPrikaziPoruke.Size = new System.Drawing.Size(121, 26); - this.btnPrikaziPoruke.TabIndex = 11; + this.btnPrikaziPoruke.TabIndex = 8; this.btnPrikaziPoruke.Text = "Prikaži poruke"; this.btnPrikaziPoruke.UseVisualStyleBackColor = true; this.btnPrikaziPoruke.Click += new System.EventHandler(this.BtnPrikaziPoruke_Click); // // btnTest // - this.btnTest.Location = new System.Drawing.Point(413, 144); + this.btnTest.Location = new System.Drawing.Point(413, 109); this.btnTest.Name = "btnTest"; this.btnTest.Size = new System.Drawing.Size(135, 29); - this.btnTest.TabIndex = 12; + this.btnTest.TabIndex = 5; this.btnTest.Text = "Test"; this.btnTest.ToolTipText = "Čuvanje podataka iz DataSet-a u posebnom XML fajlu."; this.btnTest.UseVisualStyleBackColor = true; this.btnTest.Visible = false; this.btnTest.Click += new System.EventHandler(this.BtnTest_Click); // + // btnFormAutoInput + // + this.btnFormAutoInput.Location = new System.Drawing.Point(241, 90); + this.btnFormAutoInput.Name = "btnFormAutoInput"; + this.btnFormAutoInput.Size = new System.Drawing.Size(135, 48); + this.btnFormAutoInput.TabIndex = 3; + this.btnFormAutoInput.Text = "&Form Auto Input"; + this.btnFormAutoInput.ToolTipText = "Automatsko, šablonsko popunjavanje formi\r\n"; + this.btnFormAutoInput.UseVisualStyleBackColor = true; + this.btnFormAutoInput.Click += new System.EventHandler(this.BtnFormAutoInput_Click); + // // FrmMain // this.AutoScaleDimensions = new System.Drawing.SizeF(8F, 17F); this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; - this.ClientSize = new System.Drawing.Size(617, 340); + this.ClientSize = new System.Drawing.Size(617, 364); + this.Controls.Add(this.btnFormAutoInput); this.Controls.Add(this.btnTest); this.Controls.Add(this.btnPrikaziPoruke); this.Controls.Add(this.btnProstorije); @@ -257,6 +270,7 @@ private void InitializeComponent() private Controls.UcButton btnProstorije; private System.Windows.Forms.Button btnPrikaziPoruke; private Controls.UcButton btnTest; + private Controls.UcButton btnFormAutoInput; } } diff --git a/JISP/Forms/FrmMain.cs b/JISP/Forms/FrmMain.cs index c0fa758..3365d6f 100644 --- a/JISP/Forms/FrmMain.cs +++ b/JISP/Forms/FrmMain.cs @@ -56,7 +56,6 @@ private void FrmMain_Load(object sender, EventArgs e) Utils.ShowMbox(ex, "Učitavanje podataka iz XMLa"); Close(); } - ttDataFolder.SetToolTip(lblDataFolder, "Klik za otvaranje foldera sa podacima"); ttApiToken.SetToolTip(lblApiToken, "Klik za paste Web API Token-a (Copy request headers)"); lblApiToken.Text = WebApi.TokenDisplay; @@ -120,6 +119,11 @@ private void BtnBackup_Click(object sender, EventArgs e) BackupData.CreateBackup(); } + private void BtnFormAutoInput_Click(object sender, EventArgs e) + { + Utils.ShowForm(typeof(FrmFormAutoInput)); + } + public void FrmChild_FormClosed(object sender, FormClosedEventArgs e) { var floatingForms = new[] { nameof(FrmSistematizacija), nameof(FrmRacunari) }; @@ -185,8 +189,6 @@ private void BtnTest_Click(object sender, EventArgs e) { try { - Utils.ShowForm(typeof(FrmFormAutoInput)); - // var sb = new StringBuilder(); // foreach (var z in AppData.Ds.Zaposleni) // {